Changeset 71817 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Apr 11, 2018 10:48:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImplTasks.h
r71796 r71817 79 79 /** @name File handling primitives. 80 80 * @{ */ 81 int fileCopyFrom Ex(ComObjPtr<GuestFile> &srcFile, PRTFILE phDstFile, FileCopyFlag_T enmFileCopyFlags,82 uint64_t cbOffset, uint64_t cbSize);83 int fileCopyFrom (const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags);84 int fileCopyTo Ex(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags, PRTFILE pFile,85 uint64_t cbOffset, uint64_t cbSize); /**< r=bird: 'cbOffset' makes no sense what so ever. It should be 'off', or do you mean sizeof(uint64_t)? */86 int fileCopyTo (const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags);81 int fileCopyFromGuestInner(ComObjPtr<GuestFile> &srcFile, PRTFILE phDstFile, FileCopyFlag_T fFileCopyFlags, 82 uint64_t offCopy, uint64_t cbSize); 83 int fileCopyFromGuest(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags); 84 int fileCopyToGuestInner(PRTFILE phSrcFile, ComObjPtr<GuestFile> &dstFile, FileCopyFlag_T fFileCopyFlags, 85 uint64_t offCopy, uint64_t cbSize); 86 int fileCopyToGuest(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags); 87 87 /** @} */ 88 88 … … 139 139 }; 140 140 141 class GuestSessionCopyTask : public GuestSessionTask 142 { 143 public: 144 145 GuestSessionCopyTask(GuestSession *pSession) 146 : GuestSessionTask(pSession) { RT_ZERO(u); } 147 148 virtual ~GuestSessionCopyTask() { } 149 150 protected: 151 152 Utf8Str mSource; 153 Utf8Str mDest; 154 Utf8Str mFilter; 155 156 union 157 { 158 struct 159 { 160 DirectoryCopyFlag_T fCopyFlags; 161 } Dir; 162 struct 163 { 164 FileCopyFlag_T fCopyFlags; 165 PRTFILE phFile; 166 size_t offStart; 167 uint64_t cbSize; 168 } File; 169 } u; 170 }; 171 141 172 /** 142 173 * Task for copying directories from guest to the host. 143 174 */ 144 class SessionTaskCopyDirFrom : public GuestSession Task175 class SessionTaskCopyDirFrom : public GuestSessionCopyTask 145 176 { 146 177 public: 147 178 148 179 SessionTaskCopyDirFrom(GuestSession *pSession, const Utf8Str &strSource, const Utf8Str &strDest, const Utf8Str &strFilter, 149 DirectoryCopyFlag_T enmDirCopyFlags);180 DirectoryCopyFlag_T fDirCopyFlags); 150 181 virtual ~SessionTaskCopyDirFrom(void); 151 182 int Run(void); … … 155 186 int directoryCopyToHost(const Utf8Str &strSource, const Utf8Str &strFilter, const Utf8Str &strDest, bool fRecursive, 156 187 bool fFollowSymlinks, const Utf8Str &strSubDir /* For recursion. */); 157 protected:158 159 Utf8Str mSource;160 Utf8Str mDest;161 Utf8Str mFilter;162 DirectoryCopyFlag_T mDirCopyFlags;163 188 }; 164 189 … … 166 191 * Task for copying directories from host to the guest. 167 192 */ 168 class SessionTaskCopyDirTo : public GuestSession Task193 class SessionTaskCopyDirTo : public GuestSessionCopyTask 169 194 { 170 195 public: 171 196 172 197 SessionTaskCopyDirTo(GuestSession *pSession, const Utf8Str &strSource, const Utf8Str &strDest, const Utf8Str &strFilter, 173 DirectoryCopyFlag_T enmDirCopyFlags);198 DirectoryCopyFlag_T fDirCopyFlags); 174 199 virtual ~SessionTaskCopyDirTo(void); 175 200 int Run(void); … … 179 204 int directoryCopyToGuest(const Utf8Str &strSource, const Utf8Str &strFilter, const Utf8Str &strDest, bool fRecursive, 180 205 bool fFollowSymlinks, const Utf8Str &strSubDir /* For recursion. */); 181 protected:182 183 Utf8Str mSource;184 Utf8Str mDest;185 Utf8Str mFilter;186 DirectoryCopyFlag_T mDirCopyFlags;187 206 }; 188 207 … … 190 209 * Task for copying files from host to the guest. 191 210 */ 192 class SessionTaskCopyFileTo : public GuestSession Task211 class SessionTaskCopyFileTo : public GuestSessionCopyTask 193 212 { 194 213 public: 195 214 196 215 SessionTaskCopyFileTo(GuestSession *pSession, 197 const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags); 198 SessionTaskCopyFileTo(GuestSession *pSession, 199 PRTFILE pSourceFile, size_t cbSourceOffset, uint64_t cbSourceSize, 200 const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags); 216 const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags); 201 217 virtual ~SessionTaskCopyFileTo(void); 202 218 int Run(void); 203 204 protected:205 206 Utf8Str mSource;207 PRTFILE mSourceFile;208 size_t mSourceOffset;209 uint64_t mSourceSize;210 Utf8Str mDest;211 FileCopyFlag_T mFileCopyFlags;212 219 }; 213 220 … … 215 222 * Task for copying files from guest to the host. 216 223 */ 217 class SessionTaskCopyFileFrom : public GuestSession Task224 class SessionTaskCopyFileFrom : public GuestSessionCopyTask 218 225 { 219 226 public: 220 227 221 228 SessionTaskCopyFileFrom(GuestSession *pSession, 222 const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T enmFileCopyFlags);229 const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags); 223 230 virtual ~SessionTaskCopyFileFrom(void); 224 231 int Run(void); 225 226 protected:227 228 Utf8Str mSource;229 Utf8Str mDest;230 FileCopyFlag_T mFileCopyFlags;231 232 }; 232 233 … … 240 241 SessionTaskUpdateAdditions(GuestSession *pSession, 241 242 const Utf8Str &strSource, const ProcessArguments &aArguments, 242 uint32_t uFlags);243 uint32_t fFlags); 243 244 virtual ~SessionTaskUpdateAdditions(void); 244 245 int Run(void); … … 296 297 297 298 int addProcessArguments(ProcessArguments &aArgumentsDest, const ProcessArguments &aArgumentsSource); 298 int copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO, Utf8Str const &strFileSource, const Utf8Str &strFileDest, bool fOptional , uint32_t *pcbSize);299 int copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO, Utf8Str const &strFileSource, const Utf8Str &strFileDest, bool fOptional); 299 300 int runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo); 300 301
Note:
See TracChangeset
for help on using the changeset viewer.