Changeset 50727 in vbox
- Timestamp:
- Mar 7, 2014 6:21:44 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92699
- Location:
- trunk/src/VBox/Main
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImpl.h
r49948 r50727 20 20 #define ____H_GUESTSESSIONIMPL 21 21 22 #include " VirtualBoxBase.h"22 #include "GuestSessionWrap.h" 23 23 #include "EventImpl.h" 24 24 … … 53 53 54 54 int getGuestProperty(const ComObjPtr<Guest> &pGuest, 55 const Utf8Str &strPath, Utf8Str &strValue);55 const Utf8Str &strPath, Utf8Str &strValue); 56 56 int setProgress(ULONG uPercent); 57 57 int setProgressSuccess(void); … … 221 221 }; 222 222 223 int addProcessArguments(ProcessArguments &aArgumentsDest,224 const ProcessArguments &aArgumentsSource);225 int copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO,226 Utf8Str const &strFileSource, const Utf8Str &strFileDest,227 bool fOptional, uint32_t *pcbSize);228 int runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo);223 int i_addProcessArguments(ProcessArguments &aArgumentsDest, 224 const ProcessArguments &aArgumentsSource); 225 int i_copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO, 226 Utf8Str const &strFileSource, const Utf8Str &strFileDest, 227 bool fOptional, uint32_t *pcbSize); 228 int i_runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo); 229 229 230 230 /** Files to handle. */ … … 243 243 */ 244 244 class ATL_NO_VTABLE GuestSession : 245 public VirtualBoxBase, 246 public GuestBase, 247 VBOX_SCRIPTABLE_IMPL(IGuestSession) 245 public GuestSessionWrap, 246 public GuestBase 248 247 { 249 248 public: 250 249 /** @name COM and internal init/term/mapping cruft. 251 250 * @{ */ 252 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestSession, IGuestSession)253 DECLARE_NOT_AGGREGATABLE(GuestSession)254 DECLARE_PROTECT_FINAL_CONSTRUCT()255 BEGIN_COM_MAP(GuestSession)256 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestSession)257 END_COM_MAP()258 251 DECLARE_EMPTY_CTOR_DTOR(GuestSession) 259 252 … … 264 257 /** @} */ 265 258 266 /** @name IGuestSession properties.267 * @{ */268 STDMETHOD(COMGETTER(User))(BSTR *aName);269 STDMETHOD(COMGETTER(Domain))(BSTR *aDomain);270 STDMETHOD(COMGETTER(Name))(BSTR *aName);271 STDMETHOD(COMGETTER(Id))(ULONG *aId);272 STDMETHOD(COMGETTER(Status))(GuestSessionStatus_T *aStatus);273 STDMETHOD(COMGETTER(Timeout))(ULONG *aTimeout);274 STDMETHOD(COMSETTER(Timeout))(ULONG aTimeout);275 STDMETHOD(COMGETTER(ProtocolVersion))(ULONG *aVersion);276 STDMETHOD(COMGETTER(Environment))(ComSafeArrayOut(BSTR, aEnvironment));277 STDMETHOD(COMSETTER(Environment))(ComSafeArrayIn(IN_BSTR, aEnvironment));278 STDMETHOD(COMGETTER(Processes))(ComSafeArrayOut(IGuestProcess *, aProcesses));279 STDMETHOD(COMGETTER(Directories))(ComSafeArrayOut(IGuestDirectory *, aDirectories));280 STDMETHOD(COMGETTER(Files))(ComSafeArrayOut(IGuestFile *, aFiles));281 STDMETHOD(COMGETTER(EventSource))(IEventSource ** aEventSource);282 /** @} */283 284 /** @name IGuestSession methods.285 * @{ */286 STDMETHOD(Close)(void);287 STDMETHOD(CopyFrom)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(CopyFileFlag_T, aFlags), IProgress **aProgress);288 STDMETHOD(CopyTo)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(CopyFileFlag_T, aFlags), IProgress **aProgress);289 STDMETHOD(DirectoryCreate)(IN_BSTR aPath, ULONG aMode, ComSafeArrayIn(DirectoryCreateFlag_T, aFlags));290 STDMETHOD(DirectoryCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, BSTR *aDirectory);291 STDMETHOD(DirectoryExists)(IN_BSTR aPath, BOOL *aExists);292 STDMETHOD(DirectoryOpen)(IN_BSTR aPath, IN_BSTR aFilter, ComSafeArrayIn(DirectoryOpenFlag_T, aFlags), IGuestDirectory **aDirectory);293 STDMETHOD(DirectoryQueryInfo)(IN_BSTR aPath, IGuestFsObjInfo **aInfo);294 STDMETHOD(DirectoryRemove)(IN_BSTR aPath);295 STDMETHOD(DirectoryRemoveRecursive)(IN_BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag_T, aFlags), IProgress **aProgress);296 STDMETHOD(DirectoryRename)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags));297 STDMETHOD(DirectorySetACL)(IN_BSTR aPath, IN_BSTR aACL);298 STDMETHOD(EnvironmentClear)(void);299 STDMETHOD(EnvironmentGet)(IN_BSTR aName, BSTR *aValue);300 STDMETHOD(EnvironmentSet)(IN_BSTR aName, IN_BSTR aValue);301 STDMETHOD(EnvironmentUnset)(IN_BSTR aName);302 STDMETHOD(FileCreateTemp)(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, IGuestFile **aFile);303 STDMETHOD(FileExists)(IN_BSTR aPath, BOOL *aExists);304 STDMETHOD(FileRemove)(IN_BSTR aPath);305 STDMETHOD(FileOpen)(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, ULONG aCreationMode, IGuestFile **aFile);306 STDMETHOD(FileOpenEx)(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, IN_BSTR aSharingMode, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile);307 STDMETHOD(FileQueryInfo)(IN_BSTR aPath, IGuestFsObjInfo **aInfo);308 STDMETHOD(FileQuerySize)(IN_BSTR aPath, LONG64 *aSize);309 STDMETHOD(FileRename)(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags));310 STDMETHOD(FileSetACL)(IN_BSTR aPath, IN_BSTR aACL);311 STDMETHOD(ProcessCreate)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),312 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **aProcess);313 STDMETHOD(ProcessCreateEx)(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),314 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS,315 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity),316 IGuestProcess **aProcess);317 STDMETHOD(ProcessGet)(ULONG aPID, IGuestProcess **aProcess);318 STDMETHOD(SymlinkCreate)(IN_BSTR aSource, IN_BSTR aTarget, SymlinkType_T aType);319 STDMETHOD(SymlinkExists)(IN_BSTR aSymlink, BOOL *aExists);320 STDMETHOD(SymlinkRead)(IN_BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag_T, aFlags), BSTR *aTarget);321 STDMETHOD(SymlinkRemoveDirectory)(IN_BSTR aPath);322 STDMETHOD(SymlinkRemoveFile)(IN_BSTR aFile);323 STDMETHOD(WaitFor)(ULONG aWaitFlags, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason);324 STDMETHOD(WaitForArray)(ComSafeArrayIn(GuestSessionWaitForFlag_T, aFlags), ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason);325 /** @} */326 327 259 private: 260 261 // Wrapped GuuestSession Properties 262 HRESULT getUser(com::Utf8Str &aUser); 263 HRESULT getDomain(com::Utf8Str &aDomain); 264 HRESULT getName(com::Utf8Str &aName); 265 HRESULT getId(ULONG *aId); 266 HRESULT getTimeout(ULONG *aTimeout); 267 HRESULT setTimeout(ULONG aTimeout); 268 HRESULT getProtocolVersion(ULONG *aProtocolVersion); 269 HRESULT getStatus(GuestSessionStatus_T *aStatus); 270 HRESULT getEnvironment(std::vector<com::Utf8Str> &aEnvironment); 271 HRESULT setEnvironment(const std::vector<com::Utf8Str> &aEnvironment); 272 HRESULT getProcesses(std::vector<ComPtr<IGuestProcess> > &aProcesses); 273 HRESULT getDirectories(std::vector<ComPtr<IGuestDirectory> > &aDirectories); 274 HRESULT getFiles(std::vector<ComPtr<IGuestFile> > &aFiles); 275 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource); 276 277 // Wrapped GuuestSession Methods 278 HRESULT close(); 279 HRESULT copyFrom(const com::Utf8Str &aSource, 280 const com::Utf8Str &aDest, 281 const std::vector<CopyFileFlag_T> &aFlags, 282 ComPtr<IProgress> &aProgress); 283 HRESULT copyTo(const com::Utf8Str &aSource, 284 const com::Utf8Str &aDest, 285 const std::vector<CopyFileFlag_T> &aFlags, 286 ComPtr<IProgress> &aProgress); 287 HRESULT directoryCreate(const com::Utf8Str &aPath, 288 ULONG aMode, 289 const std::vector<DirectoryCreateFlag_T> &aFlags); 290 HRESULT directoryCreateTemp(const com::Utf8Str &aTemplateName, 291 ULONG aMode, 292 const com::Utf8Str &aPath, 293 BOOL aSecure, 294 com::Utf8Str &aDirectory); 295 HRESULT directoryExists(const com::Utf8Str &aPath, 296 BOOL *aExists); 297 HRESULT directoryOpen(const com::Utf8Str &aPath, 298 const com::Utf8Str &aFilter, 299 const std::vector<DirectoryOpenFlag_T> &aFlags, 300 ComPtr<IGuestDirectory> &aDirectory); 301 HRESULT directoryQueryInfo(const com::Utf8Str &aPath, 302 ComPtr<IGuestFsObjInfo> &aInfo); 303 HRESULT directoryRemove(const com::Utf8Str &aPath); 304 HRESULT directoryRemoveRecursive(const com::Utf8Str &aPath, 305 const std::vector<DirectoryRemoveRecFlag_T> &aFlags, 306 ComPtr<IProgress> &aProgress); 307 HRESULT directoryRename(const com::Utf8Str &aSource, 308 const com::Utf8Str &aDest, 309 const std::vector<PathRenameFlag_T> &aFlags); 310 HRESULT directorySetACL(const com::Utf8Str &aPath, 311 const com::Utf8Str &aAcl); 312 HRESULT environmentClear(); 313 HRESULT environmentGet(const com::Utf8Str &aName, 314 com::Utf8Str &aValue); 315 HRESULT environmentSet(const com::Utf8Str &aName, 316 const com::Utf8Str &aValue); 317 HRESULT environmentUnset(const com::Utf8Str &aName); 318 HRESULT fileCreateTemp(const com::Utf8Str &aTemplateName, 319 ULONG aMode, 320 const com::Utf8Str &aPath, 321 BOOL aSecure, 322 ComPtr<IGuestFile> &aFile); 323 HRESULT fileExists(const com::Utf8Str &aPath, 324 BOOL *aExists); 325 HRESULT fileRemove(const com::Utf8Str &aPath); 326 HRESULT fileOpen(const com::Utf8Str &aPath, 327 const com::Utf8Str &aOpenMode, 328 const com::Utf8Str &aDisposition, 329 ULONG aCreationMode, 330 ComPtr<IGuestFile> &aFile); 331 HRESULT fileOpenEx(const com::Utf8Str &aPath, 332 const com::Utf8Str &aOpenMode, 333 const com::Utf8Str &aDisposition, 334 const com::Utf8Str &aSharingMode, 335 ULONG aCreationMode, 336 LONG64 aOffset, 337 ComPtr<IGuestFile> &aFile); 338 HRESULT fileQueryInfo(const com::Utf8Str &aPath, 339 ComPtr<IGuestFsObjInfo> &aInfo); 340 HRESULT fileQuerySize(const com::Utf8Str &aPath, 341 LONG64 *aSize); 342 HRESULT fileRename(const com::Utf8Str &aSource, 343 const com::Utf8Str &aDest, 344 const std::vector<PathRenameFlag_T> &aFlags); 345 HRESULT fileSetACL(const com::Utf8Str &aFile, 346 const com::Utf8Str &aAcl); 347 HRESULT processCreate(const com::Utf8Str &aCommand, 348 const std::vector<com::Utf8Str> &aArguments, 349 const std::vector<com::Utf8Str> &aEnvironment, 350 const std::vector<ProcessCreateFlag_T> &aFlags, 351 ULONG aTimeoutMS, 352 ComPtr<IGuestProcess> &aGuestProcess); 353 HRESULT processCreateEx(const com::Utf8Str &aCommand, 354 const std::vector<com::Utf8Str> &aArguments, 355 const std::vector<com::Utf8Str> &aEnvironment, 356 const std::vector<ProcessCreateFlag_T> &aFlags, 357 ULONG aTimeoutMS, 358 ProcessPriority_T aPriority, 359 const std::vector<LONG> &aAffinity, 360 ComPtr<IGuestProcess> &aGuestProcess); 361 HRESULT processGet(ULONG aPid, 362 ComPtr<IGuestProcess> &aGuestProcess); 363 HRESULT symlinkCreate(const com::Utf8Str &aSource, 364 const com::Utf8Str &aTarget, 365 SymlinkType_T aType); 366 HRESULT symlinkExists(const com::Utf8Str &aSymlink, 367 BOOL *aExists); 368 HRESULT symlinkRead(const com::Utf8Str &aSymlink, 369 const std::vector<SymlinkReadFlag_T> &aFlags, 370 com::Utf8Str &aTarget); 371 HRESULT symlinkRemoveDirectory(const com::Utf8Str &aPath); 372 HRESULT symlinkRemoveFile(const com::Utf8Str &aFile); 373 HRESULT waitFor(ULONG aWaitFor, 374 ULONG aTimeoutMS, 375 GuestSessionWaitResult_T *aReason); 376 HRESULT waitForArray(const std::vector<GuestSessionWaitForFlag_T> &aWaitFor, 377 ULONG aTimeoutMS, 378 GuestSessionWaitResult_T *aReason); 379 328 380 329 381 /** Map of guest directories. The key specifies the internal directory ID. */ … … 338 390 /** @name Public internal methods. 339 391 * @{ */ 340 int closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *pGuestRc);341 inline bool directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir);342 int directoryRemoveFromList(GuestDirectory *pDirectory);343 int directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags, int *pGuestRc);344 int directoryCreateInternal(const Utf8Str &strPath, uint32_t uMode, uint32_t uFlags, int *pGuestRc);345 int objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory, Utf8Str &strName, int *pGuestRc);346 int directoryOpenInternal(const GuestDirectoryOpenInfo &openInfo, ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc);347 int directoryQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc);348 int dispatchToDirectory(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);349 int dispatchToFile(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);350 int dispatchToObject(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);351 int dispatchToProcess(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);352 int dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);353 inline bool fileExists(uint32_t uFileID, ComObjPtr<GuestFile> *pFile);354 int fileRemoveFromList(GuestFile *pFile);355 int fileRemoveInternal(const Utf8Str &strPath, int *pGuestRc);356 int fileOpenInternal(const GuestFileOpenInfo &openInfo, ComObjPtr<GuestFile> &pFile, int *pGuestRc);357 int fileQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc);358 int fileQuerySizeInternal(const Utf8Str &strPath, int64_t *pllSize, int *pGuestRc);359 int fsQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc);360 const GuestCredentials &getCredentials(void);361 const GuestEnvironment &getEnvironment(void);362 EventSource * getEventSource(void) { return mEventSource; }363 Utf8Str getName(void);364 ULONG getId(void) { return mData.mSession.mID; }365 static Utf8Str guestErrorToString(int guestRc);366 HRESULT i sReadyExternal(void);367 int onRemove(void);368 int onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);369 int startSessionInternal(int *pGuestRc);370 int startSessionAsync(void);392 int i_closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *pGuestRc); 393 inline bool i_directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir); 394 int i_directoryRemoveFromList(GuestDirectory *pDirectory); 395 int i_directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags, int *pGuestRc); 396 int i_directoryCreateInternal(const Utf8Str &strPath, uint32_t uMode, uint32_t uFlags, int *pGuestRc); 397 int i_objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory, Utf8Str &strName, int *pGuestRc); 398 int i_directoryOpenInternal(const GuestDirectoryOpenInfo &openInfo, ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc); 399 int i_directoryQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc); 400 int i_dispatchToDirectory(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 401 int i_dispatchToFile(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 402 int i_dispatchToObject(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 403 int i_dispatchToProcess(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 404 int i_dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 405 inline bool i_fileExists(uint32_t uFileID, ComObjPtr<GuestFile> *pFile); 406 int i_fileRemoveFromList(GuestFile *pFile); 407 int i_fileRemoveInternal(const Utf8Str &strPath, int *pGuestRc); 408 int i_fileOpenInternal(const GuestFileOpenInfo &openInfo, ComObjPtr<GuestFile> &pFile, int *pGuestRc); 409 int i_fileQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc); 410 int i_fileQuerySizeInternal(const Utf8Str &strPath, int64_t *pllSize, int *pGuestRc); 411 int i_fsQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc); 412 const GuestCredentials &i_getCredentials(void); 413 const GuestEnvironment &i_getEnvironment(void); 414 EventSource *i_getEventSource(void) { return mEventSource; } 415 Utf8Str i_getName(void); 416 ULONG i_getId(void) { return mData.mSession.mID; } 417 static Utf8Str i_guestErrorToString(int guestRc); 418 HRESULT i_isReadyExternal(void); 419 int i_onRemove(void); 420 int i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 421 int i_startSessionInternal(int *pGuestRc); 422 int i_startSessionAsync(void); 371 423 static DECLCALLBACK(int) 372 startSessionThread(RTTHREAD Thread, void *pvUser);373 Guest * getParent(void) { return mParent; }374 uint32_t getProtocolVersion(void) { return mData.mProtocolVersion; }375 int pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *pGuestRc);376 int processRemoveFromList(GuestProcess *pProcess);377 int processCreateExInteral(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProgress);378 inline bool processExists(uint32_t uProcessID, ComObjPtr<GuestProcess> *pProcess);379 inline int processGetByPID(ULONG uPID, ComObjPtr<GuestProcess> *pProcess);380 int sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms);381 static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc);382 int setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc);383 int signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */);384 int startTaskAsync(const Utf8Str &strTaskDesc, GuestSessionTask *pTask, ComObjPtr<Progress> &pProgress);385 int queryInfo(void);386 int waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionWaitResult_T &waitResult, int *pGuestRc);387 int waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS, GuestSessionStatus_T *pSessionStatus, int *pGuestRc);424 i_startSessionThread(RTTHREAD Thread, void *pvUser); 425 Guest *i_getParent(void) { return mParent; } 426 uint32_t i_getProtocolVersion(void) { return mData.mProtocolVersion; } 427 int i_pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *pGuestRc); 428 int i_processRemoveFromList(GuestProcess *pProcess); 429 int i_processCreateExInteral(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProgress); 430 inline bool i_processExists(uint32_t uProcessID, ComObjPtr<GuestProcess> *pProcess); 431 inline int i_processGetByPID(ULONG uPID, ComObjPtr<GuestProcess> *pProcess); 432 int i_sendCommand(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms); 433 static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc); 434 int i_setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc); 435 int i_signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */); 436 int i_startTaskAsync(const Utf8Str &strTaskDesc, GuestSessionTask *pTask, ComObjPtr<Progress> &pProgress); 437 int i_queryInfo(void); 438 int i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionWaitResult_T &waitResult, int *pGuestRc); 439 int i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS, GuestSessionStatus_T *pSessionStatus, int *pGuestRc); 388 440 /** @} */ 389 441 -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r49684 r50727 193 193 Assert(!pSession.isNull()); 194 194 int guestRc; 195 rc = pSession-> startSessionInternal(&guestRc);195 rc = pSession->i_startSessionInternal(&guestRc); 196 196 if (RT_FAILURE(rc)) 197 197 { … … 207 207 SessionTaskUpdateAdditions *pTask = new SessionTaskUpdateAdditions(pSession /* GuestSession */, 208 208 Utf8Str(aSource), aArgs, fFlags); 209 rc = pSession-> startTaskAsync(tr("Updating Guest Additions"), pTask, pProgress);209 rc = pSession->i_startTaskAsync(tr("Updating Guest Additions"), pTask, pProgress); 210 210 if (RT_SUCCESS(rc)) 211 211 { … … 294 294 { 295 295 case GUEST_DISCONNECTED: 296 rc = pSession-> dispatchToThis(pCtxCb, pSvcCb);296 rc = pSession->i_dispatchToThis(pCtxCb, pSvcCb); 297 297 break; 298 298 … … 301 301 case GUEST_EXEC_INPUT_STATUS: 302 302 case GUEST_EXEC_IO_NOTIFY: 303 rc = pSession-> dispatchToProcess(pCtxCb, pSvcCb);303 rc = pSession->i_dispatchToProcess(pCtxCb, pSvcCb); 304 304 break; 305 305 306 306 case GUEST_FILE_NOTIFY: 307 rc = pSession-> dispatchToFile(pCtxCb, pSvcCb);307 rc = pSession->i_dispatchToFile(pCtxCb, pSvcCb); 308 308 break; 309 309 310 310 case GUEST_SESSION_NOTIFY: 311 rc = pSession-> dispatchToThis(pCtxCb, pSvcCb);311 rc = pSession->i_dispatchToThis(pCtxCb, pSvcCb); 312 312 break; 313 313 … … 320 320 * in this session object. 321 321 */ 322 rc = pSession-> dispatchToObject(pCtxCb, pSvcCb);322 rc = pSession->i_dispatchToObject(pCtxCb, pSvcCb); 323 323 if ( rc == VERR_NOT_FOUND 324 324 || rc == VERR_NOT_SUPPORTED) … … 355 355 int rc = VERR_NOT_FOUND; 356 356 357 LogFlowThisFunc(("Removing session (ID=%RU32) ...\n", pSession-> getId()));357 LogFlowThisFunc(("Removing session (ID=%RU32) ...\n", pSession->i_getId())); 358 358 359 359 GuestSessions::iterator itSessions = mData.mGuestSessions.begin(); … … 373 373 374 374 LogFlowThisFunc(("Removing session (pSession=%p, ID=%RU32) (now total %ld sessions)\n", 375 pSession, pSession-> getId(), mData.mGuestSessions.size() - 1));376 377 rc = pSession-> onRemove();375 pSession, pSession->i_getId(), mData.mGuestSessions.size() - 1)); 376 377 rc = pSession->i_onRemove(); 378 378 mData.mGuestSessions.erase(itSessions); 379 379 … … 525 525 /* Start (fork) the session asynchronously 526 526 * on the guest. */ 527 rc = pSession-> startSessionAsync();527 rc = pSession->i_startSessionAsync(); 528 528 } 529 529 … … 570 570 while (itSessions != mData.mGuestSessions.end()) 571 571 { 572 if (strName.contains(itSessions->second-> getName())) /** @todo Use a (simple) pattern match (IPRT?). */572 if (strName.contains(itSessions->second->i_getName())) /** @todo Use a (simple) pattern match (IPRT?). */ 573 573 listSessions.push_back(itSessions->second); 574 574 itSessions++; -
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r49948 r50727 1226 1226 { 1227 1227 AssertPtr(mSession); 1228 return GuestBase::registerWaitEvent(mSession-> getId(), mObjectID, lstEvents, ppEvent);1228 return GuestBase::registerWaitEvent(mSession->i_getId(), mObjectID, lstEvents, ppEvent); 1229 1229 } 1230 1230 -
trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
r50709 r50727 299 299 300 300 AssertPtr(mSession); 301 int rc2 = mSession-> directoryRemoveFromList(this);301 int rc2 = mSession->i_directoryRemoveFromList(this); 302 302 if (RT_SUCCESS(rc)) 303 303 rc = rc2; -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r50618 r50727 1238 1238 1239 1239 AssertPtr(mSession); 1240 int rc2 = mSession-> fileRemoveFromList(this);1240 int rc2 = mSession->i_fileRemoveFromList(this); 1241 1241 if (RT_SUCCESS(rc)) 1242 1242 rc = rc2; -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r50709 r50727 884 884 * output event. 885 885 */ 886 if (mSession-> getProtocolVersion() >= 2)886 if (mSession->i_getProtocolVersion() >= 2) 887 887 eventTypes.push_back(VBoxEventType_OnGuestProcessStateChanged); 888 888 eventTypes.push_back(VBoxEventType_OnGuestProcessOutput); … … 1000 1000 LogFlowThisFunc(("uTimeoutMS=%RU32, procCmd=%s, procTimeoutMS=%RU32, procFlags=%x, sessionID=%RU32\n", 1001 1001 uTimeoutMS, mData.mProcess.mCommand.c_str(), mData.mProcess.mTimeoutMS, mData.mProcess.mFlags, 1002 mSession-> getId()));1002 mSession->i_getId())); 1003 1003 1004 1004 /* Wait until the caller function (if kicked off by a thread) … … 1029 1029 AssertPtr(pSession); 1030 1030 1031 const GuestCredentials &sessionCreds = pSession-> getCredentials();1031 const GuestCredentials &sessionCreds = pSession->i_getCredentials(); 1032 1032 1033 1033 /* Prepare arguments. */ … … 1077 1077 { 1078 1078 AssertPtr(mSession); 1079 uint32_t uProtocol = mSession-> getProtocolVersion();1079 uint32_t uProtocol = mSession->i_getProtocolVersion(); 1080 1080 1081 1081 /* Prepare HGCM call. */ … … 1215 1215 /* Note: VBox < 4.3 (aka protocol version 1) does not 1216 1216 * support this, so just skip. */ 1217 if (mSession-> getProtocolVersion() < 2)1217 if (mSession->i_getProtocolVersion() < 2) 1218 1218 vrc = VERR_NOT_SUPPORTED; 1219 1219 … … 1360 1360 return GuestProcess::i_waitFlagsToResultEx(fWaitFlags, 1361 1361 mData.mStatus /* curStatus */, mData.mStatus /* newStatus */, 1362 mData.mProcess.mFlags, mSession-> getProtocolVersion());1362 mData.mProcess.mFlags, mSession->i_getProtocolVersion()); 1363 1363 } 1364 1364 … … 1444 1444 1445 1445 waitResult = i_waitFlagsToResultEx(fWaitFlags, curStatus, newStatus, 1446 mData.mProcess.mFlags, mSession-> getProtocolVersion());1446 mData.mProcess.mFlags, mSession->i_getProtocolVersion()); 1447 1447 #ifdef DEBUG 1448 1448 LogFlowThisFunc(("Got new status change: fWaitFlags=0x%x, newStatus=%RU32, waitResult=%RU32\n", … … 1690 1690 * input event. 1691 1691 */ 1692 if (mSession-> getProtocolVersion() >= 2)1692 if (mSession->i_getProtocolVersion() >= 2) 1693 1693 eventTypes.push_back(VBoxEventType_OnGuestProcessStateChanged); 1694 1694 eventTypes.push_back(VBoxEventType_OnGuestProcessInputNotify); … … 1824 1824 * still can hold references to it. */ 1825 1825 AssertPtr(mSession); 1826 int rc2 = mSession-> processRemoveFromList(this);1826 int rc2 = mSession->i_processRemoveFromList(this); 1827 1827 if (RT_SUCCESS(vrc)) 1828 1828 vrc = rc2; … … 1979 1979 mStartupInfo.mFlags |= ProcessCreateFlag_Hidden; 1980 1980 1981 int vrc = pSession-> processCreateExInteral(mStartupInfo, pProcess);1981 int vrc = pSession->i_processCreateExInteral(mStartupInfo, pProcess); 1982 1982 if (RT_SUCCESS(vrc)) 1983 1983 vrc = fAsync -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r50709 r50727 204 204 HRESULT hr; 205 205 206 int rc = queryInfo();206 int rc = i_queryInfo(); 207 207 if (RT_SUCCESS(rc)) 208 208 { … … 333 333 ///////////////////////////////////////////////////////////////////////////// 334 334 335 STDMETHODIMP GuestSession::COMGETTER(User)(BSTR *aUser) 336 { 337 #ifndef VBOX_WITH_GUEST_CONTROL 338 ReturnComNotImplemented(); 339 #else 340 LogFlowThisFuncEnter(); 341 342 CheckComArgOutPointerValid(aUser); 343 344 AutoCaller autoCaller(this); 345 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 335 HRESULT GuestSession::getUser(com::Utf8Str &aUser) 336 { 337 #ifndef VBOX_WITH_GUEST_CONTROL 338 ReturnComNotImplemented(); 339 #else 340 341 LogFlowThisFuncEnter(); 346 342 347 343 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 348 344 349 mData.mCredentials.mUser.cloneTo(aUser);345 aUser = mData.mCredentials.mUser; 350 346 351 347 LogFlowThisFuncLeave(); … … 354 350 } 355 351 356 STDMETHODIMP GuestSession::COMGETTER(Domain)(BSTR *aDomain) 357 { 358 #ifndef VBOX_WITH_GUEST_CONTROL 359 ReturnComNotImplemented(); 360 #else 361 LogFlowThisFuncEnter(); 362 363 CheckComArgOutPointerValid(aDomain); 364 365 AutoCaller autoCaller(this); 366 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 352 HRESULT GuestSession::getDomain(com::Utf8Str &aDomain) 353 { 354 #ifndef VBOX_WITH_GUEST_CONTROL 355 ReturnComNotImplemented(); 356 #else 357 LogFlowThisFuncEnter(); 367 358 368 359 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 369 360 370 mData.mCredentials.mDomain.cloneTo(aDomain);361 aDomain = mData.mCredentials.mDomain; 371 362 372 363 LogFlowThisFuncLeave(); … … 375 366 } 376 367 377 STDMETHODIMP GuestSession::COMGETTER(Name)(BSTR *aName) 378 { 379 #ifndef VBOX_WITH_GUEST_CONTROL 380 ReturnComNotImplemented(); 381 #else 382 LogFlowThisFuncEnter(); 383 384 CheckComArgOutPointerValid(aName); 385 386 AutoCaller autoCaller(this); 387 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 368 HRESULT GuestSession::getName(com::Utf8Str &aName) 369 { 370 #ifndef VBOX_WITH_GUEST_CONTROL 371 ReturnComNotImplemented(); 372 #else 373 LogFlowThisFuncEnter(); 388 374 389 375 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 390 376 391 mData.mSession.mName.cloneTo(aName);377 aName = mData.mSession.mName; 392 378 393 379 LogFlowThisFuncLeave(); … … 396 382 } 397 383 398 STDMETHODIMP GuestSession::COMGETTER(Id)(ULONG *aId) 399 { 400 #ifndef VBOX_WITH_GUEST_CONTROL 401 ReturnComNotImplemented(); 402 #else 403 LogFlowThisFuncEnter(); 404 405 CheckComArgOutPointerValid(aId); 406 407 AutoCaller autoCaller(this); 408 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 384 HRESULT GuestSession::getId(ULONG *aId) 385 { 386 #ifndef VBOX_WITH_GUEST_CONTROL 387 ReturnComNotImplemented(); 388 #else 389 LogFlowThisFuncEnter(); 409 390 410 391 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 417 398 } 418 399 419 STDMETHODIMP GuestSession::COMGETTER(Status)(GuestSessionStatus_T *aStatus) 420 { 421 #ifndef VBOX_WITH_GUEST_CONTROL 422 ReturnComNotImplemented(); 423 #else 424 LogFlowThisFuncEnter(); 425 426 CheckComArgOutPointerValid(aStatus); 427 428 AutoCaller autoCaller(this); 429 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 400 HRESULT GuestSession::getStatus(GuestSessionStatus_T *aStatus) 401 { 402 #ifndef VBOX_WITH_GUEST_CONTROL 403 ReturnComNotImplemented(); 404 #else 405 LogFlowThisFuncEnter(); 430 406 431 407 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 438 414 } 439 415 440 STDMETHODIMP GuestSession::COMGETTER(Timeout)(ULONG *aTimeout) 441 { 442 #ifndef VBOX_WITH_GUEST_CONTROL 443 ReturnComNotImplemented(); 444 #else 445 LogFlowThisFuncEnter(); 446 447 CheckComArgOutPointerValid(aTimeout); 448 449 AutoCaller autoCaller(this); 450 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 416 HRESULT GuestSession::getTimeout(ULONG *aTimeout) 417 { 418 #ifndef VBOX_WITH_GUEST_CONTROL 419 ReturnComNotImplemented(); 420 #else 421 LogFlowThisFuncEnter(); 451 422 452 423 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 459 430 } 460 431 461 STDMETHODIMP GuestSession::COMSETTER(Timeout)(ULONG aTimeout) 462 { 463 #ifndef VBOX_WITH_GUEST_CONTROL 464 ReturnComNotImplemented(); 465 #else 466 LogFlowThisFuncEnter(); 467 468 AutoCaller autoCaller(this); 469 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 432 HRESULT GuestSession::setTimeout(ULONG aTimeout) 433 { 434 #ifndef VBOX_WITH_GUEST_CONTROL 435 ReturnComNotImplemented(); 436 #else 437 LogFlowThisFuncEnter(); 470 438 471 439 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 478 446 } 479 447 480 STDMETHODIMP GuestSession::COMGETTER(ProtocolVersion)(ULONG *aVersion) 481 { 482 #ifndef VBOX_WITH_GUEST_CONTROL 483 ReturnComNotImplemented(); 484 #else 485 LogFlowThisFuncEnter(); 486 487 CheckComArgOutPointerValid(aVersion); 488 489 AutoCaller autoCaller(this); 490 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 448 HRESULT GuestSession::getProtocolVersion(ULONG *aProtocolVersion) 449 { 450 #ifndef VBOX_WITH_GUEST_CONTROL 451 ReturnComNotImplemented(); 452 #else 453 LogFlowThisFuncEnter(); 491 454 492 455 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 493 456 494 *a Version = mData.mProtocolVersion;457 *aProtocolVersion = mData.mProtocolVersion; 495 458 496 459 LogFlowThisFuncLeave(); … … 499 462 } 500 463 501 STDMETHODIMP GuestSession::COMGETTER(Environment)(ComSafeArrayOut(BSTR, aEnvironment)) 502 { 503 #ifndef VBOX_WITH_GUEST_CONTROL 504 ReturnComNotImplemented(); 505 #else 506 LogFlowThisFuncEnter(); 507 508 CheckComArgOutSafeArrayPointerValid(aEnvironment); 509 510 AutoCaller autoCaller(this); 511 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 464 HRESULT GuestSession::getEnvironment(std::vector<com::Utf8Str> &aEnvironment) 465 { 466 #ifndef VBOX_WITH_GUEST_CONTROL 467 ReturnComNotImplemented(); 468 #else 469 LogFlowThisFuncEnter(); 512 470 513 471 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 516 474 LogFlowThisFunc(("[%s]: cEnvVars=%RU32\n", 517 475 mData.mSession.mName.c_str(), cEnvVars)); 518 com::SafeArray<BSTR> environment(cEnvVars);519 476 520 477 for (size_t i = 0; i < cEnvVars; i++) 521 { 522 Bstr strEnv(mData.mEnvironment.Get(i)); 523 strEnv.cloneTo(&environment[i]); 524 } 525 environment.detachTo(ComSafeArrayOutArg(aEnvironment)); 478 aEnvironment[i] = mData.mEnvironment.Get(i); 526 479 527 480 LogFlowThisFuncLeave(); … … 530 483 } 531 484 532 STDMETHODIMP GuestSession::COMSETTER(Environment)(ComSafeArrayIn(IN_BSTR, aValues)) 533 { 534 #ifndef VBOX_WITH_GUEST_CONTROL 535 ReturnComNotImplemented(); 536 #else 537 LogFlowThisFuncEnter(); 538 539 AutoCaller autoCaller(this); 540 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 485 HRESULT GuestSession::setEnvironment(const std::vector<com::Utf8Str> &aEnvironment) 486 { 487 #ifndef VBOX_WITH_GUEST_CONTROL 488 ReturnComNotImplemented(); 489 #else 490 LogFlowThisFuncEnter(); 541 491 542 492 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 543 493 544 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aValues));545 546 494 int rc = VINF_SUCCESS; 547 for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++) 548 { 549 Utf8Str strEnv(environment[i]); 550 if (!strEnv.isEmpty()) /* Silently skip empty entries. */ 551 rc = mData.mEnvironment.Set(strEnv); 552 } 495 for (size_t i = 0; i < aEnvironment.size() && RT_SUCCESS(rc); ++i) 496 if (!aEnvironment[i].isEmpty()) /* Silently skip empty entries. */ 497 rc = mData.mEnvironment.Set(aEnvironment[i]); 553 498 554 499 HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; … … 558 503 } 559 504 560 STDMETHODIMP GuestSession::COMGETTER(Processes)(ComSafeArrayOut(IGuestProcess *, aProcesses)) 561 { 562 #ifndef VBOX_WITH_GUEST_CONTROL 563 ReturnComNotImplemented(); 564 #else 565 LogFlowThisFuncEnter(); 566 567 CheckComArgOutSafeArrayPointerValid(aProcesses); 568 569 AutoCaller autoCaller(this); 570 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 505 HRESULT GuestSession::getProcesses(std::vector<ComPtr<IGuestProcess> > &aProcesses) 506 { 507 #ifndef VBOX_WITH_GUEST_CONTROL 508 ReturnComNotImplemented(); 509 #else 510 LogFlowThisFuncEnter(); 571 511 572 512 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 573 574 SafeIfaceArray<IGuestProcess> collection(mData.mProcesses); 575 collection.detachTo(ComSafeArrayOutArg(aProcesses)); 576 577 LogFlowFunc(("mProcesses=%zu\n", collection.size())); 513 aProcesses.resize(mData.mProcesses.size()); 514 size_t i = 0; 515 for(SessionProcesses::iterator it = mData.mProcesses.begin(); it != mData.mProcesses.end(); ++it, ++i) 516 it->second.queryInterfaceTo(aProcesses[i].asOutParam()); 517 518 LogFlowFunc(("mProcesses=%zu\n", aProcesses.size())); 578 519 return S_OK; 579 520 #endif /* VBOX_WITH_GUEST_CONTROL */ 580 521 } 581 522 582 STDMETHODIMP GuestSession::COMGETTER(Directories)(ComSafeArrayOut(IGuestDirectory *, aDirectories)) 583 { 584 #ifndef VBOX_WITH_GUEST_CONTROL 585 ReturnComNotImplemented(); 586 #else 587 LogFlowThisFuncEnter(); 588 589 CheckComArgOutSafeArrayPointerValid(aDirectories); 590 591 AutoCaller autoCaller(this); 592 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 523 HRESULT GuestSession::getDirectories(std::vector<ComPtr<IGuestDirectory> > &aDirectories) 524 { 525 #ifndef VBOX_WITH_GUEST_CONTROL 526 ReturnComNotImplemented(); 527 #else 528 LogFlowThisFuncEnter(); 593 529 594 530 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 595 596 SafeIfaceArray<IGuestDirectory> collection(mData.mDirectories); 597 collection.detachTo(ComSafeArrayOutArg(aDirectories)); 598 599 LogFlowFunc(("mDirectories=%zu\n", collection.size())); 531 aDirectories.resize(mData.mDirectories.size()); 532 size_t i = 0; 533 for(SessionDirectories::iterator it = mData.mDirectories.begin(); it != mData.mDirectories.end(); ++it, ++i) 534 it->second.queryInterfaceTo(aDirectories[i].asOutParam()); 535 536 LogFlowFunc(("mDirectories=%zu\n", aDirectories.size())); 600 537 return S_OK; 601 538 #endif /* VBOX_WITH_GUEST_CONTROL */ 602 539 } 603 540 604 STDMETHODIMP GuestSession::COMGETTER(Files)(ComSafeArrayOut(IGuestFile *, aFiles)) 605 { 606 #ifndef VBOX_WITH_GUEST_CONTROL 607 ReturnComNotImplemented(); 608 #else 609 LogFlowThisFuncEnter(); 610 611 CheckComArgOutSafeArrayPointerValid(aFiles); 612 613 AutoCaller autoCaller(this); 614 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 541 HRESULT GuestSession::getFiles(std::vector<ComPtr<IGuestFile> > &aFiles) 542 { 543 #ifndef VBOX_WITH_GUEST_CONTROL 544 ReturnComNotImplemented(); 545 #else 546 LogFlowThisFuncEnter(); 615 547 616 548 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 617 549 618 SafeIfaceArray<IGuestFile> collection(mData.mFiles); 619 collection.detachTo(ComSafeArrayOutArg(aFiles)); 620 621 LogFlowFunc(("mFiles=%zu\n", collection.size())); 550 aFiles.resize(mData.mFiles.size()); 551 size_t i = 0; 552 for(SessionFiles::iterator it = mData.mFiles.begin(); it != mData.mFiles.end(); ++it, ++i) 553 it->second.queryInterfaceTo(aFiles[i].asOutParam()); 554 555 LogFlowFunc(("mDirectories=%zu\n", aFiles.size())); 556 622 557 return S_OK; 623 558 #endif /* VBOX_WITH_GUEST_CONTROL */ 624 559 } 625 560 626 STDMETHODIMP GuestSession::COMGETTER(EventSource)(IEventSource ** aEventSource) 627 { 628 #ifndef VBOX_WITH_GUEST_CONTROL 629 ReturnComNotImplemented(); 630 #else 631 LogFlowThisFuncEnter(); 632 633 CheckComArgOutPointerValid(aEventSource); 634 635 AutoCaller autoCaller(this); 636 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 561 HRESULT GuestSession::getEventSource(ComPtr<IEventSource> &aEventSource) 562 { 563 #ifndef VBOX_WITH_GUEST_CONTROL 564 ReturnComNotImplemented(); 565 #else 566 LogFlowThisFuncEnter(); 637 567 638 568 // no need to lock - lifetime constant 639 mEventSource.queryInterfaceTo(aEventSource );569 mEventSource.queryInterfaceTo(aEventSource.asOutParam()); 640 570 641 571 LogFlowThisFuncLeave(); … … 647 577 /////////////////////////////////////////////////////////////////////////////// 648 578 649 int GuestSession:: closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *pGuestRc)579 int GuestSession::i_closeSession(uint32_t uFlags, uint32_t uTimeoutMS, int *pGuestRc) 650 580 { 651 581 LogFlowThisFunc(("uFlags=%x, uTimeoutMS=%RU32\n", uFlags, uTimeoutMS)); … … 699 629 alock.release(); /* Drop the write lock before waiting. */ 700 630 701 vrc = sendCommand(HOST_SESSION_CLOSE, i, paParms);631 vrc = i_sendCommand(HOST_SESSION_CLOSE, i, paParms); 702 632 if (RT_SUCCESS(vrc)) 703 vrc = waitForStatusChange(pEvent, GuestSessionWaitForFlag_Terminate, uTimeoutMS,633 vrc = i_waitForStatusChange(pEvent, GuestSessionWaitForFlag_Terminate, uTimeoutMS, 704 634 NULL /* Session status */, pGuestRc); 705 635 … … 710 640 } 711 641 712 int GuestSession:: directoryCreateInternal(const Utf8Str &strPath, uint32_t uMode,642 int GuestSession::i_directoryCreateInternal(const Utf8Str &strPath, uint32_t uMode, 713 643 uint32_t uFlags, int *pGuestRc) 714 644 { … … 759 689 } 760 690 761 inline bool GuestSession:: directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir)691 inline bool GuestSession::i_directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir) 762 692 { 763 693 SessionDirectories::const_iterator it = mData.mDirectories.find(uDirID); … … 771 701 } 772 702 773 int GuestSession:: directoryQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc)703 int GuestSession::i_directoryQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc) 774 704 { 775 705 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); 776 706 777 int vrc = fsQueryInfoInternal(strPath, objData, pGuestRc);707 int vrc = i_fsQueryInfoInternal(strPath, objData, pGuestRc); 778 708 if (RT_SUCCESS(vrc)) 779 709 { … … 786 716 } 787 717 788 int GuestSession:: directoryRemoveFromList(GuestDirectory *pDirectory)718 int GuestSession::i_directoryRemoveFromList(GuestDirectory *pDirectory) 789 719 { 790 720 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 825 755 } 826 756 827 int GuestSession:: directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags,828 int *pGuestRc)757 int GuestSession::i_directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags, 758 int *pGuestRc) 829 759 { 830 760 AssertReturn(!(uFlags & ~DIRREMOVE_FLAG_VALID_MASK), VERR_INVALID_PARAMETER); … … 850 780 alock.release(); /* Drop write lock before sending. */ 851 781 852 vrc = sendCommand(HOST_DIR_REMOVE, i, paParms);782 vrc = i_sendCommand(HOST_DIR_REMOVE, i, paParms); 853 783 if (RT_SUCCESS(vrc)) 854 784 { … … 865 795 } 866 796 867 int GuestSession:: objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath,868 bool fDirectory, Utf8Str &strName, int *pGuestRc)797 int GuestSession::i_objectCreateTempInternal(const Utf8Str &strTemplate, const Utf8Str &strPath, 798 bool fDirectory, Utf8Str &strName, int *pGuestRc) 869 799 { 870 800 LogFlowThisFunc(("strTemplate=%s, strPath=%s, fDirectory=%RTbool\n", … … 928 858 } 929 859 930 int GuestSession:: directoryOpenInternal(const GuestDirectoryOpenInfo &openInfo,931 ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc)860 int GuestSession::i_directoryOpenInternal(const GuestDirectoryOpenInfo &openInfo, 861 ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc) 932 862 { 933 863 LogFlowThisFunc(("strPath=%s, strPath=%s, uFlags=%x\n", … … 947 877 { 948 878 /* Is the directory ID already used? */ 949 if (! directoryExists(uNewDirID, NULL /* pDirectory */))879 if (!i_directoryExists(uNewDirID, NULL /* pDirectory */)) 950 880 { 951 881 /* Callback with context ID was not found. This means … … 1016 946 } 1017 947 1018 int GuestSession:: dispatchToDirectory(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)948 int GuestSession::i_dispatchToDirectory(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1019 949 { 1020 950 LogFlowFunc(("pCtxCb=%p, pSvcCb=%p\n", pCtxCb, pSvcCb)); … … 1052 982 } 1053 983 1054 int GuestSession:: dispatchToFile(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)984 int GuestSession::i_dispatchToFile(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1055 985 { 1056 986 LogFlowFunc(("pCtxCb=%p, pSvcCb=%p\n", pCtxCb, pSvcCb)); … … 1085 1015 } 1086 1016 1087 int GuestSession:: dispatchToObject(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)1017 int GuestSession::i_dispatchToObject(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1088 1018 { 1089 1019 LogFlowFunc(("pCtxCb=%p, pSvcCb=%p\n", pCtxCb, pSvcCb)); … … 1108 1038 alock.release(); 1109 1039 1110 rc = dispatchToFile(pCtxCb, pSvcCb);1040 rc = i_dispatchToFile(pCtxCb, pSvcCb); 1111 1041 } 1112 1042 else … … 1117 1047 alock.release(); 1118 1048 1119 rc = dispatchToDirectory(pCtxCb, pSvcCb);1049 rc = i_dispatchToDirectory(pCtxCb, pSvcCb); 1120 1050 } 1121 1051 else … … 1127 1057 alock.release(); 1128 1058 1129 rc = dispatchToProcess(pCtxCb, pSvcCb);1059 rc = i_dispatchToProcess(pCtxCb, pSvcCb); 1130 1060 } 1131 1061 … … 1134 1064 } 1135 1065 1136 int GuestSession:: dispatchToProcess(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)1066 int GuestSession::i_dispatchToProcess(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1137 1067 { 1138 1068 LogFlowFunc(("pCtxCb=%p, pSvcCb=%p\n", pCtxCb, pSvcCb)); … … 1176 1106 } 1177 1107 1178 int GuestSession:: dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb)1108 int GuestSession::i_dispatchToThis(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb) 1179 1109 { 1180 1110 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); … … 1198 1128 case GUEST_SESSION_NOTIFY: /* Guest Additions >= 4.3.0. */ 1199 1129 { 1200 rc = onSessionStatusChange(pCbCtx, pSvcCb);1130 rc = i_onSessionStatusChange(pCbCtx, pSvcCb); 1201 1131 break; 1202 1132 } … … 1212 1142 } 1213 1143 1214 inline bool GuestSession:: fileExists(uint32_t uFileID, ComObjPtr<GuestFile> *pFile)1144 inline bool GuestSession::i_fileExists(uint32_t uFileID, ComObjPtr<GuestFile> *pFile) 1215 1145 { 1216 1146 SessionFiles::const_iterator it = mData.mFiles.find(uFileID); … … 1224 1154 } 1225 1155 1226 int GuestSession:: fileRemoveFromList(GuestFile *pFile)1156 int GuestSession::i_fileRemoveFromList(GuestFile *pFile) 1227 1157 { 1228 1158 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1266 1196 } 1267 1197 1268 int GuestSession:: fileRemoveInternal(const Utf8Str &strPath, int *pGuestRc)1198 int GuestSession::i_fileRemoveInternal(const Utf8Str &strPath, int *pGuestRc) 1269 1199 { 1270 1200 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); … … 1295 1225 } 1296 1226 1297 int GuestSession:: fileOpenInternal(const GuestFileOpenInfo &openInfo,1298 ComObjPtr<GuestFile> &pFile, int *pGuestRc)1227 int GuestSession::i_fileOpenInternal(const GuestFileOpenInfo &openInfo, 1228 ComObjPtr<GuestFile> &pFile, int *pGuestRc) 1299 1229 { 1300 1230 LogFlowThisFunc(("strPath=%s, strOpenMode=%s, strDisposition=%s, uCreationMode=%x, uOffset=%RU64\n", … … 1323 1253 { 1324 1254 /* Is the file ID already used? */ 1325 if (! fileExists(uNewFileID, NULL /* pFile */))1255 if (!i_fileExists(uNewFileID, NULL /* pFile */)) 1326 1256 { 1327 1257 /* Callback with context ID was not found. This means … … 1397 1327 } 1398 1328 1399 int GuestSession:: fileQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc)1329 int GuestSession::i_fileQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc) 1400 1330 { 1401 1331 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); 1402 1332 1403 int vrc = fsQueryInfoInternal(strPath, objData, pGuestRc);1333 int vrc = i_fsQueryInfoInternal(strPath, objData, pGuestRc); 1404 1334 if (RT_SUCCESS(vrc)) 1405 1335 { … … 1412 1342 } 1413 1343 1414 int GuestSession:: fileQuerySizeInternal(const Utf8Str &strPath, int64_t *pllSize, int *pGuestRc)1344 int GuestSession::i_fileQuerySizeInternal(const Utf8Str &strPath, int64_t *pllSize, int *pGuestRc) 1415 1345 { 1416 1346 AssertPtrReturn(pllSize, VERR_INVALID_POINTER); 1417 1347 1418 1348 GuestFsObjData objData; 1419 int vrc = fileQueryInfoInternal(strPath, objData, pGuestRc);1349 int vrc = i_fileQueryInfoInternal(strPath, objData, pGuestRc); 1420 1350 if (RT_SUCCESS(vrc)) 1421 1351 *pllSize = objData.mObjectSize; … … 1424 1354 } 1425 1355 1426 int GuestSession:: fsQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc)1356 int GuestSession::i_fsQueryInfoInternal(const Utf8Str &strPath, GuestFsObjData &objData, int *pGuestRc) 1427 1357 { 1428 1358 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); … … 1469 1399 } 1470 1400 1471 const GuestCredentials& GuestSession:: getCredentials(void)1401 const GuestCredentials& GuestSession::i_getCredentials(void) 1472 1402 { 1473 1403 return mData.mCredentials; 1474 1404 } 1475 1405 1476 const GuestEnvironment& GuestSession:: getEnvironment(void)1406 const GuestEnvironment& GuestSession::i_getEnvironment(void) 1477 1407 { 1478 1408 return mData.mEnvironment; 1479 1409 } 1480 1410 1481 Utf8Str GuestSession:: getName(void)1411 Utf8Str GuestSession::i_getName(void) 1482 1412 { 1483 1413 return mData.mSession.mName; … … 1485 1415 1486 1416 /* static */ 1487 Utf8Str GuestSession:: guestErrorToString(int guestRc)1417 Utf8Str GuestSession::i_guestErrorToString(int guestRc) 1488 1418 { 1489 1419 Utf8Str strError; … … 1542 1472 * error when not ready. 1543 1473 */ 1544 HRESULT GuestSession::i sReadyExternal(void)1474 HRESULT GuestSession::i_isReadyExternal(void) 1545 1475 { 1546 1476 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1557 1487 * the public session list. 1558 1488 */ 1559 int GuestSession:: onRemove(void)1489 int GuestSession::i_onRemove(void) 1560 1490 { 1561 1491 LogFlowThisFuncEnter(); … … 1582 1512 1583 1513 /** No locking! */ 1584 int GuestSession:: onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData)1514 int GuestSession::i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData) 1585 1515 { 1586 1516 AssertPtrReturn(pCbCtx, VERR_INVALID_POINTER); … … 1646 1576 /* Set the session status. */ 1647 1577 if (RT_SUCCESS(vrc)) 1648 vrc = setSessionStatus(sessionStatus, guestRc);1578 vrc = i_setSessionStatus(sessionStatus, guestRc); 1649 1579 1650 1580 LogFlowThisFunc(("ID=%RU32, guestRc=%Rrc\n", mData.mSession.mID, guestRc)); … … 1654 1584 } 1655 1585 1656 int GuestSession:: startSessionInternal(int *pGuestRc)1586 int GuestSession::i_startSessionInternal(int *pGuestRc) 1657 1587 { 1658 1588 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1715 1645 alock.release(); /* Drop write lock before sending. */ 1716 1646 1717 vrc = sendCommand(HOST_SESSION_CREATE, i, paParms);1647 vrc = i_sendCommand(HOST_SESSION_CREATE, i, paParms); 1718 1648 if (RT_SUCCESS(vrc)) 1719 1649 { 1720 vrc = waitForStatusChange(pEvent, GuestSessionWaitForFlag_Start,1721 30 * 1000 /* 30s timeout */,1722 NULL /* Session status */, pGuestRc);1650 vrc = i_waitForStatusChange(pEvent, GuestSessionWaitForFlag_Start, 1651 30 * 1000 /* 30s timeout */, 1652 NULL /* Session status */, pGuestRc); 1723 1653 } 1724 1654 else … … 1740 1670 } 1741 1671 1742 int GuestSession:: startSessionAsync(void)1672 int GuestSession::i_startSessionAsync(void) 1743 1673 { 1744 1674 LogFlowThisFuncEnter(); … … 1753 1683 AssertReturn(pTask->isOk(), pTask->rc()); 1754 1684 1755 vrc = RTThreadCreate(NULL, GuestSession:: startSessionThread,1685 vrc = RTThreadCreate(NULL, GuestSession::i_startSessionThread, 1756 1686 (void *)pTask.get(), 0, 1757 1687 RTTHREADTYPE_MAIN_WORKER, 0, … … 1773 1703 1774 1704 /* static */ 1775 DECLCALLBACK(int) GuestSession:: startSessionThread(RTTHREAD Thread, void *pvUser)1705 DECLCALLBACK(int) GuestSession::i_startSessionThread(RTTHREAD Thread, void *pvUser) 1776 1706 { 1777 1707 LogFlowFunc(("pvUser=%p\n", pvUser)); … … 1786 1716 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1787 1717 1788 int vrc = pSession-> startSessionInternal(NULL /* Guest rc, ignored */);1718 int vrc = pSession->i_startSessionInternal(NULL /* Guest rc, ignored */); 1789 1719 /* Nothing to do here anymore. */ 1790 1720 … … 1793 1723 } 1794 1724 1795 int GuestSession:: pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest,1725 int GuestSession::i_pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest, 1796 1726 uint32_t uFlags, int *pGuestRc) 1797 1727 { … … 1821 1751 alock.release(); /* Drop write lock before sending. */ 1822 1752 1823 vrc = sendCommand(HOST_PATH_RENAME, i, paParms);1753 vrc = i_sendCommand(HOST_PATH_RENAME, i, paParms); 1824 1754 if (RT_SUCCESS(vrc)) 1825 1755 { … … 1836 1766 } 1837 1767 1838 int GuestSession:: processRemoveFromList(GuestProcess *pProcess)1768 int GuestSession::i_processRemoveFromList(GuestProcess *pProcess) 1839 1769 { 1840 1770 AssertPtrReturn(pProcess, VERR_INVALID_POINTER); … … 1902 1832 * @param pProcess 1903 1833 */ 1904 int GuestSession:: processCreateExInteral(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProcess)1834 int GuestSession::i_processCreateExInteral(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProcess) 1905 1835 { 1906 1836 LogFlowFunc(("mCmd=%s, mFlags=%x, mTimeoutMS=%RU32\n", … … 1963 1893 { 1964 1894 /* Is the context ID already used? */ 1965 if (! processExists(uNewProcessID, NULL /* pProcess */))1895 if (!i_processExists(uNewProcessID, NULL /* pProcess */)) 1966 1896 { 1967 1897 /* Callback with context ID was not found. This means … … 2015 1945 } 2016 1946 2017 inline bool GuestSession:: processExists(uint32_t uProcessID, ComObjPtr<GuestProcess> *pProcess)1947 inline bool GuestSession::i_processExists(uint32_t uProcessID, ComObjPtr<GuestProcess> *pProcess) 2018 1948 { 2019 1949 SessionProcesses::const_iterator it = mData.mProcesses.find(uProcessID); … … 2027 1957 } 2028 1958 2029 inline int GuestSession:: processGetByPID(ULONG uPID, ComObjPtr<GuestProcess> *pProcess)1959 inline int GuestSession::i_processGetByPID(ULONG uPID, ComObjPtr<GuestProcess> *pProcess) 2030 1960 { 2031 1961 AssertReturn(uPID, false); … … 2055 1985 } 2056 1986 2057 int GuestSession:: sendCommand(uint32_t uFunction,2058 uint32_t uParms, PVBOXHGCMSVCPARM paParms)1987 int GuestSession::i_sendCommand(uint32_t uFunction, 1988 uint32_t uParms, PVBOXHGCMSVCPARM paParms) 2059 1989 { 2060 1990 LogFlowThisFuncEnter(); … … 2083 2013 2084 2014 /* static */ 2085 HRESULT GuestSession:: setErrorExternal(VirtualBoxBase *pInterface, int guestRc)2015 HRESULT GuestSession::i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc) 2086 2016 { 2087 2017 AssertPtr(pInterface); 2088 2018 AssertMsg(RT_FAILURE(guestRc), ("Guest rc does not indicate a failure when setting error\n")); 2089 2019 2090 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestSession:: guestErrorToString(guestRc).c_str());2020 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestSession::i_guestErrorToString(guestRc).c_str()); 2091 2021 } 2092 2022 2093 2023 /* Does not do locking; caller is responsible for that! */ 2094 int GuestSession:: setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc)2024 int GuestSession::i_setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc) 2095 2025 { 2096 2026 LogFlowThisFunc(("oldStatus=%RU32, newStatus=%RU32, sessionRc=%Rrc\n", … … 2117 2047 int rc2 = errorInfo->initEx(VBOX_E_IPRT_ERROR, sessionRc, 2118 2048 COM_IIDOF(IGuestSession), getComponentName(), 2119 guestErrorToString(sessionRc));2049 i_guestErrorToString(sessionRc)); 2120 2050 AssertRC(rc2); 2121 2051 … … 2127 2057 } 2128 2058 2129 int GuestSession:: signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */)2059 int GuestSession::i_signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */) 2130 2060 { 2131 2061 /*LogFlowThisFunc(("enmWaitResult=%d, rc=%Rrc, mWaitCount=%RU32, mWaitEvent=%p\n", … … 2141 2071 } 2142 2072 2143 int GuestSession:: startTaskAsync(const Utf8Str &strTaskDesc,2144 GuestSessionTask *pTask, ComObjPtr<Progress> &pProgress)2073 int GuestSession::i_startTaskAsync(const Utf8Str &strTaskDesc, 2074 GuestSessionTask *pTask, ComObjPtr<Progress> &pProgress) 2145 2075 { 2146 2076 LogFlowThisFunc(("strTaskDesc=%s, pTask=%p\n", strTaskDesc.c_str(), pTask)); … … 2180 2110 * @return IPRT status code. 2181 2111 */ 2182 int GuestSession:: queryInfo(void)2112 int GuestSession::i_queryInfo(void) 2183 2113 { 2184 2114 /* … … 2220 2150 } 2221 2151 2222 int GuestSession:: waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionWaitResult_T &waitResult, int *pGuestRc)2152 int GuestSession::i_waitFor(uint32_t fWaitFlags, ULONG uTimeoutMS, GuestSessionWaitResult_T &waitResult, int *pGuestRc) 2223 2153 { 2224 2154 LogFlowThisFuncEnter(); … … 2347 2277 2348 2278 GuestSessionStatus_T sessionStatus; 2349 vrc = waitForStatusChange(pEvent, fWaitFlags,2350 uTimeoutMS, &sessionStatus, pGuestRc);2279 vrc = i_waitForStatusChange(pEvent, fWaitFlags, 2280 uTimeoutMS, &sessionStatus, pGuestRc); 2351 2281 if (RT_SUCCESS(vrc)) 2352 2282 { … … 2386 2316 } 2387 2317 2388 int GuestSession:: waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS,2389 GuestSessionStatus_T *pSessionStatus, int *pGuestRc)2318 int GuestSession::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS, 2319 GuestSessionStatus_T *pSessionStatus, int *pGuestRc) 2390 2320 { 2391 2321 AssertPtrReturn(pEvent, VERR_INVALID_POINTER); … … 2431 2361 ///////////////////////////////////////////////////////////////////////////// 2432 2362 2433 STDMETHODIMP GuestSession:: Close(void)2363 STDMETHODIMP GuestSession::close(void) 2434 2364 { 2435 2365 #ifndef VBOX_WITH_GUEST_CONTROL … … 2443 2373 /* Close session on guest. */ 2444 2374 int guestRc = VINF_SUCCESS; 2445 int rc = closeSession(0 /* Flags */, 30 * 1000 /* Timeout */,2446 &guestRc);2375 int rc = i_closeSession(0 /* Flags */, 30 * 1000 /* Timeout */, 2376 &guestRc); 2447 2377 /* On failure don't return here, instead do all the cleanup 2448 2378 * work first and then return an error. */ … … 2461 2391 { 2462 2392 if (rc == VERR_GSTCTL_GUEST_ERROR) 2463 return GuestSession:: setErrorExternal(this, guestRc);2393 return GuestSession::i_setErrorExternal(this, guestRc); 2464 2394 2465 2395 return setError(VBOX_E_IPRT_ERROR, … … 2471 2401 } 2472 2402 2473 STDMETHODIMP GuestSession::CopyFrom(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(CopyFileFlag_T, aFlags), IProgress **aProgress) 2474 { 2475 #ifndef VBOX_WITH_GUEST_CONTROL 2476 ReturnComNotImplemented(); 2477 #else 2478 CheckComArgStrNotEmptyOrNull(aSource); 2479 CheckComArgStrNotEmptyOrNull(aDest); 2480 CheckComArgOutPointerValid(aProgress); 2481 2482 LogFlowThisFuncEnter(); 2483 2484 if (RT_UNLIKELY((aSource) == NULL || *(aSource) == '\0')) 2403 HRESULT GuestSession::copyFrom(const com::Utf8Str &aSource, const com::Utf8Str &aDest, const std::vector<CopyFileFlag_T> &aFlags, ComPtr<IProgress> &aProgress) 2404 { 2405 #ifndef VBOX_WITH_GUEST_CONTROL 2406 ReturnComNotImplemented(); 2407 #else 2408 2409 LogFlowThisFuncEnter(); 2410 2411 if (RT_UNLIKELY((aSource.c_str()) == NULL || *(aSource.c_str()) == '\0')) 2485 2412 return setError(E_INVALIDARG, tr("No source specified")); 2486 if (RT_UNLIKELY((aDest ) == NULL || *(aDest) == '\0'))2413 if (RT_UNLIKELY((aDest.c_str()) == NULL || *(aDest.c_str()) == '\0')) 2487 2414 return setError(E_INVALIDARG, tr("No destination specified")); 2488 2415 2489 AutoCaller autoCaller(this);2490 if (FAILED(autoCaller.rc())) return autoCaller.rc();2491 2492 2416 uint32_t fFlags = CopyFileFlag_None; 2493 if (aFlags) 2494 { 2495 com::SafeArray<CopyFileFlag_T> flags(ComSafeArrayInArg(aFlags)); 2496 for (size_t i = 0; i < flags.size(); i++) 2497 fFlags |= flags[i]; 2417 if (aFlags.size()) 2418 { 2419 for (size_t i = 0; i < aFlags.size(); i++) 2420 fFlags |= aFlags[i]; 2498 2421 } 2499 2422 … … 2506 2429 ComObjPtr<Progress> pProgress; 2507 2430 SessionTaskCopyFrom *pTask = new SessionTaskCopyFrom(this /* GuestSession */, 2508 Utf8Str(aSource), Utf8Str(aDest), fFlags);2509 int rc = startTaskAsync(Utf8StrFmt(tr("Copying \"%ls\" from guest to \"%ls\" on the host"), aSource, aDest),2431 aSource, aDest, fFlags); 2432 int rc = i_startTaskAsync(Utf8StrFmt(tr("Copying \"%s\" from guest to \"%s\" on the host"), aSource.c_str(), aDest.c_str()), 2510 2433 pTask, pProgress); 2511 2434 if (RT_SUCCESS(rc)) 2512 {2513 2435 /* Return progress to the caller. */ 2514 hr = pProgress.queryInterfaceTo(aProgress); 2515 } 2436 hr = pProgress.queryInterfaceTo(aProgress.asOutParam()); 2516 2437 else 2517 2438 hr = setError(VBOX_E_IPRT_ERROR, 2518 tr("Starting task for copying file \"% ls\" from guest to \"%ls\" on the host failed: %Rrc"), rc);2439 tr("Starting task for copying file \"%s\" from guest to \"%s\" on the host failed: %Rrc"), rc); 2519 2440 } 2520 2441 catch(std::bad_alloc &) … … 2527 2448 } 2528 2449 2529 STDMETHODIMP GuestSession::CopyTo(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(CopyFileFlag_T, aFlags), IProgress **aProgress) 2530 { 2531 #ifndef VBOX_WITH_GUEST_CONTROL 2532 ReturnComNotImplemented(); 2533 #else 2534 CheckComArgStrNotEmptyOrNull(aSource); 2535 CheckComArgStrNotEmptyOrNull(aDest); 2536 CheckComArgOutPointerValid(aProgress); 2537 2538 LogFlowThisFuncEnter(); 2539 2540 if (RT_UNLIKELY((aSource) == NULL || *(aSource) == '\0')) 2450 HRESULT GuestSession::copyTo(const com::Utf8Str &aSource, const com::Utf8Str &aDest, const std::vector<CopyFileFlag_T> &aFlags, ComPtr<IProgress> &aProgress) 2451 { 2452 #ifndef VBOX_WITH_GUEST_CONTROL 2453 ReturnComNotImplemented(); 2454 #else 2455 2456 LogFlowThisFuncEnter(); 2457 2458 if (RT_UNLIKELY((aSource.c_str()) == NULL || *(aSource.c_str()) == '\0')) 2541 2459 return setError(E_INVALIDARG, tr("No source specified")); 2542 if (RT_UNLIKELY((aDest ) == NULL || *(aDest) == '\0'))2460 if (RT_UNLIKELY((aDest.c_str()) == NULL || *(aDest.c_str()) == '\0')) 2543 2461 return setError(E_INVALIDARG, tr("No destination specified")); 2544 2462 2545 AutoCaller autoCaller(this);2546 if (FAILED(autoCaller.rc())) return autoCaller.rc();2547 2548 2463 uint32_t fFlags = CopyFileFlag_None; 2549 if (aFlags) 2550 { 2551 com::SafeArray<CopyFileFlag_T> flags(ComSafeArrayInArg(aFlags)); 2552 for (size_t i = 0; i < flags.size(); i++) 2553 fFlags |= flags[i]; 2464 if (aFlags.size()) 2465 { 2466 for (size_t i = 0; i < aFlags.size(); i++) 2467 fFlags |= aFlags[i]; 2554 2468 } 2555 2469 … … 2562 2476 ComObjPtr<Progress> pProgress; 2563 2477 SessionTaskCopyTo *pTask = new SessionTaskCopyTo(this /* GuestSession */, 2564 Utf8Str(aSource), Utf8Str(aDest), fFlags);2478 aSource, aDest, fFlags); 2565 2479 AssertPtrReturn(pTask, E_OUTOFMEMORY); 2566 int rc = startTaskAsync(Utf8StrFmt(tr("Copying \"%ls\" from host to \"%ls\" on the guest"), aSource, aDest),2480 int rc = i_startTaskAsync(Utf8StrFmt(tr("Copying \"%s\" from host to \"%s\" on the guest"), aSource.c_str(), aDest.c_str()), 2567 2481 pTask, pProgress); 2568 2482 if (RT_SUCCESS(rc)) 2569 2483 { 2570 2484 /* Return progress to the caller. */ 2571 hr = pProgress.queryInterfaceTo(aProgress );2485 hr = pProgress.queryInterfaceTo(aProgress.asOutParam()); 2572 2486 } 2573 2487 else 2574 2488 hr = setError(VBOX_E_IPRT_ERROR, 2575 tr("Starting task for copying file \"% ls\" from host to \"%ls\" on the guest failed: %Rrc"), rc);2489 tr("Starting task for copying file \"%s\" from host to \"%s\" on the guest failed: %Rrc"), rc); 2576 2490 } 2577 2491 catch(std::bad_alloc &) … … 2584 2498 } 2585 2499 2586 STDMETHODIMP GuestSession::DirectoryCreate(IN_BSTRaPath, ULONG aMode,2587 ComSafeArrayIn(DirectoryCreateFlag_T, aFlags))2588 { 2589 #ifndef VBOX_WITH_GUEST_CONTROL 2590 ReturnComNotImplemented(); 2591 #else 2592 LogFlowThisFuncEnter(); 2593 2594 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2500 HRESULT GuestSession::directoryCreate(const com::Utf8Str &aPath, ULONG aMode, 2501 const std::vector<DirectoryCreateFlag_T> &aFlags) 2502 { 2503 #ifndef VBOX_WITH_GUEST_CONTROL 2504 ReturnComNotImplemented(); 2505 #else 2506 LogFlowThisFuncEnter(); 2507 2508 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2595 2509 return setError(E_INVALIDARG, tr("No directory to create specified")); 2596 2510 2597 AutoCaller autoCaller(this);2598 if (FAILED(autoCaller.rc())) return autoCaller.rc();2599 2600 2511 uint32_t fFlags = DirectoryCreateFlag_None; 2601 if (aFlags) 2602 { 2603 com::SafeArray<DirectoryCreateFlag_T> flags(ComSafeArrayInArg(aFlags)); 2604 for (size_t i = 0; i < flags.size(); i++) 2605 fFlags |= flags[i]; 2512 if (aFlags.size()) 2513 { 2514 for (size_t i = 0; i < aFlags.size(); i++) 2515 fFlags |= aFlags[i]; 2606 2516 2607 2517 if (fFlags) 2608 {2609 2518 if (!(fFlags & DirectoryCreateFlag_Parents)) 2610 2519 return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), fFlags); 2611 }2612 2520 } 2613 2521 … … 2615 2523 2616 2524 ComObjPtr <GuestDirectory> pDirectory; int guestRc; 2617 int rc = directoryCreateInternal(Utf8Str(aPath), (uint32_t)aMode, fFlags, &guestRc);2525 int rc = i_directoryCreateInternal(aPath, (uint32_t)aMode, fFlags, &guestRc); 2618 2526 if (RT_FAILURE(rc)) 2619 2527 { … … 2643 2551 } 2644 2552 2645 STDMETHODIMP GuestSession::DirectoryCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, BSTR *aDirectory)2646 { 2647 #ifndef VBOX_WITH_GUEST_CONTROL 2648 ReturnComNotImplemented(); 2649 #else 2650 LogFlowThisFuncEnter(); 2651 2652 if (RT_UNLIKELY((aTemplate ) == NULL || *(aTemplate) == '\0'))2553 HRESULT GuestSession::directoryCreateTemp(const com::Utf8Str &aTemplateName, ULONG aMode, const com::Utf8Str &aPath, BOOL aSecure, com::Utf8Str &aDirectory) 2554 { 2555 #ifndef VBOX_WITH_GUEST_CONTROL 2556 ReturnComNotImplemented(); 2557 #else 2558 LogFlowThisFuncEnter(); 2559 2560 if (RT_UNLIKELY((aTemplateName.c_str()) == NULL || *(aTemplateName.c_str()) == '\0')) 2653 2561 return setError(E_INVALIDARG, tr("No template specified")); 2654 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2562 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2655 2563 return setError(E_INVALIDARG, tr("No directory name specified")); 2656 CheckComArgOutPointerValid(aDirectory);2657 2658 AutoCaller autoCaller(this);2659 if (FAILED(autoCaller.rc())) return autoCaller.rc();2660 2564 2661 2565 HRESULT hr = S_OK; 2662 2566 2663 Utf8Str strName; int guestRc; 2664 int rc = objectCreateTempInternal(Utf8Str(aTemplate), 2665 Utf8Str(aPath), 2666 true /* Directory */, strName, &guestRc); 2667 if (RT_SUCCESS(rc)) 2668 { 2669 strName.cloneTo(aDirectory); 2670 } 2671 else 2567 int guestRc; 2568 int rc = i_objectCreateTempInternal(aTemplateName, 2569 aPath, 2570 true /* Directory */, aDirectory, &guestRc); 2571 if (!RT_SUCCESS(rc)) 2672 2572 { 2673 2573 switch (rc) … … 2679 2579 default: 2680 2580 hr = setError(VBOX_E_IPRT_ERROR, tr("Temporary directory creation \"%s\" with template \"%s\" failed: %Rrc"), 2681 Utf8Str(aPath).c_str(), Utf8Str(aTemplate).c_str(), rc);2581 aPath.c_str(), aTemplateName.c_str(), rc); 2682 2582 break; 2683 2583 } … … 2688 2588 } 2689 2589 2690 STDMETHODIMP GuestSession::DirectoryExists(IN_BSTRaPath, BOOL *aExists)2691 { 2692 #ifndef VBOX_WITH_GUEST_CONTROL 2693 ReturnComNotImplemented(); 2694 #else 2695 LogFlowThisFuncEnter(); 2696 2697 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2590 HRESULT GuestSession::directoryExists(const com::Utf8Str &aPath, BOOL *aExists) 2591 { 2592 #ifndef VBOX_WITH_GUEST_CONTROL 2593 ReturnComNotImplemented(); 2594 #else 2595 LogFlowThisFuncEnter(); 2596 2597 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2698 2598 return setError(E_INVALIDARG, tr("No directory to check existence for specified")); 2699 CheckComArgOutPointerValid(aExists);2700 2701 AutoCaller autoCaller(this);2702 if (FAILED(autoCaller.rc())) return autoCaller.rc();2703 2599 2704 2600 HRESULT hr = S_OK; 2705 2601 2706 2602 GuestFsObjData objData; int guestRc; 2707 int rc = directoryQueryInfoInternal(Utf8Str(aPath), objData, &guestRc);2603 int rc = i_directoryQueryInfoInternal(aPath, objData, &guestRc); 2708 2604 if (RT_SUCCESS(rc)) 2709 {2710 2605 *aExists = objData.mType == FsObjType_Directory; 2711 }2712 2606 else 2713 2607 { … … 2720 2614 default: 2721 2615 hr = setError(VBOX_E_IPRT_ERROR, tr("Querying directory existence \"%s\" failed: %Rrc"), 2722 Utf8Str(aPath).c_str(), rc);2616 aPath.c_str(), rc); 2723 2617 break; 2724 2618 } … … 2729 2623 } 2730 2624 2731 STDMETHODIMP GuestSession::DirectoryOpen(IN_BSTR aPath, IN_BSTR aFilter, ComSafeArrayIn(DirectoryOpenFlag_T, aFlags), IGuestDirectory **aDirectory)2732 { 2733 #ifndef VBOX_WITH_GUEST_CONTROL 2734 ReturnComNotImplemented(); 2735 #else 2736 LogFlowThisFuncEnter(); 2737 2738 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2625 HRESULT GuestSession::directoryOpen(const com::Utf8Str &aPath, const com::Utf8Str &aFilter, const std::vector<DirectoryOpenFlag_T> &aFlags, ComPtr<IGuestDirectory> &aDirectory) 2626 { 2627 #ifndef VBOX_WITH_GUEST_CONTROL 2628 ReturnComNotImplemented(); 2629 #else 2630 LogFlowThisFuncEnter(); 2631 2632 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2739 2633 return setError(E_INVALIDARG, tr("No directory to open specified")); 2740 if (RT_UNLIKELY((aFilter ) != NULL && *(aFilter) != '\0'))2634 if (RT_UNLIKELY((aFilter.c_str()) != NULL && *(aFilter.c_str()) != '\0')) 2741 2635 return setError(E_INVALIDARG, tr("Directory filters are not implemented yet")); 2742 CheckComArgOutPointerValid(aDirectory);2743 2744 AutoCaller autoCaller(this);2745 if (FAILED(autoCaller.rc())) return autoCaller.rc();2746 2636 2747 2637 uint32_t fFlags = DirectoryOpenFlag_None; 2748 if (aFlags) 2749 { 2750 com::SafeArray<DirectoryOpenFlag_T> flags(ComSafeArrayInArg(aFlags)); 2751 for (size_t i = 0; i < flags.size(); i++) 2752 fFlags |= flags[i]; 2638 if (aFlags.size()) 2639 { 2640 for (size_t i = 0; i < aFlags.size(); i++) 2641 fFlags |= aFlags[i]; 2753 2642 2754 2643 if (fFlags) … … 2759 2648 2760 2649 GuestDirectoryOpenInfo openInfo; 2761 openInfo.mPath = Utf8Str(aPath);2762 openInfo.mFilter = Utf8Str(aFilter);2650 openInfo.mPath = aPath; 2651 openInfo.mFilter = aFilter; 2763 2652 openInfo.mFlags = fFlags; 2764 2653 2765 2654 ComObjPtr <GuestDirectory> pDirectory; int guestRc; 2766 int rc = directoryOpenInternal(openInfo, pDirectory, &guestRc);2655 int rc = i_directoryOpenInternal(openInfo, pDirectory, &guestRc); 2767 2656 if (RT_SUCCESS(rc)) 2768 2657 { 2769 2658 /* Return directory object to the caller. */ 2770 hr = pDirectory.queryInterfaceTo(aDirectory );2659 hr = pDirectory.queryInterfaceTo(aDirectory.asOutParam()); 2771 2660 } 2772 2661 else … … 2776 2665 case VERR_INVALID_PARAMETER: 2777 2666 hr = setError(VBOX_E_IPRT_ERROR, tr("Opening directory \"%s\" failed; invalid parameters given", 2778 Utf8Str(aPath).c_str()));2667 aPath.c_str())); 2779 2668 break; 2780 2669 … … 2785 2674 default: 2786 2675 hr = setError(VBOX_E_IPRT_ERROR, tr("Opening directory \"%s\" failed: %Rrc"), 2787 Utf8Str(aPath).c_str(),rc);2676 aPath.c_str(),rc); 2788 2677 break; 2789 2678 } … … 2794 2683 } 2795 2684 2796 STDMETHODIMP GuestSession::DirectoryQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo)2797 { 2798 #ifndef VBOX_WITH_GUEST_CONTROL 2799 ReturnComNotImplemented(); 2800 #else 2801 LogFlowThisFuncEnter(); 2802 2803 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2685 HRESULT GuestSession::directoryQueryInfo(const com::Utf8Str &aPath, ComPtr<IGuestFsObjInfo> &aInfo) 2686 { 2687 #ifndef VBOX_WITH_GUEST_CONTROL 2688 ReturnComNotImplemented(); 2689 #else 2690 LogFlowThisFuncEnter(); 2691 2692 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2804 2693 return setError(E_INVALIDARG, tr("No directory to query information for specified")); 2805 CheckComArgOutPointerValid(aInfo);2806 2807 AutoCaller autoCaller(this);2808 if (FAILED(autoCaller.rc())) return autoCaller.rc();2809 2694 2810 2695 HRESULT hr = S_OK; 2811 2696 2812 2697 GuestFsObjData objData; int guestRc; 2813 int vrc = directoryQueryInfoInternal(Utf8Str(aPath), objData, &guestRc);2698 int vrc = i_directoryQueryInfoInternal(aPath, objData, &guestRc); 2814 2699 if (RT_SUCCESS(vrc)) 2815 2700 { … … 2823 2708 if (RT_SUCCESS(vrc)) 2824 2709 { 2825 hr = pFsObjInfo.queryInterfaceTo(aInfo );2710 hr = pFsObjInfo.queryInterfaceTo(aInfo.asOutParam()); 2826 2711 if (FAILED(hr)) return hr; 2827 2712 } … … 2839 2724 case VERR_NOT_A_DIRECTORY: 2840 2725 hr = setError(VBOX_E_IPRT_ERROR, tr("Element \"%s\" exists but is not a directory", 2841 Utf8Str(aPath).c_str()));2726 aPath.c_str())); 2842 2727 break; 2843 2728 2844 2729 default: 2845 2730 hr = setError(VBOX_E_IPRT_ERROR, tr("Querying directory information for \"%s\" failed: %Rrc"), 2846 Utf8Str(aPath).c_str(), vrc);2731 aPath.c_str(), vrc); 2847 2732 break; 2848 2733 } … … 2853 2738 } 2854 2739 2855 STDMETHODIMP GuestSession::DirectoryRemove(IN_BSTRaPath)2856 { 2857 #ifndef VBOX_WITH_GUEST_CONTROL 2858 ReturnComNotImplemented(); 2859 #else 2860 LogFlowThisFuncEnter(); 2861 2862 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2740 HRESULT GuestSession::directoryRemove(const com::Utf8Str &aPath) 2741 { 2742 #ifndef VBOX_WITH_GUEST_CONTROL 2743 ReturnComNotImplemented(); 2744 #else 2745 LogFlowThisFuncEnter(); 2746 2747 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2863 2748 return setError(E_INVALIDARG, tr("No directory to remove specified")); 2864 2749 2865 AutoCaller autoCaller(this); 2866 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2867 2868 HRESULT hr = isReadyExternal(); 2750 HRESULT hr = i_isReadyExternal(); 2869 2751 if (FAILED(hr)) 2870 2752 return hr; … … 2874 2756 2875 2757 int guestRc; 2876 int vrc = directoryRemoveInternal(Utf8Str(aPath), uFlags, &guestRc);2758 int vrc = i_directoryRemoveInternal(aPath, uFlags, &guestRc); 2877 2759 if (RT_FAILURE(vrc)) 2878 2760 { … … 2890 2772 default: 2891 2773 hr = setError(VBOX_E_IPRT_ERROR, tr("Removing guest directory \"%s\" failed: %Rrc"), 2892 Utf8Str(aPath).c_str(), vrc);2774 aPath.c_str(), vrc); 2893 2775 break; 2894 2776 } … … 2899 2781 } 2900 2782 2901 STDMETHODIMP GuestSession::DirectoryRemoveRecursive(IN_BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag_T, aFlags), IProgress **aProgress)2902 { 2903 #ifndef VBOX_WITH_GUEST_CONTROL 2904 ReturnComNotImplemented(); 2905 #else 2906 LogFlowThisFuncEnter(); 2907 2908 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))2783 HRESULT GuestSession::directoryRemoveRecursive(const com::Utf8Str &aPath, const std::vector<DirectoryRemoveRecFlag_T> &aFlags, ComPtr<IProgress> &aProgress) 2784 { 2785 #ifndef VBOX_WITH_GUEST_CONTROL 2786 ReturnComNotImplemented(); 2787 #else 2788 LogFlowThisFuncEnter(); 2789 2790 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 2909 2791 return setError(E_INVALIDARG, tr("No directory to remove recursively specified")); 2910 2792 2911 AutoCaller autoCaller(this); 2912 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2913 2914 HRESULT hr = isReadyExternal(); 2793 HRESULT hr = i_isReadyExternal(); 2915 2794 if (FAILED(hr)) 2916 2795 return hr; … … 2937 2816 | DIRREMOVE_FLAG_CONTENT_AND_DIR; 2938 2817 int guestRc; 2939 int vrc = directoryRemoveInternal(Utf8Str(aPath), uFlags, &guestRc);2818 int vrc = i_directoryRemoveInternal(aPath, uFlags, &guestRc); 2940 2819 if (RT_FAILURE(vrc)) 2941 2820 { … … 2953 2832 default: 2954 2833 hr = setError(VBOX_E_IPRT_ERROR, tr("Recursively removing guest directory \"%s\" failed: %Rrc"), 2955 Utf8Str(aPath).c_str(), vrc);2834 aPath.c_str(), vrc); 2956 2835 break; 2957 2836 } … … 2959 2838 else 2960 2839 { 2961 pProgress.queryInterfaceTo(aProgress );2840 pProgress.queryInterfaceTo(aProgress.asOutParam()); 2962 2841 } 2963 2842 … … 2966 2845 } 2967 2846 2968 STDMETHODIMP GuestSession::DirectoryRename(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags)) 2969 { 2970 #ifndef VBOX_WITH_GUEST_CONTROL 2971 ReturnComNotImplemented(); 2972 #else 2973 LogFlowThisFuncEnter(); 2974 2975 if (RT_UNLIKELY((aSource) == NULL || *(aSource) == '\0')) 2847 HRESULT GuestSession::directoryRename(const com::Utf8Str &aSource, 2848 const com::Utf8Str &aDest, 2849 const std::vector<PathRenameFlag_T> &aFlags) 2850 { 2851 #ifndef VBOX_WITH_GUEST_CONTROL 2852 ReturnComNotImplemented(); 2853 #else 2854 LogFlowThisFuncEnter(); 2855 2856 if (RT_UNLIKELY((aSource.c_str()) == NULL || *(aSource.c_str()) == '\0')) 2976 2857 return setError(E_INVALIDARG, tr("No source directory to rename specified")); 2977 2858 2978 if (RT_UNLIKELY((aDest ) == NULL || *(aDest) == '\0'))2859 if (RT_UNLIKELY((aDest.c_str()) == NULL || *(aDest.c_str()) == '\0')) 2979 2860 return setError(E_INVALIDARG, tr("No destination directory to rename the source to specified")); 2980 2861 2981 AutoCaller autoCaller(this); 2982 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2983 2984 HRESULT hr = isReadyExternal(); 2862 HRESULT hr = i_isReadyExternal(); 2985 2863 if (FAILED(hr)) 2986 2864 return hr; … … 2990 2868 2991 2869 int guestRc; 2992 int vrc = pathRenameInternal(Utf8Str(aSource), Utf8Str(aDest), uFlags, &guestRc);2870 int vrc = i_pathRenameInternal(aSource, aDest, uFlags, &guestRc); 2993 2871 if (RT_FAILURE(vrc)) 2994 2872 { … … 3007 2885 default: 3008 2886 hr = setError(VBOX_E_IPRT_ERROR, tr("Renaming guest directory \"%s\" failed: %Rrc"), 3009 Utf8Str(aSource).c_str(), vrc);2887 aSource.c_str(), vrc); 3010 2888 break; 3011 2889 } … … 3016 2894 } 3017 2895 3018 STDMETHODIMP GuestSession::DirectorySetACL(IN_BSTR aPath, IN_BSTR aACL) 3019 { 3020 #ifndef VBOX_WITH_GUEST_CONTROL 3021 ReturnComNotImplemented(); 3022 #else 3023 LogFlowThisFuncEnter(); 3024 3025 AutoCaller autoCaller(this); 3026 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3027 3028 ReturnComNotImplemented(); 3029 #endif /* VBOX_WITH_GUEST_CONTROL */ 3030 } 3031 3032 STDMETHODIMP GuestSession::EnvironmentClear(void) 3033 { 3034 #ifndef VBOX_WITH_GUEST_CONTROL 3035 ReturnComNotImplemented(); 3036 #else 3037 LogFlowThisFuncEnter(); 3038 3039 AutoCaller autoCaller(this); 3040 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2896 HRESULT GuestSession::directorySetACL(const com::Utf8Str &aPath, const com::Utf8Str &aAcl) 2897 { 2898 #ifndef VBOX_WITH_GUEST_CONTROL 2899 ReturnComNotImplemented(); 2900 #else 2901 LogFlowThisFuncEnter(); 2902 2903 ReturnComNotImplemented(); 2904 #endif /* VBOX_WITH_GUEST_CONTROL */ 2905 } 2906 2907 HRESULT GuestSession::environmentClear() 2908 { 2909 #ifndef VBOX_WITH_GUEST_CONTROL 2910 ReturnComNotImplemented(); 2911 #else 2912 LogFlowThisFuncEnter(); 3041 2913 3042 2914 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 3049 2921 } 3050 2922 3051 STDMETHODIMP GuestSession::EnvironmentGet(IN_BSTR aName, BSTR *aValue)3052 { 3053 #ifndef VBOX_WITH_GUEST_CONTROL 3054 ReturnComNotImplemented(); 3055 #else 3056 LogFlowThisFuncEnter(); 3057 3058 if (RT_UNLIKELY( (aName) == NULL || *(aName) == '\0'))2923 HRESULT GuestSession::environmentGet(const com::Utf8Str &aName, com::Utf8Str &aValue) 2924 { 2925 #ifndef VBOX_WITH_GUEST_CONTROL 2926 ReturnComNotImplemented(); 2927 #else 2928 LogFlowThisFuncEnter(); 2929 2930 if (RT_UNLIKELY(aName.c_str() == NULL) || *(aName.c_str()) == '\0') 3059 2931 return setError(E_INVALIDARG, tr("No value name specified")); 3060 2932 3061 CheckComArgOutPointerValid(aValue);3062 3063 AutoCaller autoCaller(this);3064 if (FAILED(autoCaller.rc())) return autoCaller.rc();3065 3066 2933 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3067 2934 3068 Bstr strValue(mData.mEnvironment.Get(Utf8Str(aName))); 3069 strValue.cloneTo(aValue); 2935 aValue = mData.mEnvironment.Get(aName); 3070 2936 3071 2937 LogFlowThisFuncLeave(); … … 3074 2940 } 3075 2941 3076 STDMETHODIMP GuestSession::EnvironmentSet(IN_BSTR aName, IN_BSTRaValue)3077 { 3078 #ifndef VBOX_WITH_GUEST_CONTROL 3079 ReturnComNotImplemented(); 3080 #else 3081 LogFlowThisFuncEnter(); 3082 3083 if (RT_UNLIKELY((aName ) == NULL || *(aName) == '\0'))2942 HRESULT GuestSession::environmentSet(const com::Utf8Str &aName, const com::Utf8Str &aValue) 2943 { 2944 #ifndef VBOX_WITH_GUEST_CONTROL 2945 ReturnComNotImplemented(); 2946 #else 2947 LogFlowThisFuncEnter(); 2948 2949 if (RT_UNLIKELY((aName.c_str() == NULL) || *(aName.c_str()) == '\0')) 3084 2950 return setError(E_INVALIDARG, tr("No value name specified")); 3085 2951 3086 AutoCaller autoCaller(this);3087 if (FAILED(autoCaller.rc())) return autoCaller.rc();3088 3089 2952 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3090 2953 3091 int rc = mData.mEnvironment.Set( Utf8Str(aName), Utf8Str(aValue));2954 int rc = mData.mEnvironment.Set(aName, aValue); 3092 2955 3093 2956 HRESULT hr = RT_SUCCESS(rc) ? S_OK : VBOX_E_IPRT_ERROR; … … 3097 2960 } 3098 2961 3099 STDMETHODIMP GuestSession::EnvironmentUnset(IN_BSTR aName) 3100 { 3101 #ifndef VBOX_WITH_GUEST_CONTROL 3102 ReturnComNotImplemented(); 3103 #else 3104 LogFlowThisFuncEnter(); 3105 3106 AutoCaller autoCaller(this); 3107 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 2962 HRESULT GuestSession::environmentUnset(const com::Utf8Str &aName) 2963 { 2964 #ifndef VBOX_WITH_GUEST_CONTROL 2965 ReturnComNotImplemented(); 2966 #else 2967 LogFlowThisFuncEnter(); 3108 2968 3109 2969 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3110 2970 3111 mData.mEnvironment.Unset( Utf8Str(aName));2971 mData.mEnvironment.Unset(aName); 3112 2972 3113 2973 LogFlowThisFuncLeave(); … … 3116 2976 } 3117 2977 3118 STDMETHODIMP GuestSession::FileCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aPath, BOOL aSecure, IGuestFile **aFile) 3119 { 3120 #ifndef VBOX_WITH_GUEST_CONTROL 3121 ReturnComNotImplemented(); 3122 #else 3123 LogFlowThisFuncEnter(); 3124 3125 AutoCaller autoCaller(this); 3126 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3127 3128 ReturnComNotImplemented(); 3129 #endif /* VBOX_WITH_GUEST_CONTROL */ 3130 } 3131 3132 STDMETHODIMP GuestSession::FileExists(IN_BSTR aPath, BOOL *aExists) 3133 { 3134 #ifndef VBOX_WITH_GUEST_CONTROL 3135 ReturnComNotImplemented(); 3136 #else 3137 LogFlowThisFuncEnter(); 3138 3139 if (RT_UNLIKELY((aPath) == NULL || *(aPath) == '\0')) 2978 HRESULT GuestSession::fileCreateTemp(const com::Utf8Str &aTemplateName, ULONG aMode, const com::Utf8Str &aPath, BOOL aSecure, ComPtr<IGuestFile> &aFile) 2979 { 2980 #ifndef VBOX_WITH_GUEST_CONTROL 2981 ReturnComNotImplemented(); 2982 #else 2983 LogFlowThisFuncEnter(); 2984 2985 2986 ReturnComNotImplemented(); 2987 #endif /* VBOX_WITH_GUEST_CONTROL */ 2988 } 2989 2990 HRESULT GuestSession::fileExists(const com::Utf8Str &aPath, BOOL *aExists) 2991 { 2992 #ifndef VBOX_WITH_GUEST_CONTROL 2993 ReturnComNotImplemented(); 2994 #else 2995 LogFlowThisFuncEnter(); 2996 2997 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3140 2998 return setError(E_INVALIDARG, tr("No file to check existence for specified")); 3141 CheckComArgOutPointerValid(aExists);3142 3143 AutoCaller autoCaller(this);3144 if (FAILED(autoCaller.rc())) return autoCaller.rc();3145 2999 3146 3000 GuestFsObjData objData; int guestRc; 3147 int vrc = fileQueryInfoInternal(Utf8Str(aPath), objData, &guestRc);3001 int vrc = i_fileQueryInfoInternal(aPath, objData, &guestRc); 3148 3002 if (RT_SUCCESS(vrc)) 3149 3003 { … … 3166 3020 default: 3167 3021 hr = setError(VBOX_E_IPRT_ERROR, tr("Querying file information for \"%s\" failed: %Rrc"), 3168 Utf8Str(aPath).c_str(), vrc);3022 aPath.c_str(), vrc); 3169 3023 break; 3170 3024 } … … 3174 3028 } 3175 3029 3176 STDMETHODIMP GuestSession::FileRemove(IN_BSTRaPath)3177 { 3178 #ifndef VBOX_WITH_GUEST_CONTROL 3179 ReturnComNotImplemented(); 3180 #else 3181 LogFlowThisFuncEnter(); 3182 3183 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))3030 HRESULT GuestSession::fileRemove(const com::Utf8Str &aPath) 3031 { 3032 #ifndef VBOX_WITH_GUEST_CONTROL 3033 ReturnComNotImplemented(); 3034 #else 3035 LogFlowThisFuncEnter(); 3036 3037 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3184 3038 return setError(E_INVALIDARG, tr("No file to remove specified")); 3185 3039 3186 AutoCaller autoCaller(this);3187 if (FAILED(autoCaller.rc())) return autoCaller.rc();3188 3189 3040 HRESULT hr = S_OK; 3190 3041 3191 3042 int guestRc; 3192 int vrc = fileRemoveInternal(Utf8Str(aPath), &guestRc);3043 int vrc = i_fileRemoveInternal(aPath, &guestRc); 3193 3044 if (RT_FAILURE(vrc)) 3194 3045 { … … 3201 3052 default: 3202 3053 hr = setError(VBOX_E_IPRT_ERROR, tr("Removing file \"%s\" failed: %Rrc"), 3203 Utf8Str(aPath).c_str(), vrc);3054 aPath.c_str(), vrc); 3204 3055 break; 3205 3056 } … … 3210 3061 } 3211 3062 3212 STDMETHODIMP GuestSession::FileOpen(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, ULONG aCreationMode, IGuestFile **aFile)3063 HRESULT GuestSession::fileOpen(const com::Utf8Str &aPath, const com::Utf8Str &aOpenMode, const com::Utf8Str &aDisposition, ULONG aCreationMode, ComPtr<IGuestFile> &aFile) 3213 3064 { 3214 3065 #ifndef VBOX_WITH_GUEST_CONTROL … … 3219 3070 Bstr strSharingMode = ""; /* Sharing mode is ignored. */ 3220 3071 3221 return FileOpenEx(aPath, aOpenMode, aDisposition, strSharingMode.raw(), aCreationMode,3072 return fileOpenEx(aPath, aOpenMode, aDisposition, strSharingMode.raw(), aCreationMode, 3222 3073 0 /* aOffset */, aFile); 3223 3074 #endif /* VBOX_WITH_GUEST_CONTROL */ 3224 3075 } 3225 3076 3226 STDMETHODIMP GuestSession::FileOpenEx(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, IN_BSTR aSharingMode, 3227 ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile) 3228 { 3229 #ifndef VBOX_WITH_GUEST_CONTROL 3230 ReturnComNotImplemented(); 3231 #else 3232 LogFlowThisFuncEnter(); 3233 3234 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))3077 HRESULT GuestSession::fileOpenEx(const com::Utf8Str &aPath, const com::Utf8Str &aOpenMode, const com::Utf8Str &aDisposition, const com::Utf8Str &aSharingMode, ULONG aCreationMode, LONG64 aOffset, ComPtr<IGuestFile> &aFile) 3078 3079 { 3080 #ifndef VBOX_WITH_GUEST_CONTROL 3081 ReturnComNotImplemented(); 3082 #else 3083 LogFlowThisFuncEnter(); 3084 3085 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3235 3086 return setError(E_INVALIDARG, tr("No file to open specified")); 3236 if (RT_UNLIKELY((aOpenMode ) == NULL || *(aOpenMode) == '\0'))3087 if (RT_UNLIKELY((aOpenMode.c_str()) == NULL || *(aOpenMode.c_str()) == '\0')) 3237 3088 return setError(E_INVALIDARG, tr("No open mode specified")); 3238 if (RT_UNLIKELY((aDisposition ) == NULL || *(aDisposition) == '\0'))3089 if (RT_UNLIKELY((aDisposition.c_str()) == NULL || *(aDisposition.c_str()) == '\0')) 3239 3090 return setError(E_INVALIDARG, tr("No disposition mode specified")); 3240 3091 /* aSharingMode is optional. */ 3241 3092 3242 CheckComArgOutPointerValid(aFile); 3243 3244 AutoCaller autoCaller(this); 3245 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3246 3247 HRESULT hr = isReadyExternal(); 3093 HRESULT hr = i_isReadyExternal(); 3248 3094 if (FAILED(hr)) 3249 3095 return hr; … … 3253 3099 3254 3100 GuestFileOpenInfo openInfo; 3255 openInfo.mFileName = Utf8Str(aPath);3256 openInfo.mOpenMode = Utf8Str(aOpenMode);3257 openInfo.mDisposition = Utf8Str(aDisposition);3258 openInfo.mSharingMode = Utf8Str(aSharingMode);3101 openInfo.mFileName = aPath; 3102 openInfo.mOpenMode = aOpenMode; 3103 openInfo.mDisposition = aDisposition; 3104 openInfo.mSharingMode = aSharingMode; 3259 3105 openInfo.mCreationMode = aCreationMode; 3260 3106 openInfo.mInitialOffset = aOffset; … … 3269 3115 3270 3116 ComObjPtr <GuestFile> pFile; int guestRc; 3271 vrc = fileOpenInternal(openInfo, pFile, &guestRc);3117 vrc = i_fileOpenInternal(openInfo, pFile, &guestRc); 3272 3118 if (RT_SUCCESS(vrc)) 3273 {3274 3119 /* Return directory object to the caller. */ 3275 hr = pFile.queryInterfaceTo(aFile); 3276 } 3120 hr = pFile.queryInterfaceTo(aFile.asOutParam()); 3277 3121 else 3278 3122 { … … 3290 3134 default: 3291 3135 hr = setError(VBOX_E_IPRT_ERROR, tr("Opening guest file \"%s\" failed: %Rrc"), 3292 Utf8Str(aPath).c_str(), vrc);3136 aPath.c_str(), vrc); 3293 3137 break; 3294 3138 } … … 3299 3143 } 3300 3144 3301 STDMETHODIMP GuestSession::FileQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo) 3302 { 3303 #ifndef VBOX_WITH_GUEST_CONTROL 3304 ReturnComNotImplemented(); 3305 #else 3306 LogFlowThisFuncEnter(); 3307 3308 if (RT_UNLIKELY((aPath) == NULL || *(aPath) == '\0')) 3145 HRESULT GuestSession::fileQueryInfo(const com::Utf8Str &aPath, ComPtr<IGuestFsObjInfo> &aInfo) 3146 3147 { 3148 #ifndef VBOX_WITH_GUEST_CONTROL 3149 ReturnComNotImplemented(); 3150 #else 3151 LogFlowThisFuncEnter(); 3152 3153 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3309 3154 return setError(E_INVALIDARG, tr("No file to query information for specified")); 3310 CheckComArgOutPointerValid(aInfo);3311 3312 AutoCaller autoCaller(this);3313 if (FAILED(autoCaller.rc())) return autoCaller.rc();3314 3155 3315 3156 HRESULT hr = S_OK; 3316 3157 3317 3158 GuestFsObjData objData; int guestRc; 3318 int vrc = fileQueryInfoInternal(Utf8Str(aPath), objData, &guestRc);3159 int vrc = i_fileQueryInfoInternal(aPath, objData, &guestRc); 3319 3160 if (RT_SUCCESS(vrc)) 3320 3161 { … … 3326 3167 if (RT_SUCCESS(vrc)) 3327 3168 { 3328 hr = pFsObjInfo.queryInterfaceTo(aInfo );3169 hr = pFsObjInfo.queryInterfaceTo(aInfo.asOutParam()); 3329 3170 if (FAILED(hr)) return hr; 3330 3171 } … … 3353 3194 } 3354 3195 3355 STDMETHODIMP GuestSession::FileQuerySize(IN_BSTRaPath, LONG64 *aSize)3356 { 3357 #ifndef VBOX_WITH_GUEST_CONTROL 3358 ReturnComNotImplemented(); 3359 #else 3360 LogFlowThisFuncEnter(); 3361 3362 if (RT_UNLIKELY((aPath ) == NULL || *(aPath) == '\0'))3196 HRESULT GuestSession::fileQuerySize(const com::Utf8Str &aPath, LONG64 *aSize) 3197 { 3198 #ifndef VBOX_WITH_GUEST_CONTROL 3199 ReturnComNotImplemented(); 3200 #else 3201 LogFlowThisFuncEnter(); 3202 3203 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3363 3204 return setError(E_INVALIDARG, tr("No file to query size for specified")); 3364 CheckComArgOutPointerValid(aSize);3365 3366 AutoCaller autoCaller(this);3367 if (FAILED(autoCaller.rc())) return autoCaller.rc();3368 3205 3369 3206 HRESULT hr = S_OK; 3370 3207 3371 3208 int64_t llSize; int guestRc; 3372 int vrc = fileQuerySizeInternal(Utf8Str(aPath), &llSize, &guestRc);3209 int vrc = i_fileQuerySizeInternal(aPath, &llSize, &guestRc); 3373 3210 if (RT_SUCCESS(vrc)) 3374 {3375 3211 *aSize = llSize; 3376 }3377 3212 else 3378 3213 { … … 3393 3228 } 3394 3229 3395 STDMETHODIMP GuestSession::FileRename(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags))3396 { 3397 #ifndef VBOX_WITH_GUEST_CONTROL 3398 ReturnComNotImplemented(); 3399 #else 3400 LogFlowThisFuncEnter(); 3401 3402 if (RT_UNLIKELY((aSource ) == NULL || *(aSource) == '\0'))3230 HRESULT GuestSession::fileRename(const com::Utf8Str &aSource, const com::Utf8Str &aDest, const std::vector<PathRenameFlag_T> &aFlags) 3231 { 3232 #ifndef VBOX_WITH_GUEST_CONTROL 3233 ReturnComNotImplemented(); 3234 #else 3235 LogFlowThisFuncEnter(); 3236 3237 if (RT_UNLIKELY((aSource.c_str()) == NULL || *(aSource.c_str()) == '\0')) 3403 3238 return setError(E_INVALIDARG, tr("No source file to rename specified")); 3404 3239 3405 if (RT_UNLIKELY((aDest ) == NULL || *(aDest) == '\0'))3240 if (RT_UNLIKELY((aDest.c_str()) == NULL || *(aDest.c_str()) == '\0')) 3406 3241 return setError(E_INVALIDARG, tr("No destination file to rename the source to specified")); 3407 3242 3408 AutoCaller autoCaller(this); 3409 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3410 3411 HRESULT hr = isReadyExternal(); 3243 HRESULT hr = i_isReadyExternal(); 3412 3244 if (FAILED(hr)) 3413 3245 return hr; … … 3417 3249 3418 3250 int guestRc; 3419 int vrc = pathRenameInternal(Utf8Str(aSource), Utf8Str(aDest), uFlags, &guestRc);3251 int vrc = i_pathRenameInternal(aSource, aDest, uFlags, &guestRc); 3420 3252 if (RT_FAILURE(vrc)) 3421 3253 { … … 3435 3267 default: 3436 3268 hr = setError(VBOX_E_IPRT_ERROR, tr("Renaming guest file \"%s\" failed: %Rrc"), 3437 Utf8Str(aSource).c_str(), vrc);3269 aSource.c_str(), vrc); 3438 3270 break; 3439 3271 } … … 3443 3275 #endif /* VBOX_WITH_GUEST_CONTROL */ 3444 3276 } 3445 3446 STDMETHODIMP GuestSession::FileSetACL(IN_BSTR aPath, IN_BSTR aACL) 3447 { 3448 #ifndef VBOX_WITH_GUEST_CONTROL 3449 ReturnComNotImplemented(); 3450 #else 3451 LogFlowThisFuncEnter(); 3452 3453 AutoCaller autoCaller(this); 3454 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3455 3456 ReturnComNotImplemented(); 3457 #endif /* VBOX_WITH_GUEST_CONTROL */ 3458 } 3459 3460 STDMETHODIMP GuestSession::ProcessCreate(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 3461 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **aProcess) 3462 { 3463 #ifndef VBOX_WITH_GUEST_CONTROL 3464 ReturnComNotImplemented(); 3465 #else 3466 LogFlowThisFuncEnter(); 3467 3468 com::SafeArray<LONG> affinityIgnored; 3469 3470 return ProcessCreateEx(aCommand, ComSafeArrayInArg(aArguments), ComSafeArrayInArg(aEnvironment), 3471 ComSafeArrayInArg(aFlags), aTimeoutMS, ProcessPriority_Default, ComSafeArrayAsInParam(affinityIgnored), aProcess); 3472 #endif /* VBOX_WITH_GUEST_CONTROL */ 3473 } 3474 3475 STDMETHODIMP GuestSession::ProcessCreateEx(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment), 3476 ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, 3477 ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity), 3478 IGuestProcess **aProcess) 3479 { 3480 #ifndef VBOX_WITH_GUEST_CONTROL 3481 ReturnComNotImplemented(); 3482 #else 3483 LogFlowThisFuncEnter(); 3484 3485 if (RT_UNLIKELY((aCommand) == NULL || *(aCommand) == '\0')) 3277 HRESULT GuestSession::fileSetACL(const com::Utf8Str &aFile, const com::Utf8Str &aAcl) 3278 { 3279 #ifndef VBOX_WITH_GUEST_CONTROL 3280 ReturnComNotImplemented(); 3281 #else 3282 LogFlowThisFuncEnter(); 3283 3284 ReturnComNotImplemented(); 3285 #endif /* VBOX_WITH_GUEST_CONTROL */ 3286 } 3287 3288 HRESULT GuestSession::processCreate(const com::Utf8Str &aCommand, const std::vector<com::Utf8Str> &aArguments, const std::vector<com::Utf8Str> &aEnvironment, const std::vector<ProcessCreateFlag_T> &aFlags, ULONG aTimeoutMS, ComPtr<IGuestProcess> &aGuestProcess) 3289 { 3290 #ifndef VBOX_WITH_GUEST_CONTROL 3291 ReturnComNotImplemented(); 3292 #else 3293 LogFlowThisFuncEnter(); 3294 3295 std::vector<LONG> affinityIgnored; 3296 3297 return processCreateEx(aCommand, aArguments, aEnvironment, aFlags, aTimeoutMS, ProcessPriority_Default, affinityIgnored, aGuestProcess); 3298 #endif /* VBOX_WITH_GUEST_CONTROL */ 3299 } 3300 3301 HRESULT GuestSession::processCreateEx(const com::Utf8Str &aCommand, const std::vector<com::Utf8Str> &aArguments, const std::vector<com::Utf8Str> &aEnvironment, const std::vector<ProcessCreateFlag_T> &aFlags, ULONG aTimeoutMS, ProcessPriority_T aPriority, const std::vector<LONG> &aAffinity, ComPtr<IGuestProcess> &aGuestProcess) 3302 { 3303 #ifndef VBOX_WITH_GUEST_CONTROL 3304 ReturnComNotImplemented(); 3305 #else 3306 LogFlowThisFuncEnter(); 3307 3308 if (RT_UNLIKELY((aCommand.c_str()) == NULL || *(aCommand.c_str()) == '\0')) 3486 3309 return setError(E_INVALIDARG, tr("No command to execute specified")); 3487 CheckComArgOutPointerValid(aProcess); 3488 3489 AutoCaller autoCaller(this); 3490 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3491 3492 HRESULT hr = isReadyExternal(); 3310 3311 HRESULT hr = i_isReadyExternal(); 3493 3312 if (FAILED(hr)) 3494 3313 return hr; 3495 3314 3496 3315 GuestProcessStartupInfo procInfo; 3497 procInfo.mCommand = Utf8Str(aCommand); 3498 3499 if (aArguments) 3500 { 3501 com::SafeArray<IN_BSTR> arguments(ComSafeArrayInArg(aArguments)); 3502 for (size_t i = 0; i < arguments.size(); i++) 3503 procInfo.mArguments.push_back(Utf8Str(arguments[i])); 3504 } 3316 procInfo.mCommand = aCommand; 3317 3318 if (aArguments.size()) 3319 for (size_t i = 0; i < aArguments.size(); i++) 3320 procInfo.mArguments.push_back(aArguments[i]); 3505 3321 3506 3322 int rc = VINF_SUCCESS; … … 3514 3330 procInfo.mEnvironment = mData.mEnvironment; /* Apply original session environment. */ 3515 3331 3516 if (aEnvironment) 3517 { 3518 com::SafeArray<IN_BSTR> environment(ComSafeArrayInArg(aEnvironment)); 3519 for (size_t i = 0; i < environment.size() && RT_SUCCESS(rc); i++) 3520 rc = procInfo.mEnvironment.Set(Utf8Str(environment[i])); 3521 } 3332 if (aEnvironment.size()) 3333 for (size_t i = 0; i < aEnvironment.size() && RT_SUCCESS(rc); i++) 3334 rc = procInfo.mEnvironment.Set(aEnvironment[i]); 3522 3335 3523 3336 if (RT_SUCCESS(rc)) 3524 3337 { 3525 if (aFlags) 3526 { 3527 com::SafeArray<ProcessCreateFlag_T> flags(ComSafeArrayInArg(aFlags)); 3528 for (size_t i = 0; i < flags.size(); i++) 3529 procInfo.mFlags |= flags[i]; 3530 } 3338 if (aFlags.size()) 3339 for (size_t i = 0; i < aFlags.size(); i++) 3340 procInfo.mFlags |= aFlags[i]; 3531 3341 3532 3342 procInfo.mTimeoutMS = aTimeoutMS; 3533 3343 3534 if (aAffinity) 3535 { 3536 com::SafeArray<LONG> affinity(ComSafeArrayInArg(aAffinity)); 3537 for (size_t i = 0; i < affinity.size(); i++) 3538 { 3539 if (affinity[i]) 3344 if (aAffinity.size()) 3345 for (size_t i = 0; i < aAffinity.size(); i++) 3346 if (aAffinity[i]) 3540 3347 procInfo.mAffinity |= (uint64_t)1 << i; 3541 }3542 }3543 3348 3544 3349 procInfo.mPriority = aPriority; 3545 3350 3546 3351 ComObjPtr<GuestProcess> pProcess; 3547 rc = processCreateExInteral(procInfo, pProcess);3352 rc = i_processCreateExInteral(procInfo, pProcess); 3548 3353 if (RT_SUCCESS(rc)) 3549 3354 { 3550 3355 /* Return guest session to the caller. */ 3551 HRESULT hr2 = pProcess.queryInterfaceTo(a Process);3356 HRESULT hr2 = pProcess.queryInterfaceTo(aGuestProcess.asOutParam()); 3552 3357 if (FAILED(hr2)) 3553 3358 rc = VERR_COM_OBJECT_NOT_FOUND; … … 3580 3385 } 3581 3386 3582 STDMETHODIMP GuestSession::ProcessGet(ULONG aPID, IGuestProcess **aProcess)3583 { 3584 #ifndef VBOX_WITH_GUEST_CONTROL 3585 ReturnComNotImplemented(); 3586 #else 3587 LogFlowThisFunc(("PID=%RU32\n", aPID)); 3588 3589 CheckComArgOutPointerValid(aProcess); 3590 if (aP ID== 0)3387 HRESULT GuestSession::processGet(ULONG aPid, ComPtr<IGuestProcess> &aGuestProcess) 3388 3389 { 3390 #ifndef VBOX_WITH_GUEST_CONTROL 3391 ReturnComNotImplemented(); 3392 #else 3393 LogFlowThisFunc(("PID=%RU32\n", aPid)); 3394 3395 if (aPid == 0) 3591 3396 return setError(E_INVALIDARG, tr("No valid process ID (PID) specified")); 3592 3397 3593 AutoCaller autoCaller(this);3594 if (FAILED(autoCaller.rc())) return autoCaller.rc();3595 3596 3398 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3597 3399 … … 3599 3401 3600 3402 ComObjPtr<GuestProcess> pProcess; 3601 int rc = processGetByPID(aPID, &pProcess);3403 int rc = i_processGetByPID(aPid, &pProcess); 3602 3404 if (RT_FAILURE(rc)) 3603 hr = setError(E_INVALIDARG, tr("No process with PID %RU32 found"), aP ID);3405 hr = setError(E_INVALIDARG, tr("No process with PID %RU32 found"), aPid); 3604 3406 3605 3407 /* This will set (*aProcess) to NULL if pProgress is NULL. */ 3606 HRESULT hr2 = pProcess.queryInterfaceTo(a Process);3408 HRESULT hr2 = pProcess.queryInterfaceTo(aGuestProcess.asOutParam()); 3607 3409 if (SUCCEEDED(hr)) 3608 3410 hr = hr2; 3609 3411 3610 LogFlowThisFunc(("aProcess=%p, hr=%Rhrc\n", *aProcess, hr));3412 LogFlowThisFunc(("aProcess=%p, hr=%Rhrc\n", (IGuestProcess*)aGuestProcess, hr)); 3611 3413 return hr; 3612 3414 #endif /* VBOX_WITH_GUEST_CONTROL */ 3613 3415 } 3614 3416 3615 STDMETHODIMP GuestSession::SymlinkCreate(IN_BSTR aSource, IN_BSTR aTarget, SymlinkType_T aType) 3616 { 3617 #ifndef VBOX_WITH_GUEST_CONTROL 3618 ReturnComNotImplemented(); 3619 #else 3620 LogFlowThisFuncEnter(); 3621 3622 AutoCaller autoCaller(this); 3623 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3624 3625 ReturnComNotImplemented(); 3626 #endif /* VBOX_WITH_GUEST_CONTROL */ 3627 } 3628 3629 STDMETHODIMP GuestSession::SymlinkExists(IN_BSTR aSymlink, BOOL *aExists) 3630 { 3631 #ifndef VBOX_WITH_GUEST_CONTROL 3632 ReturnComNotImplemented(); 3633 #else 3634 LogFlowThisFuncEnter(); 3635 3636 AutoCaller autoCaller(this); 3637 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3638 3639 ReturnComNotImplemented(); 3640 #endif /* VBOX_WITH_GUEST_CONTROL */ 3641 } 3642 3643 STDMETHODIMP GuestSession::SymlinkRead(IN_BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag_T, aFlags), BSTR *aTarget) 3644 { 3645 #ifndef VBOX_WITH_GUEST_CONTROL 3646 ReturnComNotImplemented(); 3647 #else 3648 LogFlowThisFuncEnter(); 3649 3650 AutoCaller autoCaller(this); 3651 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3652 3653 ReturnComNotImplemented(); 3654 #endif /* VBOX_WITH_GUEST_CONTROL */ 3655 } 3656 3657 STDMETHODIMP GuestSession::SymlinkRemoveDirectory(IN_BSTR aPath) 3658 { 3659 #ifndef VBOX_WITH_GUEST_CONTROL 3660 ReturnComNotImplemented(); 3661 #else 3662 LogFlowThisFuncEnter(); 3663 3664 AutoCaller autoCaller(this); 3665 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3666 3667 ReturnComNotImplemented(); 3668 #endif /* VBOX_WITH_GUEST_CONTROL */ 3669 } 3670 3671 STDMETHODIMP GuestSession::SymlinkRemoveFile(IN_BSTR aFile) 3672 { 3673 #ifndef VBOX_WITH_GUEST_CONTROL 3674 ReturnComNotImplemented(); 3675 #else 3676 LogFlowThisFuncEnter(); 3677 3678 AutoCaller autoCaller(this); 3679 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3680 3681 ReturnComNotImplemented(); 3682 #endif /* VBOX_WITH_GUEST_CONTROL */ 3683 } 3684 3685 STDMETHODIMP GuestSession::WaitFor(ULONG aWaitFlags, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason) 3686 { 3687 #ifndef VBOX_WITH_GUEST_CONTROL 3688 ReturnComNotImplemented(); 3689 #else 3690 LogFlowThisFuncEnter(); 3691 3692 CheckComArgOutPointerValid(aReason); 3693 3694 AutoCaller autoCaller(this); 3695 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3417 HRESULT GuestSession::symlinkCreate(const com::Utf8Str &aSource, const com::Utf8Str &aTarget, SymlinkType_T aType) 3418 { 3419 #ifndef VBOX_WITH_GUEST_CONTROL 3420 ReturnComNotImplemented(); 3421 #else 3422 LogFlowThisFuncEnter(); 3423 3424 ReturnComNotImplemented(); 3425 #endif /* VBOX_WITH_GUEST_CONTROL */ 3426 } 3427 3428 HRESULT GuestSession::symlinkExists(const com::Utf8Str &aSymlink, BOOL *aExists) 3429 3430 { 3431 #ifndef VBOX_WITH_GUEST_CONTROL 3432 ReturnComNotImplemented(); 3433 #else 3434 LogFlowThisFuncEnter(); 3435 3436 ReturnComNotImplemented(); 3437 #endif /* VBOX_WITH_GUEST_CONTROL */ 3438 } 3439 3440 HRESULT GuestSession::symlinkRead(const com::Utf8Str &aSymlink, const std::vector<SymlinkReadFlag_T> &aFlags, com::Utf8Str &aTarget) 3441 { 3442 #ifndef VBOX_WITH_GUEST_CONTROL 3443 ReturnComNotImplemented(); 3444 #else 3445 LogFlowThisFuncEnter(); 3446 3447 ReturnComNotImplemented(); 3448 #endif /* VBOX_WITH_GUEST_CONTROL */ 3449 } 3450 3451 HRESULT GuestSession::symlinkRemoveDirectory(const com::Utf8Str &aPath) 3452 { 3453 #ifndef VBOX_WITH_GUEST_CONTROL 3454 ReturnComNotImplemented(); 3455 #else 3456 LogFlowThisFuncEnter(); 3457 3458 ReturnComNotImplemented(); 3459 #endif /* VBOX_WITH_GUEST_CONTROL */ 3460 } 3461 3462 HRESULT GuestSession::symlinkRemoveFile(const com::Utf8Str &aFile) 3463 { 3464 #ifndef VBOX_WITH_GUEST_CONTROL 3465 ReturnComNotImplemented(); 3466 #else 3467 LogFlowThisFuncEnter(); 3468 3469 ReturnComNotImplemented(); 3470 #endif /* VBOX_WITH_GUEST_CONTROL */ 3471 } 3472 3473 HRESULT GuestSession::waitFor(ULONG aWaitFor, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason) 3474 { 3475 #ifndef VBOX_WITH_GUEST_CONTROL 3476 ReturnComNotImplemented(); 3477 #else 3478 LogFlowThisFuncEnter(); 3696 3479 3697 3480 /* … … 3701 3484 3702 3485 int guestRc; GuestSessionWaitResult_T waitResult; 3703 int vrc = waitFor(aWaitFlags, aTimeoutMS, waitResult, &guestRc);3486 int vrc = i_waitFor(aWaitFor, aTimeoutMS, waitResult, &guestRc); 3704 3487 if (RT_SUCCESS(vrc)) 3705 {3706 3488 *aReason = waitResult; 3707 }3708 3489 else 3709 3490 { … … 3711 3492 { 3712 3493 case VERR_GSTCTL_GUEST_ERROR: 3713 hr = GuestSession:: setErrorExternal(this, guestRc);3494 hr = GuestSession::i_setErrorExternal(this, guestRc); 3714 3495 break; 3715 3496 … … 3734 3515 } 3735 3516 3736 STDMETHODIMP GuestSession::WaitForArray(ComSafeArrayIn(GuestSessionWaitForFlag_T, aFlags), ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason) 3737 { 3738 #ifndef VBOX_WITH_GUEST_CONTROL 3739 ReturnComNotImplemented(); 3740 #else 3741 LogFlowThisFuncEnter(); 3742 3743 CheckComArgOutPointerValid(aReason); 3744 3745 AutoCaller autoCaller(this); 3746 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3517 HRESULT GuestSession::waitForArray(const std::vector<GuestSessionWaitForFlag_T> &aWaitFor, ULONG aTimeoutMS, GuestSessionWaitResult_T *aReason) 3518 { 3519 #ifndef VBOX_WITH_GUEST_CONTROL 3520 ReturnComNotImplemented(); 3521 #else 3522 LogFlowThisFuncEnter(); 3747 3523 3748 3524 /* … … 3750 3526 */ 3751 3527 uint32_t fWaitFor = GuestSessionWaitForFlag_None; 3752 com::SafeArray<GuestSessionWaitForFlag_T> flags(ComSafeArrayInArg(aFlags)); 3753 for (size_t i = 0; i < flags.size(); i++) 3754 fWaitFor |= flags[i]; 3528 for (size_t i = 0; i < aWaitFor.size(); i++) 3529 fWaitFor |= aWaitFor[i]; 3755 3530 3756 3531 return WaitFor(fWaitFor, aTimeoutMS, aReason); -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r50709 r50727 186 186 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 187 187 188 int vrc = pSession-> startSessionInternal(pGuestRc);188 int vrc = pSession->i_startSessionInternal(pGuestRc); 189 189 /* Nothing to do here anymore. */ 190 190 … … 319 319 ComObjPtr<GuestProcess> pProcess; int guestRc; 320 320 if (RT_SUCCESS(rc)) 321 rc = pSession-> processCreateExInteral(procInfo, pProcess);321 rc = pSession->i_processCreateExInteral(procInfo, pProcess); 322 322 if (RT_SUCCESS(rc)) 323 323 { … … 603 603 */ 604 604 GuestFsObjData objData; int guestRc; 605 int rc = pSession-> fileQueryInfoInternal(Utf8Str(mSource), objData, &guestRc);605 int rc = pSession->i_fileQueryInfoInternal(Utf8Str(mSource), objData, &guestRc); 606 606 if (RT_FAILURE(rc)) 607 607 { … … 641 641 /* Startup process. */ 642 642 ComObjPtr<GuestProcess> pProcess; 643 rc = pSession-> processCreateExInteral(procInfo, pProcess);643 rc = pSession->i_processCreateExInteral(procInfo, pProcess); 644 644 if (RT_SUCCESS(rc)) 645 645 rc = pProcess->i_startProcess(30 * 1000 /* 30s timeout */, … … 858 858 } 859 859 860 int SessionTaskUpdateAdditions:: addProcessArguments(ProcessArguments &aArgumentsDest,861 const ProcessArguments &aArgumentsSource)860 int SessionTaskUpdateAdditions::i_addProcessArguments(ProcessArguments &aArgumentsDest, 861 const ProcessArguments &aArgumentsSource) 862 862 { 863 863 int rc = VINF_SUCCESS; … … 897 897 } 898 898 899 int SessionTaskUpdateAdditions:: copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO,900 Utf8Str const &strFileSource, const Utf8Str &strFileDest,901 bool fOptional, uint32_t *pcbSize)899 int SessionTaskUpdateAdditions::i_copyFileToGuest(GuestSession *pSession, PRTISOFSFILE pISO, 900 Utf8Str const &strFileSource, const Utf8Str &strFileDest, 901 bool fOptional, uint32_t *pcbSize) 902 902 { 903 903 AssertPtrReturn(pSession, VERR_INVALID_POINTER); … … 935 935 936 936 ComObjPtr<Progress> pProgressCopyTo; 937 rc = pSession-> startTaskAsync(Utf8StrFmt(GuestSession::tr("Copying Guest Additions installer file \"%s\" to \"%s\" on guest"),938 mSource.c_str(), strFileDest.c_str()),939 pTask, pProgressCopyTo);937 rc = pSession->i_startTaskAsync(Utf8StrFmt(GuestSession::tr("Copying Guest Additions installer file \"%s\" to \"%s\" on guest"), 938 mSource.c_str(), strFileDest.c_str()), 939 pTask, pProgressCopyTo); 940 940 if (RT_SUCCESS(rc)) 941 941 { … … 967 967 GuestFsObjData objData; 968 968 int64_t cbSizeOnGuest; int guestRc; 969 rc = pSession-> fileQuerySizeInternal(strFileDest, &cbSizeOnGuest, &guestRc);969 rc = pSession->i_fileQuerySizeInternal(strFileDest, &cbSizeOnGuest, &guestRc); 970 970 if ( RT_SUCCESS(rc) 971 971 && cbSize == (uint64_t)cbSizeOnGuest) … … 1010 1010 } 1011 1011 1012 int SessionTaskUpdateAdditions:: runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo)1012 int SessionTaskUpdateAdditions::i_runFileOnGuest(GuestSession *pSession, GuestProcessStartupInfo &procInfo) 1013 1013 { 1014 1014 AssertPtrReturn(pSession, VERR_INVALID_POINTER); … … 1077 1077 LogRel(("Automatic update of Guest Additions started, using \"%s\"\n", mSource.c_str())); 1078 1078 1079 ComObjPtr<Guest> pGuest(mSession-> getParent());1079 ComObjPtr<Guest> pGuest(mSession->i_getParent()); 1080 1080 #if 0 1081 1081 /* … … 1280 1280 /* Create the installation directory. */ 1281 1281 int guestRc; 1282 rc = pSession-> directoryCreateInternal(strUpdateDir,1283 755 /* Mode */, DirectoryCreateFlag_Parents, &guestRc);1282 rc = pSession->i_directoryCreateInternal(strUpdateDir, 1283 755 /* Mode */, DirectoryCreateFlag_Parents, &guestRc); 1284 1284 if (RT_FAILURE(rc)) 1285 1285 { … … 1378 1378 /* Add optional installer command line arguments from the API to the 1379 1379 * installer's startup info. */ 1380 rc = addProcessArguments(siInstaller.mArguments, mArguments);1380 rc = i_addProcessArguments(siInstaller.mArguments, mArguments); 1381 1381 AssertRC(rc); 1382 1382 /* If the caller does not want to wait for out guest update process to end, … … 1418 1418 if (itFiles->fFlags & UPDATEFILE_FLAG_OPTIONAL) 1419 1419 fOptional = true; 1420 rc = copyFileToGuest(pSession, &iso, itFiles->strSource, itFiles->strDest,1421 fOptional, NULL /* cbSize */);1420 rc = i_copyFileToGuest(pSession, &iso, itFiles->strSource, itFiles->strDest, 1421 fOptional, NULL /* cbSize */); 1422 1422 if (RT_FAILURE(rc)) 1423 1423 { … … 1455 1455 if (itFiles->fFlags & UPDATEFILE_FLAG_EXECUTE) 1456 1456 { 1457 rc = runFileOnGuest(pSession, itFiles->mProcInfo);1457 rc = i_runFileOnGuest(pSession, itFiles->mProcInfo); 1458 1458 if (RT_FAILURE(rc)) 1459 1459 break; -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50709 r50727 68 68 NS_DECL_CLASSINFO(Guest) 69 69 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Guest, IGuest) 70 #ifdef VBOX_WITH_GUEST_CONTROL71 NS_DECL_CLASSINFO(GuestSession)72 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(GuestSession, IGuestSession)73 #endif74 70 NS_DECL_CLASSINFO(Keyboard) 75 71 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Keyboard, IKeyboard)
Note:
See TracChangeset
for help on using the changeset viewer.