VirtualBox

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

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

release build fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: VFSExplorerImpl.h 30716 2010-07-07 16:40:45Z 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 public VirtualBoxSupportTranslation<VFSExplorer>,
28 VBOX_SCRIPTABLE_IMPL(IVFSExplorer)
29{
30 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(VFSExplorer, IVFSExplorer)
31
32 DECLARE_NOT_AGGREGATABLE(VFSExplorer)
33
34 DECLARE_PROTECT_FINAL_CONSTRUCT()
35
36 BEGIN_COM_MAP(VFSExplorer)
37 COM_INTERFACE_ENTRY(ISupportErrorInfo)
38 COM_INTERFACE_ENTRY(IVFSExplorer)
39 COM_INTERFACE_ENTRY(IDispatch)
40 END_COM_MAP()
41
42 DECLARE_EMPTY_CTOR_DTOR(VFSExplorer)
43
44 // public initializer/uninitializer for internal purposes only
45 HRESULT FinalConstruct() { return S_OK; }
46 void FinalRelease() { uninit(); }
47
48 HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
49 void uninit();
50
51 /* IVFSExplorer properties */
52 STDMETHOD(COMGETTER(Path))(BSTR *aPath);
53 STDMETHOD(COMGETTER(Type))(VFSType_T *aType);
54
55 /* IVFSExplorer methods */
56 STDMETHOD(Update)(IProgress **aProgress);
57
58 STDMETHOD(Cd)(IN_BSTR aDir, IProgress **aProgress);
59 STDMETHOD(CdUp)(IProgress **aProgress);
60
61 STDMETHOD(EntryList)(ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(VFSFileType_T, aTypes));
62
63 STDMETHOD(Exists)(ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayOut(BSTR, aExists));
64
65 STDMETHOD(Remove)(ComSafeArrayIn(IN_BSTR, aNames), IProgress **aProgress);
66
67 /* public methods only for internal purposes */
68
69 static HRESULT setErrorStatic(HRESULT aResultCode,
70 const Utf8Str &aText)
71 {
72 return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
73 }
74
75private:
76 /* Private member vars */
77 VirtualBox * const mVirtualBox;
78
79 struct TaskVFSExplorer; /* Worker thread helper */
80 struct Data;
81 Data *m;
82
83 /* Private member methods */
84 VFSFileType_T RTToVFSFileType(int aType) const;
85
86 HRESULT updateFS(TaskVFSExplorer *aTask);
87 HRESULT deleteFS(TaskVFSExplorer *aTask);
88 HRESULT updateS3(TaskVFSExplorer *aTask);
89 HRESULT deleteS3(TaskVFSExplorer *aTask);
90};
91
92#endif /* ____H_VFSEXPLORERIMPL */
93
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