VirtualBox

Ignore:
Timestamp:
Oct 17, 2008 2:22:07 PM (16 years ago)
Author:
vboxsync
Message:

HostServices/GuestProperties: use an HGCM service extension instead of the callback type I added

File:
1 edited

Legend:

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

    r13374 r13377  
    10031003#ifdef VBOX_WITH_GUEST_PROPS
    10041004// static
    1005 DECLCALLBACK(void)
    1006 Console::doGuestPropNotification (PVBOXHGCMCALLBACKHDR pHeader)
    1007 {
     1005DECLCALLBACK(int)
     1006Console::doGuestPropNotification (void *pvExtension, uint32_t,
     1007                                  void *pvParms, uint32_t cbParms)
     1008{
     1009    using namespace guestProp;
     1010
    10081011    /* No locking, as this is purely a notification which does not make any
    10091012     * changes to the object state. */
    1010     guestProp::PHOSTCALLBACKDATA pCBData
    1011         = reinterpret_cast<guestProp::PHOSTCALLBACKDATA>(pHeader);
    1012     AssertReturnVoid(VBOXHGCMCALLBACKMAGIC == pCBData->hdr.u32Magic);
    1013     AssertReturnVoid(sizeof(guestProp::HOSTCALLBACKDATA) == pCBData->hdr.cbStruct);
    1014     ComObjPtr <Console> pConsole = reinterpret_cast <Console *> (pCBData->hdr.pvData);
     1013    PHOSTCALLBACKDATA pCBData = reinterpret_cast<PHOSTCALLBACKDATA>(pvParms);
     1014    AssertReturn(sizeof(HOSTCALLBACKDATA) == cbParms, VERR_INVALID_PARAMETER);
     1015    AssertReturn(HOSTCALLBACKMAGIC == pCBData->u32Magic, VERR_INVALID_PARAMETER);
     1016    ComObjPtr <Console> pConsole = reinterpret_cast <Console *> (pvExtension);
    10151017    pConsole->mControl->PushGuestProperty(Bstr(pCBData->pcszName),
    10161018                                          Bstr(pCBData->pcszValue),
    10171019                                          pCBData->u64Timestamp,
    10181020                                          Bstr(pCBData->pcszFlags));
     1021    return VINF_SUCCESS;
    10191022}
    10201023#endif
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