VirtualBox

Changeset 35888 in vbox


Ignore:
Timestamp:
Feb 8, 2011 8:58:48 AM (14 years ago)
Author:
vboxsync
Message:

Burn fix, added facility status "failed", removed unused parameters, some renaming.

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r35887 r35888  
    78907890    </const>
    78917891    <const name="VBoxGuestDriver"         value="20">
    7892       <desc>VBoxGuest base driver.</desc>
     7892      <desc>VirtualBox base driver (VBoxGuest).</desc>
    78937893    </const>
    78947894    <const name="VBoxService"             value="100">
    7895       <desc>VBoxService.</desc>
     7895      <desc>VirtualBox system service (VBoxService).</desc>
    78967896    </const>
    78977897    <const name="VBoxTrayClient"          value="101">
    7898       <desc>VBoxTray (Windows) / VBoxClient (Non-Windows).</desc>
     7898      <desc>VirtualBox VBoxTray (Windows) / VBoxClient (Non-Windows).</desc>
    78997899    </const>
    79007900    <const name="All"                     value="999">
     
    79057905  <enum
    79067906    name="AdditionsFacilityStatus"
    7907     uuid="f49bf8c0-e40b-44dd-9db5-8f4196bfda94"
     7907    uuid="730a42a1-dac6-4194-b394-744a5ea487f3"
    79087908    >
    79097909    <desc>
     
    79347934    <const name="Terminated"              value="101">
    79357935      <desc>Facility successfully shut down.</desc>
     7936    </const>
     7937    <const name="Failed"                  value="800">
     7938      <desc>Facility failed to start.</desc>
    79367939    </const>
    79377940    <const name="Unknown"                 value="999">
  • trunk/src/VBox/Main/include/GuestImpl.h

    r35887 r35888  
    8989
    9090    // IGuest methods
    91     STDMETHOD(GetFacilityStatus)(AdditionsFacilityType aType, LONGLONG *aTimestamp, AdditionsFacilityStatus *aStatus);
     91    STDMETHOD(GetFacilityStatus)(AdditionsFacilityType aType, LONG64 *aTimestamp, AdditionsFacilityStatus *aStatus);
    9292    STDMETHOD(GetAdditionsStatus)(AdditionsRunLevelType_T aLevel, BOOL *aActive);
    9393    STDMETHOD(SetCredentials)(IN_BSTR aUserName, IN_BSTR aPassword,
     
    116116    void setAdditionsInfo(Bstr aInterfaceVersion, VBOXOSTYPE aOsType);
    117117    void setAdditionsInfo2(Bstr aAdditionsVersion, Bstr aVersionName, Bstr aRevision);
    118     void setAdditionsStatus(VBoxGuestStatusFacility Facility, VBoxGuestStatusCurrent Status, ULONG ulFlags);
    119     void setSupportedFeatures(uint32_t fCaps, uint32_t fActive);
     118    void setAdditionsStatus(VBoxGuestStatusFacility enmFacility, VBoxGuestStatusCurrent enmStatus, ULONG aFlags);
     119    void setSupportedFeatures(uint32_t aCaps);
    120120    HRESULT setStatistic(ULONG aCpuId, GUESTSTATTYPE enmType, ULONG aVal);
    121121    BOOL isPageFusionEnabled();
  • trunk/src/VBox/Main/src-client/GuestImpl.cpp

    r35887 r35888  
    445445 * @param   aTimestamp      Timestamp of last facility status update in ms (optional).
    446446 */
    447 STDMETHODIMP Guest::GetFacilityStatus(AdditionsFacilityType aType, LONGLONG *aTimestamp, AdditionsFacilityStatus *aStatus)
     447STDMETHODIMP Guest::GetFacilityStatus(AdditionsFacilityType aType, LONG64 *aTimestamp, AdditionsFacilityStatus *aStatus)
    448448{
    449449    AutoCaller autoCaller(this);
     
    626626 * Gets called by vmmdevUpdateGuestStatus.
    627627 *
    628  * @param Facility
    629  * @param Status
    630  * @param ulFlags
    631  */
    632 void Guest::setAdditionsStatus(VBoxGuestStatusFacility Facility, VBoxGuestStatusCurrent Status, ULONG ulFlags)
     628 * @param enmFacility
     629 * @param enmStatus
     630 * @param aFlags
     631 */
     632void Guest::setAdditionsStatus(VBoxGuestStatusFacility enmFacility, VBoxGuestStatusCurrent enmStatus, ULONG aFlags)
    633633{
    634634    AutoCaller autoCaller(this);
     
    642642
    643643    /* First check for disabled status. */
    644     uint32_t uCurFacility = Facility + (Status == VBoxGuestStatusCurrent_Active ? 0 : -1);
    645     if (   Facility < VBoxGuestStatusFacility_VBoxGuestDriver
    646         || (   Facility == VBoxGuestStatusFacility_All
    647             && (   Status   == VBoxGuestStatusCurrent_Inactive
    648                 || Status   == VBoxGuestStatusCurrent_Disabled
     644    uint32_t uCurFacility = enmFacility + (enmStatus == VBoxGuestStatusCurrent_Active ? 0 : -1);
     645    if (   enmFacility < VBoxGuestStatusFacility_VBoxGuestDriver
     646        || (   enmFacility == VBoxGuestStatusFacility_All
     647            && (   enmStatus   == VBoxGuestStatusCurrent_Inactive
     648                || enmStatus   == VBoxGuestStatusCurrent_Disabled
    649649               )
    650650           )
     
    671671     * Set a specific facility status.
    672672     */
    673     if (Facility)
    674     {
    675         Assert(Facility < UINT32_MAX);
    676         FacilityData *pData = &mData.mFacilityMap[(AdditionsFacilityType_T)Facility];
     673    if (enmFacility)
     674    {
     675        Assert(enmFacility < UINT32_MAX);
     676        FacilityData *pData = &mData.mFacilityMap[(AdditionsFacilityType_T)enmFacility];
    677677        AssertPtr(pData);
    678678
    679679        RTTimeNow(&pData->tsLastUpdated);
    680         pData->curStatus = (AdditionsFacilityStatus_T)Status;
     680        pData->curStatus = (AdditionsFacilityStatus_T)enmStatus;
    681681
    682682        LogFlowFunc(("Setting guest facility %u = %u (%u)\n",
    683                      Facility, pData->curStatus, pData->tsLastUpdated));
     683                     enmFacility, pData->curStatus, pData->tsLastUpdated));
    684684    }
    685685}
     
    689689 *
    690690 * @param   fCaps       Guest capability bit mask (VMMDEV_GUEST_SUPPORTS_XXX).
    691  * @param   fActive     No idea what this is supposed to be, it's always 0 and
    692  *                      not references by this method.
    693  */
    694 void Guest::setSupportedFeatures(uint32_t fCaps, uint32_t fActive)
     691 */
     692void Guest::setSupportedFeatures(uint32_t aCaps)
    695693{
    696694    AutoCaller autoCaller(this);
     
    699697    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    700698
    701     mData.mSupportsSeamless = (fCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS);
     699    mData.mSupportsSeamless = (aCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS);
    702700    /** @todo Add VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING */
    703     mData.mSupportsGraphics = (fCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS);
     701    mData.mSupportsGraphics = (aCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS);
    704702}
    705703/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/src-client/VMMDevInterface.cpp

    r35374 r35888  
    294294{
    295295    PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
     296    AssertPtr(pDrv);
    296297    Console *pConsole = pDrv->pVMMDev->getParent();
    297298
    298299    /* store that information in IGuest */
    299     Guest* guest = pConsole->getGuest();
    300     Assert(guest);
    301     if (!guest)
     300    Guest* pGuest = pConsole->getGuest();
     301    AssertPtr(pGuest);
     302    if (!pGuest)
    302303        return;
    303304
     
    305306     * Report our current capabilities (and assume none is active yet).
    306307     */
    307     guest->setSupportedFeatures(newCapabilities, 0 /* Active capabilities, not used here. */);
     308    pGuest->setSupportedFeatures(newCapabilities);
    308309
    309310    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette