1 |
|
---|
2 | /* $Id: GuestSessionImpl.cpp 42094 2012-07-10 12:47:49Z 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 "GuestSessionImpl.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(GuestSession)
|
---|
36 |
|
---|
37 | HRESULT GuestSession::FinalConstruct(void)
|
---|
38 | {
|
---|
39 | LogFlowThisFunc(("\n"));
|
---|
40 | return BaseFinalConstruct();
|
---|
41 | }
|
---|
42 |
|
---|
43 | void GuestSession::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 GuestSession::init(const ComPtr<IGuest> pGuest,
|
---|
55 | Utf8Str aUser, Utf8Str aPassword, Utf8Str aDomain, Utf8Str aName)
|
---|
56 | {
|
---|
57 | /* Enclose the state transition NotReady->InInit->Ready. */
|
---|
58 | AutoInitSpan autoInitSpan(this);
|
---|
59 | AssertReturn(autoInitSpan.isOk(), E_FAIL);
|
---|
60 |
|
---|
61 | mData.mParent = pGuest;
|
---|
62 |
|
---|
63 | mData.mUser = aUser;
|
---|
64 | mData.mPassword = aPassword;
|
---|
65 | mData.mDomain = aDomain;
|
---|
66 | mData.mName = aName;
|
---|
67 |
|
---|
68 | /* Confirm a successful initialization when it's the case. */
|
---|
69 | autoInitSpan.setSucceeded();
|
---|
70 |
|
---|
71 | return S_OK;
|
---|
72 | }
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * Uninitializes the instance.
|
---|
76 | * Called from FinalRelease().
|
---|
77 | */
|
---|
78 | void GuestSession::uninit(void)
|
---|
79 | {
|
---|
80 | LogFlowThisFunc(("\n"));
|
---|
81 |
|
---|
82 | /* Enclose the state transition Ready->InUninit->NotReady. */
|
---|
83 | AutoUninitSpan autoUninitSpan(this);
|
---|
84 | if (autoUninitSpan.uninitDone())
|
---|
85 | return;
|
---|
86 |
|
---|
87 | #ifdef VBOX_WITH_GUEST_CONTROL
|
---|
88 | for (SessionFiles::const_iterator itFiles = mData.mFiles.begin();
|
---|
89 | itFiles != mData.mFiles.end(); ++itFiles)
|
---|
90 | {
|
---|
91 | /** @todo */
|
---|
92 | }
|
---|
93 |
|
---|
94 | for (SessionDirectories::const_iterator itDirs = mData.mDirectories.begin();
|
---|
95 | itDirs != mData.mDirectories.end(); ++itDirs)
|
---|
96 | {
|
---|
97 | /** @todo */
|
---|
98 | }
|
---|
99 |
|
---|
100 | for (SessionProcesses::const_iterator itProcs = mData.mProcesses.begin();
|
---|
101 | itProcs != mData.mProcesses.end(); ++itProcs)
|
---|
102 | {
|
---|
103 | /** @todo */
|
---|
104 | }
|
---|
105 | #endif
|
---|
106 | }
|
---|
107 |
|
---|
108 | // implementation of public getters/setters for attributes
|
---|
109 | /////////////////////////////////////////////////////////////////////////////
|
---|
110 |
|
---|
111 | STDMETHODIMP GuestSession::COMGETTER(User)(BSTR *aUser)
|
---|
112 | {
|
---|
113 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
114 | ReturnComNotImplemented();
|
---|
115 | #else
|
---|
116 | CheckComArgOutPointerValid(aUser);
|
---|
117 |
|
---|
118 | AutoCaller autoCaller(this);
|
---|
119 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
120 |
|
---|
121 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
122 |
|
---|
123 | mData.mUser.cloneTo(aUser);
|
---|
124 |
|
---|
125 | return S_OK;
|
---|
126 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
127 | }
|
---|
128 |
|
---|
129 | STDMETHODIMP GuestSession::COMGETTER(Domain)(BSTR *aDomain)
|
---|
130 | {
|
---|
131 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
132 | ReturnComNotImplemented();
|
---|
133 | #else
|
---|
134 | CheckComArgOutPointerValid(aDomain);
|
---|
135 |
|
---|
136 | AutoCaller autoCaller(this);
|
---|
137 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
138 |
|
---|
139 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
140 |
|
---|
141 | mData.mDomain.cloneTo(aDomain);
|
---|
142 |
|
---|
143 | return S_OK;
|
---|
144 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
145 | }
|
---|
146 |
|
---|
147 | STDMETHODIMP GuestSession::COMGETTER(Name)(BSTR *aName)
|
---|
148 | {
|
---|
149 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
150 | ReturnComNotImplemented();
|
---|
151 | #else
|
---|
152 | CheckComArgOutPointerValid(aName);
|
---|
153 |
|
---|
154 | AutoCaller autoCaller(this);
|
---|
155 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
156 |
|
---|
157 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
158 |
|
---|
159 | mData.mName.cloneTo(aName);
|
---|
160 |
|
---|
161 | return S_OK;
|
---|
162 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
163 | }
|
---|
164 |
|
---|
165 | STDMETHODIMP GuestSession::COMGETTER(Id)(ULONG *aId)
|
---|
166 | {
|
---|
167 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
168 | ReturnComNotImplemented();
|
---|
169 | #else
|
---|
170 | CheckComArgOutPointerValid(aId);
|
---|
171 |
|
---|
172 | AutoCaller autoCaller(this);
|
---|
173 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
174 |
|
---|
175 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
176 |
|
---|
177 | *aId = mData.mId;
|
---|
178 |
|
---|
179 | return S_OK;
|
---|
180 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
181 | }
|
---|
182 |
|
---|
183 | STDMETHODIMP GuestSession::COMGETTER(Timeout)(ULONG *aTimeout)
|
---|
184 | {
|
---|
185 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
186 | ReturnComNotImplemented();
|
---|
187 | #else
|
---|
188 | CheckComArgOutPointerValid(aTimeout);
|
---|
189 |
|
---|
190 | AutoCaller autoCaller(this);
|
---|
191 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
192 |
|
---|
193 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
194 |
|
---|
195 | *aTimeout = mData.mTimeout;
|
---|
196 |
|
---|
197 | return S_OK;
|
---|
198 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
199 | }
|
---|
200 |
|
---|
201 | STDMETHODIMP GuestSession::COMGETTER(Environment)(ComSafeArrayOut(BSTR, aEnvironment))
|
---|
202 | {
|
---|
203 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
204 | ReturnComNotImplemented();
|
---|
205 | #else
|
---|
206 | CheckComArgOutSafeArrayPointerValid(aEnvironment);
|
---|
207 |
|
---|
208 | AutoCaller autoCaller(this);
|
---|
209 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
210 |
|
---|
211 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
212 |
|
---|
213 | com::SafeArray<BSTR> collection(mData.mEnvironment.size());
|
---|
214 | size_t s = 0;
|
---|
215 | for (SessionEnvironment::const_iterator it = mData.mEnvironment.begin();
|
---|
216 | it != mData.mEnvironment.end();
|
---|
217 | ++it, ++s)
|
---|
218 | {
|
---|
219 | /** @todo */
|
---|
220 | }
|
---|
221 |
|
---|
222 | collection.detachTo(ComSafeArrayOutArg(aEnvironment));
|
---|
223 |
|
---|
224 | return S_OK;
|
---|
225 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
226 | }
|
---|
227 |
|
---|
228 | STDMETHODIMP GuestSession::COMGETTER(Processes)(ComSafeArrayOut(IGuestProcess *, aProcesses))
|
---|
229 | {
|
---|
230 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
231 | ReturnComNotImplemented();
|
---|
232 | #else
|
---|
233 | CheckComArgOutSafeArrayPointerValid(aProcesses);
|
---|
234 |
|
---|
235 | AutoCaller autoCaller(this);
|
---|
236 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
237 |
|
---|
238 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
239 |
|
---|
240 | SafeIfaceArray<IGuestProcess> collection(mData.mProcesses);
|
---|
241 | collection.detachTo(ComSafeArrayOutArg(aProcesses));
|
---|
242 |
|
---|
243 | return S_OK;
|
---|
244 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
245 | }
|
---|
246 |
|
---|
247 | STDMETHODIMP GuestSession::COMGETTER(Directories)(ComSafeArrayOut(IGuestDirectory *, aDirectories))
|
---|
248 | {
|
---|
249 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
250 | ReturnComNotImplemented();
|
---|
251 | #else
|
---|
252 | CheckComArgOutSafeArrayPointerValid(aDirectories);
|
---|
253 |
|
---|
254 | AutoCaller autoCaller(this);
|
---|
255 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
256 |
|
---|
257 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
258 |
|
---|
259 | SafeIfaceArray<IGuestDirectory> collection(mData.mDirectories);
|
---|
260 | collection.detachTo(ComSafeArrayOutArg(aDirectories));
|
---|
261 |
|
---|
262 | return S_OK;
|
---|
263 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
264 | }
|
---|
265 |
|
---|
266 | STDMETHODIMP GuestSession::COMGETTER(Files)(ComSafeArrayOut(IGuestFile *, aFiles))
|
---|
267 | {
|
---|
268 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
269 | ReturnComNotImplemented();
|
---|
270 | #else
|
---|
271 | CheckComArgOutSafeArrayPointerValid(aFiles);
|
---|
272 |
|
---|
273 | AutoCaller autoCaller(this);
|
---|
274 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
275 |
|
---|
276 | AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
|
---|
277 |
|
---|
278 | SafeIfaceArray<IGuestFile> collection(mData.mFiles);
|
---|
279 | collection.detachTo(ComSafeArrayOutArg(aFiles));
|
---|
280 |
|
---|
281 | return S_OK;
|
---|
282 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
283 | }
|
---|
284 |
|
---|
285 | // implementation of public methods
|
---|
286 | /////////////////////////////////////////////////////////////////////////////
|
---|
287 |
|
---|
288 | STDMETHODIMP GuestSession::Close(void)
|
---|
289 | {
|
---|
290 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
291 | ReturnComNotImplemented();
|
---|
292 | #else
|
---|
293 | AutoCaller autoCaller(this);
|
---|
294 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
295 |
|
---|
296 | uninit();
|
---|
297 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
298 | }
|
---|
299 |
|
---|
300 | STDMETHODIMP GuestSession::CopyFrom(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
|
---|
301 | {
|
---|
302 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
303 | ReturnComNotImplemented();
|
---|
304 | #else
|
---|
305 | AutoCaller autoCaller(this);
|
---|
306 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
307 |
|
---|
308 | ReturnComNotImplemented();
|
---|
309 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
310 | }
|
---|
311 |
|
---|
312 | STDMETHODIMP GuestSession::CopyTo(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(ULONG, aFlags), IProgress **aProgress)
|
---|
313 | {
|
---|
314 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
315 | ReturnComNotImplemented();
|
---|
316 | #else
|
---|
317 | AutoCaller autoCaller(this);
|
---|
318 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
319 |
|
---|
320 | ReturnComNotImplemented();
|
---|
321 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
322 | }
|
---|
323 |
|
---|
324 | STDMETHODIMP GuestSession::DirectoryCreate(IN_BSTR aPath, ULONG aMode, ULONG aFlags, IGuestDirectory **aProgress)
|
---|
325 | {
|
---|
326 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
327 | ReturnComNotImplemented();
|
---|
328 | #else
|
---|
329 | AutoCaller autoCaller(this);
|
---|
330 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
331 |
|
---|
332 | ReturnComNotImplemented();
|
---|
333 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
334 | }
|
---|
335 |
|
---|
336 | STDMETHODIMP GuestSession::DirectoryCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestDirectory **aDirectory)
|
---|
337 | {
|
---|
338 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
339 | ReturnComNotImplemented();
|
---|
340 | #else
|
---|
341 | AutoCaller autoCaller(this);
|
---|
342 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
343 |
|
---|
344 | ReturnComNotImplemented();
|
---|
345 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
346 | }
|
---|
347 |
|
---|
348 | STDMETHODIMP GuestSession::DirectoryExists(IN_BSTR aPath, BOOL *aExists)
|
---|
349 | {
|
---|
350 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
351 | ReturnComNotImplemented();
|
---|
352 | #else
|
---|
353 | AutoCaller autoCaller(this);
|
---|
354 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
355 |
|
---|
356 | ReturnComNotImplemented();
|
---|
357 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
358 | }
|
---|
359 |
|
---|
360 | STDMETHODIMP GuestSession::DirectoryOpen(IN_BSTR aPath, IN_BSTR aFilter, IN_BSTR aFlags, IGuestDirectory **aDirectory)
|
---|
361 | {
|
---|
362 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
363 | ReturnComNotImplemented();
|
---|
364 | #else
|
---|
365 | AutoCaller autoCaller(this);
|
---|
366 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
367 |
|
---|
368 | ReturnComNotImplemented();
|
---|
369 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
370 | }
|
---|
371 |
|
---|
372 | STDMETHODIMP GuestSession::DirectoryQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo)
|
---|
373 | {
|
---|
374 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
375 | ReturnComNotImplemented();
|
---|
376 | #else
|
---|
377 | AutoCaller autoCaller(this);
|
---|
378 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
379 |
|
---|
380 | ReturnComNotImplemented();
|
---|
381 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
382 | }
|
---|
383 |
|
---|
384 | STDMETHODIMP GuestSession::DirectoryRemove(IN_BSTR aPath)
|
---|
385 | {
|
---|
386 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
387 | ReturnComNotImplemented();
|
---|
388 | #else
|
---|
389 | AutoCaller autoCaller(this);
|
---|
390 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
391 |
|
---|
392 | ReturnComNotImplemented();
|
---|
393 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
394 | }
|
---|
395 |
|
---|
396 | STDMETHODIMP GuestSession::DirectoryRemoveRecursive(IN_BSTR aPath, ComSafeArrayIn(DirectoryRemoveRecFlag_T, aFlags), IProgress **aProgress)
|
---|
397 | {
|
---|
398 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
399 | ReturnComNotImplemented();
|
---|
400 | #else
|
---|
401 | AutoCaller autoCaller(this);
|
---|
402 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
403 |
|
---|
404 | ReturnComNotImplemented();
|
---|
405 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
406 | }
|
---|
407 |
|
---|
408 | STDMETHODIMP GuestSession::DirectoryRename(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags))
|
---|
409 | {
|
---|
410 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
411 | ReturnComNotImplemented();
|
---|
412 | #else
|
---|
413 | AutoCaller autoCaller(this);
|
---|
414 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
415 |
|
---|
416 | ReturnComNotImplemented();
|
---|
417 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
418 | }
|
---|
419 |
|
---|
420 | STDMETHODIMP GuestSession::DirectorySetACL(IN_BSTR aPath, IN_BSTR aACL)
|
---|
421 | {
|
---|
422 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
423 | ReturnComNotImplemented();
|
---|
424 | #else
|
---|
425 | AutoCaller autoCaller(this);
|
---|
426 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
427 |
|
---|
428 | ReturnComNotImplemented();
|
---|
429 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
430 | }
|
---|
431 |
|
---|
432 | STDMETHODIMP GuestSession::EnvironmentClear(void)
|
---|
433 | {
|
---|
434 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
435 | ReturnComNotImplemented();
|
---|
436 | #else
|
---|
437 | AutoCaller autoCaller(this);
|
---|
438 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
439 |
|
---|
440 | ReturnComNotImplemented();
|
---|
441 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
442 | }
|
---|
443 |
|
---|
444 | STDMETHODIMP GuestSession::EnvironmentSet(IN_BSTR aName, IN_BSTR aValue)
|
---|
445 | {
|
---|
446 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
447 | ReturnComNotImplemented();
|
---|
448 | #else
|
---|
449 | AutoCaller autoCaller(this);
|
---|
450 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
451 |
|
---|
452 | ReturnComNotImplemented();
|
---|
453 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
454 | }
|
---|
455 |
|
---|
456 | STDMETHODIMP GuestSession::EnvironmentSetArray(ComSafeArrayIn(IN_BSTR, aValues))
|
---|
457 | {
|
---|
458 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
459 | ReturnComNotImplemented();
|
---|
460 | #else
|
---|
461 | AutoCaller autoCaller(this);
|
---|
462 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
463 |
|
---|
464 | ReturnComNotImplemented();
|
---|
465 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
466 | }
|
---|
467 |
|
---|
468 | STDMETHODIMP GuestSession::EnvironmentUnset(IN_BSTR aName)
|
---|
469 | {
|
---|
470 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
471 | ReturnComNotImplemented();
|
---|
472 | #else
|
---|
473 | AutoCaller autoCaller(this);
|
---|
474 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
475 |
|
---|
476 | ReturnComNotImplemented();
|
---|
477 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
478 | }
|
---|
479 |
|
---|
480 | STDMETHODIMP GuestSession::FileCreateTemp(IN_BSTR aTemplate, ULONG aMode, IN_BSTR aName, IGuestFile **aFile)
|
---|
481 | {
|
---|
482 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
483 | ReturnComNotImplemented();
|
---|
484 | #else
|
---|
485 | AutoCaller autoCaller(this);
|
---|
486 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
487 |
|
---|
488 | ReturnComNotImplemented();
|
---|
489 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
490 | }
|
---|
491 |
|
---|
492 | STDMETHODIMP GuestSession::FileExists(IN_BSTR aPath, BOOL *aExists)
|
---|
493 | {
|
---|
494 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
495 | ReturnComNotImplemented();
|
---|
496 | #else
|
---|
497 | AutoCaller autoCaller(this);
|
---|
498 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
499 |
|
---|
500 | ReturnComNotImplemented();
|
---|
501 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
502 | }
|
---|
503 |
|
---|
504 | STDMETHODIMP GuestSession::FileOpen(IN_BSTR aPath, IN_BSTR aOpenMode, IN_BSTR aDisposition, ULONG aCreationMode, LONG64 aOffset, IGuestFile **aFile)
|
---|
505 | {
|
---|
506 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
507 | ReturnComNotImplemented();
|
---|
508 | #else
|
---|
509 | AutoCaller autoCaller(this);
|
---|
510 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
511 |
|
---|
512 | ReturnComNotImplemented();
|
---|
513 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
514 | }
|
---|
515 |
|
---|
516 | STDMETHODIMP GuestSession::FileQueryInfo(IN_BSTR aPath, IGuestFsObjInfo **aInfo)
|
---|
517 | {
|
---|
518 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
519 | ReturnComNotImplemented();
|
---|
520 | #else
|
---|
521 | AutoCaller autoCaller(this);
|
---|
522 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
523 |
|
---|
524 | ReturnComNotImplemented();
|
---|
525 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
526 | }
|
---|
527 |
|
---|
528 | STDMETHODIMP GuestSession::FileQuerySize(IN_BSTR aPath, LONG64 *aSize)
|
---|
529 | {
|
---|
530 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
531 | ReturnComNotImplemented();
|
---|
532 | #else
|
---|
533 | AutoCaller autoCaller(this);
|
---|
534 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
535 |
|
---|
536 | ReturnComNotImplemented();
|
---|
537 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
538 | }
|
---|
539 |
|
---|
540 | STDMETHODIMP GuestSession::FileRemove(IN_BSTR aPath)
|
---|
541 | {
|
---|
542 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
543 | ReturnComNotImplemented();
|
---|
544 | #else
|
---|
545 | AutoCaller autoCaller(this);
|
---|
546 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
547 |
|
---|
548 | ReturnComNotImplemented();
|
---|
549 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
550 | }
|
---|
551 |
|
---|
552 | STDMETHODIMP GuestSession::FileRename(IN_BSTR aSource, IN_BSTR aDest, ComSafeArrayIn(PathRenameFlag_T, aFlags))
|
---|
553 | {
|
---|
554 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
555 | ReturnComNotImplemented();
|
---|
556 | #else
|
---|
557 | AutoCaller autoCaller(this);
|
---|
558 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
559 |
|
---|
560 | ReturnComNotImplemented();
|
---|
561 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
562 | }
|
---|
563 |
|
---|
564 | STDMETHODIMP GuestSession::FileSetACL(IN_BSTR aPath, IN_BSTR aACL)
|
---|
565 | {
|
---|
566 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
567 | ReturnComNotImplemented();
|
---|
568 | #else
|
---|
569 | AutoCaller autoCaller(this);
|
---|
570 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
571 |
|
---|
572 | ReturnComNotImplemented();
|
---|
573 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
574 | }
|
---|
575 |
|
---|
576 | STDMETHODIMP GuestSession::ProcessCreate(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
|
---|
577 | ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS, IGuestProcess **IGuestProcess)
|
---|
578 | {
|
---|
579 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
580 | ReturnComNotImplemented();
|
---|
581 | #else
|
---|
582 | AutoCaller autoCaller(this);
|
---|
583 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
584 |
|
---|
585 | ReturnComNotImplemented();
|
---|
586 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
587 | }
|
---|
588 |
|
---|
589 | STDMETHODIMP GuestSession::ProcessCreateEx(IN_BSTR aCommand, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(IN_BSTR, aEnvironment),
|
---|
590 | ComSafeArrayIn(ProcessCreateFlag_T, aFlags), ULONG aTimeoutMS,
|
---|
591 | ProcessPriority_T aPriority, ComSafeArrayIn(LONG, aAffinity),
|
---|
592 | IGuestProcess **IGuestProcess)
|
---|
593 | {
|
---|
594 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
595 | ReturnComNotImplemented();
|
---|
596 | #else
|
---|
597 | AutoCaller autoCaller(this);
|
---|
598 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
599 |
|
---|
600 | ReturnComNotImplemented();
|
---|
601 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
602 | }
|
---|
603 |
|
---|
604 | STDMETHODIMP GuestSession::ProcessGet(ULONG aPID, IGuestProcess **IGuestProcess)
|
---|
605 | {
|
---|
606 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
607 | ReturnComNotImplemented();
|
---|
608 | #else
|
---|
609 | AutoCaller autoCaller(this);
|
---|
610 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
611 |
|
---|
612 | ReturnComNotImplemented();
|
---|
613 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
614 | }
|
---|
615 |
|
---|
616 | STDMETHODIMP GuestSession::SetTimeout(ULONG aTimeoutMS)
|
---|
617 | {
|
---|
618 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
619 | ReturnComNotImplemented();
|
---|
620 | #else
|
---|
621 | AutoCaller autoCaller(this);
|
---|
622 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
623 |
|
---|
624 | ReturnComNotImplemented();
|
---|
625 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
626 | }
|
---|
627 |
|
---|
628 | STDMETHODIMP GuestSession::SymlinkCreate(IN_BSTR aSource, IN_BSTR aTarget, SymlinkType_T aType)
|
---|
629 | {
|
---|
630 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
631 | ReturnComNotImplemented();
|
---|
632 | #else
|
---|
633 | AutoCaller autoCaller(this);
|
---|
634 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
635 |
|
---|
636 | ReturnComNotImplemented();
|
---|
637 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
638 | }
|
---|
639 |
|
---|
640 | STDMETHODIMP GuestSession::SymlinkExists(IN_BSTR aSymlink, BOOL *aExists)
|
---|
641 | {
|
---|
642 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
643 | ReturnComNotImplemented();
|
---|
644 | #else
|
---|
645 | AutoCaller autoCaller(this);
|
---|
646 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
647 |
|
---|
648 | ReturnComNotImplemented();
|
---|
649 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
650 | }
|
---|
651 |
|
---|
652 | STDMETHODIMP GuestSession::SymlinkRead(IN_BSTR aSymlink, ComSafeArrayIn(SymlinkReadFlag_T, aFlags), BSTR *aTarget)
|
---|
653 | {
|
---|
654 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
655 | ReturnComNotImplemented();
|
---|
656 | #else
|
---|
657 | AutoCaller autoCaller(this);
|
---|
658 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
659 |
|
---|
660 | ReturnComNotImplemented();
|
---|
661 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
662 | }
|
---|
663 |
|
---|
664 | STDMETHODIMP GuestSession::SymlinkRemoveDirectory(IN_BSTR aPath)
|
---|
665 | {
|
---|
666 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
667 | ReturnComNotImplemented();
|
---|
668 | #else
|
---|
669 | AutoCaller autoCaller(this);
|
---|
670 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
671 |
|
---|
672 | ReturnComNotImplemented();
|
---|
673 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
674 | }
|
---|
675 |
|
---|
676 | STDMETHODIMP GuestSession::SymlinkRemoveFile(IN_BSTR aFile)
|
---|
677 | {
|
---|
678 | #ifndef VBOX_WITH_GUEST_CONTROL
|
---|
679 | ReturnComNotImplemented();
|
---|
680 | #else
|
---|
681 | AutoCaller autoCaller(this);
|
---|
682 | if (FAILED(autoCaller.rc())) return autoCaller.rc();
|
---|
683 |
|
---|
684 | ReturnComNotImplemented();
|
---|
685 | #endif /* VBOX_WITH_GUEST_CONTROL */
|
---|
686 | }
|
---|
687 |
|
---|