Changeset 32086 in vbox for trunk/src/VBox
- Timestamp:
- Aug 30, 2010 12:08:30 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r32020 r32086 1933 1933 } 1934 1934 1935 ULONG guestRunLevel;1935 AdditionsRunLevelType_T guestRunLevel; /** @todo Add a runlevel-to-string (e.g. 0 = "None") method? */ 1936 1936 rc = guest->COMGETTER(AdditionsRunLevel)(&guestRunLevel); 1937 1937 if (SUCCEEDED(rc)) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r32020 r32086 104 104 105 105 /* Guest additions state getters: */ 106 bool isGuestAdditionsActive() const { return (m_ulGuestAdditionsRunLevel > 0); }106 bool isGuestAdditionsActive() const { return (m_ulGuestAdditionsRunLevel > AdditionsRunLevelType_None); } 107 107 bool isGuestSupportsGraphics() const { return isGuestAdditionsActive() && m_fIsGuestSupportsGraphics; } 108 108 bool isGuestSupportsSeamless() const { return isGuestSupportsGraphics() && m_fIsGuestSupportsSeamless; } -
trunk/src/VBox/Main/GuestImpl.cpp
r32020 r32086 160 160 } 161 161 162 STDMETHODIMP Guest::COMGETTER(AdditionsRunLevel) ( ULONG*aRunLevel)162 STDMETHODIMP Guest::COMGETTER(AdditionsRunLevel) (AdditionsRunLevelType_T *aRunLevel) 163 163 { 164 164 AutoCaller autoCaller(this); … … 184 184 if ( mData.mAdditionsVersion.isEmpty() 185 185 /* Only try alternative way if GA are active! */ 186 && mData.mAdditionsRunLevel > VBoxGuestAdditionsRunLevel_None)186 && mData.mAdditionsRunLevel > AdditionsRunLevelType_None) 187 187 { 188 188 /* … … 429 429 } 430 430 431 STDMETHODIMP Guest::GetAdditionsStatus( ULONGaLevel, BOOL *aActive)431 STDMETHODIMP Guest::GetAdditionsStatus(AdditionsRunLevelType_T aLevel, BOOL *aActive) 432 432 { 433 433 AutoCaller autoCaller(this); … … 439 439 switch (aLevel) 440 440 { 441 case 0: /* System */442 *aActive = (mData.mAdditionsRunLevel > VBoxGuestAdditionsRunLevel_None);441 case AdditionsRunLevelType_System: 442 *aActive = (mData.mAdditionsRunLevel > AdditionsRunLevelType_None); 443 443 break; 444 444 445 case 1: /* Userland */446 *aActive = (mData.mAdditionsRunLevel >= VBoxGuestAdditionsRunLevel_Userland);445 case AdditionsRunLevelType_Userland: 446 *aActive = (mData.mAdditionsRunLevel >= AdditionsRunLevelType_Userland); 447 447 break; 448 448 449 case 2: /* Desktop */450 *aActive = (mData.mAdditionsRunLevel >= VBoxGuestAdditionsRunLevel_Desktop);449 case AdditionsRunLevelType_Desktop: 450 *aActive = (mData.mAdditionsRunLevel >= AdditionsRunLevelType_Desktop); 451 451 break; 452 452 … … 1520 1520 { 1521 1521 mData.mAdditionsRunLevel = aInterfaceVersion.isEmpty() 1522 ? VBoxGuestAdditionsRunLevel_None1523 : VBoxGuestAdditionsRunLevel_System;1522 ? AdditionsRunLevelType_None 1523 : AdditionsRunLevelType_System; 1524 1524 } 1525 1525 … … 1529 1529 * and use the setSupportedFeatures function instead. 1530 1530 */ 1531 mData.mSupportsGraphics = mData.mAdditionsRunLevel > VBoxGuestAdditionsRunLevel_None;1531 mData.mSupportsGraphics = mData.mAdditionsRunLevel > AdditionsRunLevelType_None; 1532 1532 1533 1533 /* … … 1589 1589 ) 1590 1590 { 1591 mData.mAdditionsRunLevel = VBoxGuestAdditionsRunLevel_None;1591 mData.mAdditionsRunLevel = AdditionsRunLevelType_None; 1592 1592 } 1593 1593 else if (uCurFacility >= VBoxGuestStatusFacility_VBoxTray) 1594 1594 { 1595 mData.mAdditionsRunLevel = VBoxGuestAdditionsRunLevel_Desktop;1595 mData.mAdditionsRunLevel = AdditionsRunLevelType_Desktop; 1596 1596 } 1597 1597 else if (uCurFacility >= VBoxGuestStatusFacility_VBoxService) 1598 1598 { 1599 mData.mAdditionsRunLevel = VBoxGuestAdditionsRunLevel_Userland;1599 mData.mAdditionsRunLevel = AdditionsRunLevelType_Userland; 1600 1600 } 1601 1601 else if (uCurFacility >= VBoxGuestStatusFacility_VBoxGuestDriver) 1602 1602 { 1603 mData.mAdditionsRunLevel = VBoxGuestAdditionsRunLevel_System;1603 mData.mAdditionsRunLevel = AdditionsRunLevelType_System; 1604 1604 } 1605 1605 else /* Should never happen! */ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r32074 r32086 7644 7644 </interface> 7645 7645 7646 <enum 7647 name="AdditionsRunLevelType" 7648 uuid="a25417ee-a9dd-4f5b-b0dc-377860087754" 7649 > 7650 <desc> 7651 Guest Additions run level type. 7652 </desc> 7653 7654 <const name="None" value="0"> 7655 <desc>Guest Additions are not loaded.</desc> 7656 </const> 7657 <const name="System" value="1"> 7658 <desc>Guest drivers are loaded.</desc> 7659 </const> 7660 <const name="Userland" value="2"> 7661 <desc>Common components (such as application services) are loaded.</desc> 7662 </const> 7663 <const name="Desktop" value="3"> 7664 <desc>Per-user desktop components are loaded.</desc> 7665 </const> 7666 </enum> 7667 7646 7668 <interface 7647 7669 name="IGuest" extends="$unknown" … … 7673 7695 </attribute> 7674 7696 7675 <attribute name="additionsRunLevel" type=" unsigned long" readonly="yes">7697 <attribute name="additionsRunLevel" type="AdditionsRunLevelType" readonly="yes"> 7676 7698 <desc> 7677 7699 Current run level of the Guest Additions. … … 7765 7787 7766 7788 </desc> 7767 <param name="level" type=" unsigned long" dir="in">7789 <param name="level" type="AdditionsRunLevelType" dir="in"> 7768 7790 <desc>Status level to check</desc> 7769 7791 </param> -
trunk/src/VBox/Main/include/GuestImpl.h
r32020 r32086 75 75 // IGuest properties 76 76 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId); 77 STDMETHOD(COMGETTER(AdditionsRunLevel)) ( ULONG*aRunLevel);77 STDMETHOD(COMGETTER(AdditionsRunLevel)) (AdditionsRunLevelType_T *aRunLevel); 78 78 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion); 79 79 /** @todo Remove later by replacing it by AdditionsFeatureAvailable(). */ … … 90 90 91 91 // IGuest methods 92 STDMETHOD(GetAdditionsStatus)( ULONGaLevel, BOOL *aActive);92 STDMETHOD(GetAdditionsStatus)(AdditionsRunLevelType_T aLevel, BOOL *aActive); 93 93 STDMETHOD(SetCredentials)(IN_BSTR aUserName, IN_BSTR aPassword, 94 94 IN_BSTR aDomain, BOOL aAllowInteractiveLogon); … … 160 160 # endif 161 161 162 /**163 * Guest additions run level.164 */165 enum VBoxGuestAdditionsRunLevel166 {167 VBoxGuestAdditionsRunLevel_None = 0,168 VBoxGuestAdditionsRunLevel_System = 100,169 VBoxGuestAdditionsRunLevel_Userland = 200,170 VBoxGuestAdditionsRunLevel_Desktop = 400,171 VBoxGuestAdditionsRunLevel_SizeHack = 0x7fffffff172 };173 174 162 struct Data 175 163 { 176 Data() : mAdditionsRunLevel (0), mSupportsSeamless (FALSE), 164 Data() : mAdditionsRunLevel (AdditionsRunLevelType_None), 165 mSupportsSeamless (FALSE), 177 166 mSupportsGraphics (FALSE) {} 178 167 179 Bstr mOSTypeId;180 uint32_tmAdditionsRunLevel;181 Bstr mAdditionsVersion;182 Bstr mInterfaceVersion;183 BOOL mSupportsSeamless;184 BOOL mSupportsGraphics;168 Bstr mOSTypeId; 169 AdditionsRunLevelType_T mAdditionsRunLevel; 170 Bstr mAdditionsVersion; 171 Bstr mInterfaceVersion; 172 BOOL mSupportsSeamless; 173 BOOL mSupportsGraphics; 185 174 }; 186 175
Note:
See TracChangeset
for help on using the changeset viewer.