- Timestamp:
- Oct 10, 2008 11:27:30 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 37684
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r13079 r13165 1001 1001 return VINF_SUCCESS; 1002 1002 } 1003 1004 #ifdef VBOX_WITH_GUEST_PROPS 1005 // static 1006 DECLCALLBACK(void) 1007 Console::doGuestPropNotification (PVBOXHGCMCALLBACKHDR pHeader) 1008 { 1009 /* No locking, as this is purely a notification which does not make any 1010 * changes to the object state. */ 1011 guestProp::PHOSTCALLBACKDATA pCBData 1012 = reinterpret_cast<guestProp::PHOSTCALLBACKDATA>(pHeader); 1013 AssertReturnVoid(VBOXHGCMCALLBACKMAGIC == pCBData->hdr.u32Magic); 1014 AssertReturnVoid(sizeof(guestProp::HOSTCALLBACKDATA) == pCBData->hdr.cbStruct); 1015 ComObjPtr <Console> pConsole = reinterpret_cast <Console *> (pCBData->hdr.pvData); 1016 pConsole->mControl->PushGuestProperty(Bstr(pCBData->pcszName), 1017 Bstr(pCBData->pcszValue), 1018 pCBData->u64Timestamp, 1019 Bstr(pCBData->pcszFlags)); 1020 } 1021 #endif 1022 1003 1023 1004 1024 // IConsole properties -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r12911 r13165 1810 1810 pConsole->mVMMDev->hgcmHostCall ("VBoxGuestPropSvc", guestProp::SET_CFGM_NODE, 3, &parms[0]); 1811 1811 1812 /* Register the host notification callback */ 1813 parms[0].type = VBOX_HGCM_SVC_PARM_CALLBACK; 1814 parms[0].u.callback.pFunction = Console::doGuestPropNotification; 1815 parms[0].u.callback.pvData = pvConsole; 1816 1817 pConsole->mVMMDev->hgcmHostCall ("VBoxGuestPropSvc", guestProp::REGISTER_CALLBACK, 1, &parms[0]); 1818 1812 1819 Log(("Set VBoxGuestPropSvc property store\n")); 1813 1820 } -
trunk/src/VBox/Main/MachineImpl.cpp
r12914 r13165 8926 8926 LogFlowThisFunc (("\n")); 8927 8927 8928 #ifdef VBOX_WITH_GUEST_PROPS 8928 8929 AutoCaller autoCaller (this); 8929 8930 AssertComRCReturn (autoCaller.rc(), autoCaller.rc()); … … 8957 8958 mHWData->mPropertyServiceActive = true; 8958 8959 return S_OK; 8960 #else 8961 return VERR_NOT_IMPLEMENTED; 8962 #endif 8959 8963 } 8960 8964 … … 8965 8969 { 8966 8970 LogFlowThisFunc (("\n")); 8971 8972 #ifdef VBOX_WITH_GUEST_PROPS 8967 8973 AutoCaller autoCaller (this); 8968 8974 AssertComRCReturn (autoCaller.rc(), autoCaller.rc()); … … 9006 9012 mData->mRegistered = TRUE; 9007 9013 return S_OK; 9014 #else 9015 return VERR_NOT_IMPLEMENTED; 9016 #endif 9017 } 9018 9019 STDMETHODIMP SessionMachine::PushGuestProperty (INPTR BSTR aName, INPTR BSTR aValue, 9020 ULONG64 aTimestamp, INPTR BSTR aFlags) 9021 { 9022 LogFlowThisFunc (("\n")); 9023 9024 #ifdef VBOX_WITH_GUEST_PROPS 9025 if (!VALID_PTR(aName)) 9026 return E_INVALIDARG; 9027 if ((aValue != NULL) && (!VALID_PTR(aValue) || !VALID_PTR(aFlags))) 9028 return E_INVALIDARG; /* aValue can be NULL to indicate deletion */ 9029 9030 AutoCaller autoCaller (this); 9031 CheckComRCReturnRC (autoCaller.rc()); 9032 9033 AutoWriteLock alock (this); 9034 9035 HRESULT rc = checkStateDependency (MutableStateDep); 9036 CheckComRCReturnRC (rc); 9037 9038 mHWData.backup(); 9039 for (HWData::GuestPropertyList::iterator iter = mHWData->mGuestProperties.begin(); 9040 iter != mHWData->mGuestProperties.end(); ++iter) 9041 if (aName == iter->mName) 9042 { 9043 mHWData->mGuestProperties.erase(iter); 9044 break; 9045 } 9046 if (aValue != NULL) 9047 { 9048 HWData::GuestProperty property = { aName, aValue, aTimestamp, aFlags }; 9049 mHWData->mGuestProperties.push_back(property); 9050 } 9051 9052 /* send a callback notification if appropriate */ 9053 alock.leave(); 9054 // doGuestPropertyCallback(aName, aValue, aFlags); 9055 9056 return S_OK; 9057 #else 9058 return VERR_NOT_IMPLEMENTED; 9059 #endif 9008 9060 } 9009 9061 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r13084 r13165 2251 2251 <interface 2252 2252 name="IInternalMachineControl" extends="$unknown" 2253 uuid=" de04566a-7125-444b-949e-34e9f3ec3676"2253 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630" 2254 2254 internal="yes" 2255 2255 wsmap="suppress" … … 2527 2527 <param name="name" type="wstring" dir="in" safearray="yes"> 2528 2528 <desc> 2529 The names of the properties returned.2529 The names of the properties. 2530 2530 </desc> 2531 2531 </param> 2532 2532 <param name="value" type="wstring" dir="in" safearray="yes"> 2533 2533 <desc> 2534 The values of the properties returned. The array entries match the2534 The values of the properties. The array entries match the 2535 2535 corresponding entries in the @a name array. 2536 2536 </desc> … … 2538 2538 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes"> 2539 2539 <desc> 2540 The timestamps of the properties returned. The array entries match2540 The timestamps of the properties. The array entries match 2541 2541 the corresponding entries in the @a name array. 2542 2542 </desc> … … 2544 2544 <param name="flags" type="wstring" dir="in" safearray="yes"> 2545 2545 <desc> 2546 The flags of the properties returned. The array entries match the2546 The flags of the properties. The array entries match the 2547 2547 corresponding entries in the @a name array. 2548 </desc> 2549 </param> 2550 </method> 2551 <method name="pushGuestProperty"> 2552 <desc> 2553 Update a single guest property in IMachine. 2554 </desc> 2555 <param name="name" type="wstring" dir="in"> 2556 <desc> 2557 The name of the property to be updated. 2558 </desc> 2559 </param> 2560 <param name="value" type="wstring" dir="in"> 2561 <desc> 2562 The value of the property. 2563 </desc> 2564 </param> 2565 <param name="timestamp" type="unsigned long long" dir="in"> 2566 <desc> 2567 The timestamp of the property. 2568 </desc> 2569 </param> 2570 <param name="flags" type="wstring" dir="in"> 2571 <desc> 2572 The flags of the property. 2548 2573 </desc> 2549 2574 </param> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r13079 r13165 41 41 #include <VBox/vrdpapi.h> 42 42 #include <VBox/pdmdrv.h> 43 #ifdef VBOX_WITH_GUEST_PROPS 44 # include <VBox/HostServices/GuestPropertySvc.h> /* For the property notification callback */ 45 #endif 43 46 44 47 struct VUSBIRHCONFIG; … … 485 488 static DECLCALLBACK(int) loadStateFileExec (PSSMHANDLE pSSM, void *pvUser, uint32_t u32Version); 486 489 490 #ifdef VBOX_WITH_GUEST_PROPS 491 static DECLCALLBACK(void) doGuestPropNotification (PVBOXHGCMCALLBACKHDR pHeader); 492 #endif 493 487 494 bool mSavedStateDataLoaded : 1; 488 495 -
trunk/src/VBox/Main/include/MachineImpl.h
r11683 r13165 845 845 STDMETHOD(PushGuestProperties) (ComSafeArrayIn(INPTR BSTR, aNames), ComSafeArrayIn(INPTR BSTR, aValues), 846 846 ComSafeArrayIn(ULONG64, aTimestamps), ComSafeArrayIn(INPTR BSTR, aFlags)); 847 STDMETHOD(PushGuestProperty) (INPTR BSTR aName, INPTR BSTR aValue, 848 ULONG64 aTimestamp, INPTR BSTR aFlags); 847 849 848 850 // public methods only for internal purposes
Note:
See TracChangeset
for help on using the changeset viewer.