VirtualBox

source: vbox/trunk/src/VBox/Main/include/SharedFolderImpl.h@ 76394

最後變更 在這個檔案從76394是 75458,由 vboxsync 提交於 6 年 前

Main: Stubbed three ISharedFolder attribute setters. bugref:9295

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 3.9 KB
 
1/* $Id: SharedFolderImpl.h 75458 2018-11-14 18:20:05Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 ____H_SHAREDFOLDERIMPL
19#define ____H_SHAREDFOLDERIMPL
20
21#include "SharedFolderWrap.h"
22#include <VBox/shflsvc.h>
23
24class Console;
25
26class ATL_NO_VTABLE SharedFolder :
27 public SharedFolderWrap
28{
29public:
30
31 DECLARE_EMPTY_CTOR_DTOR (SharedFolder)
32
33 HRESULT FinalConstruct();
34 void FinalRelease();
35
36 // public initializer/uninitializer for internal purposes only
37 HRESULT init(Machine *aMachine, const com::Utf8Str &aName, const com::Utf8Str &aHostPath,
38 bool aWritable, bool aAutoMount, const com::Utf8Str &aAutoMountPoint, bool fFailOnError);
39 HRESULT initCopy(Machine *aMachine, SharedFolder *aThat);
40 HRESULT init(Console *aConsole, const com::Utf8Str &aName, const com::Utf8Str &aHostPath,
41 bool aWritable, bool aAutoMount, const com::Utf8Str &aAutoMountPoint, bool fFailOnError);
42// HRESULT init(VirtualBox *aVirtualBox, const Utf8Str &aName, const Utf8Str &aHostPath,
43// bool aWritable, const com::Utf8Str &aAutoMountPoint, bool aAutoMount, bool fFailOnError);
44 void uninit();
45
46 // public methods for internal purposes only
47 // (ensure there is a caller and a read lock before calling them!)
48
49 /**
50 * Public internal method. Returns the shared folder's name. Needs caller! Locking not necessary.
51 * @return
52 */
53 const Utf8Str &i_getName() const;
54
55 /**
56 * Public internal method. Returns the shared folder's host path. Needs caller! Locking not necessary.
57 * @return
58 */
59 const Utf8Str &i_getHostPath() const;
60
61 /**
62 * Public internal method. Returns true if the shared folder is writable. Needs caller and locking!
63 * @return
64 */
65 bool i_isWritable() const;
66
67 /**
68 * Public internal method. Returns true if the shared folder is auto-mounted. Needs caller and locking!
69 * @return
70 */
71 bool i_isAutoMounted() const;
72
73 /**
74 * Public internal method for getting the auto mount point.
75 */
76 const Utf8Str &i_getAutoMountPoint() const;
77
78protected:
79
80 HRESULT i_protectedInit(VirtualBoxBase *aParent,
81 const Utf8Str &aName,
82 const Utf8Str &aHostPath,
83 bool aWritable,
84 bool aAutoMount,
85 const com::Utf8Str &aAutoMountPoint,
86 bool fFailOnError);
87private:
88
89 // wrapped ISharedFolder properies.
90 HRESULT getName(com::Utf8Str &aName);
91 HRESULT getHostPath(com::Utf8Str &aHostPath);
92 HRESULT getAccessible(BOOL *aAccessible);
93 HRESULT getWritable(BOOL *aWritable);
94 HRESULT setWritable(BOOL aWritable);
95 HRESULT getAutoMount(BOOL *aAutoMount);
96 HRESULT setAutoMount(BOOL aAutoMount);
97 HRESULT getAutoMountPoint(com::Utf8Str &aAutoMountPoint);
98 HRESULT setAutoMountPoint(com::Utf8Str const &aAutoMountPoint);
99 HRESULT getLastAccessError(com::Utf8Str &aLastAccessError);
100
101 VirtualBoxBase * const mParent;
102
103 /* weak parents (only one of them is not null) */
104#if !defined(VBOX_COM_INPROC)
105 Machine * const mMachine;
106 VirtualBox * const mVirtualBox;
107#else
108 Console * const mConsole;
109#endif
110
111 struct Data; // opaque data struct, defined in SharedFolderImpl.cpp
112 Data *m;
113};
114
115#endif // !____H_SHAREDFOLDERIMPL
116/* vi: set tabstop=4 shiftwidth=4 expandtab: */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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