Changeset 75861 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Dec 2, 2018 12:26:36 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127065
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r74734 r75861 1078 1078 int GetGuestError(void) const { return mGuestRc; } 1079 1079 int SignalExternal(IEvent *pEvent); 1080 const GuestEventTypes 1080 const GuestEventTypes &Types(void) { return mEventTypes; } 1081 1081 size_t TypeCount(void) { return mEventTypes.size(); } 1082 1082 … … 1140 1140 * for HGCM (VMMDev) communication. */ 1141 1141 Console *mConsole; 1142 /** The next upcoming context IDfor this object. */1142 /** The next context ID counter component for this object. */ 1143 1143 uint32_t mNextContextID; 1144 1144 /** Local listener for handling the waiting events -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r75798 r75861 29 29 #include "GuestSessionImplTasks.h" 30 30 31 #include <iprt/asm.h> /** @todo r=bird: Needed for ASMBitSet() in GuestSession::Data constructor. Removed when 32 * that is moved into the class implementation file as it should be. */ 31 33 #include <deque> 32 34 … … 36 38 * Guest session implementation. 37 39 */ 38 class ATL_NO_VTABLE GuestSession :39 public GuestSessionWrap,40 public GuestBase40 class ATL_NO_VTABLE GuestSession 41 : public GuestSessionWrap 42 , public GuestBase 41 43 { 42 44 public: … … 245 247 struct SessionObject 246 248 { 247 /** Creation timestamp (in ms). */ 248 uint64_t tsCreatedMs; 249 /** Creation timestamp (in ms). 250 * @note not used by anyone at the moment. */ 251 uint64_t msBirth; 249 252 /** The object type. */ 250 253 SESSIONOBJECTTYPE enmType; … … 305 308 Guest *i_getParent(void) { return mParent; } 306 309 uint32_t i_getProtocolVersion(void) { return mData.mProtocolVersion; } 307 int i_objectRegister(SESSIONOBJECTTYPE enmType, uint32_t *puObjectID); 308 int i_objectRegisterEx(SESSIONOBJECTTYPE enmType, uint32_t fFlags, uint32_t *puObjectID); 310 int i_objectRegister(SESSIONOBJECTTYPE enmType, uint32_t *pidObject); 309 311 int i_objectUnregister(uint32_t uObjectID); 310 312 int i_pathRename(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *pGuestRc); … … 341 343 const ComObjPtr<EventSource> mEventSource; 342 344 345 /** @todo r=bird: One of the core points of the DATA sub-structures in Main is 346 * hinding implementation details and stuff that requires including iprt/asm.h. 347 * The way it's used here totally defeats that purpose. You need to make it 348 * a pointer to a anynmous Data struct and define that structure in 349 * GuestSessionImpl.cpp and allocate it in the Init() function. 350 */ 343 351 struct Data 344 352 { … … 367 375 /** Map of registered session objects (files, directories, ...). */ 368 376 SessionObjects mObjects; 369 /** Queue of object IDs which are not used anymore (free list).370 * Acts as a "free list" for the mObjects map. */371 SessionObjectsFree mObjectsFree;372 377 /** Guest control protocol version to be used. 373 378 * Guest Additions < VBox 4.3 have version 1, … … 379 384 * returned from the guest side. */ 380 385 int mRC; 386 /** Object ID allocation bitmap; clear bits are free, set bits are busy. */ 387 uint64_t bmObjectIds[VBOX_GUESTCTRL_MAX_OBJECTS / sizeof(uint64_t) / 8]; 381 388 382 389 Data(void) 383 390 : mpBaseEnvironment(NULL) 384 { } 391 { 392 RT_ZERO(bmObjectIds); 393 ASMBitSet(&bmObjectIds, VBOX_GUESTCTRL_MAX_OBJECTS - 1); /* Reserved for the session itself? */ 394 ASMBitSet(&bmObjectIds, 0); /* Let's reserve this too. */ 395 } 385 396 Data(const Data &rThat) 386 397 : mCredentials(rThat.mCredentials) … … 393 404 , mProcesses(rThat.mProcesses) 394 405 , mObjects(rThat.mObjects) 395 , mObjectsFree(rThat.mObjectsFree)396 406 , mProtocolVersion(rThat.mProtocolVersion) 397 407 , mTimeout(rThat.mTimeout) 398 408 , mRC(rThat.mRC) 399 { } 409 { 410 memcpy(&bmObjectIds, &rThat.bmObjectIds, sizeof(bmObjectIds)); 411 } 400 412 ~Data(void) 401 413 {
Note:
See TracChangeset
for help on using the changeset viewer.