VirtualBox

source: vbox/trunk/src/VBox/Main/include/VFSExplorerImpl.h@ 32736

Last change on this file since 32736 was 30739, checked in by vboxsync, 14 years ago

Main: remove VirtualBoxSupportTranslation template, add translation support to generic base class, clean up COM headers more, remove SupportErrorInfo.cpp|h

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/* $Id: VFSExplorerImpl.h 30739 2010-07-08 12:27:42Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2009 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20#ifndef ____H_VFSEXPLORERIMPL
21#define ____H_VFSEXPLORERIMPL
22
23#include "VirtualBoxBase.h"
24
25class ATL_NO_VTABLE VFSExplorer :
26 public VirtualBoxBase,
27 VBOX_SCRIPTABLE_IMPL(IVFSExplorer)
28{
29 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VFSExplorer, IVFSExplorer)
30
31 DECLARE_NOT_AGGREGATABLE(VFSExplorer)
32
33 DECLARE_PROTECT_FINAL_CONSTRUCT()
34
35 BEGIN_COM_MAP(VFSExplorer)
36 COM_INTERFACE_ENTRY(ISupportErrorInfo)
37 COM_INTERFACE_ENTRY(IVFSExplorer)
38 COM_INTERFACE_ENTRY(IDispatch)
39 END_COM_MAP()
40
41 DECLARE_EMPTY_CTOR_DTOR(VFSExplorer)
42
43 // public initializer/uninitializer for internal purposes only
44 HRESULT FinalConstruct() { return S_OK; }
45 void FinalRelease() { uninit(); }
46
47 HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
48 void uninit();
49
50 /* IVFSExplorer properties */
51 STDMETHOD(COMGETTER(Path))(BSTR *aPath);
52 STDMETHOD(COMGETTER(Type))(VFSType_T *aType);
53
54 /* IVFSExplorer methods */
55 STDMETHOD(Update)(IProgress **aProgress);
56
57 STDMETHOD(Cd)(IN_BSTR aDir, IProgress **aProgress);
58 STDMETHOD(CdUp)(IProgress **aProgress);
59
60 STDMETHOD(EntryList)(ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(VFSFileType_T, aTypes));
61
62 STDMETHOD(Exists)(ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayOut(BSTR, aExists));
63
64 STDMETHOD(Remove)(ComSafeArrayIn(IN_BSTR, aNames), IProgress **aProgress);
65
66 /* public methods only for internal purposes */
67
68 static HRESULT setErrorStatic(HRESULT aResultCode,
69 const Utf8Str &aText)
70 {
71 return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
72 }
73
74private:
75 /* Private member vars */
76 VirtualBox * const mVirtualBox;
77
78 struct TaskVFSExplorer; /* Worker thread helper */
79 struct Data;
80 Data *m;
81
82 /* Private member methods */
83 VFSFileType_T RTToVFSFileType(int aType) const;
84
85 HRESULT updateFS(TaskVFSExplorer *aTask);
86 HRESULT deleteFS(TaskVFSExplorer *aTask);
87 HRESULT updateS3(TaskVFSExplorer *aTask);
88 HRESULT deleteS3(TaskVFSExplorer *aTask);
89};
90
91#endif /* ____H_VFSEXPLORERIMPL */
92
Note: See TracBrowser for help on using the repository browser.

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