VirtualBox

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

Last change on this file since 94919 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • 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 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2009-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef MAIN_INCLUDED_VFSExplorerImpl_h
19#define MAIN_INCLUDED_VFSExplorerImpl_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "VFSExplorerWrap.h"
25
26class ATL_NO_VTABLE VFSExplorer :
27 public VFSExplorerWrap
28{
29public:
30
31 DECLARE_COMMON_CLASS_METHODS(VFSExplorer)
32
33 // public initializer/uninitializer for internal purposes only
34 HRESULT FinalConstruct() { return BaseFinalConstruct(); }
35 void FinalRelease() { uninit(); BaseFinalRelease(); }
36
37 HRESULT init(VFSType_T aType, Utf8Str aFilePath, Utf8Str aHostname, Utf8Str aUsername, Utf8Str aPassword, VirtualBox *aVirtualBox);
38 void uninit();
39
40 /* public methods only for internal purposes */
41 static HRESULT setErrorStatic(HRESULT aResultCode, const char *aText, ...)
42 {
43 va_list va;
44 va_start(va, aText);
45 HRESULT hrc = setErrorInternalV(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, va, false, true);
46 va_end(va);
47 return hrc;
48 }
49
50private:
51
52 // wrapped IVFSExplorer properties
53 HRESULT getPath(com::Utf8Str &aPath);
54 HRESULT getType(VFSType_T *aType);
55
56 // wrapped IVFSExplorer methods
57 HRESULT update(ComPtr<IProgress> &aProgress);
58 HRESULT cd(const com::Utf8Str &aDir, ComPtr<IProgress> &aProgress);
59 HRESULT cdUp(ComPtr<IProgress> &aProgress);
60 HRESULT entryList(std::vector<com::Utf8Str> &aNames,
61 std::vector<ULONG> &aTypes,
62 std::vector<LONG64> &aSizes,
63 std::vector<ULONG> &aModes);
64 HRESULT exists(const std::vector<com::Utf8Str> &aNames,
65 std::vector<com::Utf8Str> &aExists);
66 HRESULT remove(const std::vector<com::Utf8Str> &aNames,
67 ComPtr<IProgress> &aProgress);
68
69 /* Private member vars */
70 VirtualBox * const mVirtualBox;
71
72 ////////////////////////////////////////////////////////////////////////////////
73 ////
74 //// VFSExplorer definitions
75 ////
76 //////////////////////////////////////////////////////////////////////////////////
77 //
78 class TaskVFSExplorer; /* Worker thread helper */
79 struct Data;
80 Data *m;
81
82 /* Private member methods */
83 FsObjType_T i_iprtToVfsObjType(RTFMODE aType) const;
84
85 HRESULT i_updateFS(TaskVFSExplorer *aTask);
86 HRESULT i_deleteFS(TaskVFSExplorer *aTask);
87
88};
89
90#endif /* !MAIN_INCLUDED_VFSExplorerImpl_h */
91
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