VirtualBox

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

Last change on this file since 26992 was 26044, checked in by vboxsync, 15 years ago

Main: move Host::Get{DVD|Floppy}Drives implementation into implementation methods to eliminate useless conversions in mountMedium()

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: VFSExplorerImpl.h 26044 2010-01-26 12:21:34Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2009 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
20 * Clara, CA 95054 USA or visit http://www.sun.com if you need
21 * additional information or have any questions.
22 */
23
24#ifndef ____H_VFSEXPLORERIMPL
25#define ____H_VFSEXPLORERIMPL
26
27#include "VirtualBoxBase.h"
28
29class ATL_NO_VTABLE VFSExplorer :
30 public VirtualBoxBase,
31 public VirtualBoxSupportErrorInfoImpl<VFSExplorer, IVFSExplorer>,
32 public VirtualBoxSupportTranslation<VFSExplorer>,
33 VBOX_SCRIPTABLE_IMPL(IVFSExplorer)
34{
35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (VFSExplorer)
36
37 DECLARE_NOT_AGGREGATABLE(VFSExplorer)
38
39 DECLARE_PROTECT_FINAL_CONSTRUCT()
40
41 BEGIN_COM_MAP(VFSExplorer)
42 COM_INTERFACE_ENTRY(ISupportErrorInfo)
43 COM_INTERFACE_ENTRY(IVFSExplorer)
44 COM_INTERFACE_ENTRY(IDispatch)
45 END_COM_MAP()
46
47 DECLARE_EMPTY_CTOR_DTOR(VFSExplorer)
48
49 // public initializer/uninitializer for internal purposes only
50 HRESULT FinalConstruct() { return S_OK; }
51 void FinalRelease() { uninit(); }
52
53 HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
54 void uninit();
55
56 // for VirtualBoxSupportErrorInfoImpl
57 static const wchar_t *getComponentName() { return L"VFSExplorer"; }
58
59 /* IVFSExplorer properties */
60 STDMETHOD(COMGETTER(Path))(BSTR *aPath);
61 STDMETHOD(COMGETTER(Type))(VFSType_T *aType);
62
63 /* IVFSExplorer methods */
64 STDMETHOD(Update)(IProgress **aProgress);
65
66 STDMETHOD(Cd)(IN_BSTR aDir, IProgress **aProgress);
67 STDMETHOD(CdUp)(IProgress **aProgress);
68
69 STDMETHOD(EntryList)(ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(VFSFileType_T, aTypes));
70
71 STDMETHOD(Exists)(ComSafeArrayIn(IN_BSTR, aNames), ComSafeArrayOut(BSTR, aExists));
72
73 STDMETHOD(Remove)(ComSafeArrayIn(IN_BSTR, aNames), IProgress **aProgress);
74
75private:
76 /* Private member vars */
77 const ComObjPtr<VirtualBox, ComWeakRef> 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