VirtualBox

Changeset 42846 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 16, 2012 1:35:28 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80104
Message:

Guest Control 2.0: Update.

Location:
trunk/src/VBox/Main/src-client
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp

    r42759 r42846  
    194194    uninit();
    195195
     196    LogFlowThisFuncLeave();
    196197    return S_OK;
    197198#endif /* VBOX_WITH_GUEST_CONTROL */
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r42818 r42846  
    6363    mData.mSession = pSession;
    6464    mData.mCreationMode = uCreationMode;
    65     mData.mDisposition = getDispositionFromString(strDisposition);
     65    mData.mDisposition = GuestFile::getDispositionFromString(strDisposition);
    6666    mData.mFileName = strPath;
    6767    mData.mInitialSize = 0;
    68     mData.mOpenMode = getOpenModeFromString(strOpenMode);
     68    mData.mOpenMode = GuestFile::getOpenModeFromString(strOpenMode);
    6969    mData.mOffset = iOffset;
    7070
     
    227227    ReturnComNotImplemented();
    228228#else
    229     AutoCaller autoCaller(this);
    230     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    231 
    232     ReturnComNotImplemented();
     229    LogFlowThisFuncEnter();
     230
     231    uninit();
     232
     233    LogFlowThisFuncLeave();
     234    return S_OK;
    233235#endif /* VBOX_WITH_GUEST_CONTROL */
    234236}
     
    242244    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    243245
    244     ReturnComNotImplemented();
     246    HRESULT hr = S_OK;
     247
     248    GuestFsObjData objData;
     249    int vrc = mData.mSession->fileQueryInfoInternal(mData.mFileName, objData);
     250    if (RT_SUCCESS(vrc))
     251    {
     252        ComObjPtr<GuestFsObjInfo> pFsObjInfo;
     253        hr = pFsObjInfo.createObject();
     254        if (FAILED(hr))
     255            return VERR_COM_UNEXPECTED;
     256
     257        vrc = pFsObjInfo->init(objData);
     258        if (RT_SUCCESS(rc))
     259            hr = pFsObjInfo.queryInterfaceTo(aInfo);
     260    }
     261    else
     262    {
     263        switch (vrc)
     264        {
     265            /** @todo Add more errors here! */
     266
     267            default:
     268               hr = setError(VBOX_E_IPRT_ERROR, tr("Querying file information failed: %Rrc"), vrc);
     269               break;
     270        }
     271    }
     272
     273    return hr;
    245274#endif /* VBOX_WITH_GUEST_CONTROL */
    246275}
  • trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp

    r42818 r42846  
    10441044{
    10451045    LogFlowThisFunc(("aCmd=%s, aTimeoutMS=%RU32, fFlags=%x\n",
    1046                  mData.mProcess.mCommand.c_str(), mData.mProcess.mTimeoutMS, mData.mProcess.mFlags));
     1046                     mData.mProcess.mCommand.c_str(), mData.mProcess.mTimeoutMS, mData.mProcess.mFlags));
    10471047
    10481048    /* Wait until the caller function (if kicked off by a thread)
     
    15451545    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    15461546
     1547    HRESULT hr = S_OK;
     1548
    15471549    int vrc = terminateProcess();
    1548     /** @todo Do setError() here. */
    1549     HRESULT hr = RT_SUCCESS(vrc) ? S_OK : VBOX_E_IPRT_ERROR;
    1550     LogFlowFuncLeaveRC(vrc);
    1551 
     1550    if (RT_FAILURE(vrc))
     1551    {
     1552        switch (vrc)
     1553        {
     1554            case VERR_NOT_IMPLEMENTED:
     1555                ReturnComNotImplemented();
     1556                break; /* Never reached. */
     1557
     1558            case VERR_NOT_SUPPORTED:
     1559                hr = setError(VBOX_E_IPRT_ERROR,
     1560                              tr("Terminating process \"%s\" (PID %RU32) not supported by installed Guest Additions"),
     1561                              mData.mProcess.mCommand.c_str(), mData.mPID);
     1562                break;
     1563
     1564            default:
     1565                hr = setError(VBOX_E_IPRT_ERROR,
     1566                              tr("Terminating process \"%s\" (PID %RU32) failed: %Rrc"),
     1567                              mData.mProcess.mCommand.c_str(), mData.mPID, vrc);
     1568                break;
     1569        }
     1570    }
     1571
     1572    LogFlowFuncLeaveRC(vrc);
    15521573    return hr;
    15531574#endif /* VBOX_WITH_GUEST_CONTROL */
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r42810 r42846  
    765765        return VERR_COM_UNEXPECTED;
    766766
    767     /* Note: There will be a race between creating and getting/initing the directory
    768              object here. */
    769767    int rc = pFile->init(this /* Parent */,
    770768                         strPath, strOpenMode, strDisposition, uCreationMode, iOffset);
     
    818816    LogFlowThisFunc(("strPath=%s\n", strPath.c_str()));
    819817
     818    /** @todo Merge this with IGuestFile::queryInfo(). */
    820819    GuestProcessStartupInfo procInfo;
    821820    procInfo.mName    = Utf8StrFmt(tr("Querying info for \"%s\""), strPath.c_str());
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette