VirtualBox

Changeset 3582 in vbox


Ignore:
Timestamp:
Jul 12, 2007 2:05:10 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22831
Message:

Added seamless support property to the IGuest class

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxDev.h

    r2981 r3582  
    2929 * @{ */
    3030/** the guest requests absolute mouse coordinates (guest additions installed) */
    31 #define VMMDEV_MOUSEGUESTWANTSABS        BIT(0)
     31#define VMMDEV_MOUSEGUESTWANTSABS                           BIT(0)
    3232/** the host wants to send absolute mouse coordinates (input not captured) */
    33 #define VMMDEV_MOUSEHOSTWANTSABS         BIT(1)
     33#define VMMDEV_MOUSEHOSTWANTSABS                            BIT(1)
    3434/** the guest needs a hardware cursor on host. When guest additions are installed
    3535 *  and the host has promised to display the cursor itself, the guest installs a
    3636 *  hardware mouse driver. Don't ask the guest to switch to a software cursor then. */
    37 #define VMMDEV_MOUSEGUESTNEEDSHOSTCUR    BIT(2)
     37#define VMMDEV_MOUSEGUESTNEEDSHOSTCUR                       BIT(2)
    3838/** the host is NOT able to draw the cursor itself (e.g. L4 console) */
    39 #define VMMDEV_MOUSEHOSTCANNOTHWPOINTER  BIT(3)
     39#define VMMDEV_MOUSEHOSTCANNOTHWPOINTER                     BIT(3)
    4040/** @} */
    4141
     
    4343 * @{ */
    4444/** the guest should perform a logon with the credentials */
    45 #define VMMDEV_SETCREDENTIALS_GUESTLOGON BIT(0)
     45#define VMMDEV_SETCREDENTIALS_GUESTLOGON                    BIT(0)
    4646/** the guest should prevent local logons */
    47 #define VMMDEV_SETCREDENTIALS_NOLOCALLOGON BIT(1)
     47#define VMMDEV_SETCREDENTIALS_NOLOCALLOGON                  BIT(1)
    4848/** the guest should verify the credentials */
    49 #define VMMDEV_SETCREDENTIALS_JUDGE      BIT(15)
     49#define VMMDEV_SETCREDENTIALS_JUDGE                         BIT(15)
     50/** @} */
     51
     52/** Guest capability bits
     53 * @{ */
     54/** the guest supports seamless display rendering */
     55#define VMMDEV_GUEST_SUPPORTS_SEAMLESS                      BIT(0)
     56/** the guest supports mapping guest to host windows */
     57#define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING     BIT(1)
    5058/** @} */
    5159
  • trunk/include/VBox/pdm.h

    r3568 r3582  
    19431943     */
    19441944    DECLR3CALLBACKMEMBER(void, pfnUpdateGuestVersion,(PPDMIVMMDEVCONNECTOR pInterface, struct VBoxGuestInfo *pGuestInfo));
     1945
     1946    /**
     1947     * Update the guest additions capabilities.
     1948     * This is called when the guest additions capabilities change. The new capabilities
     1949     * are given and the connector should update its internal state.
     1950     *
     1951     * @param   pInterface          Pointer to this interface.
     1952     * @param   newCapabilities     New capabilities.
     1953     * @thread  The emulation thread.
     1954     */
     1955    DECLR3CALLBACKMEMBER(void, pfnUpdateGuesteCapabilities,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities));
    19451956
    19461957    /**
  • 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