Changeset 43162 in vbox for trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
- Timestamp:
- Sep 4, 2012 1:53:59 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 80544
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
r43061 r43162 71 71 72 72 /** 73 * Genericclass for a all guest control callbacks/events.73 * Base class for a all guest control callbacks/events. 74 74 */ 75 75 class GuestCtrlEvent … … 121 121 { 122 122 public: 123 123 124 GuestCtrlCallback(void); 124 125 … … 165 166 typedef std::map < uint32_t, GuestCtrlCallback* > GuestCtrlCallbacks; 166 167 167 struct GuestProcessWaitResult 168 { 169 GuestProcessWaitResult(void) 170 : mResult(ProcessWaitResult_None), 171 mRC(VINF_SUCCESS) { } 172 173 /** The wait result when returning from the wait call. */ 168 169 /* 170 * Class representing a guest control process waiting 171 * event. 172 */ 173 class GuestProcessWaitEvent : public GuestCtrlEvent 174 { 175 public: 176 177 GuestProcessWaitEvent(void); 178 179 GuestProcessWaitEvent(uint32_t uWaitFlags); 180 181 virtual ~GuestProcessWaitEvent(void); 182 183 public: 184 185 void Destroy(void); 186 187 int Init(uint32_t uWaitFlags); 188 189 uint32_t GetWaitFlags(void) { return ASMAtomicReadU32(&mFlags); } 190 191 ProcessWaitResult_T GetWaitResult(void) { return mResult; } 192 193 int GetWaitRc(void) { return mRC; } 194 195 int Signal(ProcessWaitResult_T enmResult, int rc = VINF_SUCCESS); 196 197 protected: 198 199 /** The waiting flag(s). The specifies what to 200 * wait for. See ProcessWaitFlag_T. */ 201 uint32_t mFlags; 202 /** Structure containing the overall result. */ 174 203 ProcessWaitResult_T mResult; 175 /** Optional rc to this result. */176 int mRC;177 };178 179 180 /*181 * Class representing a guest control process event.182 */183 class GuestProcessEvent : public GuestCtrlEvent184 {185 public:186 GuestProcessEvent(void);187 188 GuestProcessEvent(uint32_t uWaitFlags);189 190 virtual ~GuestProcessEvent(void);191 192 public:193 194 void Destroy(void);195 196 int Init(uint32_t uWaitFlags);197 198 uint32_t GetWaitFlags(void) { return ASMAtomicReadU32(&mWaitFlags); }199 200 GuestProcessWaitResult GetResult(void) { return mWaitResult; }201 202 int Signal(ProcessWaitResult_T enmResult, int rc = VINF_SUCCESS);203 204 protected:205 206 /** The waiting flag(s). The specifies what to207 * wait for. */208 uint32_t mWaitFlags;209 /** Structure containing the overall result. */210 GuestProcessWaitResult mWaitResult;211 204 }; 212 205
Note:
See TracChangeset
for help on using the changeset viewer.