dc311b529996345ea65d51c87b60b6849642d894vboxsync/* $Id$ */
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync/** @file
dc311b529996345ea65d51c87b60b6849642d894vboxsync *
dc311b529996345ea65d51c87b60b6849642d894vboxsync * VirtualBox COM class implementation
dc311b529996345ea65d51c87b60b6849642d894vboxsync */
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync/*
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync * Copyright (C) 2009-2013 Oracle Corporation
dc311b529996345ea65d51c87b60b6849642d894vboxsync *
dc311b529996345ea65d51c87b60b6849642d894vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
dc311b529996345ea65d51c87b60b6849642d894vboxsync * available from http://www.virtualbox.org. This file is free software;
dc311b529996345ea65d51c87b60b6849642d894vboxsync * you can redistribute it and/or modify it under the terms of the GNU
dc311b529996345ea65d51c87b60b6849642d894vboxsync * General Public License (GPL) as published by the Free Software
dc311b529996345ea65d51c87b60b6849642d894vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
dc311b529996345ea65d51c87b60b6849642d894vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
dc311b529996345ea65d51c87b60b6849642d894vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
dc311b529996345ea65d51c87b60b6849642d894vboxsync */
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync#ifndef ____H_VFSEXPLORERIMPL
dc311b529996345ea65d51c87b60b6849642d894vboxsync#define ____H_VFSEXPLORERIMPL
dc311b529996345ea65d51c87b60b6849642d894vboxsync
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync#include "VFSExplorerWrap.h"
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsyncclass ATL_NO_VTABLE VFSExplorer :
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync public VFSExplorerWrap
dc311b529996345ea65d51c87b60b6849642d894vboxsync{
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsyncpublic:
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync DECLARE_EMPTY_CTOR_DTOR(VFSExplorer)
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync // public initializer/uninitializer for internal purposes only
c7a378ed2fbad681c0b674351d698ef20a368935vboxsync HRESULT FinalConstruct() { return BaseFinalConstruct(); }
c7a378ed2fbad681c0b674351d698ef20a368935vboxsync void FinalRelease() { uninit(); BaseFinalRelease(); }
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
dc311b529996345ea65d51c87b60b6849642d894vboxsync void uninit();
dc311b529996345ea65d51c87b60b6849642d894vboxsync
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync /* public methods only for internal purposes */
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync static HRESULT setErrorStatic(HRESULT aResultCode,
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync const Utf8Str &aText)
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync {
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync }
c2029891dc7fbce0f08a378d0335568cf9cbb4c5vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsyncprivate:
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync // wrapped IVFSExplorer properties
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT getPath(com::Utf8Str &aPath);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT getType(VFSType_T *aType);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync // wrapped IVFSExplorer methods
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT update(ComPtr<IProgress> &aProgress);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT cd(const com::Utf8Str &aDir, ComPtr<IProgress> &aProgress);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT cdUp(ComPtr<IProgress> &aProgress);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT entryList(std::vector<com::Utf8Str> &aNames,
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync std::vector<ULONG> &aTypes,
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync std::vector<LONG64> &aSizes,
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync std::vector<ULONG> &aModes);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT exists(const std::vector<com::Utf8Str> &aNames,
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync std::vector<com::Utf8Str> &aExists);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT remove(const std::vector<com::Utf8Str> &aNames,
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync ComPtr<IProgress> &aProgress);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync /* Private member vars */
79207ebc7bef44216ecdbe520de76317c713ada6vboxsync VirtualBox * const mVirtualBox;
dc311b529996345ea65d51c87b60b6849642d894vboxsync
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync ////////////////////////////////////////////////////////////////////////////////
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync ////
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync //// VFSExplorer definitions
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync ////
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync //////////////////////////////////////////////////////////////////////////////////
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync //
dc311b529996345ea65d51c87b60b6849642d894vboxsync struct TaskVFSExplorer; /* Worker thread helper */
4a4d0b7611a832602800898d4ec5da6d588b535avboxsync struct Data;
dc311b529996345ea65d51c87b60b6849642d894vboxsync Data *m;
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync /* Private member methods */
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync VFSFileType_T i_RTToVFSFileType(int aType) const;
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT i_updateFS(TaskVFSExplorer *aTask);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT i_deleteFS(TaskVFSExplorer *aTask);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT i_updateS3(TaskVFSExplorer *aTask);
7b01db654c23d4e432465aebc1a1853e8d6b3194vboxsync HRESULT i_deleteS3(TaskVFSExplorer *aTask);
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync};
dc311b529996345ea65d51c87b60b6849642d894vboxsync
dc311b529996345ea65d51c87b60b6849642d894vboxsync#endif /* ____H_VFSEXPLORERIMPL */
dc311b529996345ea65d51c87b60b6849642d894vboxsync