VirtualBox

Ignore:
Timestamp:
Jan 28, 2011 11:36:42 AM (14 years ago)
Author:
vboxsync
Message:

Main: convert SharedFolder to utf-8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r35722 r35755  
    406406    {
    407407    public:
    408         SharedFolderData() {}
    409         SharedFolderData(Bstr aHostPath, BOOL aWritable, BOOL aAutoMount)
    410            : mHostPath(aHostPath)
    411            , mWritable(aWritable)
    412            , mAutoMount(aAutoMount) {}
     408        SharedFolderData()
     409        { }
     410
     411        SharedFolderData(const Utf8Str &aHostPath,
     412                         bool aWritable,
     413                         bool aAutoMount)
     414           : m_strHostPath(aHostPath),
     415             m_fWritable(aWritable),
     416             m_fAutoMount(aAutoMount)
     417        { }
     418
     419        // copy constructor
    413420        SharedFolderData(const SharedFolderData& aThat)
    414            : mHostPath(aThat.mHostPath)
    415            , mWritable(aThat.mWritable)
    416            , mAutoMount(aThat.mAutoMount) {}
    417         Bstr mHostPath;
    418         BOOL mWritable;
    419         BOOL mAutoMount;
     421           : m_strHostPath(aThat.m_strHostPath),
     422             m_fWritable(aThat.m_fWritable),
     423             m_fAutoMount(aThat.m_fAutoMount)
     424        { }
     425
     426        Utf8Str m_strHostPath;
     427        bool m_fWritable;
     428        bool m_fAutoMount;
    420429    };
    421     typedef std::map <Bstr, ComObjPtr<SharedFolder> > SharedFolderMap;
    422     typedef std::map <Bstr, SharedFolderData> SharedFolderDataMap;
     430
     431    typedef std::map<Utf8Str, ComObjPtr<SharedFolder> > SharedFolderMap;
     432    typedef std::map<Utf8Str, SharedFolderData> SharedFolderDataMap;
    423433
    424434private:
     
    449459    }
    450460
    451     HRESULT findSharedFolder(CBSTR aName,
     461    HRESULT findSharedFolder(const Utf8Str &strName,
    452462                             ComObjPtr<SharedFolder> &aSharedFolder,
    453463                             bool aSetError = false);
    454464
    455465    HRESULT fetchSharedFolders(BOOL aGlobal);
    456     bool findOtherSharedFolder(IN_BSTR aName,
     466    bool findOtherSharedFolder(const Utf8Str &straName,
    457467                               SharedFolderDataMap::const_iterator &aIt);
    458468
    459     HRESULT createSharedFolder(CBSTR aName, SharedFolderData aData);
    460     HRESULT removeSharedFolder(CBSTR aName);
     469    HRESULT createSharedFolder(const Utf8Str &strName, const SharedFolderData &aData);
     470    HRESULT removeSharedFolder(const Utf8Str &strName);
    461471
    462472    static DECLCALLBACK(int) configConstructor(PVM pVM, void *pvConsole);
     
    631641    RemoteUSBDeviceList mRemoteUSBDevices;
    632642
    633     SharedFolderMap mSharedFolders;
    634     SharedFolderDataMap mMachineSharedFolders;
    635     SharedFolderDataMap mGlobalSharedFolders;
     643    SharedFolderDataMap m_mapGlobalSharedFolders;
     644    SharedFolderDataMap m_mapMachineSharedFolders;
     645    SharedFolderMap m_mapSharedFolders;             // the console instances
    636646
    637647    /** The VM instance handle. */
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