Changeset 58521 in vbox for trunk/src/VBox/Main/include/GuestSessionImpl.h
- Timestamp:
- Oct 30, 2015 9:03:19 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 103842
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImpl.h
r57425 r58521 27 27 #include "GuestFileImpl.h" 28 28 #include "GuestFsObjInfoImpl.h" 29 #include "ThreadTask.h" 29 30 30 31 #include <iprt/isofs.h> /* For UpdateAdditions. */ … … 36 37 * runs in a Main worker thread. 37 38 */ 38 class GuestSessionTask 39 class GuestSessionTask : public ThreadTask 39 40 { 40 41 public: … … 48 49 virtual int Run(void) = 0; 49 50 virtual int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress) = 0; 51 52 HRESULT Init(const Utf8Str &strTaskDesc) 53 { 54 HRESULT hr = S_OK; 55 setTaskDesc(strTaskDesc); 56 hr = createAndSetProgressObject(); 57 return hr; 58 } 59 60 ComObjPtr<Progress> GetProgressObject() const; 50 61 51 62 protected: … … 56 67 int setProgressSuccess(void); 57 68 HRESULT setProgressErrorMsg(HRESULT hr, const Utf8Str &strMsg); 58 69 inline void setTaskDesc(const Utf8Str &strTaskDesc) throw() 70 { 71 mDesc = strTaskDesc; 72 } 73 74 HRESULT createAndSetProgressObject(); 59 75 protected: 60 76 … … 84 100 int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress); 85 101 static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser); 102 void handler() 103 { 104 int vrc = SessionTaskOpen::taskThread(NULL, this); 105 } 86 106 87 107 protected: … … 114 134 int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress); 115 135 static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser); 136 void handler() 137 { 138 int vrc = SessionTaskCopyTo::taskThread(NULL, this); 139 } 116 140 117 141 protected: … … 142 166 int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress); 143 167 static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser); 168 void handler() 169 { 170 int vrc = SessionTaskCopyFrom::taskThread(NULL, this); 171 } 144 172 145 173 protected: … … 168 196 int RunAsync(const Utf8Str &strDesc, ComObjPtr<Progress> &pProgress); 169 197 static DECLCALLBACK(int) taskThread(RTTHREAD Thread, void *pvUser); 198 void handler() 199 { 200 int vrc = SessionTaskUpdateAdditions::taskThread(NULL, this); 201 } 170 202 171 203 protected:
Note:
See TracChangeset
for help on using the changeset viewer.