1 |
|
---|
2 | /* $Id: GuestFsObjInfoImpl.cpp 42084 2012-07-10 10:17:20Z vboxsync $ */
|
---|
3 | /** @file
|
---|
4 | * VirtualBox Main - XXX.
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2012 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 |
|
---|
20 | /*******************************************************************************
|
---|
21 | * Header Files *
|
---|
22 | *******************************************************************************/
|
---|
23 | #include "GuestFsObjInfoImpl.h"
|
---|
24 |
|
---|
25 | #include "Global.h"
|
---|
26 | #include "AutoCaller.h"
|
---|
27 | #include "Logging.h"
|
---|
28 |
|
---|
29 | #include <VBox/com/array.h>
|
---|
30 |
|
---|
31 |
|
---|
32 | // constructor / destructor
|
---|
33 | /////////////////////////////////////////////////////////////////////////////
|
---|
34 |
|
---|
35 | DEFINE_EMPTY_CTOR_DTOR(GuestFsObjInfo)
|
---|
36 |
|
---|
37 | HRESULT GuestFsObjInfo::FinalConstruct()
|
---|
38 | {
|
---|
39 | LogFlowThisFunc(("\n"));
|
---|
40 | return BaseFinalConstruct();
|
---|
41 | }
|
---|
42 |
|
---|
43 | void GuestFsObjInfo::FinalRelease(void)
|
---|
44 | {
|
---|
45 | LogFlowThisFuncEnter();
|
---|
46 | uninit();
|
---|
47 | BaseFinalRelease();
|
---|
48 | LogFlowThisFuncLeave();
|
---|
49 | }
|
---|
50 |
|
---|
51 | // public initializer/uninitializer for internal purposes only
|
---|
52 | /////////////////////////////////////////////////////////////////////////////
|
---|
53 |
|
---|
54 | HRESULT GuestFsObjInfo::init(void)
|
---|
55 | {
|
---|
56 | return S_OK;
|
---|
57 | }
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * Uninitializes the instance.
|
---|
61 | * Called from FinalRelease().
|
---|
62 | */
|
---|
63 | void GuestFsObjInfo::uninit(void)
|
---|
64 | {
|
---|
65 | LogFlowThisFunc(("\n"));
|
---|
66 |
|
---|
67 | /* Enclose the state transition Ready->InUninit->NotReady. */
|
---|
68 | AutoUninitSpan autoUninitSpan(this);
|
---|
69 | if (autoUninitSpan.uninitDone())
|
---|
70 | return;
|
---|
71 | }
|
---|
72 |
|
---|
73 | // implementation of public getters/setters for attributes
|
---|
74 | /////////////////////////////////////////////////////////////////////////////
|
---|
75 |
|
---|
76 | STDMETHODIMP GuestFsObjInfo::COMGETTER(AccessTime)(LONG64 *aAccessTime)
|
---|
77 | {
|
---|
78 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
79 | ReturnComNotImplemented();
|
---|
80 | #else
|
---|
81 | AutoCaller autoCaller(this);
|
---|
82 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
83 |
|
---|
84 | ReturnComNotImplemented();
|
---|
85 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
86 | }
|
---|
87 |
|
---|
88 | STDMETHODIMP GuestFsObjInfo::COMGETTER(AllocatedSize)(LONG64 *aAllocatedSize)
|
---|
89 | {
|
---|
90 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
91 | ReturnComNotImplemented();
|
---|
92 | #else
|
---|
93 | AutoCaller autoCaller(this);
|
---|
94 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
95 |
|
---|
96 | ReturnComNotImplemented();
|
---|
97 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
98 | }
|
---|
99 |
|
---|
100 | STDMETHODIMP GuestFsObjInfo::COMGETTER(BirthTime)(LONG64 *aBirthTime)
|
---|
101 | {
|
---|
102 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
103 | ReturnComNotImplemented();
|
---|
104 | #else
|
---|
105 | AutoCaller autoCaller(this);
|
---|
106 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
107 |
|
---|
108 | ReturnComNotImplemented();
|
---|
109 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
110 | }
|
---|
111 |
|
---|
112 | STDMETHODIMP GuestFsObjInfo::COMGETTER(ChangeTime)(LONG64 *aChangeTime)
|
---|
113 | {
|
---|
114 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
115 | ReturnComNotImplemented();
|
---|
116 | #else
|
---|
117 | AutoCaller autoCaller(this);
|
---|
118 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
119 |
|
---|
120 | ReturnComNotImplemented();
|
---|
121 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
122 | }
|
---|
123 |
|
---|
124 | STDMETHODIMP GuestFsObjInfo::COMGETTER(DeviceNumber)(ULONG *aDeviceNumber)
|
---|
125 | {
|
---|
126 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
127 | ReturnComNotImplemented();
|
---|
128 | #else
|
---|
129 | AutoCaller autoCaller(this);
|
---|
130 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
131 |
|
---|
132 | ReturnComNotImplemented();
|
---|
133 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
134 | }
|
---|
135 |
|
---|
136 | STDMETHODIMP GuestFsObjInfo::COMGETTER(FileAttrs)(BSTR *aFileAttrs)
|
---|
137 | {
|
---|
138 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
139 | ReturnComNotImplemented();
|
---|
140 | #else
|
---|
141 | AutoCaller autoCaller(this);
|
---|
142 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
143 |
|
---|
144 | ReturnComNotImplemented();
|
---|
145 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
146 | }
|
---|
147 |
|
---|
148 | STDMETHODIMP GuestFsObjInfo::COMGETTER(GenerationID)(ULONG *aGenerationID)
|
---|
149 | {
|
---|
150 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
151 | ReturnComNotImplemented();
|
---|
152 | #else
|
---|
153 | AutoCaller autoCaller(this);
|
---|
154 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
155 |
|
---|
156 | ReturnComNotImplemented();
|
---|
157 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
158 | }
|
---|
159 |
|
---|
160 | STDMETHODIMP GuestFsObjInfo::COMGETTER(GID)(ULONG *aGID)
|
---|
161 | {
|
---|
162 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
163 | ReturnComNotImplemented();
|
---|
164 | #else
|
---|
165 | AutoCaller autoCaller(this);
|
---|
166 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
167 |
|
---|
168 | ReturnComNotImplemented();
|
---|
169 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
170 | }
|
---|
171 |
|
---|
172 | STDMETHODIMP GuestFsObjInfo::COMGETTER(GroupName)(BSTR *aGroupName)
|
---|
173 | {
|
---|
174 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
175 | ReturnComNotImplemented();
|
---|
176 | #else
|
---|
177 | AutoCaller autoCaller(this);
|
---|
178 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
179 |
|
---|
180 | ReturnComNotImplemented();
|
---|
181 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
182 | }
|
---|
183 |
|
---|
184 | STDMETHODIMP GuestFsObjInfo::COMGETTER(HardLinks)(ULONG *aHardLinks)
|
---|
185 | {
|
---|
186 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
187 | ReturnComNotImplemented();
|
---|
188 | #else
|
---|
189 | AutoCaller autoCaller(this);
|
---|
190 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
191 |
|
---|
192 | ReturnComNotImplemented();
|
---|
193 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
194 | }
|
---|
195 |
|
---|
196 | STDMETHODIMP GuestFsObjInfo::COMGETTER(ModificationTime)(LONG64 *aModificationTime)
|
---|
197 | {
|
---|
198 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
199 | ReturnComNotImplemented();
|
---|
200 | #else
|
---|
201 | AutoCaller autoCaller(this);
|
---|
202 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
203 |
|
---|
204 | ReturnComNotImplemented();
|
---|
205 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
206 | }
|
---|
207 |
|
---|
208 | STDMETHODIMP GuestFsObjInfo::COMGETTER(Name)(BSTR *aName)
|
---|
209 | {
|
---|
210 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
211 | ReturnComNotImplemented();
|
---|
212 | #else
|
---|
213 | AutoCaller autoCaller(this);
|
---|
214 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
215 |
|
---|
216 | ReturnComNotImplemented();
|
---|
217 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
218 | }
|
---|
219 |
|
---|
220 | STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeID)(LONG64 *aNodeID)
|
---|
221 | {
|
---|
222 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
223 | ReturnComNotImplemented();
|
---|
224 | #else
|
---|
225 | AutoCaller autoCaller(this);
|
---|
226 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
227 |
|
---|
228 | ReturnComNotImplemented();
|
---|
229 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
230 | }
|
---|
231 |
|
---|
232 | STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeIDDevice)(ULONG *aNodeIDDevice)
|
---|
233 | {
|
---|
234 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
235 | ReturnComNotImplemented();
|
---|
236 | #else
|
---|
237 | AutoCaller autoCaller(this);
|
---|
238 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
239 |
|
---|
240 | ReturnComNotImplemented();
|
---|
241 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
242 | }
|
---|
243 |
|
---|
244 | STDMETHODIMP GuestFsObjInfo::COMGETTER(ObjectSize)(ULONG *aObjectSize)
|
---|
245 | {
|
---|
246 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
247 | ReturnComNotImplemented();
|
---|
248 | #else
|
---|
249 | AutoCaller autoCaller(this);
|
---|
250 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
251 |
|
---|
252 | ReturnComNotImplemented();
|
---|
253 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
254 | }
|
---|
255 |
|
---|
256 | STDMETHODIMP GuestFsObjInfo::COMGETTER(Type)(FsObjType *aType)
|
---|
257 | {
|
---|
258 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
259 | ReturnComNotImplemented();
|
---|
260 | #else
|
---|
261 | AutoCaller autoCaller(this);
|
---|
262 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
263 |
|
---|
264 | ReturnComNotImplemented();
|
---|
265 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
266 | }
|
---|
267 |
|
---|
268 | STDMETHODIMP GuestFsObjInfo::COMGETTER(UID)(ULONG *aUID)
|
---|
269 | {
|
---|
270 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
271 | ReturnComNotImplemented();
|
---|
272 | #else
|
---|
273 | AutoCaller autoCaller(this);
|
---|
274 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
275 |
|
---|
276 | ReturnComNotImplemented();
|
---|
277 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
278 | }
|
---|
279 |
|
---|
280 | STDMETHODIMP GuestFsObjInfo::COMGETTER(UserFlags)(ULONG *aUserFlags)
|
---|
281 | {
|
---|
282 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
283 | ReturnComNotImplemented();
|
---|
284 | #else
|
---|
285 | AutoCaller autoCaller(this);
|
---|
286 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
287 |
|
---|
288 | ReturnComNotImplemented();
|
---|
289 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
290 | }
|
---|
291 |
|
---|
292 | STDMETHODIMP GuestFsObjInfo::COMGETTER(UserName)(BSTR *aUserName)
|
---|
293 | {
|
---|
294 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
295 | ReturnComNotImplemented();
|
---|
296 | #else
|
---|
297 | AutoCaller autoCaller(this);
|
---|
298 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
299 |
|
---|
300 | ReturnComNotImplemented();
|
---|
301 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
302 | }
|
---|
303 |
|
---|
304 | STDMETHODIMP GuestFsObjInfo::COMGETTER(ACL)(BSTR *aACL)
|
---|
305 | {
|
---|
306 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
307 | ReturnComNotImplemented();
|
---|
308 | #else
|
---|
309 | AutoCaller autoCaller(this);
|
---|
310 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
311 |
|
---|
312 | ReturnComNotImplemented();
|
---|
313 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
314 | }
|
---|
315 |
|
---|