Changeset 70061 in vbox
- Timestamp:
- Dec 11, 2017 3:26:46 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
include/VBox/HostServices/GuestPropertySvc.h (modified) (8 diffs)
-
src/VBox/Additions/common/VBoxControl/VBoxControl.cpp (modified) (2 diffs)
-
src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp (modified) (9 diffs)
-
src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibVideo.cpp (modified) (3 diffs)
-
src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp (modified) (1 diff)
-
src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp (modified) (1 diff)
-
src/VBox/Main/src-client/ConsoleImpl.cpp (modified) (5 diffs)
-
src/VBox/Main/src-client/ConsoleImpl2.cpp (modified) (1 diff)
-
src/VBox/Main/src-server/MachineImpl.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/GuestPropertySvc.h
r70060 r70061 290 290 #define GUESTPROPHOSTCALLBACKDATA_MAGIC UINT32_C(0x69c87a78) 291 291 292 /** Everything defined in this file lives in this namespace. */293 namespace guestProp {294 295 292 /** 296 293 * HGCM parameter structures. Packing is explicitly defined as this is a wire format. 297 294 */ 298 295 /** The guest is requesting the value of a property */ 299 typedef struct _GetProperty296 typedef struct GuestPropMsgGetProperty 300 297 { 301 298 VBGLIOCHGCMCALL hdr; … … 329 326 */ 330 327 HGCMFunctionParameter size; 331 } G etProperty;332 AssertCompileSize(G etProperty, 40 + 4 * (ARCH_BITS == 64 ? 16 : 12));328 } GuestPropMsgGetProperty; 329 AssertCompileSize(GuestPropMsgGetProperty, 40 + 4 * (ARCH_BITS == 64 ? 16 : 12)); 333 330 334 331 /** The guest is requesting to change a property */ 335 typedef struct _SetProperty332 typedef struct GuestPropMsgSetProperty 336 333 { 337 334 VBGLIOCHGCMCALL hdr; … … 360 357 */ 361 358 HGCMFunctionParameter flags; 362 } SetProperty;363 AssertCompileSize( SetProperty, 40 + 3 * (ARCH_BITS == 64 ? 16 : 12));359 } GuestPropMsgSetProperty; 360 AssertCompileSize(GuestPropMsgSetProperty, 40 + 3 * (ARCH_BITS == 64 ? 16 : 12)); 364 361 365 362 /** The guest is requesting to change the value of a property */ 366 typedef struct _SetPropertyValue363 typedef struct GuestPropMsgSetPropertyValue 367 364 { 368 365 VBGLIOCHGCMCALL hdr; … … 383 380 */ 384 381 HGCMFunctionParameter value; 385 } SetPropertyValue;386 AssertCompileSize( SetPropertyValue, 40 + 2 * (ARCH_BITS == 64 ? 16 : 12));382 } GuestPropMsgSetPropertyValue; 383 AssertCompileSize(GuestPropMsgSetPropertyValue, 40 + 2 * (ARCH_BITS == 64 ? 16 : 12)); 387 384 388 385 /** The guest is requesting to remove a property */ 389 typedef struct _DelProperty386 typedef struct GuestPropMsgDelProperty 390 387 { 391 388 VBGLIOCHGCMCALL hdr; … … 398 395 */ 399 396 HGCMFunctionParameter name; 400 } DelProperty;401 AssertCompileSize( DelProperty, 40 + 1 * (ARCH_BITS == 64 ? 16 : 12));397 } GuestPropMsgDelProperty; 398 AssertCompileSize(GuestPropMsgDelProperty, 40 + 1 * (ARCH_BITS == 64 ? 16 : 12)); 402 399 403 400 /** The guest is requesting to enumerate properties */ 404 typedef struct _EnumProperties401 typedef struct GuestPropMsgEnumProperties 405 402 { 406 403 VBGLIOCHGCMCALL hdr; … … 429 426 */ 430 427 HGCMFunctionParameter size; 431 } EnumProperties;432 AssertCompileSize( EnumProperties, 40 + 3 * (ARCH_BITS == 64 ? 16 : 12));428 } GuestPropMsgEnumProperties; 429 AssertCompileSize(GuestPropMsgEnumProperties, 40 + 3 * (ARCH_BITS == 64 ? 16 : 12)); 433 430 434 431 /** … … 453 450 * the outgoing timestamp from the previous call. 454 451 */ 455 typedef struct _GetNotification452 typedef struct GuestPropMsgGetNotification 456 453 { 457 454 VBGLIOCHGCMCALL hdr; … … 489 486 */ 490 487 HGCMFunctionParameter size; 491 } GetNotification; 492 AssertCompileSize(GetNotification, 40 + 4 * (ARCH_BITS == 64 ? 16 : 12)); 493 494 } /* namespace guestProp */ 488 } GuestPropMsgGetNotification; 489 AssertCompileSize(GuestPropMsgGetNotification, 40 + 4 * (ARCH_BITS == 64 ? 16 : 12)); 490 495 491 496 492 #endif /* !___VBox_HostService_GuestPropertySvc_h */ -
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r70058 r70061 1158 1158 static RTEXITCODE getGuestProperty(int argc, char **argv) 1159 1159 { 1160 using namespace guestProp;1161 1162 1160 bool fVerbose = false; 1163 1161 if ( argc == 2 … … 1432 1430 static RTEXITCODE waitGuestProperty(int argc, char **argv) 1433 1431 { 1434 using namespace guestProp;1435 1436 1432 /* 1437 1433 * Handle arguments -
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestProp.cpp
r70058 r70061 117 117 }; 118 118 119 using namespace guestProp; 119 120 120 121 121 /** … … 164 164 if (pszValue != NULL) 165 165 { 166 SetProperty Msg;166 GuestPropMsgSetProperty Msg; 167 167 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_SET_PROP_VALUE, 3); 168 168 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 173 173 else 174 174 { 175 DelProperty Msg;175 GuestPropMsgDelProperty Msg; 176 176 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_DEL_PROP, 1); 177 177 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 201 201 if (pszValue != NULL) 202 202 { 203 SetPropertyValue Msg;203 GuestPropMsgSetPropertyValue Msg; 204 204 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_SET_PROP_VALUE, 2); 205 205 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 209 209 else 210 210 { 211 DelProperty Msg;211 GuestPropMsgDelProperty Msg; 212 212 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_DEL_PROP, 1); 213 213 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 297 297 * Create the GET_PROP message and call the host. 298 298 */ 299 G etProperty Msg;299 GuestPropMsgGetProperty Msg; 300 300 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_GET_PROP, 4); 301 301 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 492 492 uint32_t *pcbBufActual) 493 493 { 494 EnumProperties Msg;494 GuestPropMsgEnumProperties Msg; 495 495 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_ENUM_PROPS, 3); 496 496 … … 757 757 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 758 758 759 DelProperty Msg;759 GuestPropMsgDelProperty Msg; 760 760 VBGL_HGCM_HDR_INIT(&Msg.hdr, idClient, GUEST_PROP_FN_DEL_PROP, 1); 761 761 VbglHGCMParmPtrSetString(&Msg.name, pszName); … … 859 859 * Create the GET_NOTIFICATION message and call the host. 860 860 */ 861 G etNotification Msg;861 GuestPropMsgGetNotification Msg; 862 862 VBGL_HGCM_HDR_INIT_TIMED(&Msg.hdr, idClient, GUEST_PROP_FN_GET_NOTIFICATION, 4, cMillies); 863 863 -
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibVideo.cpp
r70058 r70061 314 314 { 315 315 #if defined(VBOX_WITH_GUEST_PROPS) 316 using namespace guestProp;317 318 316 int rc; 319 317 HGCMCLIENTID idClient = 0; … … 374 372 { 375 373 #ifdef VBOX_WITH_GUEST_PROPS 376 using namespace guestProp;377 378 374 unsigned cHighestScreen = 0; 379 375 int rc = VbglR3VideoModeGetHighestSavedScreen(&cHighestScreen); … … 457 453 { 458 454 #ifdef VBOX_WITH_GUEST_PROPS 459 using namespace guestProp;460 461 455 /* 462 456 * First we retrieve the video mode which is saved as a string in the -
trunk/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
r70058 r70061 99 99 #include <VBox/log.h> 100 100 #ifdef VBOX_WITH_GUEST_PROPS 101 #include <VBox/HostServices/GuestPropertySvc.h> 102 using namespace guestProp; 101 # include <VBox/HostServices/GuestPropertySvc.h> 103 102 #endif 104 103 -
trunk/src/VBox/HostServices/GuestProperties/testcase/tstGuestPropSvc.cpp
r70058 r70061 31 31 static RTTEST g_hTest = NIL_RTTEST; 32 32 33 using namespace guestProp; 34 33 34 /********************************************************************************************************************************* 35 * Internal Functions * 36 *********************************************************************************************************************************/ 35 37 extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable); 38 36 39 37 40 /** Simple call handle structure for the guest call completion callback */ -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r70058 r70061 1758 1758 uint32_t cbParms) 1759 1759 { 1760 using namespace guestProp;1761 1762 1760 Assert(u32Function == 0); NOREF(u32Function); 1763 1761 … … 1803 1801 AssertReturn(m_pVMMDev, E_FAIL); 1804 1802 1805 using namespace guestProp;1806 1807 1803 VBOXHGCMSVCPARM parm[3]; 1808 1809 1804 parm[0].type = VBOX_HGCM_SVC_PARM_PTR; 1810 1805 parm[0].u.pointer.addr = (void*)aPatterns.c_str(); … … 5935 5930 5936 5931 HRESULT rc = E_UNEXPECTED; 5937 using namespace guestProp;5938 5939 5932 try 5940 5933 { … … 6012 6005 * ptrVM, so there is no need to hold a lock of this */ 6013 6006 6014 using namespace guestProp;6015 6016 6007 VBOXHGCMSVCPARM parm[3]; 6017 6008 … … 6062 6053 * ptrVM, so there is no need to hold a lock of this */ 6063 6054 6064 using namespace guestProp;6065 6066 6055 VBOXHGCMSVCPARM parm[1]; 6067 6068 6056 parm[0].type = VBOX_HGCM_SVC_PARM_PTR; 6069 6057 parm[0].u.pointer.addr = (void*)aName.c_str(); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r70058 r70061 6129 6129 6130 6130 #ifdef VBOX_WITH_GUEST_PROPS_RDONLY_GUEST 6131 rc = configSetGlobalPropertyFlags(pConsole->m_pVMMDev, guestProp::RDONLYGUEST);6131 rc = configSetGlobalPropertyFlags(pConsole->m_pVMMDev, GUEST_PROP_F_RDONLYGUEST); 6132 6132 AssertRCReturn(rc, rc); 6133 6133 #endif -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r70058 r70061 5647 5647 com::Utf8Str &aFlags) const 5648 5648 { 5649 using namespace guestProp;5650 5651 5649 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 5650 5652 5651 HWData::GuestPropertyMap::const_iterator it = mHWData->mGuestProperties.find(aName); 5653 5654 5652 if (it != mHWData->mGuestProperties.end()) 5655 5653 { … … 5742 5740 const com::Utf8Str &aFlags, bool fDelete) 5743 5741 { 5744 using namespace guestProp;5745 5746 5742 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 5747 HRESULT rc = S_OK; 5748 5749 rc = i_checkStateDependency(MutableOrSavedStateDep); 5743 HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep); 5750 5744 if (FAILED(rc)) return rc; 5751 5745 … … 5899 5893 std::vector<com::Utf8Str> &aFlags) 5900 5894 { 5901 using namespace guestProp;5902 5903 5895 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 5904 5896 Utf8Str strPatterns(aPatterns); 5905 5906 HWData::GuestPropertyMap propMap;5907 5897 5908 5898 /* 5909 5899 * Look for matching patterns and build up a list. 5910 5900 */ 5901 HWData::GuestPropertyMap propMap; 5911 5902 for (HWData::GuestPropertyMap::const_iterator 5912 5903 it = mHWData->mGuestProperties.begin(); … … 13524 13515 13525 13516 #ifdef VBOX_WITH_GUEST_PROPS 13526 using namespace guestProp;13527 13528 13517 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 13529 13518 … … 13534 13523 aFlags.resize(cEntries); 13535 13524 13536 size_t i = 0;13525 size_t i = 0; 13537 13526 for (HWData::GuestPropertyMap::const_iterator 13538 13527 it = mHWData->mGuestProperties.begin(); … … 13568 13557 13569 13558 #ifdef VBOX_WITH_GUEST_PROPS 13570 using namespace guestProp;13571 13572 13559 try 13573 13560 {
Note:
See TracChangeset
for help on using the changeset viewer.

