VirtualBox

Changeset 3582 in vbox for trunk/src


Ignore:
Timestamp:
Jul 12, 2007 2:05:10 PM (18 years ago)
Author:
vboxsync
Message:

Added seamless support property to the IGuest class

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r3007 r3582  
    141141}
    142142
     143STDMETHODIMP Guest::COMGETTER(SeamlessSupport) (BOOL *aSeamlessSupport)
     144{
     145    if (!aSeamlessSupport)
     146        return E_POINTER;
     147
     148    AutoCaller autoCaller (this);
     149    CheckComRCReturnRC (autoCaller.rc());
     150
     151    AutoReaderLock alock (this);
     152
     153    *aSeamlessSupport = mData.mSeamlessSupport;
     154
     155    return S_OK;
     156}
     157
    143158STDMETHODIMP Guest::SetCredentials(INPTR BSTR aUserName, INPTR BSTR aPassword,
    144159                                   INPTR BSTR aDomain, BOOL aAllowInteractiveLogon)
     
    185200    mData.mAdditionsActive = TRUE;
    186201}
     202
     203void Guest::setSeamlessSupport(BOOL aSeamlessSupport)
     204{
     205    AutoCaller autoCaller (this);
     206    AssertComRCReturnVoid (autoCaller.rc());
     207
     208    AutoLock alock (this);
     209
     210    mData.mSeamlessSupport = aSeamlessSupport;
     211}
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r3579 r3582  
    183183        pDrv->pVMMDev->getParent()->onAdditionsOutdated();
    184184    }
     185}
     186
     187/**
     188 * Update the guest additions capabilities.
     189 * This is called when the guest additions capabilities change. The new capabilities
     190 * are given and the connector should update its internal state.
     191 *
     192 * @param   pInterface          Pointer to this interface.
     193 * @param   newCapabilities     New capabilities.
     194 * @thread  The emulation thread.
     195 */
     196DECLCALLBACK(void) vmmdevUpdateGuestCapabilities(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities)
     197{
     198    PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
     199
     200    /* store that information in IGuest */
     201    Guest* guest = pDrv->pVMMDev->getParent()->getGuest();
     202    Assert(guest);
     203    if (!guest)
     204        return;
     205
     206    guest->setSeamlessSupport(BOOL (newCapabilities & VMMDEV_GUEST_SUPPORTS_SEAMLESS));
     207
     208    /*
     209     * Tell the console interface about the event
     210     * so that it can notify its consumers.
     211     */
     212    pDrv->pVMMDev->getParent()->onAdditionsStateChange();
     213   
    185214}
    186215
     
    507536
    508537    pData->Connector.pfnUpdateGuestVersion            = vmmdevUpdateGuestVersion;
     538    pData->Connector.pfnUpdateGuesteCapabilities      = vmmdevUpdateGuestCapabilities;
    509539    pData->Connector.pfnUpdateMouseCapabilities       = vmmdevUpdateMouseCapabilities;
    510540    pData->Connector.pfnUpdatePointerShape            = vmmdevUpdatePointerShape;
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r3578 r3582  
    41314131  <interface
    41324132     name="IGuest" extends="$unknown"
    4133      uuid="4b71ac5f-db5a-4b4f-af6e-a947d4b83dda"
     4133     uuid="d7a3f7cf-84c4-4628-9267-a1cff0e5f3bc"
    41344134     wsmap="suppress"
    41354135     >
     
    41714171        the version might be refused by VirtualBox (incompatible) or
    41724172        other failures occured.
     4173      </desc>
     4174    </attribute>
     4175
     4176    <attribute name="seamlessSupport" type="boolean" readonly="yes">
     4177      <desc>
     4178        Flag whether seamless guest display rendering is supported.
    41734179      </desc>
    41744180    </attribute>
  • trunk/src/VBox/Main/include/GuestImpl.h

    r2981 r3582  
    5959    STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive);
    6060    STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
     61    STDMETHOD(COMGETTER(SeamlessSupport)) (BOOL *aSeamlessSupport);
    6162
    6263    // IGuest methods
     
    6768    void setAdditionsVersion (Bstr aVersion);
    6869
     70    void setSeamlessSupport(BOOL aSeamlessSupport);
     71
    6972    // for VirtualBoxSupportErrorInfoImpl
    7073    static const wchar_t *getComponentName() { return L"Guest"; }
     
    7477    struct Data
    7578    {
    76         Data() : mAdditionsActive (FALSE) {}
     79        Data() : mAdditionsActive (FALSE), mSeamlessSupport (FALSE) {}
    7780
    7881        Bstr mOSTypeId;
    7982        BOOL mAdditionsActive;
    8083        Bstr mAdditionsVersion;
     84        BOOL mSeamlessSupport;
    8185    };
    8286
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