Changeset 47469 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Jul 30, 2013 9:43:14 AM (12 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r45780 r47469 377 377 class GuestWaitEvent 378 378 { 379 379 380 public: 380 381 … … 387 388 const ComPtr<IEvent> Event(void) { return mEvent; }; 388 389 const std::list<VBoxEventType_T> Types(void) { return mEventTypes; }; 389 intSignal(IEvent *pEvent);390 virtual int Signal(IEvent *pEvent); 390 391 int Wait(RTMSINTERVAL uTimeoutMS); 391 392 392 393 protected: 393 394 395 /* Shutdown indicator. */ 396 bool fAborted; 397 /* Associated context ID (CID). */ 394 398 uint32_t mCID; 399 /** List of event types this event should 400 * be signalled on. */ 395 401 std::list<VBoxEventType_T> mEventTypes; 396 402 /** The event semaphore for triggering … … 418 424 public: 419 425 426 int baseInit(void); 427 void baseUninit(void); 428 int cancelWaitEvents(void); 420 429 int generateContextID(uint32_t uSessionID, uint32_t uObjectID, uint32_t *puContextID); 421 int registerEvent(uint32_t uSessionID, uint32_t uObjectID, const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent); 422 void unregisterEvent(GuestWaitEvent *pEvent); 423 void unregisterEventListener(void); 430 int registerWaitEvent(uint32_t uSessionID, uint32_t uObjectID, const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent); 431 void unregisterWaitEvent(GuestWaitEvent *pEvent); 424 432 int waitForEvent(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, VBoxEventType_T *pType, IEvent **ppEvent); 425 433 … … 431 439 /** The next upcoming context ID for this object. */ 432 440 uint32_t mNextContextID; 433 /** Local listener for handling the waiting events. */ 434 ComPtr<IEventListener> mListener; 441 /** Local listener for handling the waiting events 442 * internally. */ 443 ComPtr<IEventListener> mLocalListener; 435 444 /** Critical section for wait events access. */ 436 445 RTCRITSECT mWaitEventCritSect; … … 463 472 464 473 int bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID); 465 int register Event(const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent);474 int registerWaitEvent(const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent); 466 475 int sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms); 467 476 -
trunk/src/VBox/Main/include/GuestProcessImpl.h
r45780 r47469 80 80 int readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc); 81 81 static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc); 82 int startProcess( int *pGuestRc);82 int startProcess(uint32_t uTimeoutMS, int *pGuestRc); 83 83 int startProcessAsync(void); 84 int terminateProcess(int *pGuestRc); 84 int terminateProcess(uint32_t uTimeoutMS, int *pGuestRc); 85 static ProcessWaitResult_T waitFlagsToResultEx(uint32_t fWaitFlags, ProcessStatus_T procStatus, uint32_t uProcFlags, uint32_t uProtocol); 86 ProcessWaitResult_T waitFlagsToResult(uint32_t fWaitFlags); 85 87 int waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, ProcessWaitResult_T &waitResult, int *pGuestRc); 86 88 int waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed); 87 89 int waitForOutput(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, void* pvData, size_t cbData, uint32_t *pcbRead); 88 int waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS, ProcessStatus_T *pProcessStatus, int *pGuestRc); 90 int waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, ProcessStatus_T *pProcessStatus, int *pGuestRc); 91 static bool waitResultImpliesEx(ProcessWaitResult_T waitResult, ProcessStatus_T procStatus, uint32_t uProcFlags, uint32_t uProtocol); 89 92 int writeData(uint32_t uHandle, uint32_t uFlags, void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc); 90 93 /** @} */ … … 168 171 int TerminatedOk(LONG *pExitCode); 169 172 170 void Terminate(void);173 int Terminate(uint32_t uTimeoutMS, int *pGuestRc); 171 174 172 175 protected: -
trunk/src/VBox/Main/include/GuestSessionImpl.h
r46524 r47469 273 273 STDMETHOD(COMGETTER(Timeout))(ULONG *aTimeout); 274 274 STDMETHOD(COMSETTER(Timeout))(ULONG aTimeout); 275 STDMETHOD(COMGETTER(ProtocolVersion))(ULONG *aVersion); 275 276 STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment)); 276 277 STDMETHOD(COMSETTER(Environment))(ComSafeArrayIn(IN_BSTR, aEnvironment)); … … 359 360 HRESULT isReadyExternal(void); 360 361 int onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 361 int startSessionInte nal(int *pGuestRc);362 int startSessionInternal(int *pGuestRc); 362 363 int startSessionAsync(void); 363 364 static DECLCALLBACK(int) … … 384 385 Guest *mParent; 385 386 /** 386 * This can safely be used without holding any locks. 387 * The session's event source. This source is used for 388 * serving the internal listener as well as all other 389 * external listeners that may register to it. 390 * 391 * Note: This can safely be used without holding any locks. 387 392 * An AutoCaller suffices to prevent it being destroy while in use and 388 393 * internally there is a lock providing the necessary serialization.
Note:
See TracChangeset
for help on using the changeset viewer.