Changeset 71345 in vbox
- Timestamp:
- Mar 15, 2018 9:45:28 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121296
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestSessionImpl.h
r71314 r71345 501 501 inline bool i_directoryExists(uint32_t uDirID, ComObjPtr<GuestDirectory> *pDir); 502 502 int i_directoryRemoveFromList(GuestDirectory *pDirectory); 503 int i_directoryRemove Internal(const Utf8Str &strPath, uint32_t uFlags, int *pGuestRc);504 int i_directoryCreate Internal(const Utf8Str &strPath, uint32_t uMode, uint32_t uFlags, int *pGuestRc);505 int i_objectCreateTemp Internal(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory,506 507 int i_directoryOpen Internal(const GuestDirectoryOpenInfo &openInfo,508 509 int i_directoryQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc);503 int i_directoryRemove(const Utf8Str &strPath, uint32_t uFlags, int *pGuestRc); 504 int i_directoryCreate(const Utf8Str &strPath, uint32_t uMode, uint32_t uFlags, int *pGuestRc); 505 int i_objectCreateTemp(const Utf8Str &strTemplate, const Utf8Str &strPath, bool fDirectory, 506 Utf8Str &strName, int *pGuestRc); 507 int i_directoryOpen(const GuestDirectoryOpenInfo &openInfo, 508 ComObjPtr<GuestDirectory> &pDirectory, int *pGuestRc); 509 int i_directoryQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc); 510 510 int i_dispatchToDirectory(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 511 511 int i_dispatchToFile(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); … … 515 515 inline bool i_fileExists(uint32_t uFileID, ComObjPtr<GuestFile> *pFile); 516 516 int i_fileRemoveFromList(GuestFile *pFile); 517 int i_fileRemove Internal(const Utf8Str &strPath, int *pGuestRc);518 int i_fileOpen Internal(const GuestFileOpenInfo &openInfo, ComObjPtr<GuestFile> &pFile, int *pGuestRc);519 int i_fileQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc);520 int i_fileQuerySize Internal(const Utf8Str &strPath, bool fFollowSymlinks, int64_t *pllSize, int *pGuestRc);521 int i_fsQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc);517 int i_fileRemove(const Utf8Str &strPath, int *pGuestRc); 518 int i_fileOpen(const GuestFileOpenInfo &openInfo, ComObjPtr<GuestFile> &pFile, int *pGuestRc); 519 int i_fileQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc); 520 int i_fileQuerySize(const Utf8Str &strPath, bool fFollowSymlinks, int64_t *pllSize, int *pGuestRc); 521 int i_fsQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *pGuestRc); 522 522 const GuestCredentials &i_getCredentials(void); 523 523 EventSource *i_getEventSource(void) { return mEventSource; } … … 528 528 int i_onRemove(void); 529 529 int i_onSessionStatusChange(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData); 530 int i_startSession Internal(int *pGuestRc);530 int i_startSession(int *pGuestRc); 531 531 int i_startSessionAsync(void); 532 532 static void i_startSessionThreadTask(GuestSessionTaskInternalOpen *pTask); 533 533 Guest *i_getParent(void) { return mParent; } 534 534 uint32_t i_getProtocolVersion(void) { return mData.mProtocolVersion; } 535 int i_pathRenameInternal(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, 536 int *pGuestRc); 535 int i_pathRename(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *pGuestRc); 537 536 int i_pathUserDocuments(Utf8Str &strPath, int *prcGuest); 538 537 int i_pathUserHome(Utf8Str &strPath, int *prcGuest); 539 538 int i_processRemoveFromList(GuestProcess *pProcess); 540 int i_processCreateEx Internal(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProgress);539 int i_processCreateEx(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProgress); 541 540 inline bool i_processExists(uint32_t uProcessID, ComObjPtr<GuestProcess> *pProcess); 542 541 inline int i_processGetByPID(ULONG uPID, ComObjPtr<GuestProcess> *pProcess); -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r71299 r71345 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 547 547 Assert(!pSession.isNull()); 548 548 int rcGuest; 549 rc = pSession->i_startSession Internal(&rcGuest);549 rc = pSession->i_startSession(&rcGuest); 550 550 if (RT_FAILURE(rc)) 551 551 { -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r71301 r71345 1970 1970 mStartupInfo.mFlags |= ProcessCreateFlag_Hidden; 1971 1971 1972 int vrc = pSession->i_processCreateEx Internal(mStartupInfo, pProcess);1972 int vrc = pSession->i_processCreateEx(mStartupInfo, pProcess); 1973 1973 if (RT_SUCCESS(vrc)) 1974 1974 { -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r71334 r71345 730 730 } 731 731 732 int GuestSession::i_directoryCreate Internal(const Utf8Str &strPath, uint32_t uMode,733 732 int GuestSession::i_directoryCreate(const Utf8Str &strPath, uint32_t uMode, 733 uint32_t uFlags, int *prcGuest) 734 734 { 735 735 AssertPtrReturn(prcGuest, VERR_INVALID_POINTER); … … 797 797 } 798 798 799 int GuestSession::i_directoryQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks,800 799 int GuestSession::i_directoryQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, 800 GuestFsObjData &objData, int *prcGuest) 801 801 { 802 802 AssertPtrReturn(prcGuest, VERR_INVALID_POINTER); … … 804 804 LogFlowThisFunc(("strPath=%s, fFollowSymlinks=%RTbool\n", strPath.c_str(), fFollowSymlinks)); 805 805 806 int vrc = i_fsQueryInfo Internal(strPath, fFollowSymlinks, objData, prcGuest);806 int vrc = i_fsQueryInfo(strPath, fFollowSymlinks, objData, prcGuest); 807 807 if (RT_SUCCESS(vrc)) 808 808 { … … 856 856 } 857 857 858 int GuestSession::i_directoryRemoveInternal(const Utf8Str &strPath, uint32_t uFlags, 859 int *prcGuest) 858 int GuestSession::i_directoryRemove(const Utf8Str &strPath, uint32_t uFlags, int *prcGuest) 860 859 { 861 860 AssertReturn(!(uFlags & ~DIRREMOVE_FLAG_VALID_MASK), VERR_INVALID_PARAMETER); … … 897 896 } 898 897 899 int GuestSession::i_objectCreateTemp Internal(const Utf8Str &strTemplate, const Utf8Str &strPath,900 898 int GuestSession::i_objectCreateTemp(const Utf8Str &strTemplate, const Utf8Str &strPath, 899 bool fDirectory, Utf8Str &strName, int *prcGuest) 901 900 { 902 901 AssertPtrReturn(prcGuest, VERR_INVALID_POINTER); … … 962 961 } 963 962 964 int GuestSession::i_directoryOpen Internal(const GuestDirectoryOpenInfo &openInfo,965 963 int GuestSession::i_directoryOpen(const GuestDirectoryOpenInfo &openInfo, 964 ComObjPtr<GuestDirectory> &pDirectory, int *prcGuest) 966 965 { 967 966 AssertPtrReturn(prcGuest, VERR_INVALID_POINTER); … … 1302 1301 } 1303 1302 1304 int GuestSession::i_fileRemove Internal(const Utf8Str &strPath, int *prcGuest)1303 int GuestSession::i_fileRemove(const Utf8Str &strPath, int *prcGuest) 1305 1304 { 1306 1305 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); … … 1333 1332 } 1334 1333 1335 int GuestSession::i_fileOpen Internal(const GuestFileOpenInfo &openInfo,1336 1334 int GuestSession::i_fileOpen(const GuestFileOpenInfo &openInfo, 1335 ComObjPtr<GuestFile> &pFile, int *prcGuest) 1337 1336 { 1338 1337 LogFlowThisFunc(("strFile=%s, enmAccessMode=%d (%s) enmOpenAction=%d (%s) uCreationMode=%RU32 mfOpenEx=%RU32\n", … … 1435 1434 } 1436 1435 1437 int GuestSession::i_fileQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *prcGuest)1436 int GuestSession::i_fileQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *prcGuest) 1438 1437 { 1439 1438 LogFlowThisFunc(("strPath=%s fFollowSymlinks=%RTbool\n", strPath.c_str(), fFollowSymlinks)); 1440 1439 1441 int vrc = i_fsQueryInfo Internal(strPath, fFollowSymlinks, objData, prcGuest);1440 int vrc = i_fsQueryInfo(strPath, fFollowSymlinks, objData, prcGuest); 1442 1441 if (RT_SUCCESS(vrc)) 1443 1442 { … … 1450 1449 } 1451 1450 1452 int GuestSession::i_fileQuerySize Internal(const Utf8Str &strPath, bool fFollowSymlinks, int64_t *pllSize, int *prcGuest)1451 int GuestSession::i_fileQuerySize(const Utf8Str &strPath, bool fFollowSymlinks, int64_t *pllSize, int *prcGuest) 1453 1452 { 1454 1453 AssertPtrReturn(pllSize, VERR_INVALID_POINTER); 1455 1454 1456 1455 GuestFsObjData objData; 1457 int vrc = i_fileQueryInfo Internal(strPath, fFollowSymlinks, objData, prcGuest);1456 int vrc = i_fileQueryInfo(strPath, fFollowSymlinks, objData, prcGuest); 1458 1457 if (RT_SUCCESS(vrc)) 1459 1458 *pllSize = objData.mObjectSize; … … 1472 1471 * Any other return code indicates some host side error. 1473 1472 */ 1474 int GuestSession::i_fsQueryInfo Internal(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *prcGuest)1473 int GuestSession::i_fsQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *prcGuest) 1475 1474 { 1476 1475 LogFlowThisFunc(("strPath=%s\n", strPath.c_str())); … … 1722 1721 } 1723 1722 1724 int GuestSession::i_startSession Internal(int *prcGuest)1723 int GuestSession::i_startSession(int *prcGuest) 1725 1724 { 1726 1725 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 1857 1856 return; 1858 1857 1859 int vrc = pSession->i_startSession Internal(NULL /* Guest rc, ignored */);1858 int vrc = pSession->i_startSession(NULL /* Guest rc, ignored */); 1860 1859 /** @todo 1861 1860 * … … 1870 1869 } 1871 1870 1872 int GuestSession::i_pathRename Internal(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *prcGuest)1871 int GuestSession::i_pathRename(const Utf8Str &strSource, const Utf8Str &strDest, uint32_t uFlags, int *prcGuest) 1873 1872 { 1874 1873 AssertReturn(!(uFlags & ~PATHRENAME_FLAG_VALID_MASK), VERR_INVALID_PARAMETER); … … 2080 2079 * @param pProcess 2081 2080 */ 2082 int GuestSession::i_processCreateEx Internal(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProcess)2081 int GuestSession::i_processCreateEx(GuestProcessStartupInfo &procInfo, ComObjPtr<GuestProcess> &pProcess) 2083 2082 { 2084 2083 LogFlowFunc(("mExe=%s, mFlags=%x, mTimeoutMS=%RU32\n", … … 2956 2955 2957 2956 ComObjPtr <GuestDirectory> pDirectory; int rcGuest; 2958 int rc = i_directoryCreate Internal(aPath, (uint32_t)aMode, fFlags, &rcGuest);2957 int rc = i_directoryCreate(aPath, (uint32_t)aMode, fFlags, &rcGuest); 2959 2958 if (RT_FAILURE(rc)) 2960 2959 { … … 3000 2999 3001 3000 int rcGuest; 3002 int rc = i_objectCreateTempInternal(aTemplateName, 3003 aPath, 3004 true /* Directory */, aDirectory, &rcGuest); 3001 int rc = i_objectCreateTemp(aTemplateName, aPath, true /* Directory */, aDirectory, &rcGuest); 3005 3002 if (!RT_SUCCESS(rc)) 3006 3003 { … … 3031 3028 3032 3029 GuestFsObjData objData; int rcGuest; 3033 int rc = i_directoryQueryInfo Internal(aPath, aFollowSymlinks != FALSE, objData, &rcGuest);3030 int rc = i_directoryQueryInfo(aPath, aFollowSymlinks != FALSE, objData, &rcGuest); 3034 3031 if (RT_SUCCESS(rc)) 3035 3032 *aExists = objData.mType == FsObjType_Directory; … … 3091 3088 3092 3089 ComObjPtr <GuestDirectory> pDirectory; int rcGuest; 3093 int rc = i_directoryOpen Internal(openInfo, pDirectory, &rcGuest);3090 int rc = i_directoryOpen(openInfo, pDirectory, &rcGuest); 3094 3091 if (RT_SUCCESS(rc)) 3095 3092 { … … 3135 3132 3136 3133 int rcGuest; 3137 int vrc = i_directoryRemove Internal(aPath, uFlags, &rcGuest);3134 int vrc = i_directoryRemove(aPath, uFlags, &rcGuest); 3138 3135 if (RT_FAILURE(vrc)) 3139 3136 { … … 3196 3193 | DIRREMOVE_FLAG_CONTENT_AND_DIR; 3197 3194 int rcGuest; 3198 int vrc = i_directoryRemove Internal(aPath, uFlags, &rcGuest);3195 int vrc = i_directoryRemove(aPath, uFlags, &rcGuest); 3199 3196 if (RT_FAILURE(vrc)) 3200 3197 { … … 3355 3352 3356 3353 GuestFsObjData objData; int rcGuest; 3357 int vrc = i_fileQueryInfo Internal(aPath, aFollowSymlinks != FALSE, objData, &rcGuest);3354 int vrc = i_fileQueryInfo(aPath, aFollowSymlinks != FALSE, objData, &rcGuest); 3358 3355 if (RT_SUCCESS(vrc)) 3359 3356 { … … 3468 3465 ComObjPtr <GuestFile> pFile; 3469 3466 int rcGuest; 3470 int vrc = i_fileOpen Internal(openInfo, pFile, &rcGuest);3467 int vrc = i_fileOpen(openInfo, pFile, &rcGuest); 3471 3468 if (RT_SUCCESS(vrc)) 3472 3469 /* Return directory object to the caller. */ … … 3503 3500 3504 3501 int64_t llSize; int rcGuest; 3505 int vrc = i_fileQuerySize Internal(aPath, aFollowSymlinks != FALSE, &llSize, &rcGuest);3502 int vrc = i_fileQuerySize(aPath, aFollowSymlinks != FALSE, &llSize, &rcGuest); 3506 3503 if (RT_SUCCESS(vrc)) 3507 3504 { … … 3534 3531 GuestFsObjData objData; 3535 3532 int rcGuest; 3536 int vrc = i_fsQueryInfo Internal(aPath, aFollowSymlinks != FALSE, objData, &rcGuest);3533 int vrc = i_fsQueryInfo(aPath, aFollowSymlinks != FALSE, objData, &rcGuest); 3537 3534 if (RT_SUCCESS(vrc)) 3538 3535 { … … 3570 3567 3571 3568 GuestFsObjData Info; int rcGuest; 3572 int vrc = i_fsQueryInfo Internal(aPath, aFollowSymlinks != FALSE, Info, &rcGuest);3569 int vrc = i_fsQueryInfo(aPath, aFollowSymlinks != FALSE, Info, &rcGuest); 3573 3570 if (RT_SUCCESS(vrc)) 3574 3571 { … … 3607 3604 3608 3605 int rcGuest; 3609 int vrc = i_fileRemove Internal(aPath, &rcGuest);3606 int vrc = i_fileRemove(aPath, &rcGuest); 3610 3607 if (RT_FAILURE(vrc)) 3611 3608 { … … 3654 3651 /* Call worker to do the job. */ 3655 3652 int rcGuest; 3656 int vrc = i_pathRename Internal(aSource, aDestination, fBackend, &rcGuest);3653 int vrc = i_pathRename(aSource, aDestination, fBackend, &rcGuest); 3657 3654 if (RT_FAILURE(vrc)) 3658 3655 { … … 3777 3774 */ 3778 3775 ComObjPtr<GuestProcess> pProcess; 3779 vrc = i_processCreateEx Internal(procInfo, pProcess);3776 vrc = i_processCreateEx(procInfo, pProcess); 3780 3777 if (RT_SUCCESS(vrc)) 3781 3778 { -
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r71299 r71345 217 217 GuestFsObjData objData; int rcGuest; 218 218 219 int rc = mSession->i_directoryQueryInfo Internal(strPath, fFollowSymlinks, objData, &rcGuest);219 int rc = mSession->i_directoryQueryInfo(strPath, fFollowSymlinks, objData, &rcGuest); 220 220 if (RT_SUCCESS(rc)) 221 221 { … … 232 232 case VERR_FILE_NOT_FOUND: 233 233 case VERR_PATH_NOT_FOUND: 234 rc = mSession->i_directoryCreate Internal(strPath.c_str(), uMode, enmDirecotryCreateFlags, &rcGuest);234 rc = mSession->i_directoryCreate(strPath.c_str(), uMode, enmDirecotryCreateFlags, &rcGuest); 235 235 break; 236 236 default: … … 292 292 GuestFsObjData objData; 293 293 int rcGuest = VERR_IPE_UNINITIALIZED_STATUS; 294 int rc = mSession->i_fileQueryInfo Internal(strSource, false /*fFollowSymlinks*/, objData, &rcGuest);294 int rc = mSession->i_fileQueryInfo(strSource, false /*fFollowSymlinks*/, objData, &rcGuest); 295 295 if (RT_FAILURE(rc)) 296 296 { … … 330 330 /* Startup process. */ 331 331 ComObjPtr<GuestProcess> pProcess; 332 rc = mSession->i_processCreateEx Internal(procInfo, pProcess);332 rc = mSession->i_processCreateEx(procInfo, pProcess); 333 333 if (RT_SUCCESS(rc)) 334 334 rc = pProcess->i_startProcess(msTimeout, &rcGuest); … … 595 595 /* Startup process. */ 596 596 ComObjPtr<GuestProcess> pProcess; 597 int rc = mSession->i_processCreateEx Internal(procInfo, pProcess);597 int rc = mSession->i_processCreateEx(procInfo, pProcess); 598 598 599 599 int rcGuest = VERR_IPE_UNINITIALIZED_STATUS; … … 917 917 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 918 918 919 int vrc = mSession->i_startSession Internal(NULL /*pvrcGuest*/);919 int vrc = mSession->i_startSession(NULL /*pvrcGuest*/); 920 920 /* Nothing to do here anymore. */ 921 921 … … 995 995 996 996 ComObjPtr <GuestDirectory> pDir; int rcGuest; 997 rc = mSession->i_directoryOpen Internal(dirOpenInfo, pDir, &rcGuest);997 rc = mSession->i_directoryOpen(dirOpenInfo, pDir, &rcGuest); 998 998 999 999 if (RT_FAILURE(rc)) … … 1419 1419 int rcGuest; 1420 1420 GuestFsObjData objData; 1421 rc = mSession->i_fsQueryInfo Internal(mDest, true /* fFollowSymlinks */, objData, &rcGuest);1421 rc = mSession->i_fsQueryInfo(mDest, true /* fFollowSymlinks */, objData, &rcGuest); 1422 1422 if (RT_SUCCESS(rc)) 1423 1423 { … … 1663 1663 int64_t cbSizeOnGuest; 1664 1664 int rcGuest = VERR_IPE_UNINITIALIZED_STATUS; 1665 rc = pSession->i_fileQuerySize Internal(strFileDest, false /*fFollowSymlinks*/, &cbSizeOnGuest, &rcGuest);1665 rc = pSession->i_fileQuerySize(strFileDest, false /*fFollowSymlinks*/, &cbSizeOnGuest, &rcGuest); 1666 1666 if ( RT_SUCCESS(rc) 1667 1667 && cbSize == (uint64_t)cbSizeOnGuest) … … 1974 1974 /* Create the installation directory. */ 1975 1975 int rcGuest = VERR_IPE_UNINITIALIZED_STATUS; 1976 rc = pSession->i_directoryCreate Internal(strUpdateDir, 755 /* Mode */, DirectoryCreateFlag_Parents, &rcGuest);1976 rc = pSession->i_directoryCreate(strUpdateDir, 755 /* Mode */, DirectoryCreateFlag_Parents, &rcGuest); 1977 1977 if (RT_FAILURE(rc)) 1978 1978 {
Note:
See TracChangeset
for help on using the changeset viewer.