VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: VFSExplorerImpl.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2009-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_VFSExplorerImpl_h
29#define MAIN_INCLUDED_VFSExplorerImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "VFSExplorerWrap.h"
35
36class ATL_NO_VTABLE VFSExplorer :
37 public VFSExplorerWrap
38{
39public:
40
41 DECLARE_COMMON_CLASS_METHODS(VFSExplorer)
42
43 // public initializer/uninitializer for internal purposes only
44 HRESULT FinalConstruct() { return BaseFinalConstruct(); }
45 void FinalRelease() { uninit(); BaseFinalRelease(); }
46
47 HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
48 void uninit();
49
50 /* public methods only for internal purposes */
51 static HRESULT setErrorStatic(HRESULT aResultCode, const char *aText, ...)
52 {
53 va_list va;
54 va_start(va, aText);
55 HRESULT hrc = setErrorInternalV(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, va, false, true);
56 va_end(va);
57 return hrc;
58 }
59
60private:
61
62 // wrapped IVFSExplorer properties
63 HRESULT getPath(com::Utf8Str &aPath);
64 HRESULT getType(VFSType_T *aType);
65
66 // wrapped IVFSExplorer methods
67 HRESULT update(ComPtr<IProgress> &aProgress);
68 HRESULT cd(const com::Utf8Str &aDir, ComPtr<IProgress> &aProgress);
69 HRESULT cdUp(ComPtr<IProgress> &aProgress);
70 HRESULT entryList(std::vector<com::Utf8Str> &aNames,
71 std::vector<ULONG> &aTypes,
72 std::vector<LONG64> &aSizes,
73 std::vector<ULONG> &aModes);
74 HRESULT exists(const std::vector<com::Utf8Str> &aNames,
75 std::vector<com::Utf8Str> &aExists);
76 HRESULT remove(const std::vector<com::Utf8Str> &aNames,
77 ComPtr<IProgress> &aProgress);
78
79 /* Private member vars */
80 VirtualBox * const mVirtualBox;
81
82 ////////////////////////////////////////////////////////////////////////////////
83 ////
84 //// VFSExplorer definitions
85 ////
86 //////////////////////////////////////////////////////////////////////////////////
87 //
88 class TaskVFSExplorer; /* Worker thread helper */
89 struct Data;
90 Data *m;
91
92 /* Private member methods */
93 FsObjType_T i_iprtToVfsObjType(RTFMODE aType) const;
94
95 HRESULT i_updateFS(TaskVFSExplorer *aTask);
96 HRESULT i_deleteFS(TaskVFSExplorer *aTask);
97
98};
99
100#endif /* !MAIN_INCLUDED_VFSExplorerImpl_h */
101
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use