Changeset 4316 in vbox
- Timestamp:
- Aug 23, 2007 3:02:45 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23846
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/GuestImpl.cpp
r4314 r4316 199 199 } 200 200 201 STDMETHODIMP Guest::GetGuestStatistic(GuestStatisticType_T statistic, ULONG *aStatVal) 202 { 203 if (!aStatVal) 204 return E_INVALIDARG; 205 206 switch(statistic) 207 { 208 case GuestStatisticType_CPULoad: 209 case GuestStatisticType_Threads: 210 case GuestStatisticType_Processes: 211 case GuestStatisticType_PhysMemTotal: 212 case GuestStatisticType_PhysMemAvailable: 213 case GuestStatisticType_PageFileSize: 214 *aStatVal = 0; 215 break; 216 217 default: 218 AssertFailed(); 219 return E_INVALIDARG; 220 } 221 return S_OK; 222 } 223 224 STDMETHODIMP Guest::SetGuestStatistic(GuestStatisticType_T statistic, ULONG aStatVal) 225 { 226 switch(statistic) 227 { 228 case GuestStatisticType_CPULoad: 229 case GuestStatisticType_Threads: 230 case GuestStatisticType_Processes: 231 case GuestStatisticType_PhysMemTotal: 232 case GuestStatisticType_PhysMemAvailable: 233 case GuestStatisticType_PageFileSize: 234 break; 235 236 default: 237 AssertFailed(); 238 return E_INVALIDARG; 239 } 240 return S_OK; 241 } 201 242 202 243 // public methods only for internal purposes -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r4314 r4316 407 407 </enum> 408 408 409 <enum 410 name="GuestStatisticType" 411 uuid="da89a1b7-e602-45ac-84b7-29c9d12b92d5" 412 > 413 <const name="CPULoad" value="0"> 414 <desc> 415 Current CPU load (0-100%). 416 </desc> 417 </const> 418 <const name="Threads" value="1"> 419 <desc> 420 Total number of threads in the system. 421 </desc> 422 </const> 423 <const name="Processes" value="2"> 424 <desc> 425 Total number of processes in the system. 426 </desc> 427 </const> 428 <const name="PhysMemTotal" value="3"> 429 <desc> 430 Total physical memory in megabytes. 431 </desc> 432 </const> 433 <const name="PhysMemAvailable" value="4"> 434 <desc> 435 Free physical memory in megabytes. 436 </desc> 437 </const> 438 <const name="PageFileSize" value="5"> 439 <desc> 440 Pagefile size in megabytes. 441 </desc> 442 </const> 443 </enum> 444 409 445 <!-- 410 446 // IVirtualBoxErrorInfo … … 4401 4437 </method> 4402 4438 4439 <method name="getGuestStatistic"> 4440 <desc> 4441 Query specified guest statistics as reported by the VirtualBox Additions. 4442 </desc> 4443 <param name="statistic" type="GuestStatisticType" dir="in"> 4444 <desc>Statistic type.</desc> 4445 </param> 4446 <param name="statVal" type="unsigned long" dir="out"> 4447 <desc>Statistics value</desc> 4448 </param> 4449 </method> 4450 4403 4451 </interface> 4404 4452 -
trunk/src/VBox/Main/include/GuestImpl.h
r4314 r4316 62 62 STDMETHOD(SetCredentials)(INPTR BSTR aUserName, INPTR BSTR aPassword, 63 63 INPTR BSTR aDomain, BOOL aAllowInteractiveLogon); 64 STDMETHOD(GetGuestStatistic)(GuestStatisticType_T statistic, ULONG *aStatVal); 64 65 65 66 // public methods that are not in IDL … … 67 68 68 69 void setSupportsSeamless (BOOL aSupportsSeamless); 70 71 STDMETHOD(SetGuestStatistic)(GuestStatisticType_T statistic, ULONG aStatVal); 69 72 70 73 // for VirtualBoxSupportErrorInfoImpl
Note:
See TracChangeset
for help on using the changeset viewer.