VirtualBox

Changeset 47469 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jul 30, 2013 9:43:14 AM (12 years ago)
Author:
vboxsync
Message:

Guest Control: Adjustments for supporting < 4.3 Guest Additions in conjunction with the new guest session, extended testcase (now passing using latest 4.2 Guest Additions with latest trunk).

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r45780 r47469  
    377377class GuestWaitEvent
    378378{
     379
    379380public:
    380381
     
    387388    const ComPtr<IEvent>             Event(void) { return mEvent; };
    388389    const std::list<VBoxEventType_T> Types(void) { return mEventTypes; };
    389     int                              Signal(IEvent *pEvent);
     390    virtual int                      Signal(IEvent *pEvent);
    390391    int                              Wait(RTMSINTERVAL uTimeoutMS);
    391392
    392393protected:
    393394
     395    /* Shutdown indicator. */
     396    bool                       fAborted;
     397    /* Associated context ID (CID). */
    394398    uint32_t                   mCID;
     399    /** List of event types this event should
     400     *  be signalled on. */
    395401    std::list<VBoxEventType_T> mEventTypes;
    396402    /** The event semaphore for triggering
     
    418424public:
    419425
     426    int baseInit(void);
     427    void baseUninit(void);
     428    int cancelWaitEvents(void);
    420429    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);
    424432    int waitForEvent(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, VBoxEventType_T *pType, IEvent **ppEvent);
    425433
     
    431439    /** The next upcoming context ID for this object. */
    432440    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;
    435444    /** Critical section for wait events access. */
    436445    RTCRITSECT               mWaitEventCritSect;
     
    463472
    464473    int bindToSession(Console *pConsole, GuestSession *pSession, uint32_t uObjectID);
    465     int registerEvent(const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent);
     474    int registerWaitEvent(const std::list<VBoxEventType_T> &lstEvents, GuestWaitEvent **ppEvent);
    466475    int sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms);
    467476
  • trunk/src/VBox/Main/include/GuestProcessImpl.h

    r45780 r47469  
    8080    int readData(uint32_t uHandle, uint32_t uSize, uint32_t uTimeoutMS, void *pvData, size_t cbData, uint32_t *pcbRead, int *pGuestRc);
    8181    static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
    82     int startProcess(int *pGuestRc);
     82    int startProcess(uint32_t uTimeoutMS, int *pGuestRc);
    8383    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);
    8587    int waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, ProcessWaitResult_T &waitResult, int *pGuestRc);
    8688    int waitForInputNotify(GuestWaitEvent *pEvent, uint32_t uHandle, uint32_t uTimeoutMS, ProcessInputStatus_T *pInputStatus, uint32_t *pcbProcessed);
    8789    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);
    8992    int writeData(uint32_t uHandle, uint32_t uFlags, void *pvData, size_t cbData, uint32_t uTimeoutMS, uint32_t *puWritten, int *pGuestRc);
    9093    /** @}  */
     
    168171    int TerminatedOk(LONG *pExitCode);
    169172
    170     void Terminate(void);
     173    int Terminate(uint32_t uTimeoutMS, int *pGuestRc);
    171174
    172175protected:
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r46524 r47469  
    273273    STDMETHOD(COMGETTER(Timeout))(ULONG *aTimeout);
    274274    STDMETHOD(COMSETTER(Timeout))(ULONG aTimeout);
     275    STDMETHOD(COMGETTER(ProtocolVersion))(ULONG *aVersion);
    275276    STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment));
    276277    STDMETHOD(COMSETTER(Environment))(ComSafeArrayIn(IN_BSTR, aEnvironment));
     
    359360    HRESULT                 isReadyExternal(void);
    360361    int                     onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
    361     int                     startSessionIntenal(int *pGuestRc);
     362    int                     startSessionInternal(int *pGuestRc);
    362363    int                     startSessionAsync(void);
    363364    static DECLCALLBACK(int)
     
    384385    Guest                          *mParent;
    385386    /**
    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.
    387392     * An AutoCaller suffices to prevent it being destroy while in use and
    388393     * internally there is a lock providing the necessary serialization.
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