VirtualBox

Changeset 50548 in vbox


Ignore:
Timestamp:
Feb 21, 2014 7:53:11 PM (11 years ago)
Author:
vboxsync
Message:

6813 - src-client/GuestDirectoryImpl.cpp - changes backed out due to error on winrel clbr 92400

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r50547 r50548  
    10311031        include/ConsoleImpl.h
    10321032
     1033ifdef VBOX_WITH_GUEST_CONTROL
    10331034VBoxC_VBOX_INTERMEDIATES   = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS)
    10341035VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS)
     1036endif # VBOX_WITH_GUEST_CONTROL
    10351037
    10361038VBoxC_VBOX_TRANSLATIONS = \
  • trunk/src/VBox/Main/include/GuestDirectoryImpl.h

    r50547 r50548  
    2020#define ____H_GUESTDIRECTORYIMPL
    2121
     22#include "VirtualBoxBase.h"
    2223#include "GuestProcessImpl.h"
    23 #include "GuestDirectoryWrap.h"
    2424
    2525class GuestSession;
     
    2929 */
    3030class ATL_NO_VTABLE GuestDirectory :
    31     public GuestDirectoryWrap,
    32     public GuestObject
     31    public VirtualBoxBase,
     32    public GuestObject,
     33    VBOX_SCRIPTABLE_IMPL(IGuestDirectory)
    3334{
    3435public:
    3536    /** @name COM and internal init/term/mapping cruft.
    3637     * @{ */
     38    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestDirectory, IGuestDirectory)
     39    DECLARE_NOT_AGGREGATABLE(GuestDirectory)
     40    DECLARE_PROTECT_FINAL_CONSTRUCT()
     41    BEGIN_COM_MAP(GuestDirectory)
     42        VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestDirectory)
     43        COM_INTERFACE_ENTRY(IDirectory)
     44    END_COM_MAP()
    3745    DECLARE_EMPTY_CTOR_DTOR(GuestDirectory)
    3846
    3947    int     init(Console *pConsole, GuestSession *pSession, ULONG uDirID, const GuestDirectoryOpenInfo &openInfo);
    4048    void    uninit(void);
    41 
    4249    HRESULT FinalConstruct(void);
    4350    void    FinalRelease(void);
    4451    /** @}  */
    4552
     53    /** @name IDirectory interface.
     54     * @{ */
     55    STDMETHOD(COMGETTER(DirectoryName))(BSTR *aName);
     56    STDMETHOD(COMGETTER(Filter))(BSTR *aFilter);
     57    STDMETHOD(Close)(void);
     58    STDMETHOD(Read)(IFsObjInfo **aInfo);
     59    /** @}  */
    4660
    4761public:
     
    4963     * @{ */
    5064    int            callbackDispatcher(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);
     65    static Utf8Str guestErrorToString(int guestRc);
    5166    int            onRemove(void);
    52 
    53     static Utf8Str i_guestErrorToString(int guestRc);
    54     static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
     67    static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
    5568    /** @}  */
    5669
    5770private:
    5871
    59     /** @name Private Wrapped properties
     72    /** @name Private internal methods.
    6073     * @{ */
    6174    /** @}  */
    62     HRESULT getDirectoryName(com::Utf8Str &aDirectoryName);
    63     HRESULT getFilter(com::Utf8Str &aFilter);
    64 
    65     /** @name Wrapped Private internal methods.
    66      * @{ */
    67     /** @}  */
    68      HRESULT close();
    69      HRESULT read(ComPtr<IFsObjInfo> &aObjInfo);
    7075
    7176    struct Data
  • trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp

    r50547 r50548  
    143143}
    144144
    145 // implementation of private wrapped getters/setters for attributes
     145// implementation of public getters/setters for attributes
    146146/////////////////////////////////////////////////////////////////////////////
    147147
    148 HRESULT GuestDirectory::getDirectoryName(com::Utf8Str &aDirectoryName)
    149 {
    150     LogFlowThisFuncEnter();
     148STDMETHODIMP GuestDirectory::COMGETTER(DirectoryName)(BSTR *aName)
     149{
     150    LogFlowThisFuncEnter();
     151
     152    CheckComArgOutPointerValid(aName);
     153
     154    AutoCaller autoCaller(this);
     155    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    151156
    152157    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    153158
    154     aDirectoryName = mData.mOpenInfo.mPath;
     159    mData.mOpenInfo.mPath.cloneTo(aName);
    155160
    156161    return S_OK;
    157162}
    158163
    159 HRESULT GuestDirectory::getFilter(com::Utf8Str &aFilter)
    160 {
    161     LogFlowThisFuncEnter();
     164STDMETHODIMP GuestDirectory::COMGETTER(Filter)(BSTR *aFilter)
     165{
     166    LogFlowThisFuncEnter();
     167
     168    CheckComArgOutPointerValid(aFilter);
     169
     170    AutoCaller autoCaller(this);
     171    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    162172
    163173    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    164174
    165     aFilter = mData.mOpenInfo.mFilter;
     175    mData.mOpenInfo.mFilter.cloneTo(aFilter);
    166176
    167177    return S_OK;
     
    219229
    220230/* static */
    221 Utf8Str GuestDirectory::i_guestErrorToString(int guestRc)
     231Utf8Str GuestDirectory::guestErrorToString(int guestRc)
    222232{
    223233    Utf8Str strError;
     
    253263
    254264/* static */
    255 HRESULT GuestDirectory::i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc)
     265HRESULT GuestDirectory::setErrorExternal(VirtualBoxBase *pInterface, int guestRc)
    256266{
    257267    AssertPtr(pInterface);
    258268    AssertMsg(RT_FAILURE(guestRc), ("Guest rc does not indicate a failure when setting error\n"));
    259269
    260     return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory::i_guestErrorToString(guestRc).c_str());
     270    return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory::guestErrorToString(guestRc).c_str());
    261271}
    262272
    263273// implementation of public methods
    264274/////////////////////////////////////////////////////////////////////////////
    265 HRESULT GuestDirectory::close()
     275
     276STDMETHODIMP GuestDirectory::Close(void)
    266277{
    267278#ifndef VBOX_WITH_GUEST_CONTROL
     
    308319}
    309320
    310 HRESULT GuestDirectory::read(ComPtr<IFsObjInfo> &aObjInfo)
     321STDMETHODIMP GuestDirectory::Read(IFsObjInfo **aInfo)
    311322{
    312323#ifndef VBOX_WITH_GUEST_CONTROL
     
    359370                {
    360371                    /* Return info object to the caller. */
    361                     hr2 = pFsObjInfo.queryInterfaceTo(aObjInfo.asOutParam());
     372                    hr2 = pFsObjInfo.queryInterfaceTo(aInfo);
    362373                    if (FAILED(hr2))
    363374                        rc = VERR_COM_UNEXPECTED;
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r50547 r50548  
    27802780
    27812781            case VERR_GSTCTL_GUEST_ERROR:
    2782                 hr = GuestDirectory::i_setErrorExternal(this, guestRc);
     2782                hr = GuestDirectory::setErrorExternal(this, guestRc);
    27832783                break;
    27842784
     
    28852885
    28862886            case VERR_GSTCTL_GUEST_ERROR:
    2887                 hr = GuestDirectory::i_setErrorExternal(this, guestRc);
     2887                hr = GuestDirectory::setErrorExternal(this, guestRc);
    28882888                break;
    28892889
  • trunk/src/VBox/Main/src-client/xpcom/module.cpp

    r50547 r50548  
    6969NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Guest, IGuest)
    7070 #ifdef VBOX_WITH_GUEST_CONTROL
     71NS_DECL_CLASSINFO(GuestDirectory)
     72NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestDirectory, IGuestDirectory, IDirectory)
    7173NS_DECL_CLASSINFO(GuestFile)
    7274NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFile, IGuestFile, IFile)
Note: See TracChangeset for help on using the changeset viewer.

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