VirtualBox

vbox的更動 45010 路徑 trunk/src/VBox/Main/include


忽略:
時間撮記:
2013-3-12 下午05:47:56 (12 年 以前)
作者:
vboxsync
訊息:

GuestCtrl: More code for guest session infrastructure handling (untested, work in progress).

位置:
trunk/src/VBox/Main/include
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h

    r44935 r45010  
    205205    /** Structure containing the overall result. */
    206206    ProcessWaitResult_T         mResult;
     207};
     208
     209
     210/*
     211 * Class representing a guest control session waiting
     212 * event.
     213 */
     214class GuestSessionWaitEvent : public GuestCtrlEvent
     215{
     216public:
     217
     218    GuestSessionWaitEvent(void);
     219
     220    GuestSessionWaitEvent(uint32_t uWaitFlags);
     221
     222    virtual ~GuestSessionWaitEvent(void);
     223
     224public:
     225
     226    void Destroy(void);
     227
     228    int Init(uint32_t uWaitFlags);
     229
     230    uint32_t GetWaitFlags(void) { return ASMAtomicReadU32(&mFlags); }
     231
     232    GuestSessionWaitResult_T GetWaitResult(void) { return mResult; }
     233
     234    int GetWaitRc(void) { return mRC; }
     235
     236    int Signal(GuestSessionWaitResult_T enmResult, int rc = VINF_SUCCESS);
     237
     238protected:
     239
     240    /** The waiting flag(s). The specifies what to
     241     *  wait for. See GuestSessionWaitFlag_T. */
     242    uint32_t                    mFlags;
     243    /** Structure containing the overall result. */
     244    GuestSessionWaitResult_T    mResult;
    207245};
    208246
  • trunk/src/VBox/Main/include/GuestProcessImpl.h

    r44935 r45010  
    113113        /** The current process status. */
    114114        ProcessStatus_T          mStatus;
     115        /** The last returned process status
     116         *  returned from the guest side. */
    115117        int                      mRC;
    116         /** The mutex for protecting the waiter(s). */
    117         RTSEMMUTEX               mWaitMutex;
    118118        /** How many waiters? At the moment there can only
    119119         *  be one. */
  • trunk/src/VBox/Main/include/GuestSessionImpl.h

    r44935 r45010  
    311311    STDMETHOD(SymlinkRemoveDirectory)(IN_BSTR aPath);
    312312    STDMETHOD(SymlinkRemoveFile)(IN_BSTR aFile);
     313    STDMETHOD(WaitFor)(ULONG aWaitFlags, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason);
     314    STDMETHOD(WaitForArray)(ComSafeArrayIn(GuestSessionWaitForFlag_T, aFlags), ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason);
    313315    /** @}  */
    314316
     
    347349    static Utf8Str          guestErrorToString(int guestRc);
    348350    int                     onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, GuestCtrlCallback *pCallback, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
    349     int                     openSession(int *pGuestRc);
    350     int                     openSessionAsync(void);
     351    int                     startSessionIntenal(int *pGuestRc);
     352    int                     startSessionAsync(void);
    351353    static DECLCALLBACK(int)
    352                             openSessionThread(RTTHREAD Thread, void *pvUser);
     354                            startSessionThread(RTTHREAD Thread, void *pvUser);
    353355    Guest                  *getParent(void) { return mData.mParent; }
    354356    uint32_t                getProtocolVersion(void) { return mData.mProtocolVersion; }
     
    361363    int                     startTaskAsync(const Utf8Str &strTaskDesc, GuestSessionTask *pTask, ComObjPtr<Progress> &pProgress);
    362364    int                     queryInfo(void);
     365    int                     waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionWaitResult_T &waitResult, int *pGuestRc);
    363366    /** @}  */
    364367
     
    396399         *  files, ...). */
    397400        uint32_t                    mNumObjects;
     401        /** The last returned session status
     402         *  returned from the guest side. */
     403        int                         mRC;
     404        /** How many waiters? At the moment there can only
     405         *  be one. */
     406        uint32_t                    mWaitCount;
     407        /** The actual session event for doing the waits.
     408         *  At the moment we only support one wait a time. */
     409        GuestSessionWaitEvent      *mWaitEvent;
    398410    } mData;
    399411};
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette