VirtualBox

source: vbox/trunk/src/VBox/Main/idl/VirtualBox.xidl@ 24262

Last change on this file since 24262 was 24262, checked in by vboxsync, 15 years ago

Main: more API doc fixes

  • Property svn:eol-style set to native
File size: 493.1 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="0f4cc50c-e1cc-4cde-ae7a-e6164bac5ba2"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Aborted" value="3">
619 <desc>
620 The process running the machine has terminated abnormally. This may
621 indicate a crash of the VM process in host execution context, or
622 the VM process has been terminated externally.
623 </desc>
624 </const>
625 <const name="Running" value="4">
626 <desc>
627 The machine is currently being executed.
628 <note internal="yes">
629 For whoever decides to touch this enum: In order to keep the
630 comparisons in the old source code valid, this state must immediately
631 precede the Paused state.
632 </note>
633 </desc>
634 </const>
635 <const name="Paused" value="5">
636 <desc>
637 Execution of the machine has been paused.
638 <note internal="yes">
639 For whoever decides to touch this enum: In order to keep the
640 comparisons in the old source code valid, this state must immediately
641 follow the Running state.
642 </note>
643 </desc>
644 </const>
645 <const name="Stuck" value="6">
646 <desc>
647 Execution of the machine has reached the "Guru Meditation"
648 condition. This indicates a severe error in the hypervisor itself.
649 </desc>
650 </const>
651 <const name="Starting" value="7">
652 <desc>
653 Machine is being started after powering it on from a
654 zero execution state.
655 </desc>
656 </const>
657 <const name="Stopping" value="8">
658 <desc>
659 Machine is being normally stopped powering it off, or after the guest OS
660 has initiated a shutdown sequence.
661 </desc>
662 </const>
663 <const name="Saving" value="9">
664 <desc>
665 Machine is saving its execution state to a file, or an online
666 snapshot of the machine is being taken.
667 </desc>
668 </const>
669 <const name="Restoring" value="10">
670 <desc>
671 Execution state of the machine is being restored from a file
672 after powering it on from the saved execution state.
673 </desc>
674 </const>
675 <const name="TeleportingFrom" value="11">
676 <desc>
677 Teleporting the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="RestoringSnapshot" value="12">
681 <desc>
682 A machine snapshot is being restored; this typically does not take long.
683 </desc>
684 </const>
685 <const name="DeletingSnapshot" value="13">
686 <desc>
687 A machine snapshot is being deleted; this can take a long time since this
688 may require merging differencing media.
689 </desc>
690 </const>
691 <const name="SettingUp" value="14">
692 <desc>
693 Lengthy setup operation is in progress.
694 </desc>
695 </const>
696
697 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
698 <desc>
699 Pseudo-state: first online state (for use in relational expressions).
700 </desc>
701 </const>
702 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
703 <desc>
704 Pseudo-state: last online state (for use in relational expressions).
705 </desc>
706 </const>
707
708 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
709 <desc>
710 Pseudo-state: first transient state (for use in relational expressions).
711 </desc>
712 </const>
713 <const name="LastTransient" value="14" wsmap="suppress"> <!-- SettingUp -->
714 <desc>
715 Pseudo-state: last transient state (for use in relational expressions).
716 </desc>
717 </const>
718
719 </enum>
720
721 <enum
722 name="SessionState"
723 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
724 >
725 <desc>
726 Session state. This enumeration represents possible values of
727 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
728 attributes. See individual enumerator descriptions for the meaning for
729 every value.
730 </desc>
731
732 <const name="Null" value="0">
733 <desc>Null value (never used by the API).</desc>
734 </const>
735 <const name="Closed" value="1">
736 <desc>
737 The machine has no open sessions (<link to="IMachine::sessionState"/>);
738 the session is closed (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Open" value="2">
742 <desc>
743 The machine has an open direct session (<link to="IMachine::sessionState"/>);
744 the session is open (<link to="ISession::state"/>)
745 </desc>
746 </const>
747 <const name="Spawning" value="3">
748 <desc>
749 A new (direct) session is being opened for the machine as a result of
750 <link to="IVirtualBox::openRemoteSession"/> call
751 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
752 This state also occurs as a short transient state when a new direct
753 session is opened by calling <link to="IVirtualBox::openSession"/>.
754 </desc>
755 </const>
756 <const name="Closing" value="4">
757 <desc>
758 The direct session is being closed (<link to="IMachine::sessionState"/>);
759 the session is being closed (<link to="ISession::state"/>)
760 </desc>
761 </const>
762 </enum>
763
764 <enum
765 name="CpuPropertyType"
766 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
767 >
768 <desc>
769 Virtual CPU property type. This enumeration represents possible values of the
770 IMachine get- and setCpuProperty methods.
771 </desc>
772 <const name="Null" value="0">
773 <desc>Null value (never used by the API).</desc>
774 </const>
775 <const name="PAE" value="1">
776 <desc>
777 This setting determines whether VirtualBox will expose the Physical Address
778 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
779 is not available, it will not be reported.
780 </desc>
781 </const>
782 <const name="Synthetic" value="2">
783 <desc>
784 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
785 teleporting between host systems that differ significantly.
786 </desc>
787 </const>
788 </enum>
789
790
791 <enum
792 name="HWVirtExPropertyType"
793 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
794 >
795 <desc>
796 HWVirtEx property type. This enumeration represents possible values of the
797 IMachine get- and setHWVirtExProperty methods.
798 </desc>
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Enabled" value="1">
803 <desc>
804 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
805 they will not be used.
806 </desc>
807 </const>
808 <const name="Exclusive" value="2">
809 <desc>
810 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
811 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
812 </desc>
813 </const>
814 <const name="VPID" value="3">
815 <desc>
816 VT-x VPID boolean property. Note that in case this extension is not available,
817 it will not be used.
818 </desc>
819 </const>
820 <const name="NestedPaging" value="4">
821 <desc>
822 Nested Paging boolean property. Note that in case this extension is not available,
823 it will not be used.
824 </desc>
825 </const>
826 </enum>
827
828 <enum
829 name="SessionType"
830 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
831 >
832 <desc>
833 Session type. This enumeration represents possible values of the
834 <link to="ISession::type"/> attribute.
835 </desc>
836
837 <const name="Null" value="0">
838 <desc>Null value (never used by the API).</desc>
839 </const>
840 <const name="Direct" value="1">
841 <desc>
842 Direct session
843 (opened by <link to="IVirtualBox::openSession"/>)
844 </desc>
845 </const>
846 <const name="Remote" value="2">
847 <desc>
848 Remote session
849 (opened by <link to="IVirtualBox::openRemoteSession"/>)
850 </desc>
851 </const>
852 <const name="Existing" value="3">
853 <desc>
854 Existing session
855 (opened by <link to="IVirtualBox::openExistingSession"/>)
856 </desc>
857 </const>
858 </enum>
859
860 <enum
861 name="DeviceType"
862 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
863 >
864 <desc>
865 Device type.
866 </desc>
867 <const name="Null" value="0">
868 <desc>
869 Null value, may also mean "no device" (not allowed for
870 <link to="IConsole::getDeviceActivity"/>).
871 </desc>
872 </const>
873 <const name="Floppy" value="1">
874 <desc>Floppy device.</desc>
875 </const>
876 <const name="DVD" value="2">
877 <desc>CD/DVD-ROM device.</desc>
878 </const>
879 <const name="HardDisk" value="3">
880 <desc>Hard disk device.</desc>
881 </const>
882 <const name="Network" value="4">
883 <desc>Network device.</desc>
884 </const>
885 <const name="USB" value="5">
886 <desc>USB device.</desc>
887 </const>
888 <const name="SharedFolder" value="6">
889 <desc>Shared folder device.</desc>
890 </const>
891 </enum>
892
893 <enum
894 name="DeviceActivity"
895 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
896 >
897 <desc>
898 Device activity for <link to="IConsole::getDeviceActivity"/>.
899 </desc>
900
901 <const name="Null" value="0"/>
902 <const name="Idle" value="1"/>
903 <const name="Reading" value="2"/>
904 <const name="Writing" value="3"/>
905 </enum>
906
907 <enum
908 name="ClipboardMode"
909 uuid="33364716-4008-4701-8f14-be0fa3d62950"
910 >
911 <desc>
912 Host-Guest clipboard interchange mode.
913 </desc>
914
915 <const name="Disabled" value="0"/>
916 <const name="HostToGuest" value="1"/>
917 <const name="GuestToHost" value="2"/>
918 <const name="Bidirectional" value="3"/>
919 </enum>
920
921 <enum
922 name="Scope"
923 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
924 >
925 <desc>
926 Scope of the operation.
927
928 A generic enumeration used in various methods to define the action or
929 argument scope.
930 </desc>
931
932 <const name="Global" value="0"/>
933 <const name="Machine" value="1"/>
934 <const name="Session" value="2"/>
935 </enum>
936
937 <enum
938 name="GuestStatisticType"
939 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
940 >
941 <desc>
942 Statistics type for <link to="IGuest::getStatistic"/>.
943 </desc>
944
945 <const name="CPULoad_Idle" value="0">
946 <desc>
947 Idle CPU load (0-100%) for last interval.
948 </desc>
949 </const>
950 <const name="CPULoad_Kernel" value="1">
951 <desc>
952 Kernel CPU load (0-100%) for last interval.
953 </desc>
954 </const>
955 <const name="CPULoad_User" value="2">
956 <desc>
957 User CPU load (0-100%) for last interval.
958 </desc>
959 </const>
960 <const name="Threads" value="3">
961 <desc>
962 Total number of threads in the system.
963 </desc>
964 </const>
965 <const name="Processes" value="4">
966 <desc>
967 Total number of processes in the system.
968 </desc>
969 </const>
970 <const name="Handles" value="5">
971 <desc>
972 Total number of handles in the system.
973 </desc>
974 </const>
975 <const name="MemoryLoad" value="6">
976 <desc>
977 Memory load (0-100%).
978 </desc>
979 </const>
980 <const name="PhysMemTotal" value="7">
981 <desc>
982 Total physical memory in megabytes.
983 </desc>
984 </const>
985 <const name="PhysMemAvailable" value="8">
986 <desc>
987 Free physical memory in megabytes.
988 </desc>
989 </const>
990 <const name="PhysMemBalloon" value="9">
991 <desc>
992 Ballooned physical memory in megabytes.
993 </desc>
994 </const>
995 <const name="MemCommitTotal" value="10">
996 <desc>
997 Total amount of memory in the committed state in megabytes.
998 </desc>
999 </const>
1000 <const name="MemKernelTotal" value="11">
1001 <desc>
1002 Total amount of memory used by the guest OS's kernel in megabytes.
1003 </desc>
1004 </const>
1005 <const name="MemKernelPaged" value="12">
1006 <desc>
1007 Total amount of paged memory used by the guest OS's kernel in megabytes.
1008 </desc>
1009 </const>
1010 <const name="MemKernelNonpaged" value="13">
1011 <desc>
1012 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1013 </desc>
1014 </const>
1015 <const name="MemSystemCache" value="14">
1016 <desc>
1017 Total amount of memory used by the guest OS's system cache in megabytes.
1018 </desc>
1019 </const>
1020 <const name="PageFileSize" value="15">
1021 <desc>
1022 Pagefile size in megabytes.
1023 </desc>
1024 </const>
1025 <const name="SampleNumber" value="16">
1026 <desc>
1027 Statistics sample number
1028 </desc>
1029 </const>
1030 <const name="MaxVal" value="17"/>
1031 </enum>
1032
1033 <enum
1034 name="BIOSBootMenuMode"
1035 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1036 >
1037 <desc>
1038 BIOS boot menu mode.
1039 </desc>
1040
1041 <const name="Disabled" value="0"/>
1042 <const name="MenuOnly" value="1"/>
1043 <const name="MessageAndMenu" value="2"/>
1044 </enum>
1045
1046 <enum
1047 name="ProcessorFeature"
1048 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1049 >
1050 <desc>
1051 CPU features.
1052 </desc>
1053
1054 <const name="HWVirtEx" value="0"/>
1055 <const name="PAE" value="1"/>
1056 <const name="LongMode" value="2"/>
1057 <const name="NestedPaging" value="3"/>
1058 </enum>
1059
1060 <enum
1061 name="FirmwareType"
1062 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1063 >
1064 <desc>
1065 Firmware type.
1066 </desc>
1067 <const name="BIOS" value="1">
1068 <desc>BIOS Firmware.</desc>
1069 </const>
1070 <const name="EFI" value="2">
1071 <desc>Efi firmware.</desc>
1072 </const>
1073 </enum>
1074
1075 <!--
1076 // IVirtualBoxErrorInfo
1077 /////////////////////////////////////////////////////////////////////////
1078 -->
1079
1080 <interface
1081 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1082 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1083 supportsErrorInfo="no"
1084 wsmap="managed"
1085 >
1086 <desc>
1087 The IVirtualBoxErrorInfo interface represents extended error information.
1088
1089 Extended error information can be set by VirtualBox components after
1090 unsuccessful or partially successful method invocation. This information
1091 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1092 and then shown to the client in addition to the plain 32-bit result code.
1093
1094 In MS COM, this interface extends the IErrorInfo interface,
1095 in XPCOM, it extends the nsIException interface. In both cases,
1096 it provides a set of common attributes to retrieve error
1097 information.
1098
1099 Sometimes invocation of some component's method may involve methods of
1100 other components that may also fail (independently of this method's
1101 failure), or a series of non-fatal errors may precede a fatal error that
1102 causes method failure. In cases like that, it may be desirable to preserve
1103 information about all errors happened during method invocation and deliver
1104 it to the caller. The <link to="#next"/> attribute is intended
1105 specifically for this purpose and allows to represent a chain of errors
1106 through a single IVirtualBoxErrorInfo object set after method invocation.
1107
1108 Note that errors are stored to a chain in the reverse order, i.e. the
1109 initial error object you query right after method invocation is the last
1110 error set by the callee, the object it points to in the @a next attribute
1111 is the previous error and so on, up to the first error (which is the last
1112 in the chain).
1113 </desc>
1114
1115 <attribute name="resultCode" type="long" readonly="yes">
1116 <desc>
1117 Result code of the error.
1118 Usually, it will be the same as the result code returned
1119 by the method that provided this error information, but not
1120 always. For example, on Win32, CoCreateInstance() will most
1121 likely return E_NOINTERFACE upon unsuccessful component
1122 instantiation attempt, but not the value the component factory
1123 returned. Value is typed 'long', not 'result',
1124 to make interface usable from scripting languages.
1125 <note>
1126 In MS COM, there is no equivalent.
1127 In XPCOM, it is the same as nsIException::result.
1128 </note>
1129 </desc>
1130 </attribute>
1131
1132 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1133 <desc>
1134 UUID of the interface that defined the error.
1135 <note>
1136 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1137 data type.
1138 In XPCOM, there is no equivalent.
1139 </note>
1140 </desc>
1141 </attribute>
1142
1143 <attribute name="component" type="wstring" readonly="yes">
1144 <desc>
1145 Name of the component that generated the error.
1146 <note>
1147 In MS COM, it is the same as IErrorInfo::GetSource.
1148 In XPCOM, there is no equivalent.
1149 </note>
1150 </desc>
1151 </attribute>
1152
1153 <attribute name="text" type="wstring" readonly="yes">
1154 <desc>
1155 Text description of the error.
1156 <note>
1157 In MS COM, it is the same as IErrorInfo::GetDescription.
1158 In XPCOM, it is the same as nsIException::message.
1159 </note>
1160 </desc>
1161 </attribute>
1162
1163 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1164 <desc>
1165 Next error object if there is any, or @c null otherwise.
1166 <note>
1167 In MS COM, there is no equivalent.
1168 In XPCOM, it is the same as nsIException::inner.
1169 </note>
1170 </desc>
1171 </attribute>
1172
1173 </interface>
1174
1175 <interface
1176 name="ILocalOwner" extends="$dispatched"
1177 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1178 >
1179 <desc>
1180 The ILocalOwner interface allows to register local objects
1181 (created without COM calls, but with new()).
1182 Once registered, calls to methods of such objects can be made
1183 from remote COM processes.
1184 The main usecase is the event callback implementation where
1185 API clients provide callback objects.
1186 </desc>
1187 <method name="setLocalObject">
1188 <desc>
1189 Set local object.
1190 </desc>
1191 <param name="object" type="$unknown" dir="in">
1192 <desc>Local object to forward requests to.
1193 If null, clears currently set local object.</desc>
1194 </param>
1195 </method>
1196 </interface>
1197
1198 <!--
1199 // IVirtualBox
1200 /////////////////////////////////////////////////////////////////////////
1201 -->
1202
1203 <interface
1204 name="IVirtualBoxCallback" extends="$unknown"
1205 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1206 wsmap="suppress"
1207 >
1208
1209 <method name="onMachineStateChange">
1210 <desc>
1211 The execution state of the given machine has changed.
1212 <see>IMachine::state</see>
1213 </desc>
1214 <param name="machineId" type="uuid" mod="string" dir="in">
1215 <desc>ID of the machine this event relates to.</desc>
1216 </param>
1217 <param name="state" type="MachineState" dir="in">
1218 <desc>New execution state.</desc>
1219 </param>
1220 </method>
1221
1222 <method name="onMachineDataChange">
1223 <desc>
1224 Any of the settings of the given machine has changed.
1225 </desc>
1226 <param name="machineId" type="uuid" mod="string" dir="in">
1227 <desc>ID of the machine this event relates to.</desc>
1228 </param>
1229 </method>
1230
1231 <method name="onExtraDataCanChange">
1232 <desc>
1233 Notification when someone tries to change extra data for
1234 either the given machine or (if @c null) global extra data.
1235 This gives the chance to veto against changes.
1236 </desc>
1237 <param name="machineId" type="uuid" mod="string" dir="in">
1238 <desc>
1239 ID of the machine this event relates to
1240 (@c null ID for global extra data change requests).
1241 </desc>
1242 </param>
1243 <param name="key" type="wstring" dir="in">
1244 <desc>
1245 Extra data key for the attempted write.
1246 </desc>
1247 </param>
1248 <param name="value" type="wstring" dir="in">
1249 <desc>
1250 Extra data value for the given key.
1251 </desc>
1252 </param>
1253 <param name="error" type="wstring" dir="out">
1254 <desc>
1255 Optional error message describing the reason of the
1256 veto (ignored if this notification returns @c true).
1257 </desc>
1258 </param>
1259 <param name="allowChange" type="boolean" dir="return">
1260 <desc>
1261 Flag to indicate whether the callee agrees (@c true)
1262 or vetoes against the change (@c false).
1263 </desc>
1264 </param>
1265 </method>
1266
1267 <method name="onExtraDataChange">
1268 <desc>
1269 Notification when machine specific or global extra data
1270 has changed.
1271 </desc>
1272 <param name="machineId" type="uuid" mod="string" dir="in">
1273 <desc>
1274 ID of the machine this event relates to.
1275 Null for global extra data changes.
1276 </desc>
1277 </param>
1278 <param name="key" type="wstring" dir="in">
1279 <desc>
1280 Extra data key that has changed.
1281 </desc>
1282 </param>
1283 <param name="value" type="wstring" dir="in">
1284 <desc>
1285 Extra data value for the given key.
1286 </desc>
1287 </param>
1288 </method>
1289
1290 <method name="onMediumRegistered">
1291 <desc>
1292 The given medium was registered or unregistered
1293 within this VirtualBox installation.
1294
1295 The @a mediumType parameter describes what type of
1296 medium the specified @a mediumId refers to. Possible
1297 values are:
1298
1299 <ul>
1300 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1301 that, if registered, can be obtained using the
1302 <link to="IVirtualBox::getHardDisk"/> call.</li>
1303 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1304 that, if registered, can be obtained using the
1305 <link to="IVirtualBox::getDVDImage"/> call.</li>
1306 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1307 that, if registered, can be obtained using the
1308 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1309 </ul>
1310
1311 Note that if this is a deregistration notification,
1312 there is no way to access the object representing the
1313 unregistered medium. It is supposed that the
1314 application will do required cleanup based on the
1315 @a mediumId value.
1316 </desc>
1317 <param name="mediumId" type="uuid" mod="string" dir="in">
1318 <desc>ID of the medium this event relates to.</desc>
1319 </param>
1320 <param name="mediumType" type="DeviceType" dir="in">
1321 <desc>Type of the medium this event relates to.</desc>
1322 </param>
1323 <param name="registered" type="boolean" dir="in">
1324 <desc>
1325 If @c true, the medium was registered, otherwise it was
1326 unregistered.
1327 </desc>
1328 </param>
1329 </method>
1330
1331 <method name="onMachineRegistered">
1332 <desc>
1333 The given machine was registered or unregistered
1334 within this VirtualBox installation.
1335 </desc>
1336 <param name="machineId" type="uuid" mod="string" dir="in">
1337 <desc>ID of the machine this event relates to.</desc>
1338 </param>
1339 <param name="registered" type="boolean" dir="in">
1340 <desc>
1341 If @c true, the machine was registered, otherwise it was
1342 unregistered.
1343 </desc>
1344 </param>
1345 </method>
1346
1347 <method name="onSessionStateChange">
1348 <desc>
1349 The state of the session for the given machine was changed.
1350 <see>IMachine::sessionState</see>
1351 </desc>
1352 <param name="machineId" type="uuid" mod="string" dir="in">
1353 <desc>ID of the machine this event relates to.</desc>
1354 </param>
1355 <param name="state" type="SessionState" dir="in">
1356 <desc>New session state.</desc>
1357 </param>
1358 </method>
1359
1360 <method name="onSnapshotTaken">
1361 <desc>
1362 A new snapshot of the machine has been taken.
1363 <see>ISnapshot</see>
1364 </desc>
1365 <param name="machineId" type="uuid" mod="string" dir="in">
1366 <desc>ID of the machine this event relates to.</desc>
1367 </param>
1368 <param name="snapshotId" type="uuid" mod="string" dir="in">
1369 <desc>ID of the new snapshot.</desc>
1370 </param>
1371 </method>
1372
1373 <method name="onSnapshotDiscarded">
1374 <desc>
1375 Snapshot of the given machine has been discarded.
1376
1377 <note>
1378 This notification is delivered <b>after</b> the snapshot
1379 object has been uninitialized on the server (so that any
1380 attempt to call its methods will return an error).
1381 </note>
1382
1383 <see>ISnapshot</see>
1384 </desc>
1385 <param name="machineId" type="uuid" mod="string" dir="in">
1386 <desc>ID of the machine this event relates to.</desc>
1387 </param>
1388 <param name="snapshotId" type="uuid" mod="string" dir="in">
1389 <desc>
1390 ID of the discarded snapshot. @c null means the current machine
1391 state has been discarded (restored from the current snapshot).
1392 </desc>
1393 </param>
1394 </method>
1395
1396 <method name="onSnapshotChange">
1397 <desc>
1398 Snapshot properties (name and/or description) have been changed.
1399 <see>ISnapshot</see>
1400 </desc>
1401 <param name="machineId" type="uuid" mod="string" dir="in">
1402 <desc>ID of the machine this event relates to.</desc>
1403 </param>
1404 <param name="snapshotId" type="uuid" mod="string" dir="in">
1405 <desc>ID of the changed snapshot.</desc>
1406 </param>
1407 </method>
1408
1409 <method name="onGuestPropertyChange">
1410 <desc>
1411 Notification when a guest property has changed.
1412 </desc>
1413 <param name="machineId" type="uuid" mod="string" dir="in">
1414 <desc>
1415 ID of the machine this event relates to.
1416 </desc>
1417 </param>
1418 <param name="name" type="wstring" dir="in">
1419 <desc>
1420 The name of the property that has changed.
1421 </desc>
1422 </param>
1423 <param name="value" type="wstring" dir="in">
1424 <desc>
1425 The new property value.
1426 </desc>
1427 </param>
1428 <param name="flags" type="wstring" dir="in">
1429 <desc>
1430 The new property flags.
1431 </desc>
1432 </param>
1433 </method>
1434
1435 </interface>
1436
1437 <interface
1438 name="IDHCPServer" extends="$unknown"
1439 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1440 wsmap="managed"
1441 >
1442 <desc>
1443 The IDHCPServer interface represents the vbox dhcp server configuration.
1444
1445 To enumerate all the dhcp servers on the host, use the
1446 <link to="IVirtualBox::DHCPServers"/> attribute.
1447 </desc>
1448
1449 <attribute name="enabled" type="boolean">
1450 <desc>
1451 specifies if the dhcp server is enabled
1452 </desc>
1453 </attribute>
1454
1455 <attribute name="IPAddress" type="wstring" readonly="yes">
1456 <desc>
1457 specifies server IP
1458 </desc>
1459 </attribute>
1460
1461 <attribute name="networkMask" type="wstring" readonly="yes">
1462 <desc>
1463 specifies server network mask
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="networkName" type="wstring" readonly="yes">
1468 <desc>
1469 specifies internal network name the server is used for
1470 </desc>
1471 </attribute>
1472
1473 <attribute name="lowerIP" type="wstring" readonly="yes">
1474 <desc>
1475 specifies from IP adrres in server address range
1476 </desc>
1477 </attribute>
1478
1479 <attribute name="upperIP" type="wstring" readonly="yes">
1480 <desc>
1481 specifies to IP adrres in server address range
1482 </desc>
1483 </attribute>
1484
1485 <method name="setConfiguration">
1486 <desc>
1487 configures the server
1488 <result name="E_INVALIDARG">
1489 invalid configuration supplied
1490 </result>
1491 </desc>
1492 <param name="IPAddress" type="wstring" dir="in">
1493 <desc>
1494 server IP address
1495 </desc>
1496 </param>
1497 <param name="networkMask" type="wstring" dir="in">
1498 <desc>
1499 server network mask
1500 </desc>
1501 </param>
1502 <param name="FromIPAddress" type="wstring" dir="in">
1503 <desc>
1504 server From IP address for address range
1505 </desc>
1506 </param>
1507 <param name="ToIPAddress" type="wstring" dir="in">
1508 <desc>
1509 server To IP address for address range
1510 </desc>
1511 </param>
1512 </method>
1513
1514 <method name="start">
1515 <desc>
1516 Starts DHCP server process.
1517 <result name="E_FAIL">
1518 Failed to start the process.
1519 </result>
1520 </desc>
1521 <param name="networkName" type="wstring" dir="in">
1522 <desc>
1523 Name of internal network DHCP server should attach to.
1524 </desc>
1525 </param>
1526 <param name="trunkName" type="wstring" dir="in">
1527 <desc>
1528 Name of internal network trunk.
1529 </desc>
1530 </param>
1531 <param name="trunkType" type="wstring" dir="in">
1532 <desc>
1533 Type of internal network trunk.
1534 </desc>
1535 </param>
1536 </method>
1537
1538 <method name="stop">
1539 <desc>
1540 Stops DHCP server process.
1541 <result name="E_FAIL">
1542 Failed to stop the process.
1543 </result>
1544 </desc>
1545 </method>
1546 </interface>
1547
1548 <interface
1549 name="IVirtualBox" extends="$dispatched"
1550 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1551 wsmap="managed"
1552 >
1553 <desc>
1554 The IVirtualBox interface represents the main interface exposed by the
1555 product that provides virtual machine management.
1556
1557 An instance of IVirtualBox is required for the product to do anything
1558 useful. Even though the interface does not expose this, internally,
1559 IVirtualBox is implemented as a singleton and actually lives in the
1560 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1561 IVirtualBox can track the state of all virtual machines on a particular
1562 host, regardless of which frontend started them.
1563
1564 To enumerate all the virtual machines on the host, use the
1565 <link to="IVirtualBox::machines"/> attribute.
1566 </desc>
1567
1568 <attribute name="version" type="wstring" readonly="yes">
1569 <desc>
1570 A string representing the version number of the product. The
1571 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1572 last number represents the build number and will frequently change.
1573 </desc>
1574 </attribute>
1575
1576 <attribute name="revision" type="unsigned long" readonly="yes">
1577 <desc>
1578 The internal build revision number of the product.
1579 </desc>
1580 </attribute>
1581
1582 <attribute name="packageType" type="wstring" readonly="yes">
1583 <desc>
1584 A string representing the package type of this product. The
1585 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1586 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1587 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1588 this.
1589 </desc>
1590 </attribute>
1591
1592 <attribute name="homeFolder" type="wstring" readonly="yes">
1593 <desc>
1594 Full path to the directory where the global settings file,
1595 <tt>VirtualBox.xml</tt>, is stored.
1596
1597 In this version of VirtualBox, the value of this property is
1598 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1599 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1600 as determined by the host OS), and cannot be changed.
1601
1602 This path is also used as the base to resolve relative paths in
1603 places where relative paths are allowed (unless otherwise
1604 expressly indicated).
1605 </desc>
1606 </attribute>
1607
1608 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1609 <desc>
1610 Full name of the global settings file.
1611 The value of this property corresponds to the value of
1612 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1613 </desc>
1614 </attribute>
1615
1616 <attribute name="host" type="IHost" readonly="yes">
1617 <desc>Associated host object.</desc>
1618 </attribute>
1619
1620 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1621 <desc>Associated system information object.</desc>
1622 </attribute>
1623
1624 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1625 <desc>
1626 Array of machine objects registered within this VirtualBox instance.
1627 </desc>
1628 </attribute>
1629
1630 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1631 <desc>
1632 Array of medium objects known to this VirtualBox installation.
1633
1634 This array contains only base media. All differencing
1635 media of the given base medium can be enumerated using
1636 <link to="IMedium::children"/>.
1637 </desc>
1638 </attribute>
1639
1640 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1641 <desc>
1642 Array of CD/DVD image objects registered with this VirtualBox instance.
1643 </desc>
1644 </attribute>
1645
1646 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1647 <desc>
1648 Array of floppy image objects registered with this VirtualBox instance.
1649 </desc>
1650 </attribute>
1651
1652 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1653
1654 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1655
1656 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1657 <desc>
1658 Collection of global shared folders. Global shared folders are
1659 available to all virtual machines.
1660
1661 New shared folders are added to the collection using
1662 <link to="#createSharedFolder"/>. Existing shared folders can be
1663 removed using <link to="#removeSharedFolder"/>.
1664
1665 <note>
1666 In the current version of the product, global shared folders are not
1667 implemented and therefore this collection is always empty.
1668 </note>
1669 </desc>
1670 </attribute>
1671
1672 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1673 <desc>
1674 Associated performance collector object.
1675 </desc>
1676 </attribute>
1677
1678 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1679 <desc>
1680 dhcp server settings.
1681 </desc>
1682 </attribute>
1683
1684 <method name="createMachine">
1685 <desc>
1686 Creates a new virtual machine.
1687
1688 The new machine is created unregistered, with the initial configuration
1689 set according to the specified guest OS type. A typical sequence of
1690 actions to create a new virtual machine is as follows:
1691
1692 <ol>
1693 <li>
1694 Call this method to have a new machine created. The returned machine
1695 object will be "mutable" allowing to change any machine property.
1696 </li>
1697
1698 <li>
1699 Configure the machine using the appropriate attributes and methods.
1700 </li>
1701
1702 <li>
1703 Call <link to="IMachine::saveSettings" /> to write the settings
1704 to the machine's XML settings file. The configuration of the newly
1705 created machine will not be saved to disk until this method is
1706 called.
1707 </li>
1708
1709 <li>
1710 Call <link to="#registerMachine" /> to add the machine to the list
1711 of machines known to VirtualBox.
1712 </li>
1713 </ol>
1714
1715 You should specify valid name for the newly created machine when calling
1716 this method. See the <link to="IMachine::name"/> attribute description
1717 for more details about the machine name.
1718
1719 The specified guest OS type identifier must match an ID of one of known
1720 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1721 array.
1722
1723 Every machine has a <i>settings file</i> that is used to store
1724 the machine configuration. This file is stored in a directory called the
1725 <i>machine settings subfolder</i>. Both the settings subfolder and file
1726 will have a name that corresponds to the name of the virtual machine.
1727 You can specify where to create the machine setting subfolder using the
1728 @a baseFolder argument. The base folder can be absolute (full path) or
1729 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1730 directory</link>.
1731
1732 If @a baseFolder is a @c null or empty string (which is recommended), the
1733 <link to="ISystemProperties::defaultMachineFolder">default machine
1734 settings folder</link> will be used as a base folder for the created
1735 machine. Otherwise the given base folder will be used. In either case,
1736 the full path to the resulting settings file has the following
1737 structure:
1738 <pre>
1739 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1740 </pre>
1741
1742 Note that if the resulting settings file already exists, this method
1743 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1744
1745 Optionally, you may specify an UUID of to assign to the created machine.
1746 However, this is not recommended and you should normally pass an empty
1747 (@c null) UUID to this method so that a new UUID will be automatically
1748 generated for every created machine. You can use UUID
1749 00000000-0000-0000-0000-000000000000 as @c null value.
1750
1751 <note>
1752 There is no way to change the name of the settings file or
1753 subfolder of the created machine directly.
1754 </note>
1755
1756 <result name="VBOX_E_OBJECT_NOT_FOUND">
1757 @a osTypeId is invalid.
1758 </result>
1759 <result name="VBOX_E_FILE_ERROR">
1760 Resulting settings file name is invalid or the settings file already
1761 exists or could not be created due to an I/O error.
1762 </result>
1763 <result name="E_INVALIDARG">
1764 @a name is empty or @c null.
1765 </result>
1766 </desc>
1767
1768 <param name="name" type="wstring" dir="in">
1769 <desc>Machine name.</desc>
1770 </param>
1771 <param name="osTypeId" type="wstring" dir="in">
1772 <desc>Guest OS Type ID.</desc>
1773 </param>
1774 <param name="baseFolder" type="wstring" dir="in">
1775 <desc>Base machine folder (optional).</desc>
1776 </param>
1777 <param name="id" type="uuid" mod="string" dir="in">
1778 <desc>Machine UUID (optional).</desc>
1779 </param>
1780 <param name="machine" type="IMachine" dir="return">
1781 <desc>Created machine object.</desc>
1782 </param>
1783 </method>
1784
1785 <method name="createLegacyMachine">
1786 <desc>
1787 Creates a new virtual machine in "legacy" mode, using the specified
1788 settings file to store machine settings.
1789
1790 As opposed to machines created by <link to="#createMachine"/>,
1791 the settings file of the machine created in "legacy" mode is not
1792 automatically renamed when the machine name is changed -- it will always
1793 remain the same as specified in this method call.
1794
1795 The specified settings file name can be absolute (full path) or relative
1796 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1797 directory</link>. If the file name doesn't contain an extension, the
1798 default extension (.xml) will be appended.
1799
1800 Note that the configuration of the newly created machine is not
1801 saved to disk (and therefore no settings file is created)
1802 until <link to="IMachine::saveSettings"/> is called. If the
1803 specified settings file already exists, this method
1804 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1805
1806 See <link to="#createMachine"/> for more information.
1807
1808 @deprecated This method may be removed later. Use <link
1809 to="IVirtualBox::createMachine"/> instead.
1810
1811 <note>
1812 There is no way to change the name of the settings file
1813 of the machine created in "legacy" mode.
1814 </note>
1815
1816 <result name="VBOX_E_OBJECT_NOT_FOUND">
1817 @a osTypeId is invalid.
1818 </result>
1819 <result name="VBOX_E_FILE_ERROR">
1820 @a settingsFile is invalid or the settings file already exists or
1821 could not be created due to an I/O error.
1822 </result>
1823 <result name="E_INVALIDARG">
1824 @a name or @a settingsFile is empty or @c null.
1825 </result>
1826 </desc>
1827
1828 <param name="name" type="wstring" dir="in">
1829 <desc>Machine name.</desc>
1830 </param>
1831 <param name="osTypeId" type="wstring" dir="in">
1832 <desc>Machine OS Type ID.</desc>
1833 </param>
1834 <param name="settingsFile" type="wstring" dir="in">
1835 <desc>Name of the machine settings file.</desc>
1836 </param>
1837 <param name="id" type="uuid" mod="string" dir="in">
1838 <desc>Machine UUID (optional).</desc>
1839 </param>
1840 <param name="machine" type="IMachine" dir="return">
1841 <desc>Created machine object.</desc>
1842 </param>
1843 </method>
1844
1845 <method name="openMachine">
1846 <desc>
1847 Opens a virtual machine from the existing settings file.
1848 The opened machine remains unregistered until you call
1849 <link to="#registerMachine"/>.
1850
1851 The specified settings file name can be absolute
1852 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1853 VirtualBox home directory</link>. This file must exist
1854 and must be a valid machine settings file whose contents
1855 will be used to construct the machine object.
1856
1857 @deprecated Will be removed soon.
1858 <result name="VBOX_E_FILE_ERROR">
1859 Settings file name invalid, not found or sharing violation.
1860 </result>
1861 </desc>
1862 <param name="settingsFile" type="wstring" dir="in">
1863 <desc>
1864 Name of the machine settings file.
1865 </desc>
1866 </param>
1867 <param name="machine" type="IMachine" dir="return">
1868 <desc>Opened machine object.</desc>
1869 </param>
1870 <note>
1871 <link to="IMachine::settingsModified"/> will return
1872 @c false for the created machine, until any of machine settings
1873 are changed.
1874 </note>
1875 </method>
1876
1877 <method name="registerMachine">
1878 <desc>
1879
1880 Registers the machine previously created using
1881 <link to="#createMachine"/> or opened using
1882 <link to="#openMachine"/> within this VirtualBox installation. After
1883 successful method invocation, the
1884 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1885 to all registered callbacks.
1886
1887 <note>
1888 This method implicitly calls <link to="IMachine::saveSettings"/>
1889 to save all current machine settings before registering it.
1890 </note>
1891
1892 <result name="VBOX_E_OBJECT_NOT_FOUND">
1893 No matching virtual machine found.
1894 </result>
1895 <result name="VBOX_E_INVALID_OBJECT_STATE">
1896 Virtual machine was not created within this VirtualBox instance.
1897 </result>
1898
1899 </desc>
1900 <param name="machine" type="IMachine" dir="in"/>
1901 </method>
1902
1903 <method name="getMachine">
1904 <desc>
1905 Attempts to find a virtual machine given its UUID.
1906 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1907 instead.
1908
1909 <result name="VBOX_E_OBJECT_NOT_FOUND">
1910 Could not find registered machine matching @a id.
1911 </result>
1912
1913 </desc>
1914 <param name="id" type="uuid" mod="string" dir="in"/>
1915 <param name="machine" type="IMachine" dir="return"/>
1916 </method>
1917
1918 <method name="findMachine">
1919 <desc>
1920 Attempts to find a virtual machine given its name.
1921 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1922 instead.
1923
1924 <result name="VBOX_E_OBJECT_NOT_FOUND">
1925 Could not find registered machine matching @a name.
1926 </result>
1927
1928 </desc>
1929 <param name="name" type="wstring" dir="in"/>
1930 <param name="machine" type="IMachine" dir="return"/>
1931 </method>
1932
1933 <method name="unregisterMachine">
1934 <desc>
1935
1936 Unregisters the machine previously registered using
1937 <link to="#registerMachine"/>. After successful method invocation, the
1938 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1939 to all registered callbacks.
1940
1941 <note>
1942 The specified machine must not be in the Saved state, have an open
1943 (or a spawning) direct session associated with it, have snapshots or
1944 have any medium attached.
1945 </note>
1946
1947 <note>
1948 This method implicitly calls <link to="IMachine::saveSettings"/> to
1949 save all current machine settings before unregistering it.
1950 </note>
1951
1952 <note>
1953 If the given machine is inaccessible (see
1954 <link to="IMachine::accessible"/>), it will be unregistered and
1955 fully uninitialized right afterwards. As a result, the returned
1956 machine object will be unusable and an attempt to call
1957 <b>any</b> method will return the "Object not ready" error.
1958 </note>
1959
1960 <result name="VBOX_E_OBJECT_NOT_FOUND">
1961 Could not find registered machine matching @a id.
1962 </result>
1963 <result name="VBOX_E_INVALID_VM_STATE">
1964 Machine is in Saved state.
1965 </result>
1966 <result name="VBOX_E_INVALID_OBJECT_STATE">
1967 Machine has snapshot or open session or medium attached.
1968 </result>
1969
1970 </desc>
1971 <param name="id" type="uuid" mod="string" dir="in">
1972 <desc>UUID of the machine to unregister.</desc>
1973 </param>
1974 <param name="machine" type="IMachine" dir="return">
1975 <desc>Unregistered machine object.</desc>
1976 </param>
1977 </method>
1978
1979 <method name="createAppliance">
1980 <desc>
1981 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1982 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1983 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1984 </desc>
1985 <param name="appliance" type="IAppliance" dir="return">
1986 <desc>New appliance.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="createHardDisk">
1991 <desc>
1992 Creates a new base medium object that will use the given storage
1993 format and location for medium data.
1994
1995 Note that the actual storage unit is not created by this method. In
1996 order to do it, and before you are able to attach the created medium
1997 to virtual machines, you must call one of the following methods to
1998 allocate a format-specific storage unit at the specified location:
1999 <ul>
2000 <li><link to="IMedium::createBaseStorage"/></li>
2001 <li><link to="IMedium::createDiffStorage"/></li>
2002 </ul>
2003
2004 Some medium attributes, such as <link to="IMedium::id"/>, may
2005 remain uninitialized until the medium storage unit is successfully
2006 created by one of the above methods.
2007
2008 After the storage unit is successfully created, the medium gets
2009 remembered by this VirtualBox installation and will be accessible
2010 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2011 methods. Remembered base medium are also returned as part of
2012 the <link to="#hardDisks"/> array. See IMedium for more details.
2013
2014 The list of all storage formats supported by this VirtualBox
2015 installation can be obtained using
2016 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2017 attribute is empty or @c null then the default storage format
2018 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2019 be used for creating a storage unit of the medium.
2020
2021 Note that the format of the location string is storage format specific.
2022 See <link to="IMedium::location"/>, IMedium and
2023 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2024
2025 <result name="VBOX_E_OBJECT_NOT_FOUND">
2026 @a format identifier is invalid. See
2027 <link to="ISystemProperties::mediumFormats"/>.
2028 </result>
2029 <result name="VBOX_E_FILE_ERROR">
2030 @a location is a not valid file name (for file-based formats only).
2031 </result>
2032 </desc>
2033 <param name="format" type="wstring" dir="in">
2034 <desc>
2035 Identifier of the storage format to use for the new medium.
2036 </desc>
2037 </param>
2038 <param name="location" type="wstring" dir="in">
2039 <desc>
2040 Location of the storage unit for the new medium.
2041 </desc>
2042 </param>
2043 <param name="medium" type="IMedium" dir="return">
2044 <desc>Created medium object.</desc>
2045 </param>
2046 </method>
2047
2048 <method name="openHardDisk">
2049 <desc>
2050 Opens a medium from an existing location, optionally replacing
2051 the image UUID and/or parent UUID.
2052
2053 After the medium is successfully opened by this method, it gets
2054 remembered by (known to) this VirtualBox installation and will be
2055 accessible through <link to="#getHardDisk"/> and
2056 <link to="#findHardDisk"/> methods. Remembered base media
2057 are also returned as part of the <link to="#hardDisks"/> array and can
2058 be attached to virtual machines. See IMedium for more details.
2059
2060 If a differencing medium is to be opened by this method, the
2061 operation will succeed only if its parent medium and all ancestors,
2062 if any, are already known to this VirtualBox installation (for example,
2063 were opened by this method before).
2064
2065 This method tries to guess the storage format of the specified medium
2066 by reading medium data at the specified location.
2067
2068 If @a write is ReadWrite (which it should be), the image is opened for
2069 read/write access and must have according permissions, as VirtualBox
2070 may actually write status information into the disk's metadata sections.
2071
2072 Note that write access is required for all typical image usage in VirtualBox,
2073 since VirtualBox may need to write metadata such as a UUID into the image.
2074 The only exception is opening a source image temporarily for copying and
2075 cloning when the image will quickly be closed again.
2076
2077 Note that the format of the location string is storage format specific.
2078 See <link to="IMedium::location"/>, IMedium and
2079 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2080
2081 <result name="VBOX_E_FILE_ERROR">
2082 Invalid medium storage file location or could not find the medium
2083 at the specified location.
2084 </result>
2085 <result name="VBOX_E_IPRT_ERROR">
2086 Could not get medium storage format.
2087 </result>
2088 <result name="E_INVALIDARG">
2089 Invalid medium storage format.
2090 </result>
2091
2092 </desc>
2093 <param name="location" type="wstring" dir="in">
2094 <desc>
2095 Location of the storage unit that contains medium data in one of
2096 the supported storage formats.
2097 </desc>
2098 </param>
2099 <param name="accessMode" type="AccessMode" dir="in">
2100 <desc>
2101 Determines whether to open the image in read/write or read-only mode.
2102 </desc>
2103 </param>
2104 <param name="setImageId" type="boolean" dir="in">
2105 <desc>
2106 Select whether a new image UUID is set or not.
2107 </desc>
2108 </param>
2109 <param name="imageId" type="uuid" mod="string" dir="in">
2110 <desc>
2111 New UUID for the image. If an empty string is passed, then a new
2112 UUID is automatically created. Specifying a zero UUIDs is not valid.
2113 </desc>
2114 </param>
2115 <param name="setParentId" type="boolean" dir="in">
2116 <desc>
2117 Select whether a new parent UUID is set or not.
2118 </desc>
2119 </param>
2120 <param name="parentId" type="uuid" mod="string" dir="in">
2121 <desc>
2122 New parent UUID for the image. If an empty string is passed, then a
2123 new UUID is automatically created, provided @a setParentId is
2124 @c true. A zero UUID is valid.
2125 </desc>
2126 </param>
2127 <param name="medium" type="IMedium" dir="return">
2128 <desc>Opened medium object.</desc>
2129 </param>
2130 </method>
2131
2132 <method name="getHardDisk" const="yes">
2133 <desc>
2134 Returns a medium with the given UUID.
2135
2136 The medium with the given UUID must be known to this VirtualBox
2137 installation, i.e. it must be previously created by
2138 <link to="#createHardDisk"/> or opened by <link
2139 to="#openHardDisk"/>, or attached to some known virtual machine.
2140
2141 <result name="VBOX_E_OBJECT_NOT_FOUND">
2142 No medium object matching @a id found.
2143 </result>
2144
2145 </desc>
2146 <param name="id" type="uuid" mod="string" dir="in">
2147 <desc>UUID of the medium to look for.</desc>
2148 </param>
2149 <param name="medium" type="IMedium" dir="return">
2150 <desc>Found medium object.</desc>
2151 </param>
2152 </method>
2153
2154 <method name="findHardDisk">
2155 <desc>
2156 Returns a medium that uses the given location to store medium data.
2157
2158 The given medium must be known to this VirtualBox installation, i.e.
2159 it must be previously created by
2160 <link to="#createHardDisk"/> or opened by <link
2161 to="#openHardDisk"/>, or attached to some known virtual machine.
2162
2163 The search is done by comparing the value of the @a location argument to
2164 the <link to="IMedium::location"/> attribute of each known medium.
2165
2166 For locations represented by file names in the host's file system, the
2167 requested location can be a path relative to the
2168 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2169 only a file name without any path is given, the
2170 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2171 folder</link> will be prepended to the file name before searching. Note
2172 that on case sensitive file systems, a case sensitive comparison is
2173 performed, otherwise the case of symbols in the file path is ignored.
2174
2175 <result name="VBOX_E_OBJECT_NOT_FOUND">
2176 No medium object matching @a location found.
2177 </result>
2178
2179 </desc>
2180 <param name="location" type="wstring" dir="in">
2181 <desc>Location string to search for.</desc>
2182 </param>
2183 <param name="medium" type="IMedium" dir="return">
2184 <desc>Found medium object.</desc>
2185 </param>
2186 </method>
2187
2188 <method name="openDVDImage">
2189 <desc>
2190 Opens a CD/DVD image contained in the specified file of the supported
2191 format and assigns it the given UUID.
2192
2193 After the image is successfully opened by this method, it gets
2194 remembered by (known to) this VirtualBox installation and will be
2195 accessible through <link to="#getDVDImage"/> and
2196 <link to="#findDVDImage"/> methods. Remembered images are also
2197 returned as part of the <link to="#DVDImages"/> array and can be mounted
2198 to virtual machines. See IMedium for more details.
2199
2200 See <link to="IMedium::location"/> to get more details about the format
2201 of the location string.
2202
2203 <note>
2204 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2205 </note>
2206
2207 <result name="VBOX_E_FILE_ERROR">
2208 Invalid CD/DVD image file location or could not find the CD/DVD
2209 image at the specified location.
2210 </result>
2211 <result name="VBOX_E_INVALID_OBJECT_STATE">
2212 CD/DVD image already exists in the media registry.
2213 </result>
2214
2215 </desc>
2216 <param name="location" type="wstring" dir="in">
2217 <desc>
2218 Full path to the file that contains a valid CD/DVD image.
2219 </desc>
2220 </param>
2221 <param name="id" type="uuid" mod="string" dir="in">
2222 <desc>
2223 UUID to assign to the given image within this VirtualBox installation.
2224 If an empty (@c null) UUID is specified, the system will randomly
2225 generate a new UUID.
2226 </desc>
2227 </param>
2228 <param name="image" type="IMedium" dir="return">
2229 <desc>Opened CD/DVD image object.</desc>
2230 </param>
2231 </method>
2232
2233 <method name="getDVDImage">
2234 <desc>
2235 Returns a CD/DVD image with the given UUID.
2236
2237 The image with the given UUID must be known to this VirtualBox
2238 installation, i.e. it must be previously opened by <link
2239 to="#openDVDImage"/>, or mounted to some known virtual machine.
2240
2241 <result name="VBOX_E_OBJECT_NOT_FOUND">
2242 No matching DVD image found in the media registry.
2243 </result>
2244
2245 </desc>
2246 <param name="id" type="uuid" mod="string" dir="in">
2247 <desc>UUID of the image to look for.</desc>
2248 </param>
2249 <param name="image" type="IMedium" dir="return">
2250 <desc>Found CD/DVD image object.</desc>
2251 </param>
2252 </method>
2253
2254 <method name="findDVDImage">
2255 <desc>
2256 Returns a CD/DVD image with the given image location.
2257
2258 The image with the given UUID must be known to this VirtualBox
2259 installation, i.e. it must be previously opened by <link
2260 to="#openDVDImage"/>, or mounted to some known virtual machine.
2261
2262 The search is done by comparing the value of the @a location argument to
2263 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2264
2265 The requested location can be a path relative to the
2266 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2267 only a file name without any path is given, the
2268 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2269 folder</link> will be prepended to the file name before searching. Note
2270 that on case sensitive file systems, a case sensitive comparison is
2271 performed, otherwise the case in the file path is ignored.
2272
2273 <result name="VBOX_E_FILE_ERROR">
2274 Invalid image file location.
2275 </result>
2276 <result name="VBOX_E_OBJECT_NOT_FOUND">
2277 No matching DVD image found in the media registry.
2278 </result>
2279
2280 </desc>
2281 <param name="location" type="wstring" dir="in">
2282 <desc>CD/DVD image file path to look for.</desc>
2283 </param>
2284 <param name="image" type="IMedium" dir="return">
2285 <desc>Found CD/DVD image object.</desc>
2286 </param>
2287 </method>
2288
2289 <method name="openFloppyImage">
2290 <desc>
2291 Opens a floppy image contained in the specified file of the supported
2292 format and assigns it the given UUID.
2293
2294 After the image is successfully opened by this method, it gets
2295 remembered by (known to) this VirtualBox installation and will be
2296 accessible through <link to="#getFloppyImage"/> and
2297 <link to="#findFloppyImage"/> methods. Remembered images are also
2298 returned as part of the <link to="#floppyImages"/> array and can be
2299 mounted to virtual machines. See IMedium for more details.
2300
2301 See <link to="IMedium::location"/> to get more details about the format
2302 of the location string.
2303
2304 <result name="VBOX_E_FILE_ERROR">
2305 Invalid floppy image file location or could not find the floppy
2306 image at the specified location.
2307 </result>
2308 <result name="VBOX_E_INVALID_OBJECT_STATE">
2309 Floppy image already exists in the media registry.
2310 </result>
2311
2312 <note>
2313 Currently, only raw floppy images are supported by VirtualBox.
2314 </note>
2315 </desc>
2316 <param name="location" type="wstring" dir="in">
2317 <desc>
2318 Full path to the file that contains a valid floppy image.
2319 </desc>
2320 </param>
2321 <param name="id" type="uuid" mod="string" dir="in">
2322 <desc>
2323 UUID to assign to the given image file within this VirtualBox
2324 installation. If an empty (@c null) UUID is specified, the system will
2325 randomly generate a new UUID.
2326 </desc>
2327 </param>
2328 <param name="image" type="IMedium" dir="return">
2329 <desc>Opened floppy image object.</desc>
2330 </param>
2331 </method>
2332
2333 <method name="getFloppyImage">
2334 <desc>
2335 Returns a floppy image with the given UUID.
2336
2337 The image with the given UUID must be known to this VirtualBox
2338 installation, i.e. it must be previously opened by <link
2339 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2340
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching floppy image found in the media registry.
2343 </result>
2344
2345 </desc>
2346 <param name="id" type="uuid" mod="string" dir="in">
2347 <desc>UUID of the image to look for.</desc>
2348 </param>
2349 <param name="image" type="IMedium" dir="return">
2350 <desc>Found floppy image object.</desc>
2351 </param>
2352 </method>
2353
2354 <method name="findFloppyImage">
2355 <desc>
2356 Returns a floppy image with the given image location.
2357
2358 The image with the given UUID must be known to this VirtualBox
2359 installation, i.e. it must be previously opened by <link
2360 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2361
2362 The search is done by comparing the value of the @a location argument to
2363 the <link to="IMedium::location"/> attribute of each known floppy image.
2364
2365 The requested location can be a path relative to the
2366 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2367 only a file name without any path is given, the
2368 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2369 folder</link> will be prepended to the file name before searching. Note
2370 that on case sensitive file systems, a case sensitive comparison is
2371 performed, otherwise the case of symbols in the file path is ignored.
2372
2373 <result name="VBOX_E_FILE_ERROR">
2374 Invalid image file location.
2375 </result>
2376 <result name="VBOX_E_OBJECT_NOT_FOUND">
2377 No matching floppy image found in the media registry.
2378 </result>
2379
2380 </desc>
2381 <param name="location" type="wstring" dir="in">
2382 <desc>Floppy image file path to look for.</desc>
2383 </param>
2384 <param name="image" type="IMedium" dir="return">
2385 <desc>Found floppy image object.</desc>
2386 </param>
2387 </method>
2388
2389 <method name="getGuestOSType">
2390 <desc>
2391 Returns an object describing the specified guest OS type.
2392
2393 The requested guest OS type is specified using a string which is a
2394 mnemonic identifier of the guest operating system, such as
2395 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2396 particular virtual machine can be read or set using the
2397 <link to="IMachine::OSTypeId"/> attribute.
2398
2399 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2400 available guest OS type objects. Each object has an
2401 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2402 the guest OS this object describes.
2403
2404 <result name="E_INVALIDARG">
2405 @a id is not a valid Guest OS type.
2406 </result>
2407
2408 </desc>
2409 <param name="id" type="uuid" mod="string" dir="in">
2410 <desc>Guest OS type ID string.</desc>
2411 </param>
2412 <param name="type" type="IGuestOSType" dir="return">
2413 <desc>Guest OS type object.</desc>
2414 </param>
2415 </method>
2416
2417 <method name="createSharedFolder">
2418 <desc>
2419 Creates a new global shared folder by associating the given logical
2420 name with the given host path, adds it to the collection of shared
2421 folders and starts sharing it. Refer to the description of
2422 <link to="ISharedFolder"/> to read more about logical names.
2423 <note>
2424 In the current implementation, this operation is not
2425 implemented.
2426 </note>
2427 </desc>
2428 <param name="name" type="wstring" dir="in">
2429 <desc>Unique logical name of the shared folder.</desc>
2430 </param>
2431 <param name="hostPath" type="wstring" dir="in">
2432 <desc>Full path to the shared folder in the host file system.</desc>
2433 </param>
2434 <param name="writable" type="boolean" dir="in">
2435 <desc>Whether the share is writable or readonly</desc>
2436 </param>
2437 </method>
2438
2439 <method name="removeSharedFolder">
2440 <desc>
2441 Removes the global shared folder with the given name previously
2442 created by <link to="#createSharedFolder"/> from the collection of
2443 shared folders and stops sharing it.
2444 <note>
2445 In the current implementation, this operation is not
2446 implemented.
2447 </note>
2448 </desc>
2449 <param name="name" type="wstring" dir="in">
2450 <desc>Logical name of the shared folder to remove.</desc>
2451 </param>
2452 </method>
2453
2454 <method name="getExtraDataKeys">
2455 <desc>
2456 Returns an array representing the global extra data keys which currently
2457 have values defined.
2458 </desc>
2459 <param name="value" type="wstring" dir="return" safearray="yes">
2460 <desc>Array of extra data keys.</desc>
2461 </param>
2462 </method>
2463
2464 <method name="getExtraData">
2465 <desc>
2466 Returns associated global extra data.
2467
2468 If the requested data @a key does not exist, this function will
2469 succeed and return an empty string in the @a value argument.
2470
2471 <result name="VBOX_E_FILE_ERROR">
2472 Settings file not accessible.
2473 </result>
2474 <result name="VBOX_E_XML_ERROR">
2475 Could not parse the settings file.
2476 </result>
2477
2478 </desc>
2479 <param name="key" type="wstring" dir="in">
2480 <desc>Name of the data key to get.</desc>
2481 </param>
2482 <param name="value" type="wstring" dir="return">
2483 <desc>Value of the requested data key.</desc>
2484 </param>
2485 </method>
2486
2487 <method name="setExtraData">
2488 <desc>
2489 Sets associated global extra data.
2490
2491 If you pass @c null or empty string as a key @a value, the given @a key
2492 will be deleted.
2493
2494 <note>
2495 Before performing the actual data change, this method will ask all
2496 registered callbacks using the
2497 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2498 notification for a permission. If one of the callbacks refuses the
2499 new value, the change will not be performed.
2500 </note>
2501 <note>
2502 On success, the
2503 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2504 is called to inform all registered callbacks about a successful data
2505 change.
2506 </note>
2507
2508 <result name="VBOX_E_FILE_ERROR">
2509 Settings file not accessible.
2510 </result>
2511 <result name="VBOX_E_XML_ERROR">
2512 Could not parse the settings file.
2513 </result>
2514 <result name="E_ACCESSDENIED">
2515 Modification request refused.
2516 </result>
2517
2518 </desc>
2519 <param name="key" type="wstring" dir="in">
2520 <desc>Name of the data key to set.</desc>
2521 </param>
2522 <param name="value" type="wstring" dir="in">
2523 <desc>Value to assign to the key.</desc>
2524 </param>
2525 </method>
2526
2527 <method name="openSession">
2528 <desc>
2529 Opens a new direct session with the given virtual machine.
2530
2531 A direct session acts as a local lock on the given VM.
2532 There can be only one direct session open at a time for every
2533 virtual machine, protecting the VM from being manipulated by
2534 conflicting actions from different processes. Only after a
2535 direct session has been opened, one can change all VM settings
2536 and execute the VM in the process space of the session object.
2537
2538 Sessions therefore can be compared to mutex semaphores that
2539 lock a given VM for modification and execution.
2540 See <link to="ISession">ISession</link> for details.
2541
2542 <note>Unless you are writing a new VM frontend, you will not
2543 want to execute a VM in the current process. To spawn a new
2544 process that executes a VM, use
2545 <link to="IVirtualBox::openRemoteSession" />
2546 instead.</note>
2547
2548 Upon successful return, the session object can be used to
2549 get access to the machine and to the VM console.
2550
2551 In VirtualBox terminology, the machine becomes "mutable" after
2552 a session has been opened. Note that the "mutable" machine
2553 object, on which you may invoke IMachine methods to change its
2554 settings, will be a different object from the immutable IMachine
2555 objects returned by various IVirtualBox methods. To obtain a
2556 mutable IMachine object (upon which you can invoke settings methods),
2557 use the <link to="ISession::machine" /> attribute.
2558
2559 One must always call <link to="ISession::close" /> to release the
2560 lock on the machine, or the machine's state will eventually be
2561 set to "Aborted".
2562
2563 In other words, to change settings on a machine, the following
2564 sequence is typically performed:
2565
2566 <ol>
2567 <li>Call this method (openSession) to have a machine locked for
2568 the current session.</li>
2569
2570 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2571
2572 <li>Change the settings of the machine.</li>
2573
2574 <li>Call <link to="IMachine::saveSettings" />.</li>
2575
2576 <li>Close the session by calling <link to="ISession::close"/>.</li>
2577 </ol>
2578
2579 <result name="E_UNEXPECTED">
2580 Virtual machine not registered.
2581 </result>
2582 <result name="E_ACCESSDENIED">
2583 Process not started by OpenRemoteSession.
2584 </result>
2585 <result name="VBOX_E_OBJECT_NOT_FOUND">
2586 No matching virtual machine found.
2587 </result>
2588 <result name="VBOX_E_INVALID_OBJECT_STATE">
2589 Session already open or being opened.
2590 </result>
2591 <result name="VBOX_E_VM_ERROR">
2592 Failed to assign machine to session.
2593 </result>
2594
2595 </desc>
2596 <param name="session" type="ISession" dir="in">
2597 <desc>
2598 Session object that will represent the opened session after
2599 successful method invocation. This object must not represent
2600 the already open session.
2601 <note>
2602 This session will be automatically closed if the
2603 VirtualBox server is terminated for some reason.
2604 </note>
2605 </desc>
2606 </param>
2607 <param name="machineId" type="uuid" mod="string" dir="in">
2608 <desc>ID of the virtual machine to open a session with.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="openRemoteSession">
2613 <desc>
2614 Spawns a new process that executes a virtual machine (called a
2615 "remote session").
2616
2617 Opening a remote session causes the VirtualBox server to start a new
2618 process that opens a direct session with the given VM. As a result, the
2619 VM is locked by that direct session in the new process, preventing
2620 conflicting changes from other processes. Since sessions act as locks
2621 that prevent conflicting changes, one cannot open a remote session
2622 for a VM that already has another open session (direct or remote), or
2623 is currently in the process of opening one (see <link
2624 to="IMachine::sessionState"/>).
2625
2626 While the remote session still provides some level of control over the
2627 VM execution to the caller (using the <link to="IConsole" /> interface),
2628 not all VM settings are available for modification within the remote
2629 session context.
2630
2631 This operation can take some time (a new VM is started in a new process,
2632 for which memory and other resources need to be set up). Because of this,
2633 an <link to="IProgress" /> is returned to allow the caller to wait for this
2634 asynchronous operation to be completed. Until then, the remote session
2635 object remains in the closed state, and accessing the machine or its
2636 console through it is invalid. It is recommended to use
2637 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2638 completion.
2639
2640 As with all <link to="ISession" /> objects, it is recommended to call
2641 <link to="ISession::close" /> on the local session object once openRemoteSession()
2642 has been called. However, the session's state (see <link to="ISession::state" />)
2643 will not return to "Closed" until the remote session has also closed (i.e.
2644 until the VM is no longer running). In that case, however, the state of
2645 the session will automatically change back to "Closed".
2646
2647 Currently supported session types (values of the @a type
2648 argument) are:
2649 <ul>
2650 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2651 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2652 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2653 </ul>
2654
2655 The @a environment argument is a string containing definitions of
2656 environment variables in the following format:
2657 @code
2658 NAME[=VALUE]\n
2659 NAME[=VALUE]\n
2660 ...
2661 @endcode
2662 where <tt>\\n</tt> is the new line character. These environment
2663 variables will be appended to the environment of the VirtualBox server
2664 process. If an environment variable exists both in the server process
2665 and in this list, the value from this list takes precedence over the
2666 server's variable. If the value of the environment variable is
2667 omitted, this variable will be removed from the resulting environment.
2668 If the environment string is @c null or empty, the server environment
2669 is inherited by the started process as is.
2670
2671 <see>openExistingSession</see>
2672
2673 <result name="E_UNEXPECTED">
2674 Virtual machine not registered.
2675 </result>
2676 <result name="E_INVALIDARG">
2677 Invalid session type @a type.
2678 </result>
2679 <result name="VBOX_E_OBJECT_NOT_FOUND">
2680 No machine matching @a machineId found.
2681 </result>
2682 <result name="VBOX_E_INVALID_OBJECT_STATE">
2683 Session already open or being opened.
2684 </result>
2685 <result name="VBOX_E_IPRT_ERROR">
2686 Launching process for machine failed.
2687 </result>
2688 <result name="VBOX_E_VM_ERROR">
2689 Failed to assign machine to session.
2690 </result>
2691
2692 </desc>
2693 <param name="session" type="ISession" dir="in">
2694 <desc>
2695 Session object that will represent the opened remote session
2696 after successful method invocation (this object must not
2697 represent an already open session).
2698 </desc>
2699 </param>
2700 <param name="machineId" type="uuid" mod="string" dir="in">
2701 <desc>ID of the virtual machine to open a session with.</desc>
2702 </param>
2703 <param name="type" type="wstring" dir="in">
2704 <desc>
2705 Type of the remote session (case sensitive).
2706 </desc>
2707 </param>
2708 <param name="environment" type="wstring" dir="in">
2709 <desc>
2710 Environment to pass to the opened session.
2711 </desc>
2712 </param>
2713 <param name="progress" type="IProgress" dir="return">
2714 <desc>Progress object to track the operation completion.</desc>
2715 </param>
2716 </method>
2717
2718 <method name="openExistingSession">
2719 <desc>
2720 Opens a new remote session with the virtual machine for
2721 which a direct session is already open.
2722
2723 The remote session provides some level of control over the VM
2724 execution (using the IConsole interface) to the caller; however,
2725 within the remote session context, not all VM settings are available
2726 for modification.
2727
2728 As opposed to <link to="#openRemoteSession"/>, the number of
2729 remote sessions opened this way is not limited by the API
2730
2731 <note>
2732 It is an error to open a remote session with the machine that
2733 doesn't have an open direct session.
2734 </note>
2735
2736 <result name="E_UNEXPECTED">
2737 Virtual machine not registered.
2738 </result>
2739 <result name="VBOX_E_OBJECT_NOT_FOUND">
2740 No machine matching @a machineId found.
2741 </result>
2742 <result name="VBOX_E_INVALID_OBJECT_STATE">
2743 Session already open or being opened.
2744 </result>
2745 <result name="VBOX_E_INVALID_SESSION_STATE">
2746 Direct session state not Open.
2747 </result>
2748 <result name="VBOX_E_VM_ERROR">
2749 Failed to get console object from direct session or assign
2750 machine to session.
2751 </result>
2752
2753 <see>openRemoteSession</see>
2754 </desc>
2755 <param name="session" type="ISession" dir="in">
2756 <desc>
2757 Session object that will represent the open remote session
2758 after successful method invocation. This object must not
2759 represent an already open session.
2760 <note>
2761 This session will be automatically closed when the peer
2762 (direct) session dies or gets closed.
2763 </note>
2764 </desc>
2765 </param>
2766 <param name="machineId" type="uuid" mod="string" dir="in">
2767 <desc>ID of the virtual machine to open a session with.</desc>
2768 </param>
2769 </method>
2770
2771 <method name="registerCallback">
2772 <desc>
2773 Registers a new global VirtualBox callback. The methods of the given
2774 callback object will be called by VirtualBox when an appropriate
2775 event occurs.
2776
2777 <result name="E_INVALIDARG">
2778 A @c null callback cannot be registered.
2779 </result>
2780
2781 </desc>
2782 <param name="callback" type="IVirtualBoxCallback" dir="in">
2783 <desc>Callback object to register.</desc>
2784 </param>
2785 </method>
2786
2787 <method name="unregisterCallback">
2788 <desc>
2789 Unregisters the previously registered global VirtualBox callback.
2790
2791 <result name="E_INVALIDARG">
2792 Specified @a callback not registered.
2793 </result>
2794
2795 </desc>
2796 <param name="callback" type="IVirtualBoxCallback" dir="in">
2797 <desc>Callback object to unregister.</desc>
2798 </param>
2799 </method>
2800
2801 <method name="waitForPropertyChange">
2802 <desc>
2803 Blocks the caller until any of the properties represented by the
2804 @a what argument changes the value or until the given timeout interval
2805 expires.
2806
2807 The @a what argument is a comma separated list of property masks that
2808 describe properties the caller is interested in. The property mask is
2809 a string in the following format:
2810
2811 <pre>
2812 [[group.]subgroup.]name
2813 </pre>
2814
2815 where @c name is the property name and @c group, @c subgroup are zero
2816 or more property group specifiers. Each element (group or name) in
2817 the property mask may be either a Latin string or an asterisk symbol
2818 (@c "*") which is used to match any string for the given element. A
2819 property mask that doesn't contain asterisk symbols represents a
2820 single fully qualified property name.
2821
2822 Groups in the fully qualified property name go from more generic (the
2823 left-most part) to more specific (the right-most part). The first
2824 element is usually a name of the object the property belongs to. The
2825 second element may be either a property name, or a child object name,
2826 or an index if the preceding element names an object which is one of
2827 many objects of the same type. This way, property names form a
2828 hierarchy of properties. Here are some examples of property names:
2829
2830 <table>
2831 <tr>
2832 <td><tt>VirtualBox.version</tt></td>
2833 <td><link to="IVirtualBox::version"/> property</td>
2834 </tr>
2835 <tr>
2836 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2837 <td><link to="IMachine::name"/> property of the machine with the
2838 given UUID</td>
2839 </tr>
2840 </table>
2841
2842 Most property names directly correspond to the properties of objects
2843 (components) provided by the VirtualBox library and may be used to
2844 track changes to these properties. However, there may be
2845 pseudo-property names that don't correspond to any existing object's
2846 property directly, as well as there may be object properties that
2847 don't have a corresponding property name that is understood by this
2848 method, and therefore changes to such properties cannot be
2849 tracked. See individual object's property descriptions to get a
2850 fully qualified property name that can be used with this method (if
2851 any).
2852
2853 There is a special property mask @c "*" (i.e. a string consisting of a
2854 single asterisk symbol) that can be used to match all properties.
2855 Below are more examples of property masks:
2856
2857 <table>
2858 <tr>
2859 <td><tt>VirtualBox.*</tt></td>
2860 <td>Track all properties of the VirtualBox object</td>
2861 </tr>
2862 <tr>
2863 <td><tt>Machine.*.name</tt></td>
2864 <td>Track changes to the <link to="IMachine::name"/> property of
2865 all registered virtual machines</td>
2866 </tr>
2867 </table>
2868
2869 <note>
2870 This function is not implemented in the current version of the
2871 product.
2872 </note>
2873 </desc>
2874 <param name="what" type="wstring" dir="in">
2875 <desc>Comma separated list of property masks.</desc>
2876 </param>
2877 <param name="timeout" type="unsigned long" dir="in">
2878 <desc>
2879 Wait timeout in milliseconds.
2880 Specify -1 for an indefinite wait.
2881 </desc>
2882 </param>
2883 <param name="changed" type="wstring" dir="out">
2884 <desc>
2885 Comma separated list of properties that have been changed and caused
2886 this method to return to the caller.
2887 </desc>
2888 </param>
2889 <param name="values" type="wstring" dir="out">
2890 <desc>Reserved, not currently used.</desc>
2891 </param>
2892 </method>
2893
2894 <!--method name="createDHCPServerForInterface">
2895 <desc>
2896 Creates a dhcp server settings to be used for the given interface
2897 <result name="E_INVALIDARG">
2898 Host network interface @a name already exists.
2899 </result>
2900 </desc>
2901 <param name="interface" type="IHostNetworkInterface" dir="in">
2902 <desc>Network Interface</desc>
2903 </param>
2904 <param name="server" type="IDHCPServer" dir="out">
2905 <desc>Dhcp server settings</desc>
2906 </param>
2907 </method-->
2908
2909 <method name="createDHCPServer">
2910 <desc>
2911 Creates a dhcp server settings to be used for the given internal network name
2912 <result name="E_INVALIDARG">
2913 Host network interface @a name already exists.
2914 </result>
2915 </desc>
2916 <param name="name" type="wstring" dir="in">
2917 <desc>server name</desc>
2918 </param>
2919 <param name="server" type="IDHCPServer" dir="return">
2920 <desc>Dhcp server settings</desc>
2921 </param>
2922 </method>
2923
2924 <method name="findDHCPServerByNetworkName">
2925 <desc>
2926 Searches a dhcp server settings to be used for the given internal network name
2927 <result name="E_INVALIDARG">
2928 Host network interface @a name already exists.
2929 </result>
2930
2931 </desc>
2932 <param name="name" type="wstring" dir="in">
2933 <desc>server name</desc>
2934 </param>
2935 <param name="server" type="IDHCPServer" dir="return">
2936 <desc>Dhcp server settings</desc>
2937 </param>
2938 </method>
2939
2940 <!--method name="findDHCPServerForInterface">
2941 <desc>
2942 Searches a dhcp server settings to be used for the given interface
2943 <result name="E_INVALIDARG">
2944 Host network interface @a name already exists.
2945 </result>
2946 </desc>
2947 <param name="interface" type="IHostNetworkInterface" dir="in">
2948 <desc>Network Interface</desc>
2949 </param>
2950 <param name="server" type="IDHCPServer" dir="out">
2951 <desc>Dhcp server settings</desc>
2952 </param>
2953 </method-->
2954
2955 <method name="removeDHCPServer">
2956 <desc>
2957 Removes the dhcp server settings
2958 <result name="E_INVALIDARG">
2959 Host network interface @a name already exists.
2960 </result>
2961 </desc>
2962 <param name="server" type="IDHCPServer" dir="in">
2963 <desc>Dhcp server settings to be removed</desc>
2964 </param>
2965 </method>
2966
2967 </interface>
2968
2969 <!--
2970 // IVFSExplorer
2971 /////////////////////////////////////////////////////////////////////////
2972 -->
2973
2974 <enum
2975 name="VFSType"
2976 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2977 >
2978 <desc>
2979 Virtual file systems supported by VFSExplorer.
2980 </desc>
2981
2982 <const name="File" value="1" />
2983 <const name="Cloud" value="2" />
2984 <const name="S3" value="3" />
2985 <const name="WebDav" value="4" />
2986 </enum>
2987
2988 <enum
2989 name="VFSFileType"
2990 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2991 >
2992 <desc>
2993 File types known by VFSExplorer.
2994 </desc>
2995
2996 <const name="Unknown" value="1" />
2997 <const name="Fifo" value="2" />
2998 <const name="DevChar" value="3" />
2999 <const name="Directory" value="4" />
3000 <const name="DevBlock" value="5" />
3001 <const name="File" value="6" />
3002 <const name="SymLink" value="7" />
3003 <const name="Socket" value="8" />
3004 <const name="WhiteOut" value="9" />
3005 </enum>
3006
3007 <interface
3008 name="IVFSExplorer" extends="$unknown"
3009 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3010 wsmap="managed"
3011 >
3012 <desc>
3013 The VFSExplorer interface unifies access to different file system
3014 types. This includes local file systems as well remote file systems like
3015 S3. For a list of supported types see <link to="VFSType" />.
3016 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3017 </desc>
3018
3019 <attribute name="path" type="wstring" readonly="yes">
3020 <desc>Returns the current path in the virtual file system.</desc>
3021 </attribute>
3022
3023 <attribute name="type" type="VFSType" readonly="yes">
3024 <desc>Returns the file system type which is currently in use.</desc>
3025 </attribute>
3026
3027 <method name="update">
3028 <desc>Updates the internal list of files/directories from the
3029 current directory level. Use <link to="#entryList" /> to get the full list
3030 after a call to this method.</desc>
3031
3032 <param name="aProgress" type="IProgress" dir="return">
3033 <desc>Progress object to track the operation completion.</desc>
3034 </param>
3035 </method>
3036
3037 <method name="cd">
3038 <desc>Change the current directory level.</desc>
3039
3040 <param name="aDir" type="wstring" dir="in">
3041 <desc>The name of the directory to go in.</desc>
3042 </param>
3043
3044 <param name="aProgress" type="IProgress" dir="return">
3045 <desc>Progress object to track the operation completion.</desc>
3046 </param>
3047 </method>
3048
3049 <method name="cdUp">
3050 <desc>Go one directory upwards from the current directory level.</desc>
3051
3052 <param name="aProgress" type="IProgress" dir="return">
3053 <desc>Progress object to track the operation completion.</desc>
3054 </param>
3055 </method>
3056
3057 <method name="entryList">
3058 <desc>Returns a list of files/directories after a call to <link
3059 to="#update" />. The user is responsible for keeping this internal
3060 list up do date.</desc>
3061
3062 <param name="aNames" type="wstring" safearray="yes" dir="out">
3063 <desc>The list of names for the entries.</desc>
3064 </param>
3065
3066 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3067 <desc>The list of types for the entries.</desc>
3068 </param>
3069 </method>
3070
3071 <method name="exists">
3072 <desc>Checks if the given file list exists in the current directory
3073 level.</desc>
3074
3075 <param name="aNames" type="wstring" safearray="yes" dir="in">
3076 <desc>The names to check.</desc>
3077 </param>
3078
3079 <param name="aExists" type="wstring" safearray="yes" dir="return">
3080 <desc>The names which exist.</desc>
3081 </param>
3082 </method>
3083
3084 <method name="remove">
3085 <desc>Deletes the given files in the current directory level.</desc>
3086
3087 <param name="aNames" type="wstring" safearray="yes" dir="in">
3088 <desc>The names to remove.</desc>
3089 </param>
3090
3091 <param name="aProgress" type="IProgress" dir="return">
3092 <desc>Progress object to track the operation completion.</desc>
3093 </param>
3094 </method>
3095
3096 </interface>
3097
3098 <!--
3099 // IAppliance
3100 /////////////////////////////////////////////////////////////////////////
3101 -->
3102
3103 <interface
3104 name="IAppliance" extends="$unknown"
3105 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3106 wsmap="managed"
3107 >
3108 <desc>
3109 Represents a platform-independent appliance in OVF format. An instance of this is returned
3110 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3111 appliances with VirtualBox.
3112
3113 The OVF standard suggests two different physical file formats:
3114
3115 <ol>
3116 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3117 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3118 this descriptor file references other files, as OVF appliances distributed as a set of
3119 files most likely do, those files must be in the same directory as the descriptor file.</li>
3120
3121 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3122 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3123 files and optionally other files.
3124
3125 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3126 be added with a later version.</li>
3127 </ol>
3128
3129 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3130 <link to="IMachine" /> involves the following sequence of API calls:
3131
3132 <ol>
3133 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3134 </li>
3135
3136 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3137 would like to import. So long as this file is syntactically valid, this will succeed
3138 and return an instance of IAppliance that contains the parsed data from the OVF file.
3139 </li>
3140
3141 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3142 contents of the IAppliance attributes accordingly. These can be inspected by a
3143 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3144 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3145 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3146 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3147 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3148 The GUI can then give the user the option to confirm and/or change these suggestions.
3149 </li>
3150
3151 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3152 virtual system to override the suggestions made by the interpret() routine.
3153 </li>
3154
3155 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3156 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3157 virtual system descriptions.
3158 </li>
3159 </ol>
3160
3161 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3162
3163 <ol>
3164 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3165 an empty IAppliance object.
3166 </li>
3167
3168 <li>For each machine you would like to export, call <link to="IMachine::export" />
3169 with the IAppliance object you just created. This creates an instance of
3170 <link to="IVirtualSystemDescription" /> inside the appliance.
3171 </li>
3172
3173 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3174 virtual system to override the suggestions made by the export() routine.
3175 </li>
3176
3177 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3178 file written.</li>
3179 </ol>
3180
3181 </desc>
3182
3183 <attribute name="path" type="wstring" readonly="yes">
3184 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3185 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3186 <link to="#write" /> (for export).
3187 This attribute is empty until one of these methods has been called.
3188 </desc>
3189 </attribute>
3190
3191 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3192 <desc>
3193 Array of virtual disk definitions. One such description exists for each
3194 disk definition in the OVF; each string array item represents one such piece of
3195 disk information, with the information fields separated by tab (\\t) characters.
3196
3197 The caller should be prepared for additional fields being appended to
3198 this string in future versions of VirtualBox and therefore check for
3199 the number of tabs in the strings returned.
3200
3201 In the current version, the following eight fields are returned per string
3202 in the array:
3203
3204 <ol>
3205 <li>Disk ID (unique string identifier given to disk)</li>
3206
3207 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3208
3209 <li>Populated size (optional unsigned integer indicating the current size of the
3210 disk; can be approximate; -1 if unspecified)</li>
3211
3212 <li>Format (string identifying the disk format, typically
3213 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3214
3215 <li>Reference (where to find the disk image, typically a file name; if empty,
3216 then the disk should be created on import)</li>
3217
3218 <li>Image size (optional unsigned integer indicating the size of the image,
3219 which need not necessarily be the same as the values specified above, since
3220 the image may be compressed or sparse; -1 if not specified)</li>
3221
3222 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3223 presently unsupported and always -1)</li>
3224
3225 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3226 </ol>
3227 </desc>
3228 </attribute>
3229
3230 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3231 <desc> Array of virtual system descriptions. One such description is created
3232 for each virtual system found in the OVF.
3233 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3234 (for export) has been called.
3235 </desc>
3236 </attribute>
3237
3238 <method name="read">
3239 <desc>
3240 Reads an OVF file into the appliance object.
3241
3242 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3243 mere fact that this method returns successfully does not mean that VirtualBox supports all
3244 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3245 </desc>
3246 <param name="file" type="wstring" dir="in">
3247 <desc>
3248 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3249 on whether the appliance is distributed as a set of files or as a single file, respectively).
3250 </desc>
3251 </param>
3252 <param name="aProgress" type="IProgress" dir="return">
3253 <desc></desc>
3254 </param>
3255 </method>
3256
3257 <method name="interpret">
3258 <desc>
3259 Interprets the OVF data that was read when the appliance was constructed. After
3260 calling this method, one can inspect the
3261 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3262 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3263 the appliance.
3264
3265 Calling this method is the second step of importing an appliance into VirtualBox;
3266 see <link to="IAppliance" /> for an overview.
3267
3268 After calling this method, one should call <link to="#getWarnings" /> to find out
3269 if problems were encountered during the processing which might later lead to
3270 errors.
3271 </desc>
3272 </method>
3273
3274 <method name="importMachines">
3275 <desc>
3276 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3277 and other interfaces that match the information contained in the appliance as
3278 closely as possible, as represented by the import instructions in the
3279 <link to="#virtualSystemDescriptions" /> array.
3280
3281 Calling this method is the final step of importing an appliance into VirtualBox;
3282 see <link to="IAppliance" /> for an overview.
3283
3284 Since importing the appliance will most probably involve copying and converting
3285 disk images, which can take a long time, this method operates asynchronously and
3286 returns an IProgress object to allow the caller to monitor the progress.
3287 </desc>
3288
3289 <param name="aProgress" type="IProgress" dir="return">
3290 <desc></desc>
3291 </param>
3292 </method>
3293
3294 <method name="createVFSExplorer">
3295 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3296
3297 <param name="aUri" type="wstring" dir="in">
3298 <desc>The URI describing the file system to use.</desc>
3299 </param>
3300
3301 <param name="aExplorer" type="IVFSExplorer" dir="return">
3302 <desc></desc>
3303 </param>
3304 </method>
3305
3306 <method name="write">
3307 <desc>
3308 Writes the contents of the appliance exports into a new OVF file.
3309
3310 Calling this method is the final step of exporting an appliance from VirtualBox;
3311 see <link to="IAppliance" /> for an overview.
3312
3313 Since exporting the appliance will most probably involve copying and converting
3314 disk images, which can take a long time, this method operates asynchronously and
3315 returns an IProgress object to allow the caller to monitor the progress.
3316 </desc>
3317 <param name="format" type="wstring" dir="in">
3318 <desc>
3319 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3320 future versions of VirtualBox may support additional formats.
3321 </desc>
3322 </param>
3323 <param name="path" type="wstring" dir="in">
3324 <desc>
3325 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3326 on whether the appliance is distributed as a set of files or as a single file, respectively).
3327 </desc>
3328 </param>
3329 <param name="aProgress" type="IProgress" dir="return">
3330 <desc>Progress object to track the operation completion.</desc>
3331 </param>
3332 </method>
3333
3334 <method name="getWarnings">
3335 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3336
3337 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3338 <desc></desc>
3339 </param>
3340 </method>
3341
3342 </interface>
3343
3344 <enum
3345 name="VirtualSystemDescriptionType"
3346 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3347 >
3348 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3349 a configuration value.</desc>
3350
3351 <const name="Ignore" value="1" />
3352 <const name="OS" value="2" />
3353 <const name="Name" value="3" />
3354 <const name="Product" value="4" />
3355 <const name="Vendor" value="5" />
3356 <const name="Version" value="6" />
3357 <const name="ProductUrl" value="7" />
3358 <const name="VendorUrl" value="8" />
3359 <const name="Description" value="9" />
3360 <const name="License" value="10" />
3361 <const name="Miscellaneous" value="11" />
3362 <const name="CPU" value="12" />
3363 <const name="Memory" value="13" />
3364 <const name="HardDiskControllerIDE" value="14" />
3365 <const name="HardDiskControllerSATA" value="15" />
3366 <const name="HardDiskControllerSCSI" value="16" />
3367 <const name="HardDiskImage" value="17" />
3368 <const name="Floppy" value="18" />
3369 <const name="CDROM" value="19" />
3370 <const name="NetworkAdapter" value="20" />
3371 <const name="USBController" value="21" />
3372 <const name="SoundCard" value="22" />
3373
3374 </enum>
3375
3376 <enum
3377 name="VirtualSystemDescriptionValueType"
3378 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3379 >
3380 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3381 type to fetch.</desc>
3382
3383 <const name="Reference" value="1" />
3384 <const name="Original" value="2" />
3385 <const name="Auto" value="3" />
3386 <const name="ExtraConfig" value="4" />
3387
3388 </enum>
3389
3390 <interface
3391 name="IVirtualSystemDescription" extends="$unknown"
3392 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3393 wsmap="managed"
3394 >
3395
3396 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3397 After <link to="IAppliance::interpret" /> has been called, that array contains
3398 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3399 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3400 into VirtualBox.
3401 </desc>
3402
3403 <attribute name="count" type="unsigned long" readonly="yes">
3404 <desc>Return the number of virtual system description entries.</desc>
3405 </attribute>
3406
3407 <method name="getDescription">
3408 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3409 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3410
3411 The list below identifies the value sets that are possible depending on the
3412 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3413 the array item with the same index in aOvfValues[] will contain the original value as contained
3414 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3415 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3416 the aExtraConfigValues[] array item may also be used.
3417
3418 <ul>
3419 <li>
3420 "OS": the guest operating system type. There must be exactly one such array item on import. The
3421 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3422 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3423 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3424 </li>
3425 <li>
3426 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3427 if none is present on import, then an automatic name will be created from the operating system
3428 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3429 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3430 <link to="IMachine" /> name that does not exist yet.
3431 </li>
3432 <li>
3433 "Description": an arbitrary description.
3434 </li>
3435 <li>
3436 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3437 code to display such a license for agreement; the Main API does not enforce any such policy.
3438 </li>
3439 <li>
3440 Miscellaneous: reserved for future use.
3441 </li>
3442 <li>
3443 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3444 </li>
3445 <li>
3446 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3447 is present on import, then VirtualBox will set a meaningful default based on the operating system
3448 type.
3449 </li>
3450 <li>
3451 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3452 has no value in aOvfValues[] or aVBoxValues[].
3453 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3454 type can use to specify which hard disk controller a virtual disk should be connected to.
3455 </li>
3456 <li>
3457 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3458 has no value in aOvfValues[] or aVBoxValues[].
3459 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3460 </li>
3461 <li>
3462 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3463 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3464 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3465 </li>
3466 <li>
3467 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3468 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3469
3470 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3471 a path since the image file should be in the same location as the OVF file itself), whereas the
3472 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3473 hard disk image. This means that on import the image will be copied and converted from the
3474 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3475 On import, the target image will also be registered with VirtualBox.
3476
3477 The matching item in the aExtraConfigValues[] array must contain a string of the following
3478 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3479 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3480 the image to. That number must be the index of an array item with one of the hard disk controller
3481 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3482 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3483 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3484 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3485 </li>
3486 <li>
3487 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3488 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3489 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3490 </li>
3491 <li>
3492 "USBController": a USB controller. There can be at most one such item. If and only if such an
3493 item ispresent, USB support will be enabled for the new virtual machine.
3494 </li>
3495 <li>
3496 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3497 present, sound support will be enabled for the new virtual machine. Note that the virtual
3498 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3499 may be different from the virtual soundcard expected by the appliance.
3500 </li>
3501 </ul>
3502
3503 </desc>
3504
3505 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3506 <desc></desc>
3507 </param>
3508
3509 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3510 <desc></desc>
3511 </param>
3512
3513 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3514 <desc></desc>
3515 </param>
3516
3517 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3518 <desc></desc>
3519 </param>
3520
3521 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3522 <desc></desc>
3523 </param>
3524
3525 </method>
3526
3527 <method name="getDescriptionByType">
3528 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3529 should be returned.</desc>
3530
3531 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3532 <desc></desc>
3533 </param>
3534
3535 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3536 <desc></desc>
3537 </param>
3538
3539 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3540 <desc></desc>
3541 </param>
3542
3543 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3544 <desc></desc>
3545 </param>
3546
3547 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3548 <desc></desc>
3549 </param>
3550
3551 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3552 <desc></desc>
3553 </param>
3554
3555 </method>
3556
3557 <method name="getValuesByType">
3558 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3559 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3560 values.</desc>
3561
3562 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3563 <desc></desc>
3564 </param>
3565
3566 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3567 <desc></desc>
3568 </param>
3569
3570 <param name="aValues" type="wstring" dir="return" safearray="yes">
3571 <desc></desc>
3572 </param>
3573
3574 </method>
3575
3576 <method name="setFinalValues">
3577 <desc>
3578 This method allows the appliance's user to change the configuration for the virtual
3579 system descriptions. For each array item returned from <link to="#getDescription" />,
3580 you must pass in one boolean value and one configuration value.
3581
3582 Each item in the boolean array determines whether the particular configuration item
3583 should be enabled.
3584 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3585 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3586 and SoundCard.
3587
3588 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3589 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3590 the configuration remains unchanged. Please see the documentation for getDescription()
3591 for valid configuration values for the individual array item types. If the
3592 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3593 </desc>
3594
3595 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3596 <desc></desc>
3597 </param>
3598
3599 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3600 <desc></desc>
3601 </param>
3602
3603 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3604 <desc></desc>
3605 </param>
3606 </method>
3607
3608 <method name="addDescription">
3609 <desc>
3610 This method adds an additional description entry to the stack of already
3611 available descriptions for this virtual system. This is handy for writing
3612 values which aren't directly supported by VirtualBox. One example would
3613 be the License type of <link to="VirtualSystemDescriptionType" />.
3614 </desc>
3615
3616 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3617 <desc></desc>
3618 </param>
3619
3620 <param name="aVBoxValue" type="wstring" dir="in">
3621 <desc></desc>
3622 </param>
3623
3624 <param name="aExtraConfigValue" type="wstring" dir="in">
3625 <desc></desc>
3626 </param>
3627 </method>
3628 </interface>
3629
3630
3631 <!--
3632 // IMachine
3633 /////////////////////////////////////////////////////////////////////////
3634 -->
3635
3636 <interface
3637 name="IInternalMachineControl" extends="$unknown"
3638 uuid="4e2b8f0f-6575-49d2-bb19-5cd15a6ca2f0"
3639 internal="yes"
3640 wsmap="suppress"
3641 >
3642 <method name="setRemoveSavedState">
3643 <desc>
3644 Updates the flag whether saved state is removed on a machine state
3645 change from Saved to PoweredOff.
3646 </desc>
3647 <param name="aRemove" type="boolean" dir="in"/>
3648 </method>
3649
3650 <method name="updateState">
3651 <desc>
3652 Updates the VM state.
3653 <note>
3654 This operation will also update the settings file with
3655 the correct information about the saved state file
3656 and delete this file from disk when appropriate.
3657 </note>
3658 </desc>
3659 <param name="state" type="MachineState" dir="in"/>
3660 </method>
3661
3662 <method name="getIPCId">
3663 <param name="id" type="wstring" dir="return"/>
3664 </method>
3665
3666 <method name="runUSBDeviceFilters">
3667 <desc>
3668 Asks the server to run USB devices filters of the associated
3669 machine against the given USB device and tell if there is
3670 a match.
3671 <note>
3672 Intended to be used only for remote USB devices. Local
3673 ones don't require to call this method (this is done
3674 implicitly by the Host and USBProxyService).
3675 </note>
3676 </desc>
3677 <param name="device" type="IUSBDevice" dir="in"/>
3678 <param name="matched" type="boolean" dir="out"/>
3679 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3680 </method>
3681
3682 <method name="captureUSBDevice">
3683 <desc>
3684 Requests a capture of the given host USB device.
3685 When the request is completed, the VM process will
3686 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3687 notification.
3688 </desc>
3689 <param name="id" type="uuid" mod="string" dir="in"/>
3690 </method>
3691
3692 <method name="detachUSBDevice">
3693 <desc>
3694 Notification that a VM is going to detach (@a done = @c false) or has
3695 already detached (@a done = @c true) the given USB device.
3696 When the @a done = @c true request is completed, the VM process will
3697 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3698 notification.
3699 <note>
3700 In the @a done = @c true case, the server must run its own filters
3701 and filters of all VMs but this one on the detached device
3702 as if it were just attached to the host computer.
3703 </note>
3704 </desc>
3705 <param name="id" type="uuid" mod="string" dir="in"/>
3706 <param name="done" type="boolean" dir="in"/>
3707 </method>
3708
3709 <method name="autoCaptureUSBDevices">
3710 <desc>
3711 Requests a capture all matching USB devices attached to the host.
3712 When the request is completed, the VM process will
3713 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3714 notification per every captured device.
3715 </desc>
3716 </method>
3717
3718 <method name="detachAllUSBDevices">
3719 <desc>
3720 Notification that a VM that is being powered down. The done
3721 parameter indicates whether which stage of the power down
3722 we're at. When @a done = @c false the VM is announcing its
3723 intentions, while when @a done = @c true the VM is reporting
3724 what it has done.
3725 <note>
3726 In the @a done = @c true case, the server must run its own filters
3727 and filters of all VMs but this one on all detach devices as
3728 if they were just attached to the host computer.
3729 </note>
3730 </desc>
3731 <param name="done" type="boolean" dir="in"/>
3732 </method>
3733
3734 <method name="onSessionEnd">
3735 <desc>
3736 Triggered by the given session object when the session is about
3737 to close normally.
3738 </desc>
3739 <param name="session" type="ISession" dir="in">
3740 <desc>Session that is being closed</desc>
3741 </param>
3742 <param name="progress" type="IProgress" dir="return">
3743 <desc>
3744 Used to wait until the corresponding machine is actually
3745 dissociated from the given session on the server.
3746 Returned only when this session is a direct one.
3747 </desc>
3748 </param>
3749 </method>
3750
3751 <method name="beginSavingState">
3752 <desc>
3753 Called by the VM process to inform the server it wants to
3754 save the current state and stop the VM execution.
3755 </desc>
3756 <param name="progress" type="IProgress" dir="in">
3757 <desc>
3758 Progress object created by the VM process to wait until
3759 the state is saved.
3760 </desc>
3761 </param>
3762 <param name="stateFilePath" type="wstring" dir="out">
3763 <desc>
3764 File path the VM process must save the execution state to.
3765 </desc>
3766 </param>
3767 </method>
3768
3769 <method name="endSavingState">
3770 <desc>
3771 Called by the VM process to inform the server that saving
3772 the state previously requested by #beginSavingState is either
3773 successfully finished or there was a failure.
3774
3775 <result name="VBOX_E_FILE_ERROR">
3776 Settings file not accessible.
3777 </result>
3778 <result name="VBOX_E_XML_ERROR">
3779 Could not parse the settings file.
3780 </result>
3781
3782 </desc>
3783
3784 <param name="success" type="boolean" dir="in">
3785 <desc>@c true to indicate success and @c false otherwise.
3786 </desc>
3787 </param>
3788 </method>
3789
3790 <method name="adoptSavedState">
3791 <desc>
3792 Gets called by IConsole::adoptSavedState.
3793 <result name="VBOX_E_FILE_ERROR">
3794 Invalid saved state file path.
3795 </result>
3796 </desc>
3797 <param name="savedStateFile" type="wstring" dir="in">
3798 <desc>Path to the saved state file to adopt.</desc>
3799 </param>
3800 </method>
3801
3802 <method name="beginTakingSnapshot">
3803 <desc>
3804 Called from the VM process to request from the server to perform the
3805 server-side actions of creating a snapshot (creating differencing images
3806 and the snapshot object).
3807
3808 <result name="VBOX_E_FILE_ERROR">
3809 Settings file not accessible.
3810 </result>
3811 <result name="VBOX_E_XML_ERROR">
3812 Could not parse the settings file.
3813 </result>
3814 </desc>
3815 <param name="initiator" type="IConsole" dir="in">
3816 <desc>The console object that initiated this call.</desc>
3817 </param>
3818 <param name="name" type="wstring" dir="in">
3819 <desc>Snapshot name.</desc>
3820 </param>
3821 <param name="description" type="wstring" dir="in">
3822 <desc>Snapshot description.</desc>
3823 </param>
3824 <param name="consoleProgress" type="IProgress" dir="in">
3825 <desc>
3826 Progress object created by the VM process tracking the
3827 snapshot's progress. This has the following sub-operations:
3828 <ul>
3829 <li>setting up (weight 1);</li>
3830 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3831 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3832 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3833 <li>finishing up (weight 1)</li>
3834 </ul>
3835 </desc>
3836 </param>
3837 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3838 <desc>
3839 Whether this is an online snapshot (i.e. the machine is running).
3840 </desc>
3841 </param>
3842 <param name="stateFilePath" type="wstring" dir="out">
3843 <desc>
3844 File path the VM process must save the execution state to.
3845 </desc>
3846 </param>
3847 </method>
3848
3849 <method name="endTakingSnapshot">
3850 <desc>
3851 Called by the VM process to inform the server that the snapshot
3852 previously requested by #beginTakingSnapshot is either
3853 successfully taken or there was a failure.
3854 </desc>
3855
3856 <param name="success" type="boolean" dir="in">
3857 <desc>@c true to indicate success and @c false otherwise</desc>
3858 </param>
3859 </method>
3860
3861 <method name="deleteSnapshot">
3862 <desc>
3863 Gets called by IConsole::deleteSnapshot.
3864 <result name="VBOX_E_INVALID_OBJECT_STATE">
3865 Snapshot has more than one child snapshot.
3866 </result>
3867 </desc>
3868 <param name="initiator" type="IConsole" dir="in">
3869 <desc>The console object that initiated this call.</desc>
3870 </param>
3871 <param name="id" type="uuid" mod="string" dir="in">
3872 <desc>UUID of the snapshot to discard.</desc>
3873 </param>
3874 <param name="machineState" type="MachineState" dir="out">
3875 <desc>New machine state after this operation is started.</desc>
3876 </param>
3877 <param name="progress" type="IProgress" dir="return">
3878 <desc>Progress object to track the operation completion.</desc>
3879 </param>
3880 </method>
3881
3882 <method name="restoreSnapshot">
3883 <desc>
3884 Gets called by IConsole::RestoreSnapshot.
3885 </desc>
3886 <param name="initiator" type="IConsole" dir="in">
3887 <desc>The console object that initiated this call.</desc>
3888 </param>
3889 <param name="snapshot" type="ISnapshot" dir="in">
3890 <desc>The snapshot to restore the VM state from.</desc>
3891 </param>
3892 <param name="machineState" type="MachineState" dir="out">
3893 <desc>New machine state after this operation is started.</desc>
3894 </param>
3895 <param name="progress" type="IProgress" dir="return">
3896 <desc>Progress object to track the operation completion.</desc>
3897 </param>
3898 </method>
3899
3900 <method name="pullGuestProperties">
3901 <desc>
3902 Get the list of the guest properties matching a set of patterns along
3903 with their values, time stamps and flags and give responsibility for
3904 managing properties to the console.
3905 </desc>
3906 <param name="name" type="wstring" dir="out" safearray="yes">
3907 <desc>
3908 The names of the properties returned.
3909 </desc>
3910 </param>
3911 <param name="value" type="wstring" dir="out" safearray="yes">
3912 <desc>
3913 The values of the properties returned. The array entries match the
3914 corresponding entries in the @a name array.
3915 </desc>
3916 </param>
3917 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3918 <desc>
3919 The time stamps of the properties returned. The array entries match
3920 the corresponding entries in the @a name array.
3921 </desc>
3922 </param>
3923 <param name="flags" type="wstring" dir="out" safearray="yes">
3924 <desc>
3925 The flags of the properties returned. The array entries match the
3926 corresponding entries in the @a name array.
3927 </desc>
3928 </param>
3929 </method>
3930
3931 <method name="pushGuestProperties">
3932 <desc>
3933 Set the list of the guest properties matching a set of patterns along
3934 with their values, time stamps and flags and return responsibility for
3935 managing properties to IMachine.
3936 </desc>
3937 <param name="name" type="wstring" dir="in" safearray="yes">
3938 <desc>
3939 The names of the properties.
3940 </desc>
3941 </param>
3942 <param name="value" type="wstring" dir="in" safearray="yes">
3943 <desc>
3944 The values of the properties. The array entries match the
3945 corresponding entries in the @a name array.
3946 </desc>
3947 </param>
3948 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3949 <desc>
3950 The time stamps of the properties. The array entries match
3951 the corresponding entries in the @a name array.
3952 </desc>
3953 </param>
3954 <param name="flags" type="wstring" dir="in" safearray="yes">
3955 <desc>
3956 The flags of the properties. The array entries match the
3957 corresponding entries in the @a name array.
3958 </desc>
3959 </param>
3960 </method>
3961 <method name="pushGuestProperty">
3962 <desc>
3963 Update a single guest property in IMachine.
3964 </desc>
3965 <param name="name" type="wstring" dir="in">
3966 <desc>
3967 The name of the property to be updated.
3968 </desc>
3969 </param>
3970 <param name="value" type="wstring" dir="in">
3971 <desc>
3972 The value of the property.
3973 </desc>
3974 </param>
3975 <param name="timestamp" type="unsigned long long" dir="in">
3976 <desc>
3977 The timestamp of the property.
3978 </desc>
3979 </param>
3980 <param name="flags" type="wstring" dir="in">
3981 <desc>
3982 The flags of the property.
3983 </desc>
3984 </param>
3985 </method>
3986
3987 <method name="lockMedia">
3988 <desc>
3989 Locks all media attached to the machine for writing and parents of
3990 attached differencing media (if any) for reading. This operation is
3991 atomic so that if it fails no media is actually locked.
3992
3993 This method is intended to be called when the machine is in Starting or
3994 Restoring state. The locked media will be automatically unlocked when
3995 the machine is powered off or crashed.
3996 </desc>
3997 </method>
3998 </interface>
3999
4000 <interface
4001 name="IBIOSSettings" extends="$unknown"
4002 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4003 wsmap="managed"
4004 >
4005 <desc>
4006 The IBIOSSettings interface represents BIOS settings of the virtual
4007 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4008 </desc>
4009 <attribute name="logoFadeIn" type="boolean">
4010 <desc>Fade in flag for BIOS logo animation.</desc>
4011 </attribute>
4012
4013 <attribute name="logoFadeOut" type="boolean">
4014 <desc>Fade out flag for BIOS logo animation.</desc>
4015 </attribute>
4016
4017 <attribute name="logoDisplayTime" type="unsigned long">
4018 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4019 </attribute>
4020
4021 <attribute name="logoImagePath" type="wstring">
4022 <desc>Local file system path for external BIOS image.</desc>
4023 </attribute>
4024
4025 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4026 <desc>Mode of the BIOS boot device menu.</desc>
4027 </attribute>
4028
4029 <attribute name="ACPIEnabled" type="boolean">
4030 <desc>ACPI support flag.</desc>
4031 </attribute>
4032
4033 <attribute name="IOAPICEnabled" type="boolean">
4034 <desc>
4035 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4036 and support IRQs above 15.
4037 </desc>
4038 </attribute>
4039
4040 <attribute name="timeOffset" type="long long">
4041 <desc>
4042 Offset in milliseconds from the host system time. This allows for
4043 guests running with a different system date/time than the host.
4044 It is equivalent to setting the system date/time in the BIOS except
4045 it is not an absolute value but a relative one. Guest Additions
4046 time synchronization honors this offset.
4047 </desc>
4048 </attribute>
4049
4050 <attribute name="PXEDebugEnabled" type="boolean">
4051 <desc>
4052 PXE debug logging flag. If set, VirtualBox will write extensive
4053 PXE trace information to the release log.
4054 </desc>
4055 </attribute>
4056
4057 </interface>
4058
4059 <interface
4060 name="IMachine" extends="$unknown"
4061 uuid="59080235-41e1-41ca-aa28-33f6992d1646"
4062 wsmap="managed"
4063 >
4064 <desc>
4065 The IMachine interface represents a virtual machine, or guest, created
4066 in VirtualBox.
4067
4068 This interface is used in two contexts. First of all, a collection of
4069 objects implementing this interface is stored in the
4070 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4071 machines that are currently registered with this VirtualBox
4072 installation. Also, once a session has been opened for the given virtual
4073 machine (e.g. the virtual machine is running), the machine object
4074 associated with the open session can be queried from the session object;
4075 see <link to="ISession"/> for details.
4076
4077 The main role of this interface is to expose the settings of the virtual
4078 machine and provide methods to change various aspects of the virtual
4079 machine's configuration. For machine objects stored in the
4080 <link to="IVirtualBox::machines"/> collection, all attributes are
4081 read-only unless explicitly stated otherwise in individual attribute
4082 and method descriptions. In order to change a machine setting, a session
4083 for this machine must be opened using one of
4084 <link to="IVirtualBox::openSession"/>,
4085 <link to="IVirtualBox::openRemoteSession"/> or
4086 <link to="IVirtualBox::openExistingSession"/> methods. After the
4087 session has been successfully opened, a mutable machine object needs to
4088 be queried from the session object and then the desired settings changes
4089 can be applied to the returned object using IMachine attributes and
4090 methods. See the <link to="ISession"/> interface description for more
4091 information about sessions.
4092
4093 Note that IMachine does not provide methods to control virtual machine
4094 execution (such as start the machine, or power it down) -- these methods
4095 are grouped in a separate interface called <link to="IConsole" />.
4096
4097 <see>ISession, IConsole</see>
4098 </desc>
4099
4100 <attribute name="parent" type="IVirtualBox" readonly="yes">
4101 <desc>Associated parent object.</desc>
4102 </attribute>
4103
4104 <attribute name="accessible" type="boolean" readonly="yes">
4105 <desc>
4106 Whether this virtual machine is currently accessible or not.
4107
4108 A machine is always deemed accessible unless it is registered <i>and</i>
4109 its settings file cannot be read or parsed (either because the file itself
4110 is unavailable or has invalid XML contents).
4111
4112 Every time this property is read, the accessibility state of
4113 this machine is re-evaluated. If the returned value is @c false,
4114 the <link to="#accessError"/> property may be used to get the
4115 detailed error information describing the reason of
4116 inaccessibility, including XML error messages.
4117
4118 When the machine is inaccessible, only the following properties
4119 can be used on it:
4120 <ul>
4121 <li><link to="#parent"/></li>
4122 <li><link to="#id"/></li>
4123 <li><link to="#settingsFilePath"/></li>
4124 <li><link to="#accessible"/></li>
4125 <li><link to="#accessError"/></li>
4126 </ul>
4127
4128 An attempt to access any other property or method will return
4129 an error.
4130
4131 The only possible action you can perform on an inaccessible
4132 machine is to unregister it using the
4133 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4134 for the accessibility state once more by querying this
4135 property).
4136
4137 <note>
4138 In the current implementation, once this property returns
4139 @c true, the machine will never become inaccessible
4140 later, even if its settings file cannot be successfully
4141 read/written any more (at least, until the VirtualBox
4142 server is restarted). This limitation may be removed in
4143 future releases.
4144 </note>
4145 </desc>
4146 </attribute>
4147
4148 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4149 <desc>
4150 Error information describing the reason of machine
4151 inaccessibility.
4152
4153 Reading this property is only valid after the last call to
4154 <link to="#accessible"/> returned @c false (i.e. the
4155 machine is currently unaccessible). Otherwise, a @c null
4156 IVirtualBoxErrorInfo object will be returned.
4157 </desc>
4158 </attribute>
4159
4160 <attribute name="name" type="wstring">
4161 <desc>
4162 Name of the virtual machine.
4163
4164 Besides being used for human-readable identification purposes
4165 everywhere in VirtualBox, the virtual machine name is also used
4166 as a name of the machine's settings file and as a name of the
4167 subdirectory this settings file resides in. Thus, every time you
4168 change the value of this property, the settings file will be
4169 renamed once you call <link to="#saveSettings"/> to confirm the
4170 change. The containing subdirectory will be also renamed, but
4171 only if it has exactly the same name as the settings file
4172 itself prior to changing this property (for backward compatibility
4173 with previous API releases). The above implies the following
4174 limitations:
4175 <ul>
4176 <li>The machine name cannot be empty.</li>
4177 <li>The machine name can contain only characters that are valid
4178 file name characters according to the rules of the file
4179 system used to store VirtualBox configuration.</li>
4180 <li>You cannot have two or more machines with the same name
4181 if they use the same subdirectory for storing the machine
4182 settings files.</li>
4183 <li>You cannot change the name of the machine if it is running,
4184 or if any file in the directory containing the settings file
4185 is being used by another running machine or by any other
4186 process in the host operating system at a time when
4187 <link to="#saveSettings"/> is called.
4188 </li>
4189 </ul>
4190 If any of the above limitations are hit, <link to="#saveSettings"/>
4191 will return an appropriate error message explaining the exact
4192 reason and the changes you made to this machine will not be
4193 saved.
4194 <note>
4195 For "legacy" machines created using the
4196 <link to="IVirtualBox::createLegacyMachine"/> call,
4197 the above naming limitations do not apply because the
4198 machine name does not affect the settings file name.
4199 The settings file name remains the same as it was specified
4200 during machine creation and never changes.
4201 </note>
4202 </desc>
4203 </attribute>
4204
4205 <attribute name="description" type="wstring">
4206 <desc>
4207 Description of the virtual machine.
4208
4209 The description attribute can contain any text and is
4210 typically used to describe the hardware and software
4211 configuration of the virtual machine in detail (i.e. network
4212 settings, versions of the installed software and so on).
4213 </desc>
4214 </attribute>
4215
4216 <attribute name="id" type="uuid" mod="string" readonly="yes">
4217 <desc>UUID of the virtual machine.</desc>
4218 </attribute>
4219
4220 <attribute name="OSTypeId" type="wstring">
4221 <desc>
4222 User-defined identifier of the Guest OS type.
4223 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4224 an IGuestOSType object representing details about the given
4225 Guest OS type.
4226 <note>
4227 This value may differ from the value returned by
4228 <link to="IGuest::OSTypeId"/> if Guest Additions are
4229 installed to the guest OS.
4230 </note>
4231 </desc>
4232 </attribute>
4233
4234 <attribute name="HardwareVersion" type="wstring">
4235 <desc>Hardware version identifier. Internal use only for now.</desc>
4236 </attribute>
4237
4238 <attribute name="hardwareUUID" type="uuid" mod="string">
4239 <desc>
4240 The UUID presented to the guest via memory tables, hardware and guest
4241 properties. For most VMs this is the same as the @a id, but for VMs
4242 which have been cloned or teleported it may be the same as the source
4243 VM. This latter is because the guest shouldn't notice that it was
4244 cloned or teleported.
4245 </desc>
4246 </attribute>
4247
4248 <attribute name="CPUCount" type="unsigned long">
4249 <desc>Number of virtual CPUs in the VM.</desc>
4250 </attribute>
4251
4252 <attribute name="memorySize" type="unsigned long">
4253 <desc>System memory size in megabytes.</desc>
4254 </attribute>
4255
4256 <attribute name="memoryBalloonSize" type="unsigned long">
4257 <desc>Initial memory balloon size in megabytes.</desc>
4258 </attribute>
4259
4260 <attribute name="statisticsUpdateInterval" type="unsigned long">
4261 <desc>Initial interval to update guest statistics in seconds.</desc>
4262 </attribute>
4263
4264 <attribute name="VRAMSize" type="unsigned long">
4265 <desc>Video memory size in megabytes.</desc>
4266 </attribute>
4267
4268 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4269 <desc>
4270 This setting determines whether VirtualBox allows this machine to make
4271 use of the 3D graphics support available on the host.</desc>
4272 </attribute>
4273
4274 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4275 <desc>
4276 This setting determines whether VirtualBox allows this machine to make
4277 use of the 2D video acceleration support available on the host.</desc>
4278 </attribute>
4279
4280 <attribute name="monitorCount" type="unsigned long">
4281 <desc>
4282 Number of virtual monitors.
4283 <note>
4284 Only effective on Windows XP and later guests with
4285 Guest Additions installed.
4286 </note>
4287 </desc>
4288 </attribute>
4289
4290 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4291 <desc>Object containing all BIOS settings.</desc>
4292 </attribute>
4293
4294 <attribute name="firmwareType" type="FirmwareType">
4295 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4296 bootstrap in this VM.</desc>
4297 </attribute>
4298
4299 <attribute name="snapshotFolder" type="wstring">
4300 <desc>
4301 Full path to the directory used to store snapshot data
4302 (differencing media and saved state files) of this machine.
4303
4304 The initial value of this property is
4305 <tt>&lt;</tt><link to="#settingsFilePath">
4306 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4307 <link to="#id">machine_uuid</link>
4308 <tt>&gt;</tt>.
4309
4310 Currently, it is an error to try to change this property on
4311 a machine that has snapshots (because this would require to
4312 move possibly large files to a different location).
4313 A separate method will be available for this purpose later.
4314
4315 <note>
4316 Setting this property to @c null or to an empty string will restore
4317 the initial value.
4318 </note>
4319 <note>
4320 When setting this property, the specified path can be
4321 absolute (full path) or relative to the directory where the
4322 <link to="#settingsFilePath">machine settings file</link>
4323 is located. When reading this property, a full path is
4324 always returned.
4325 </note>
4326 <note>
4327 The specified path may not exist, it will be created
4328 when necessary.
4329 </note>
4330 </desc>
4331 </attribute>
4332
4333 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4334 <desc>VRDP server object.</desc>
4335 </attribute>
4336
4337 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4338 <desc>Array of media attached to this machine.</desc>
4339 </attribute>
4340
4341 <attribute name="USBController" type="IUSBController" readonly="yes">
4342 <desc>
4343 Associated USB controller object.
4344
4345 <note>
4346 If USB functionality is not available in the given edition of
4347 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4348 </note>
4349 </desc>
4350 </attribute>
4351
4352 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4353 <desc>Associated audio adapter, always present.</desc>
4354 </attribute>
4355
4356 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4357 <desc>Array of storage controllers attached to this machine.</desc>
4358 </attribute>
4359
4360 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4361 <desc>
4362 Full name of the file containing machine settings data.
4363 </desc>
4364 </attribute>
4365
4366 <attribute name="settingsModified" type="boolean" readonly="yes">
4367 <desc>
4368 Whether the settings of this machine have been modified
4369 (but neither yet saved nor discarded).
4370 <note>
4371 Reading this property is only valid on instances returned
4372 by <link to="ISession::machine"/> and on new machines
4373 created by <link to="IVirtualBox::createMachine"/> or opened
4374 by <link to="IVirtualBox::openMachine"/> but not
4375 yet registered, or on unregistered machines after calling
4376 <link to="IVirtualBox::unregisterMachine"/>. For all other
4377 cases, the settings can never be modified.
4378 </note>
4379 <note>
4380 For newly created unregistered machines, the value of this
4381 property is always @c true until <link to="#saveSettings"/>
4382 is called (no matter if any machine settings have been
4383 changed after the creation or not). For opened machines
4384 the value is set to @c false (and then follows to normal rules).
4385 </note>
4386 </desc>
4387 </attribute>
4388
4389 <attribute name="sessionState" type="SessionState" readonly="yes">
4390 <desc>Current session state for this machine.</desc>
4391 </attribute>
4392
4393 <attribute name="sessionType" type="wstring" readonly="yes">
4394 <desc>
4395 Type of the session. If <link to="#sessionState"/> is
4396 SessionSpawning or SessionOpen, this attribute contains the
4397 same value as passed to the
4398 <link to="IVirtualBox::openRemoteSession"/> method in the
4399 @a type parameter. If the session was opened directly using
4400 <link to="IVirtualBox::openSession"/>, or if
4401 <link to="#sessionState"/> is SessionClosed, the value of this
4402 attribute is an empty string.
4403 </desc>
4404 </attribute>
4405
4406 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4407 <desc>
4408 Identifier of the session process. This attribute contains the
4409 platform-dependent identifier of the process that has opened a
4410 direct session for this machine using the
4411 <link to="IVirtualBox::openSession"/> call. The returned value
4412 is only valid if <link to="#sessionState"/> is SessionOpen or
4413 SessionClosing (i.e. a session is currently open or being
4414 closed) by the time this property is read.
4415 </desc>
4416 </attribute>
4417
4418 <attribute name="state" type="MachineState" readonly="yes">
4419 <desc>Current execution state of this machine.</desc>
4420 </attribute>
4421
4422 <attribute name="lastStateChange" type="long long" readonly="yes">
4423 <desc>
4424 Time stamp of the last execution state change,
4425 in milliseconds since 1970-01-01 UTC.
4426 </desc>
4427 </attribute>
4428
4429 <attribute name="stateFilePath" type="wstring" readonly="yes">
4430 <desc>
4431 Full path to the file that stores the execution state of
4432 the machine when it is in the <link to="MachineState_Saved"/> state.
4433 <note>
4434 When the machine is not in the Saved state, this attribute is
4435 an empty string.
4436 </note>
4437 </desc>
4438 </attribute>
4439
4440 <attribute name="logFolder" type="wstring" readonly="yes">
4441 <desc>
4442 Full path to the folder that stores a set of rotated log files
4443 recorded during machine execution. The most recent log file is
4444 named <tt>VBox.log</tt>, the previous log file is
4445 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4446 in the current version).
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4451 <desc>
4452 Current snapshot of this machine. This is @c null if the machine
4453 currently has no snapshots. If it is not @c null, then it was
4454 set by one of <link to="Console::takeSnapshot" />,
4455 <link to="Console::deleteSnapshot" />
4456 or <link to="Console::restoreSnapshot" />, depending on which
4457 was called last. See <link to="ISnapshot"/> for details.
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4462 <desc>
4463 Number of snapshots taken on this machine. Zero means the
4464 machine doesn't have any snapshots.
4465 </desc>
4466 </attribute>
4467
4468 <attribute name="currentStateModified" type="boolean" readonly="yes">
4469 <desc>
4470 Returns @c true if the current state of the machine is not
4471 identical to the state stored in the current snapshot.
4472
4473 The current state is identical to the current snapshot only
4474 directly after one of the following calls are made:
4475
4476 <ul>
4477 <li><link to="IConsole::restoreSnapshot"/>
4478 </li>
4479 <li><link to="IConsole::takeSnapshot"/> (issued on a
4480 "powered off" or "saved" machine, for which
4481 <link to="#settingsModified"/> returns @c false)
4482 </li>
4483 <li><link to="IMachine::setCurrentSnapshot"/>
4484 </li>
4485 </ul>
4486
4487 The current state remains identical until one of the following
4488 happens:
4489 <ul>
4490 <li>settings of the machine are changed</li>
4491 <li>the saved state is discarded</li>
4492 <li>the current snapshot is discarded</li>
4493 <li>an attempt to execute the machine is made</li>
4494 </ul>
4495
4496 <note>
4497 For machines that don't have snapshots, this property is
4498 always @c false.
4499 </note>
4500 </desc>
4501 </attribute>
4502
4503 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4504 <desc>
4505 Collection of shared folders for this machine (permanent shared
4506 folders). These folders are shared automatically at machine startup
4507 and available only to the guest OS installed within this machine.
4508
4509 New shared folders are added to the collection using
4510 <link to="#createSharedFolder"/>. Existing shared folders can be
4511 removed using <link to="#removeSharedFolder"/>.
4512 </desc>
4513 </attribute>
4514
4515 <attribute name="clipboardMode" type="ClipboardMode">
4516 <desc>
4517 Synchronization mode between the host OS clipboard
4518 and the guest OS clipboard.
4519 </desc>
4520 </attribute>
4521
4522 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4523 <desc>
4524 A comma-separated list of simple glob patterns. Changes to guest
4525 properties whose name matches one of the patterns will generate an
4526 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4527 </desc>
4528 </attribute>
4529
4530 <attribute name="teleporterEnabled" type="boolean">
4531 <desc>
4532 When set to @a true, the virtual machine becomes a target teleporter
4533 the next time it is powered on. This can only set to @a true when the
4534 VM is in the @a PoweredOff or @a Aborted state.
4535
4536 This property is automatically set to @a false when the VM is powered
4537 on.
4538 </desc>
4539 </attribute>
4540
4541 <attribute name="teleporterPort" type="unsigned long">
4542 <desc>
4543 The TCP port the target teleporter will listen for incoming
4544 teleportations on.
4545
4546 0 means the port is automatically selected upon power on. The actual
4547 value can be read from this property while the machine is waiting for
4548 incoming teleportations.
4549 </desc>
4550 </attribute>
4551
4552 <attribute name="teleporterAddress" type="wstring">
4553 <desc>
4554 The address the target teleporter will listen on. If set to an empty
4555 string, it will listen on all addresses.
4556 </desc>
4557 </attribute>
4558
4559 <attribute name="teleporterPassword" type="wstring">
4560 <desc>
4561 The password the to check for on the target teleporter. This is just a
4562 very basic measure to prevent simple hacks and operators accidentally
4563 beaming a virtual machine to the wrong place.
4564 </desc>
4565 </attribute>
4566
4567 <method name="setBootOrder">
4568 <desc>
4569 Puts the given device to the specified position in
4570 the boot order.
4571
4572 To indicate that no device is associated with the given position,
4573 <link to="DeviceType_Null"/> should be used.
4574
4575 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4576
4577 <result name="E_INVALIDARG">
4578 Boot @a position out of range.
4579 </result>
4580 <result name="E_NOTIMPL">
4581 Booting from USB @a device currently not supported.
4582 </result>
4583
4584 </desc>
4585 <param name="position" type="unsigned long" dir="in">
4586 <desc>
4587 Position in the boot order (@c 1 to the total number of
4588 devices the machine can boot from, as returned by
4589 <link to="ISystemProperties::maxBootPosition"/>).
4590 </desc>
4591 </param>
4592 <param name="device" type="DeviceType" dir="in">
4593 <desc>
4594 The type of the device used to boot at the given position.
4595 </desc>
4596 </param>
4597 </method>
4598
4599 <method name="getBootOrder" const="yes">
4600 <desc>
4601 Returns the device type that occupies the specified
4602 position in the boot order.
4603
4604 @todo [remove?]
4605 If the machine can have more than one device of the returned type
4606 (such as hard disks), then a separate method should be used to
4607 retrieve the individual device that occupies the given position.
4608
4609 If here are no devices at the given position, then
4610 <link to="DeviceType_Null"/> is returned.
4611
4612 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4613
4614 <result name="E_INVALIDARG">
4615 Boot @a position out of range.
4616 </result>
4617
4618 </desc>
4619 <param name="position" type="unsigned long" dir="in">
4620 <desc>
4621 Position in the boot order (@c 1 to the total number of
4622 devices the machine can boot from, as returned by
4623 <link to="ISystemProperties::maxBootPosition"/>).
4624 </desc>
4625 </param>
4626 <param name="device" type="DeviceType" dir="return">
4627 <desc>
4628 Device at the given position.
4629 </desc>
4630 </param>
4631 </method>
4632
4633 <method name="attachDevice">
4634 <desc>
4635 Attaches a device and optionally mounts a medium to the given storage
4636 controller (<link to="IStorageController" />, identified by @a name),
4637 at the indicated port and device.
4638
4639 This method is intended for managing storage devices in general (it works
4640 for both fixed and removable media). For storage devices supporting removable
4641 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4642 for changing the media while the machine is running.
4643
4644 For the IDE bus, the @a controllerPort parameter can be either
4645 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4646 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4647 to specify the master or the slave device, respectively. (In the
4648 default configuration of virtual machines, the secondary master is
4649 used for a CD/DVD drive.)
4650
4651 For an SATA controller, @a controllerPort must be a number ranging
4652 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4653 be a number ranging from @c 0 to @c 15.
4654
4655 For both SCSI and SATA, the @a device parameter is unused and must
4656 be @c 0.
4657
4658 For fixed media such as hard disks, the given medium identifier cannot
4659 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4660 and floppies.
4661
4662 After calling this returns successfully, a new instance of
4663 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4664 attachments (<link to="IMachine::mediumAttachments"/>).
4665
4666 The specified device slot must not have a device attached to it,
4667 or this method will fail.
4668
4669 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4670 information about attaching media.
4671
4672 <note>
4673 You cannot attach a device to a running machine. Also, you cannot
4674 attach a device to a newly created machine until this machine's
4675 settings are saved to disk using <link to="#saveSettings"/>.
4676 </note>
4677 <note>
4678 If the medium is being attached indirectly, a new differencing medium
4679 will implicitly be created for it and attached instead. If the
4680 changes made to the machine settings (including this indirect
4681 attachment) are later cancelled using <link to="#discardSettings"/>,
4682 this implicitly created differencing medium will implicitly
4683 be deleted.
4684 </note>
4685
4686 <result name="E_INVALIDARG">
4687 SATA device, SATA port, IDE port or IDE slot out of range.
4688 </result>
4689 <result name="VBOX_E_INVALID_OBJECT_STATE">
4690 Attempt to attach medium to an unregistered virtual machine.
4691 </result>
4692 <result name="VBOX_E_INVALID_VM_STATE">
4693 Invalid machine state.
4694 </result>
4695 <result name="VBOX_E_OBJECT_IN_USE">
4696 Hard disk already attached to this or another virtual machine.
4697 </result>
4698
4699 </desc>
4700 <param name="name" type="wstring" dir="in">
4701 <desc>Name of the storage controller to attach the device to.</desc>
4702 </param>
4703 <param name="controllerPort" type="long" dir="in">
4704 <desc>Port to attach the device to.</desc>
4705 </param>
4706 <param name="device" type="long" dir="in">
4707 <desc>Device slot in the given port to attach the device to.</desc>
4708 </param>
4709 <param name="type" type="DeviceType" dir="in">
4710 <desc>Device type of the attached device.</desc>
4711 </param>
4712 <param name="id" type="uuid" mod="string" dir="in">
4713 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4714 medium.</desc>
4715 </param>
4716 </method>
4717
4718 <method name="detachDevice">
4719 <desc>
4720 Detaches the device attached to a device slot of the specified bus.
4721
4722 Detaching the device from the virtual machine is deferred. This means
4723 that the medium remains associated with the machine when this method
4724 returns and gets actually de-associated only after a successful
4725 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4726 for more detailed information about attaching media.
4727
4728 <note>
4729 You cannot detach a device from a running machine.
4730 </note>
4731 <note>
4732 Detaching differencing media implicitly created by <link
4733 to="#attachDevice"/> for the indirect attachment using this
4734 method will <b>not</b> implicitly delete them. The
4735 <link to="IMedium::deleteStorage"/> operation should be
4736 explicitly performed by the caller after the medium is successfully
4737 detached and the settings are saved with
4738 <link to="#saveSettings"/>, if it is the desired action.
4739 </note>
4740
4741 <result name="VBOX_E_INVALID_VM_STATE">
4742 Attempt to detach medium from a running virtual machine.
4743 </result>
4744 <result name="VBOX_E_OBJECT_NOT_FOUND">
4745 No medium attached to given slot/bus.
4746 </result>
4747 <result name="VBOX_E_NOT_SUPPORTED">
4748 Medium format does not support storage deletion.
4749 </result>
4750
4751 </desc>
4752 <param name="name" type="wstring" dir="in">
4753 <desc>Name of the storage controller to detach the medium from.</desc>
4754 </param>
4755 <param name="controllerPort" type="long" dir="in">
4756 <desc>Port number to detach the medium from.</desc>
4757 </param>
4758 <param name="device" type="long" dir="in">
4759 <desc>Device slot number to detach the medium from.</desc>
4760 </param>
4761 </method>
4762
4763 <method name="passthroughDevice">
4764 <desc>
4765 Sets the passthrough mode of an existing DVD device. Changing the
4766 setting while the VM is running is forbidden. The setting is only used
4767 if at VM start the device is configured as a host DVD drive, in all
4768 other cases it is ignored. The device must already exist; see
4769 <link to="IMachine::attachDevice"/> for how to attach a new device.
4770
4771 The @a controllerPort and @a device parameters specify the device slot and
4772 have have the same meaning as with <link to="IMachine::attachDevice" />.
4773
4774 <result name="E_INVALIDARG">
4775 SATA device, SATA port, IDE port or IDE slot out of range.
4776 </result>
4777 <result name="VBOX_E_INVALID_OBJECT_STATE">
4778 Attempt to modify an unregistered virtual machine.
4779 </result>
4780 <result name="VBOX_E_INVALID_VM_STATE">
4781 Invalid machine state.
4782 </result>
4783
4784 </desc>
4785 <param name="name" type="wstring" dir="in">
4786 <desc>Name of the storage controller.</desc>
4787 </param>
4788 <param name="controllerPort" type="long" dir="in">
4789 <desc>Storage controller port.</desc>
4790 </param>
4791 <param name="device" type="long" dir="in">
4792 <desc>Device slot in the given port.</desc>
4793 </param>
4794 <param name="passthrough" type="boolean" dir="in">
4795 <desc>New value for the passthrough setting.</desc>
4796 </param>
4797 </method>
4798
4799 <method name="mountMedium">
4800 <desc>
4801 Mounts a medium (<link to="IMedium" />, identified
4802 by the given UUID @a id) to the given storage controller
4803 (<link to="IStorageController" />, identified by @a name),
4804 at the indicated port and device. The device must already exist;
4805 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4806
4807 This method is intended only for managing removable media, where the
4808 device is fixed but media is changeable at runtime (such as DVDs
4809 and floppies). It cannot be used for fixed media such as hard disks.
4810
4811 The @a controllerPort and @a device parameters specify the device slot and
4812 have have the same meaning as with <link to="IMachine::attachDevice" />.
4813
4814 The specified device slot can have a medium mounted, which will be
4815 unmounted first. Specifying a zero UUID (or an empty string) for
4816 @a medium does just an unmount.
4817
4818 See <link to="IMedium"/> for more detailed information about
4819 attaching media.
4820
4821 <result name="E_INVALIDARG">
4822 SATA device, SATA port, IDE port or IDE slot out of range.
4823 </result>
4824 <result name="VBOX_E_INVALID_OBJECT_STATE">
4825 Attempt to attach medium to an unregistered virtual machine.
4826 </result>
4827 <result name="VBOX_E_INVALID_VM_STATE">
4828 Invalid machine state.
4829 </result>
4830 <result name="VBOX_E_OBJECT_IN_USE">
4831 Medium already attached to this or another virtual machine.
4832 </result>
4833
4834 </desc>
4835 <param name="name" type="wstring" dir="in">
4836 <desc>Name of the storage controller to attach the medium to.</desc>
4837 </param>
4838 <param name="controllerPort" type="long" dir="in">
4839 <desc>Port to attach the medium to.</desc>
4840 </param>
4841 <param name="device" type="long" dir="in">
4842 <desc>Device slot in the given port to attach the medium to.</desc>
4843 </param>
4844 <param name="medium" type="uuid" mod="string" dir="in">
4845 <desc>UUID of the medium to attach. A zero UUID means unmount the
4846 currently mounted medium.</desc>
4847 </param>
4848 </method>
4849
4850 <method name="getMedium" const="yes">
4851 <desc>
4852 Returns the virtual medium attached to a device slot of the specified
4853 bus.
4854
4855 Note that if the medium was indirectly attached by
4856 <link to="#mountMedium"/> to the given device slot then this
4857 method will return not the same object as passed to the
4858 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4859 more detailed information about mounting a medium.
4860
4861 <result name="VBOX_E_OBJECT_NOT_FOUND">
4862 No medium attached to given slot/bus.
4863 </result>
4864
4865 </desc>
4866 <param name="name" type="wstring" dir="in">
4867 <desc>Name of the storage controller the medium is attached to.</desc>
4868 </param>
4869 <param name="controllerPort" type="long" dir="in">
4870 <desc>Port to query.</desc>
4871 </param>
4872 <param name="device" type="long" dir="in">
4873 <desc>Device slot in the given port to query.</desc>
4874 </param>
4875 <param name="medium" type="IMedium" dir="return">
4876 <desc>Attached medium object.</desc>
4877 </param>
4878 </method>
4879
4880 <method name="getMediumAttachmentsOfController" const="yes">
4881 <desc>
4882 Returns an array of medium attachments which are attached to the
4883 the controller with the given name.
4884
4885 <result name="VBOX_E_OBJECT_NOT_FOUND">
4886 A storage controller with given name doesn't exist.
4887 </result>
4888 </desc>
4889 <param name="name" type="wstring" dir="in"/>
4890 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4891 </method>
4892
4893 <method name="getMediumAttachment" const="yes">
4894 <desc>
4895 Returns a medium attachment which corresponds to the controller with
4896 the given name, on the given port and device slot.
4897
4898 <result name="VBOX_E_OBJECT_NOT_FOUND">
4899 No attachment exists for the given controller/port/device combination.
4900 </result>
4901 </desc>
4902 <param name="name" type="wstring" dir="in"/>
4903 <param name="controllerPort" type="long" dir="in"/>
4904 <param name="device" type="long" dir="in"/>
4905 <param name="attachment" type="IMediumAttachment" dir="return"/>
4906 </method>
4907
4908 <method name="getNetworkAdapter" const="yes">
4909 <desc>
4910 Returns the network adapter associated with the given slot.
4911 Slots are numbered sequentially, starting with zero. The total
4912 number of adapters per machine is defined by the
4913 <link to="ISystemProperties::networkAdapterCount"/> property,
4914 so the maximum slot number is one less than that property's value.
4915
4916 <result name="E_INVALIDARG">
4917 Invalid @a slot number.
4918 </result>
4919
4920 </desc>
4921 <param name="slot" type="unsigned long" dir="in"/>
4922 <param name="adapter" type="INetworkAdapter" dir="return"/>
4923 </method>
4924
4925 <method name="addStorageController">
4926 <desc>
4927 Adds a new storage controller (SCSI or SATA controller) to the
4928 machine and returns it as an instance of
4929 <link to="IStorageController" />.
4930
4931 @a name identifies the controller for subsequent calls such as
4932 <link to="#getStorageControllerByName" />,
4933 <link to="#getStorageControllerByInstance" />,
4934 <link to="#removeStorageController" />,
4935 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4936
4937 After the controller has been added, you can set its exact
4938 type by setting the <link to="IStorageController::controllerType" />.
4939
4940 <result name="VBOX_E_OBJECT_IN_USE">
4941 A storage controller with given name exists already.
4942 </result>
4943 <result name="E_INVALIDARG">
4944 Invalid @a controllerType.
4945 </result>
4946 </desc>
4947 <param name="name" type="wstring" dir="in"/>
4948 <param name="connectionType" type="StorageBus" dir="in"/>
4949 <param name="controller" type="IStorageController" dir="return"/>
4950 </method>
4951
4952 <method name="getStorageControllerByName" const="yes">
4953 <desc>
4954 Returns a storage controller with the given name.
4955
4956 <result name="VBOX_E_OBJECT_NOT_FOUND">
4957 A storage controller with given name doesn't exist.
4958 </result>
4959 </desc>
4960 <param name="name" type="wstring" dir="in"/>
4961 <param name="storageController" type="IStorageController" dir="return"/>
4962 </method>
4963
4964 <method name="getStorageControllerByInstance" const="yes">
4965 <desc>
4966 Returns a storage controller with the given instance number.
4967
4968 <result name="VBOX_E_OBJECT_NOT_FOUND">
4969 A storage controller with given instance number doesn't exist.
4970 </result>
4971 </desc>
4972 <param name="instance" type="unsigned long" dir="in"/>
4973 <param name="storageController" type="IStorageController" dir="return"/>
4974 </method>
4975
4976 <method name="removeStorageController">
4977 <desc>
4978 Removes a storage controller from the machine.
4979
4980 <result name="VBOX_E_OBJECT_NOT_FOUND">
4981 A storage controller with given name doesn't exist.
4982 </result>
4983 </desc>
4984 <param name="name" type="wstring" dir="in"/>
4985 </method>
4986
4987 <method name="getSerialPort" const="yes">
4988 <desc>
4989 Returns the serial port associated with the given slot.
4990 Slots are numbered sequentially, starting with zero. The total
4991 number of serial ports per machine is defined by the
4992 <link to="ISystemProperties::serialPortCount"/> property,
4993 so the maximum slot number is one less than that property's value.
4994
4995 <result name="E_INVALIDARG">
4996 Invalid @a slot number.
4997 </result>
4998
4999 </desc>
5000 <param name="slot" type="unsigned long" dir="in"/>
5001 <param name="port" type="ISerialPort" dir="return"/>
5002 </method>
5003
5004 <method name="getParallelPort" const="yes">
5005 <desc>
5006 Returns the parallel port associated with the given slot.
5007 Slots are numbered sequentially, starting with zero. The total
5008 number of parallel ports per machine is defined by the
5009 <link to="ISystemProperties::parallelPortCount"/> property,
5010 so the maximum slot number is one less than that property's value.
5011
5012 <result name="E_INVALIDARG">
5013 Invalid @a slot number.
5014 </result>
5015
5016 </desc>
5017 <param name="slot" type="unsigned long" dir="in"/>
5018 <param name="port" type="IParallelPort" dir="return"/>
5019 </method>
5020
5021 <method name="getExtraDataKeys">
5022 <desc>
5023 Returns an array representing the machine-specific extra data keys
5024 which currently have values defined.
5025 </desc>
5026 <param name="value" type="wstring" dir="return" safearray="yes">
5027 <desc>Array of extra data keys.</desc>
5028 </param>
5029 </method>
5030
5031 <method name="getExtraData">
5032 <desc>
5033 Returns associated machine-specific extra data.
5034
5035 If the requested data @a key does not exist, this function will
5036 succeed and return an empty string in the @a value argument.
5037
5038 <result name="VBOX_E_FILE_ERROR">
5039 Settings file not accessible.
5040 </result>
5041 <result name="VBOX_E_XML_ERROR">
5042 Could not parse the settings file.
5043 </result>
5044
5045 </desc>
5046 <param name="key" type="wstring" dir="in">
5047 <desc>Name of the data key to get.</desc>
5048 </param>
5049 <param name="value" type="wstring" dir="return">
5050 <desc>Value of the requested data key.</desc>
5051 </param>
5052 </method>
5053
5054 <method name="setExtraData">
5055 <desc>
5056 Sets associated machine-specific extra data.
5057
5058 If you pass @c null or an empty string as a key @a value, the given
5059 @a key will be deleted.
5060
5061 <note>
5062 Before performing the actual data change, this method will ask all
5063 registered callbacks using the
5064 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5065 notification for a permission. If one of the callbacks refuses the
5066 new value, the change will not be performed.
5067 </note>
5068 <note>
5069 On success, the
5070 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5071 is called to inform all registered callbacks about a successful data
5072 change.
5073 </note>
5074 <note>
5075 This method can be called outside the machine session and therefore
5076 it's a caller's responsibility to handle possible race conditions
5077 when several clients change the same key at the same time.
5078 </note>
5079
5080 <result name="VBOX_E_FILE_ERROR">
5081 Settings file not accessible.
5082 </result>
5083 <result name="VBOX_E_XML_ERROR">
5084 Could not parse the settings file.
5085 </result>
5086
5087 </desc>
5088 <param name="key" type="wstring" dir="in">
5089 <desc>Name of the data key to set.</desc>
5090 </param>
5091 <param name="value" type="wstring" dir="in">
5092 <desc>Value to assign to the key.</desc>
5093 </param>
5094 </method>
5095
5096 <method name="getCpuProperty" const="yes">
5097 <desc>
5098 Returns the virtual CPU boolean value of the specified property.
5099
5100 <result name="E_INVALIDARG">
5101 Invalid property.
5102 </result>
5103
5104 </desc>
5105 <param name="property" type="CpuPropertyType" dir="in">
5106 <desc>
5107 Property type to query.
5108 </desc>
5109 </param>
5110 <param name="value" type="boolean" dir="return">
5111 <desc>
5112 Property value.
5113 </desc>
5114 </param>
5115 </method>
5116
5117 <method name="setCpuProperty">
5118 <desc>
5119 Sets the virtual CPU boolean value of the specified property.
5120
5121 <result name="E_INVALIDARG">
5122 Invalid property.
5123 </result>
5124
5125 </desc>
5126 <param name="property" type="CpuPropertyType" dir="in">
5127 <desc>
5128 Property type to query.
5129 </desc>
5130 </param>
5131 <param name="value" type="boolean" dir="in">
5132 <desc>
5133 Property value.
5134 </desc>
5135 </param>
5136 </method>
5137
5138 <method name="getHWVirtExProperty" const="yes">
5139 <desc>
5140 Returns the HWVirtEx boolean value of the specified property.
5141
5142 <result name="E_INVALIDARG">
5143 Invalid property.
5144 </result>
5145
5146 </desc>
5147 <param name="property" type="HWVirtExPropertyType" dir="in">
5148 <desc>
5149 Property type to query.
5150 </desc>
5151 </param>
5152 <param name="value" type="boolean" dir="return">
5153 <desc>
5154 Property value.
5155 </desc>
5156 </param>
5157 </method>
5158
5159 <method name="setHWVirtExProperty">
5160 <desc>
5161 Sets the HWVirtEx boolean value of the specified property.
5162
5163 <result name="E_INVALIDARG">
5164 Invalid property.
5165 </result>
5166
5167 </desc>
5168 <param name="property" type="HWVirtExPropertyType" dir="in">
5169 <desc>
5170 Property type to query.
5171 </desc>
5172 </param>
5173 <param name="value" type="boolean" dir="in">
5174 <desc>
5175 Property value.
5176 </desc>
5177 </param>
5178 </method>
5179
5180 <method name="saveSettings">
5181 <desc>
5182 Saves any changes to machine settings made since the session
5183 has been opened or a new machine has been created, or since the
5184 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5185 For registered machines, new settings become visible to all
5186 other VirtualBox clients after successful invocation of this
5187 method.
5188 <note>
5189 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5190 notification event after the configuration has been successfully
5191 saved (only for registered machines).
5192 </note>
5193 <note>
5194 Calling this method is only valid on instances returned
5195 by <link to="ISession::machine"/> and on new machines
5196 created by <link to="IVirtualBox::createMachine"/> but not
5197 yet registered, or on unregistered machines after calling
5198 <link to="IVirtualBox::unregisterMachine"/>.
5199 </note>
5200
5201 <result name="VBOX_E_FILE_ERROR">
5202 Settings file not accessible.
5203 </result>
5204 <result name="VBOX_E_XML_ERROR">
5205 Could not parse the settings file.
5206 </result>
5207 <result name="E_ACCESSDENIED">
5208 Modification request refused.
5209 </result>
5210
5211 </desc>
5212 </method>
5213
5214 <method name="discardSettings">
5215 <desc>
5216 Discards any changes to the machine settings made since the session
5217 has been opened or since the last call to <link to="#saveSettings"/>
5218 or <link to="#discardSettings"/>.
5219 <note>
5220 Calling this method is only valid on instances returned
5221 by <link to="ISession::machine"/> and on new machines
5222 created by <link to="IVirtualBox::createMachine"/> or
5223 opened by <link to="IVirtualBox::openMachine"/> but not
5224 yet registered, or on unregistered machines after calling
5225 <link to="IVirtualBox::unregisterMachine"/>.
5226 </note>
5227
5228 <result name="VBOX_E_INVALID_VM_STATE">
5229 Virtual machine is not mutable.
5230 </result>
5231
5232 </desc>
5233 </method>
5234
5235 <method name="deleteSettings">
5236 <desc>
5237 Deletes the settings file of this machine from disk.
5238 The machine must not be registered in order for this operation
5239 to succeed.
5240 <note>
5241 <link to="#settingsModified"/> will return @c true after this
5242 method successfully returns.
5243 </note>
5244 <note>
5245 Calling this method is only valid on instances returned
5246 by <link to="ISession::machine"/> and on new machines
5247 created by <link to="IVirtualBox::createMachine"/> or
5248 opened by <link to="IVirtualBox::openMachine"/> but not
5249 yet registered, or on unregistered machines after calling
5250 <link to="IVirtualBox::unregisterMachine"/>.
5251 </note>
5252 <note>
5253 The deleted machine settings file can be restored (saved again)
5254 by calling <link to="#saveSettings"/>.
5255 </note>
5256
5257 <result name="VBOX_E_INVALID_VM_STATE">
5258 Cannot delete settings of a registered machine or
5259 machine not mutable.
5260 </result>
5261 <result name="VBOX_E_IPRT_ERROR">
5262 Could not delete the settings file.
5263 </result>
5264
5265 </desc>
5266 </method>
5267
5268 <method name="export">
5269 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5270 steps required to export VirtualBox machines to OVF.
5271 </desc>
5272
5273 <param name="aAppliance" type="IAppliance" dir="in">
5274 <desc>Appliance to export this machine to.</desc>
5275 </param>
5276 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5277 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5278 </param>
5279 </method >
5280
5281 <method name="getSnapshot">
5282 <desc>
5283 Returns a snapshot of this machine with the given UUID.
5284 A @c null UUID can be used to obtain the first snapshot
5285 taken on this machine. This is useful if you want to traverse
5286 the whole tree of snapshots starting from the root.
5287
5288 <result name="VBOX_E_OBJECT_NOT_FOUND">
5289 Virtual machine has no snapshots or snapshot not found.
5290 </result>
5291
5292 </desc>
5293 <param name="id" type="uuid" mod="string" dir="in">
5294 <desc>UUID of the snapshot to get</desc>
5295 </param>
5296 <param name="snapshot" type="ISnapshot" dir="return">
5297 <desc>Snapshot object with the given UUID.</desc>
5298 </param>
5299 </method>
5300
5301 <method name="findSnapshot">
5302 <desc>
5303 Returns a snapshot of this machine with the given name.
5304
5305 <result name="VBOX_E_OBJECT_NOT_FOUND">
5306 Virtual machine has no snapshots or snapshot not found.
5307 </result>
5308
5309 </desc>
5310 <param name="name" type="wstring" dir="in">
5311 <desc>Name of the snapshot to find</desc>
5312 </param>
5313 <param name="snapshot" type="ISnapshot" dir="return">
5314 <desc>Snapshot object with the given name.</desc>
5315 </param>
5316 </method>
5317
5318 <method name="setCurrentSnapshot">
5319 <desc>
5320 Sets the current snapshot of this machine.
5321 <note>
5322 In the current implementation, this operation is not
5323 implemented.
5324 </note>
5325 </desc>
5326 <param name="id" type="uuid" mod="string" dir="in">
5327 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5328 </param>
5329 </method>
5330
5331 <method name="createSharedFolder">
5332 <desc>
5333 Creates a new permanent shared folder by associating the given logical
5334 name with the given host path, adds it to the collection of shared
5335 folders and starts sharing it. Refer to the description of
5336 <link to="ISharedFolder"/> to read more about logical names.
5337
5338 <result name="VBOX_E_OBJECT_IN_USE">
5339 Shared folder already exists.
5340 </result>
5341 <result name="VBOX_E_FILE_ERROR">
5342 Shared folder @a hostPath not accessible.
5343 </result>
5344
5345 </desc>
5346 <param name="name" type="wstring" dir="in">
5347 <desc>Unique logical name of the shared folder.</desc>
5348 </param>
5349 <param name="hostPath" type="wstring" dir="in">
5350 <desc>Full path to the shared folder in the host file system.</desc>
5351 </param>
5352 <param name="writable" type="boolean" dir="in">
5353 <desc>Whether the share is writable or readonly</desc>
5354 </param>
5355 </method>
5356
5357 <method name="removeSharedFolder">
5358 <desc>
5359 Removes the permanent shared folder with the given name previously
5360 created by <link to="#createSharedFolder"/> from the collection of
5361 shared folders and stops sharing it.
5362
5363 <result name="VBOX_E_INVALID_VM_STATE">
5364 Virtual machine is not mutable.
5365 </result>
5366 <result name="VBOX_E_OBJECT_NOT_FOUND">
5367 Shared folder @a name does not exist.
5368 </result>
5369
5370 </desc>
5371 <param name="name" type="wstring" dir="in">
5372 <desc>Logical name of the shared folder to remove.</desc>
5373 </param>
5374 </method>
5375
5376 <method name="canShowConsoleWindow">
5377 <desc>
5378 Returns @c true if the VM console process can activate the
5379 console window and bring it to foreground on the desktop of
5380 the host PC.
5381 <note>
5382 This method will fail if a session for this machine is not
5383 currently open.
5384 </note>
5385
5386 <result name="VBOX_E_INVALID_VM_STATE">
5387 Machine session is not open.
5388 </result>
5389
5390 </desc>
5391 <param name="canShow" type="boolean" dir="return">
5392 <desc>
5393 @c true if the console window can be shown and @c false otherwise.
5394 </desc>
5395 </param>
5396 </method>
5397
5398 <method name="showConsoleWindow">
5399 <desc>
5400 Activates the console window and brings it to foreground on
5401 the desktop of the host PC. Many modern window managers on
5402 many platforms implement some sort of focus stealing
5403 prevention logic, so that it may be impossible to activate
5404 a window without the help of the currently active
5405 application. In this case, this method will return a non-zero
5406 identifier that represents the top-level window of the VM
5407 console process. The caller, if it represents a currently
5408 active process, is responsible to use this identifier (in a
5409 platform-dependent manner) to perform actual window
5410 activation.
5411 <note>
5412 This method will fail if a session for this machine is not
5413 currently open.
5414 </note>
5415
5416 <result name="VBOX_E_INVALID_VM_STATE">
5417 Machine session is not open.
5418 </result>
5419
5420 </desc>
5421 <param name="winId" type="unsigned long long" dir="return">
5422 <desc>
5423 Platform-dependent identifier of the top-level VM console
5424 window, or zero if this method has performed all actions
5425 necessary to implement the <i>show window</i> semantics for
5426 the given platform and/or VirtualBox front-end.
5427 </desc>
5428 </param>
5429 </method>
5430
5431 <method name="getGuestProperty">
5432 <desc>
5433 Reads an entry from the machine's guest property store.
5434
5435 <result name="VBOX_E_INVALID_VM_STATE">
5436 Machine session is not open.
5437 </result>
5438
5439 </desc>
5440 <param name="name" type="wstring" dir="in">
5441 <desc>
5442 The name of the property to read.
5443 </desc>
5444 </param>
5445 <param name="value" type="wstring" dir="out">
5446 <desc>
5447 The value of the property. If the property does not exist then this
5448 will be empty.
5449 </desc>
5450 </param>
5451 <param name="timestamp" type="unsigned long long" dir="out">
5452 <desc>
5453 The time at which the property was last modified, as seen by the
5454 server process.
5455 </desc>
5456 </param>
5457 <param name="flags" type="wstring" dir="out">
5458 <desc>
5459 Additional property parameters, passed as a comma-separated list of
5460 "name=value" type entries.
5461 </desc>
5462 </param>
5463 </method>
5464
5465 <method name="getGuestPropertyValue">
5466 <desc>
5467 Reads a value from the machine's guest property store.
5468
5469 <result name="VBOX_E_INVALID_VM_STATE">
5470 Machine session is not open.
5471 </result>
5472
5473 </desc>
5474 <param name="property" type="wstring" dir="in">
5475 <desc>
5476 The name of the property to read.
5477 </desc>
5478 </param>
5479 <param name="value" type="wstring" dir="return">
5480 <desc>
5481 The value of the property. If the property does not exist then this
5482 will be empty.
5483 </desc>
5484 </param>
5485 </method>
5486
5487 <method name="getGuestPropertyTimestamp">
5488 <desc>
5489 Reads a property timestamp from the machine's guest property store.
5490
5491 <result name="VBOX_E_INVALID_VM_STATE">
5492 Machine session is not open.
5493 </result>
5494
5495 </desc>
5496 <param name="property" type="wstring" dir="in">
5497 <desc>
5498 The name of the property to read.
5499 </desc>
5500 </param>
5501 <param name="value" type="unsigned long long" dir="return">
5502 <desc>
5503 The timestamp. If the property does not exist then this will be
5504 empty.
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="setGuestProperty">
5510 <desc>
5511 Sets, changes or deletes an entry in the machine's guest property
5512 store.
5513
5514 <result name="E_ACCESSDENIED">
5515 Property cannot be changed.
5516 </result>
5517 <result name="E_INVALIDARG">
5518 Invalid @a flags.
5519 </result>
5520 <result name="VBOX_E_INVALID_VM_STATE">
5521 Virtual machine is not mutable or session not open.
5522 </result>
5523 <result name="VBOX_E_INVALID_OBJECT_STATE">
5524 Cannot set transient property when machine not running.
5525 </result>
5526
5527 </desc>
5528 <param name="property" type="wstring" dir="in">
5529 <desc>
5530 The name of the property to set, change or delete.
5531 </desc>
5532 </param>
5533 <param name="value" type="wstring" dir="in">
5534 <desc>
5535 The new value of the property to set, change or delete. If the
5536 property does not yet exist and value is non-empty, it will be
5537 created. If the value is @c null or empty, the property will be
5538 deleted if it exists.
5539 </desc>
5540 </param>
5541 <param name="flags" type="wstring" dir="in">
5542 <desc>
5543 Additional property parameters, passed as a comma-separated list of
5544 "name=value" type entries.
5545 </desc>
5546 </param>
5547 </method>
5548
5549 <method name="setGuestPropertyValue">
5550 <desc>
5551 Sets, changes or deletes a value in the machine's guest property
5552 store. The flags field will be left unchanged or created empty for a
5553 new property.
5554
5555 <result name="E_ACCESSDENIED">
5556 Property cannot be changed.
5557 </result>
5558 <result name="VBOX_E_INVALID_VM_STATE">
5559 Virtual machine is not mutable or session not open.
5560 </result>
5561 <result name="VBOX_E_INVALID_OBJECT_STATE">
5562 Cannot set transient property when machine not running.
5563 </result>
5564 </desc>
5565
5566 <param name="property" type="wstring" dir="in">
5567 <desc>
5568 The name of the property to set, change or delete.
5569 </desc>
5570 </param>
5571 <param name="value" type="wstring" dir="in">
5572 <desc>
5573 The new value of the property to set, change or delete. If the
5574 property does not yet exist and value is non-empty, it will be
5575 created. If the value is @c null or empty, the property will be
5576 deleted if it exists.
5577 </desc>
5578 </param>
5579 </method>
5580
5581 <method name="enumerateGuestProperties">
5582 <desc>
5583 Return a list of the guest properties matching a set of patterns along
5584 with their values, time stamps and flags.
5585 </desc>
5586 <param name="patterns" type="wstring" dir="in">
5587 <desc>
5588 The patterns to match the properties against, separated by '|'
5589 characters. If this is empty or @c null, all properties will match.
5590 </desc>
5591 </param>
5592 <param name="name" type="wstring" dir="out" safearray="yes">
5593 <desc>
5594 The names of the properties returned.
5595 </desc>
5596 </param>
5597 <param name="value" type="wstring" dir="out" safearray="yes">
5598 <desc>
5599 The values of the properties returned. The array entries match the
5600 corresponding entries in the @a name array.
5601 </desc>
5602 </param>
5603 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5604 <desc>
5605 The time stamps of the properties returned. The array entries match
5606 the corresponding entries in the @a name array.
5607 </desc>
5608 </param>
5609 <param name="flags" type="wstring" dir="out" safearray="yes">
5610 <desc>
5611 The flags of the properties returned. The array entries match the
5612 corresponding entries in the @a name array.
5613 </desc>
5614 </param>
5615 </method>
5616</interface>
5617
5618 <!--
5619 // IConsole
5620 /////////////////////////////////////////////////////////////////////////
5621 -->
5622
5623 <interface
5624 name="IConsoleCallback" extends="$unknown"
5625 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5626 wsmap="suppress"
5627 >
5628
5629 <desc>
5630 This interface is used by a client of the Main API that need to
5631 be notified of events. For example, a graphical user interface
5632 can use this to learn about machine state changes so they can
5633 update the list of virtual machines without having to rely
5634 on polling.
5635
5636 Whenever relevant events occur in VirtualBox, the callbacks in
5637 objects of this interface are called. In order for this to be
5638 useful, a client needs to create its own subclass that implements
5639 this interface in which the methods for the relevant callbacks
5640 are overridden. An instance of this subclass interface can then
5641 be passed to <link to="IConsole::registerCallback" />.
5642 </desc>
5643
5644 <method name="onMousePointerShapeChange">
5645 <desc>
5646 Notification when the guest mouse pointer shape has
5647 changed. The new shape data is given.
5648 </desc>
5649 <param name="visible" type="boolean" dir="in">
5650 <desc>
5651 Flag whether the pointer is visible.
5652 </desc>
5653 </param>
5654 <param name="alpha" type="boolean" dir="in">
5655 <desc>
5656 Flag whether the pointer has an alpha channel.
5657 </desc>
5658 </param>
5659 <param name="xHot" type="unsigned long" dir="in">
5660 <desc>
5661 The pointer hot spot x coordinate.
5662 </desc>
5663 </param>
5664 <param name="yHot" type="unsigned long" dir="in">
5665 <desc>
5666 The pointer hot spot y coordinate.
5667 </desc>
5668 </param>
5669 <param name="width" type="unsigned long" dir="in">
5670 <desc>
5671 Width of the pointer shape in pixels.
5672 </desc>
5673 </param>
5674 <param name="height" type="unsigned long" dir="in">
5675 <desc>
5676 Height of the pointer shape in pixels.
5677 </desc>
5678 </param>
5679 <param name="shape" type="octet" mod="ptr" dir="in">
5680 <desc>
5681 Address of the shape buffer.
5682
5683 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5684 followed by a 32-bpp XOR (color) mask.
5685
5686 For pointers without alpha channel the XOR mask pixels are 32
5687 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5688 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5689
5690 An AND mask is used for pointers with alpha channel, so if the
5691 callback does not support alpha, the pointer could be
5692 displayed as a normal color pointer.
5693
5694 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5695 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5696 height</tt>. The padding bits at the end of each scanline are
5697 undefined.
5698
5699 The XOR mask follows the AND mask on the next 4-byte aligned
5700 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5701 Bytes in the gap between the AND and the XOR mask are undefined.
5702 The XOR mask scanlines have no gap between them and the size of
5703 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5704
5705 <note>
5706 If @a shape is 0, only the pointer visibility is changed.
5707 </note>
5708 </desc>
5709 </param>
5710 </method>
5711
5712 <method name="onMouseCapabilityChange">
5713 <desc>
5714 Notification when the mouse capabilities reported by the
5715 guest have changed. The new capabilities are passed.
5716 </desc>
5717 <param name="supportsAbsolute" type="boolean" dir="in"/>
5718 <param name="needsHostCursor" type="boolean" dir="in"/>
5719 </method>
5720
5721 <method name="onKeyboardLedsChange">
5722 <desc>
5723 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5724 to alter the state of the keyboard LEDs.
5725 </desc>
5726 <param name="numLock" type="boolean" dir="in"/>
5727 <param name="capsLock" type="boolean" dir="in"/>
5728 <param name="scrollLock" type="boolean" dir="in"/>
5729 </method>
5730
5731 <method name="onStateChange">
5732 <desc>
5733 Notification when the execution state of the machine has changed.
5734 The new state will be given.
5735 </desc>
5736 <param name="state" type="MachineState" dir="in"/>
5737 </method>
5738
5739 <method name="onAdditionsStateChange">
5740 <desc>
5741 Notification when a Guest Additions property changes.
5742 Interested callees should query IGuest attributes to
5743 find out what has changed.
5744 </desc>
5745 </method>
5746
5747 <method name="onNetworkAdapterChange">
5748 <desc>
5749 Notification when a property of one of the
5750 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5751 changes. Interested callees should use INetworkAdapter methods and
5752 attributes to find out what has changed.
5753 </desc>
5754 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5755 <desc>Network adapter that is subject to change.</desc>
5756 </param>
5757 </method>
5758
5759 <method name="onSerialPortChange">
5760 <desc>
5761 Notification when a property of one of the
5762 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5763 Interested callees should use ISerialPort methods and attributes
5764 to find out what has changed.
5765 </desc>
5766 <param name="serialPort" type="ISerialPort" dir="in">
5767 <desc>Serial port that is subject to change.</desc>
5768 </param>
5769 </method>
5770
5771 <method name="onParallelPortChange">
5772 <desc>
5773 Notification when a property of one of the
5774 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5775 changes. Interested callees should use ISerialPort methods and
5776 attributes to find out what has changed.
5777 </desc>
5778 <param name="parallelPort" type="IParallelPort" dir="in">
5779 <desc>Parallel port that is subject to change.</desc>
5780 </param>
5781 </method>
5782
5783 <method name="onStorageControllerChange">
5784 <desc>
5785 Notification when a property of one of the
5786 virtual <link to="IMachine::storageControllers">storage controllers</link>
5787 changes. Interested callees should query the corresponding collections
5788 to find out what has changed.
5789 </desc>
5790 </method>
5791
5792 <method name="onMediumChange">
5793 <desc>
5794 Notification when a
5795 <link to="IMachine::mediumAttachments">medium attachment</link>
5796 changes.
5797 </desc>
5798 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5799 <desc>Medium attachment that is subject to change.</desc>
5800 </param>
5801 </method>
5802
5803 <method name="onVRDPServerChange">
5804 <desc>
5805 Notification when a property of the
5806 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5807 Interested callees should use IVRDPServer methods and attributes to
5808 find out what has changed.
5809 </desc>
5810 </method>
5811
5812 <method name="onRemoteDisplayInfoChange">
5813 <desc>
5814 Notification when the status of the VRDP server changes. Interested callees
5815 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5816 attributes to find out what is the current status.
5817 </desc>
5818 </method>
5819
5820 <method name="onUSBControllerChange">
5821 <desc>
5822 Notification when a property of the virtual
5823 <link to="IMachine::USBController">USB controller</link> changes.
5824 Interested callees should use IUSBController methods and attributes to
5825 find out what has changed.
5826 </desc>
5827 </method>
5828
5829 <method name="onUSBDeviceStateChange">
5830 <desc>
5831 Notification when a USB device is attached to or detached from
5832 the virtual USB controller.
5833
5834 This notification is sent as a result of the indirect
5835 request to attach the device because it matches one of the
5836 machine USB filters, or as a result of the direct request
5837 issued by <link to="IConsole::attachUSBDevice"/> or
5838 <link to="IConsole::detachUSBDevice"/>.
5839
5840 This notification is sent in case of both a succeeded and a
5841 failed request completion. When the request succeeds, the
5842 @a error parameter is @c null, and the given device has been
5843 already added to (when @a attached is @c true) or removed from
5844 (when @a attached is @c false) the collection represented by
5845 <link to="IConsole::USBDevices"/>. On failure, the collection
5846 doesn't change and the @a error parameter represents the error
5847 message describing the failure.
5848
5849 </desc>
5850 <param name="device" type="IUSBDevice" dir="in">
5851 <desc>Device that is subject to state change.</desc>
5852 </param>
5853 <param name="attached" type="boolean" dir="in">
5854 <desc>
5855 @c true if the device was attached and @c false otherwise.
5856 </desc>
5857 </param>
5858 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5859 <desc>
5860 @c null on success or an error message object on failure.
5861 </desc>
5862 </param>
5863 </method>
5864
5865 <method name="onSharedFolderChange">
5866 <desc>
5867 Notification when a shared folder is added or removed.
5868 The @a scope argument defines one of three scopes:
5869 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5870 (<link to="Scope_Global">Global</link>),
5871 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5872 the machine (<link to="Scope_Machine">Machine</link>) or <link
5873 to="IConsole::sharedFolders">transient shared folders</link> of the
5874 machine (<link to="Scope_Session">Session</link>). Interested callees
5875 should use query the corresponding collections to find out what has
5876 changed.
5877 </desc>
5878 <param name="scope" type="Scope" dir="in">
5879 <desc>Scope of the notification.</desc>
5880 </param>
5881 </method>
5882
5883 <method name="onRuntimeError">
5884 <desc>
5885 Notification when an error happens during the virtual
5886 machine execution.
5887
5888 There are three kinds of runtime errors:
5889 <ul>
5890 <li><i>fatal</i></li>
5891 <li><i>non-fatal with retry</i></li>
5892 <li><i>non-fatal warnings</i></li>
5893 </ul>
5894
5895 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5896 to @c true. In case of fatal errors, the virtual machine
5897 execution is always paused before calling this notification, and
5898 the notification handler is supposed either to immediately save
5899 the virtual machine state using <link to="IConsole::saveState"/>
5900 or power it off using <link to="IConsole::powerDown"/>.
5901 Resuming the execution can lead to unpredictable results.
5902
5903 <b>Non-fatal</b> errors and warnings are indicated by the
5904 @a fatal parameter set to @c false. If the virtual machine
5905 is in the Paused state by the time the error notification is
5906 received, it means that the user can <i>try to resume</i> the machine
5907 execution after attempting to solve the problem that caused the
5908 error. In this case, the notification handler is supposed
5909 to show an appropriate message to the user (depending on the
5910 value of the @a id parameter) that offers several actions such
5911 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5912 wants to retry, the notification handler should continue
5913 the machine execution using the <link to="IConsole::resume"/>
5914 call. If the machine execution is not Paused during this
5915 notification, then it means this notification is a <i>warning</i>
5916 (for example, about a fatal condition that can happen very soon);
5917 no immediate action is required from the user, the machine
5918 continues its normal execution.
5919
5920 Note that in either case the notification handler
5921 <b>must not</b> perform any action directly on a thread
5922 where this notification is called. Everything it is allowed to
5923 do is to post a message to another thread that will then talk
5924 to the user and take the corresponding action.
5925
5926 Currently, the following error identifiers are known:
5927 <ul>
5928 <li><tt>"HostMemoryLow"</tt></li>
5929 <li><tt>"HostAudioNotResponding"</tt></li>
5930 <li><tt>"VDIStorageFull"</tt></li>
5931 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5932 </ul>
5933
5934 <note>
5935 This notification is not designed to be implemented by
5936 more than one callback at a time. If you have multiple
5937 IConsoleCallback instances registered on the given
5938 IConsole object, make sure you simply do nothing but
5939 return @c S_OK from all but one of them that does actual
5940 user notification and performs necessary actions.
5941 </note>
5942
5943 </desc>
5944 <param name="fatal" type="boolean" dir="in">
5945 <desc>Whether the error is fatal or not</desc>
5946 </param>
5947 <param name="id" type="wstring" dir="in">
5948 <desc>Error identifier</desc>
5949 </param>
5950 <param name="message" type="wstring" dir="in">
5951 <desc>Optional error message</desc>
5952 </param>
5953 </method>
5954
5955 <method name="onCanShowWindow">
5956 <desc>
5957 Notification when a call to
5958 <link to="IMachine::canShowConsoleWindow"/> is made by a
5959 front-end to check if a subsequent call to
5960 <link to="IMachine::showConsoleWindow"/> can succeed.
5961
5962 The callee should give an answer appropriate to the current
5963 machine state in the @a canShow argument. This answer must
5964 remain valid at least until the next
5965 <link to="IConsole::state">machine state</link> change.
5966
5967 <note>
5968 This notification is not designed to be implemented by
5969 more than one callback at a time. If you have multiple
5970 IConsoleCallback instances registered on the given
5971 IConsole object, make sure you simply do nothing but
5972 return @c true and @c S_OK from all but one of them that
5973 actually manages console window activation.
5974 </note>
5975 </desc>
5976 <param name="canShow" type="boolean" dir="return">
5977 <desc>
5978 @c true if the console window can be shown and @c false otherwise.
5979 </desc>
5980 </param>
5981 </method>
5982
5983 <method name="onShowWindow">
5984 <desc>
5985 Notification when a call to
5986 <link to="IMachine::showConsoleWindow"/>
5987 requests the console window to be activated and brought to
5988 foreground on the desktop of the host PC.
5989
5990 This notification should cause the VM console process to
5991 perform the requested action as described above. If it is
5992 impossible to do it at a time of this notification, this
5993 method should return a failure.
5994
5995 Note that many modern window managers on many platforms
5996 implement some sort of focus stealing prevention logic, so
5997 that it may be impossible to activate a window without the
5998 help of the currently active application (which is supposedly
5999 an initiator of this notification). In this case, this method
6000 must return a non-zero identifier that represents the
6001 top-level window of the VM console process. The caller, if it
6002 represents a currently active process, is responsible to use
6003 this identifier (in a platform-dependent manner) to perform
6004 actual window activation.
6005
6006 This method must set @a winId to zero if it has performed all
6007 actions necessary to complete the request and the console
6008 window is now active and in foreground, to indicate that no
6009 further action is required on the caller's side.
6010
6011 <note>
6012 This notification is not designed to be implemented by
6013 more than one callback at a time. If you have multiple
6014 IConsoleCallback instances registered on the given
6015 IConsole object, make sure you simply do nothing but
6016 return @c S_OK from all but one of them that actually
6017 manages console window activation.
6018 </note>
6019 </desc>
6020 <param name="winId" type="unsigned long long" dir="return">
6021 <desc>
6022 Platform-dependent identifier of the top-level VM console
6023 window, or zero if this method has performed all actions
6024 necessary to implement the <i>show window</i> semantics for
6025 the given platform and/or this VirtualBox front-end.
6026 </desc>
6027 </param>
6028 </method>
6029
6030 </interface>
6031
6032 <interface
6033 name="IRemoteDisplayInfo" extends="$unknown"
6034 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6035 wsmap="struct"
6036 >
6037 <desc>
6038 Contains information about the remote display (VRDP) capabilities and status.
6039 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6040 </desc>
6041
6042 <attribute name="active" type="boolean" readonly="yes">
6043 <desc>
6044 Whether the remote display connection is active.
6045 </desc>
6046 </attribute>
6047
6048 <attribute name="port" type="long" readonly="yes">
6049 <desc>
6050 VRDP server port number. If this property is equal to <tt>0</tt>, then
6051 the VRDP server failed to start, usually because there are no free TCP
6052 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6053 server has not yet been started.
6054 </desc>
6055 </attribute>
6056
6057 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6058 <desc>
6059 How many times a client connected.
6060 </desc>
6061 </attribute>
6062
6063 <attribute name="beginTime" type="long long" readonly="yes">
6064 <desc>
6065 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6066 </desc>
6067 </attribute>
6068
6069 <attribute name="endTime" type="long long" readonly="yes">
6070 <desc>
6071 When the last connection was terminated or the current time, if
6072 connection is still active, in milliseconds since 1970-01-01 UTC.
6073 </desc>
6074 </attribute>
6075
6076 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6077 <desc>
6078 How many bytes were sent in last or current, if still active, connection.
6079 </desc>
6080 </attribute>
6081
6082 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6083 <desc>
6084 How many bytes were sent in all connections.
6085 </desc>
6086 </attribute>
6087
6088 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6089 <desc>
6090 How many bytes were received in last or current, if still active, connection.
6091 </desc>
6092 </attribute>
6093
6094 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6095 <desc>
6096 How many bytes were received in all connections.
6097 </desc>
6098 </attribute>
6099
6100 <attribute name="user" type="wstring" readonly="yes">
6101 <desc>
6102 Login user name supplied by the client.
6103 </desc>
6104 </attribute>
6105
6106 <attribute name="domain" type="wstring" readonly="yes">
6107 <desc>
6108 Login domain name supplied by the client.
6109 </desc>
6110 </attribute>
6111
6112 <attribute name="clientName" type="wstring" readonly="yes">
6113 <desc>
6114 The client name supplied by the client.
6115 </desc>
6116 </attribute>
6117
6118 <attribute name="clientIP" type="wstring" readonly="yes">
6119 <desc>
6120 The IP address of the client.
6121 </desc>
6122 </attribute>
6123
6124 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6125 <desc>
6126 The client software version number.
6127 </desc>
6128 </attribute>
6129
6130 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6131 <desc>
6132 Public key exchange method used when connection was established.
6133 Values: 0 - RDP4 public key exchange scheme.
6134 1 - X509 certificates were sent to client.
6135 </desc>
6136 </attribute>
6137
6138 </interface>
6139
6140 <interface
6141 name="IConsole" extends="$unknown"
6142 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6143 wsmap="managed"
6144 >
6145 <desc>
6146 The IConsole interface represents an interface to control virtual
6147 machine execution.
6148
6149 The console object that implements the IConsole interface is obtained
6150 from a session object after the session for the given machine has been
6151 opened using one of <link to="IVirtualBox::openSession"/>,
6152 <link to="IVirtualBox::openRemoteSession"/> or
6153 <link to="IVirtualBox::openExistingSession"/> methods.
6154
6155 Methods of the IConsole interface allow the caller to query the current
6156 virtual machine execution state, pause the machine or power it down, save
6157 the machine state or take a snapshot, attach and detach removable media
6158 and so on.
6159
6160 <see>ISession</see>
6161 </desc>
6162
6163 <attribute name="machine" type="IMachine" readonly="yes">
6164 <desc>
6165 Machine object this console is sessioned with.
6166 <note>
6167 This is a convenience property, it has the same value as
6168 <link to="ISession::machine"/> of the corresponding session
6169 object.
6170 </note>
6171 </desc>
6172 </attribute>
6173
6174 <attribute name="state" type="MachineState" readonly="yes">
6175 <desc>
6176 Current execution state of the machine.
6177 <note>
6178 This property always returns the same value as the corresponding
6179 property of the IMachine object this console is sessioned with.
6180 For the process that owns (executes) the VM, this is the
6181 preferable way of querying the VM state, because no IPC
6182 calls are made.
6183 </note>
6184 </desc>
6185 </attribute>
6186
6187 <attribute name="guest" type="IGuest" readonly="yes">
6188 <desc>Guest object.</desc>
6189 </attribute>
6190
6191 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6192 <desc>
6193 Virtual keyboard object.
6194 <note>
6195 If the machine is not running, any attempt to use
6196 the returned object will result in an error.
6197 </note>
6198 </desc>
6199 </attribute>
6200
6201 <attribute name="mouse" type="IMouse" readonly="yes">
6202 <desc>
6203 Virtual mouse object.
6204 <note>
6205 If the machine is not running, any attempt to use
6206 the returned object will result in an error.
6207 </note>
6208 </desc>
6209 </attribute>
6210
6211 <attribute name="display" type="IDisplay" readonly="yes">
6212 <desc>Virtual display object.
6213 <note>
6214 If the machine is not running, any attempt to use
6215 the returned object will result in an error.
6216 </note>
6217 </desc>
6218 </attribute>
6219
6220 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6221 <desc>Debugging interface.</desc>
6222 </attribute>
6223
6224 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6225 <desc>
6226 Collection of USB devices currently attached to the virtual
6227 USB controller.
6228 <note>
6229 The collection is empty if the machine is not running.
6230 </note>
6231 </desc>
6232 </attribute>
6233
6234 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6235 <desc>
6236 List of USB devices currently attached to the remote VRDP client.
6237 Once a new device is physically attached to the remote host computer,
6238 it appears in this list and remains there until detached.
6239 </desc>
6240 </attribute>
6241
6242 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6243 <desc>
6244 Collection of shared folders for the current session. These folders
6245 are called transient shared folders because they are available to the
6246 guest OS running inside the associated virtual machine only for the
6247 duration of the session (as opposed to
6248 <link to="IMachine::sharedFolders"/> which represent permanent shared
6249 folders). When the session is closed (e.g. the machine is powered down),
6250 these folders are automatically discarded.
6251
6252 New shared folders are added to the collection using
6253 <link to="#createSharedFolder"/>. Existing shared folders can be
6254 removed using <link to="#removeSharedFolder"/>.
6255 </desc>
6256 </attribute>
6257
6258 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6259 <desc>
6260 Interface that provides information on Remote Display (VRDP) connection.
6261 </desc>
6262 </attribute>
6263
6264 <method name="powerUp">
6265 <desc>
6266 Starts the virtual machine execution using the current machine
6267 state (that is, its current execution state, current settings and
6268 current storage devices).
6269
6270 If the machine is powered off or aborted, the execution will
6271 start from the beginning (as if the real hardware were just
6272 powered on).
6273
6274 If the machine is in the <link to="MachineState_Saved"/> state,
6275 it will continue its execution the point where the state has
6276 been saved.
6277
6278 <note>
6279 Unless you are trying to write a new VirtualBox front-end that
6280 performs direct machine execution (like the VirtualBox or VBoxSDL
6281 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6282 session opened by <link to="IVirtualBox::openSession"/> and use this
6283 session only to change virtual machine settings. If you simply want to
6284 start virtual machine execution using one of the existing front-ends
6285 (for example the VirtualBox GUI or headless server), simply use
6286 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6287 power up the machine automatically for you.
6288 </note>
6289
6290 <see>#saveState</see>
6291 <result name="VBOX_E_INVALID_VM_STATE">
6292 Virtual machine already running.
6293 </result>
6294 <result name="VBOX_E_HOST_ERROR">
6295 Host interface does not exist or name not set.
6296 </result>
6297 <result name="VBOX_E_FILE_ERROR">
6298 Invalid saved state file.
6299 </result>
6300 </desc>
6301 <param name="progress" type="IProgress" dir="return">
6302 <desc>Progress object to track the operation completion.</desc>
6303 </param>
6304 </method>
6305
6306 <method name="powerUpPaused">
6307 <desc>
6308 Identical to powerUp except that the VM will enter the
6309 <link to="MachineState_Paused"/> state, instead of
6310 <link to="MachineState_Running"/>.
6311
6312 <see>#powerUp</see>
6313 <result name="VBOX_E_INVALID_VM_STATE">
6314 Virtual machine already running.
6315 </result>
6316 <result name="VBOX_E_HOST_ERROR">
6317 Host interface does not exist or name not set.
6318 </result>
6319 <result name="VBOX_E_FILE_ERROR">
6320 Invalid saved state file.
6321 </result>
6322 </desc>
6323 <param name="progress" type="IProgress" dir="return">
6324 <desc>Progress object to track the operation completion.</desc>
6325 </param>
6326 </method>
6327
6328 <method name="powerDown">
6329 <desc>
6330 Initiates the power down procedure to stop the virtual machine
6331 execution.
6332
6333 The completion of the power down procedure is tracked using the returned
6334 IProgress object. After the operation is complete, the machine will go
6335 to the PoweredOff state.
6336 <result name="VBOX_E_INVALID_VM_STATE">
6337 Virtual machine must be Running, Paused or Stuck to be powered down.
6338 </result>
6339 </desc>
6340 <param name="progress" type="IProgress" dir="return">
6341 <desc>Progress object to track the operation completion.</desc>
6342 </param>
6343 </method>
6344
6345 <method name="reset">
6346 <desc>Resets the virtual machine.
6347 <result name="VBOX_E_INVALID_VM_STATE">
6348 Virtual machine not in Running state.
6349 </result>
6350 <result name="VBOX_E_VM_ERROR">
6351 Virtual machine error in reset operation.
6352 </result>
6353 </desc>
6354 </method>
6355
6356 <method name="pause">
6357 <desc>Pauses the virtual machine execution.
6358 <result name="VBOX_E_INVALID_VM_STATE">
6359 Virtual machine not in Running state.
6360 </result>
6361 <result name="VBOX_E_VM_ERROR">
6362 Virtual machine error in suspend operation.
6363 </result>
6364 </desc>
6365 </method>
6366
6367 <method name="resume">
6368 <desc>Resumes the virtual machine execution.
6369 <result name="VBOX_E_INVALID_VM_STATE">
6370 Virtual machine not in Paused state.
6371 </result>
6372 <result name="VBOX_E_VM_ERROR">
6373 Virtual machine error in resume operation.
6374 </result>
6375 </desc>
6376 </method>
6377
6378 <method name="powerButton">
6379 <desc>Sends the ACPI power button event to the guest.
6380 <result name="VBOX_E_INVALID_VM_STATE">
6381 Virtual machine not in Running state.
6382 </result>
6383 <result name="VBOX_E_PDM_ERROR">
6384 Controlled power off failed.
6385 </result>
6386 </desc>
6387 </method>
6388
6389 <method name="sleepButton">
6390 <desc>Sends the ACPI sleep button event to the guest.
6391 <result name="VBOX_E_INVALID_VM_STATE">
6392 Virtual machine not in Running state.
6393 </result>
6394 <result name="VBOX_E_PDM_ERROR">
6395 Sending sleep button event failed.
6396 </result>
6397 </desc>
6398 </method>
6399
6400 <method name="getPowerButtonHandled">
6401 <desc>Checks if the last power button event was handled by guest.
6402 <result name="VBOX_E_PDM_ERROR">
6403 Checking if the event was handled by the guest OS failed.
6404 </result>
6405 </desc>
6406 <param name="handled" type="boolean" dir="return"/>
6407 </method>
6408
6409 <method name="getGuestEnteredACPIMode">
6410 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6411 G1 (sleeping). If this method returns @c false, the guest will
6412 most likely not respond to external ACPI events.
6413 <result name="VBOX_E_INVALID_VM_STATE">
6414 Virtual machine not in Running state.
6415 </result>
6416 </desc>
6417 <param name="entered" type="boolean" dir="return"/>
6418 </method>
6419
6420 <method name="saveState">
6421 <desc>
6422 Saves the current execution state of a running virtual machine
6423 and stops its execution.
6424
6425 After this operation completes, the machine will go to the
6426 Saved state. Next time it is powered up, this state will
6427 be restored and the machine will continue its execution from
6428 the place where it was saved.
6429
6430 This operation differs from taking a snapshot to the effect
6431 that it doesn't create new differencing media. Also, once
6432 the machine is powered up from the state saved using this method,
6433 the saved state is deleted, so it will be impossible to return
6434 to this state later.
6435
6436 <note>
6437 On success, this method implicitly calls
6438 <link to="IMachine::saveSettings"/> to save all current machine
6439 settings (including runtime changes to the DVD medium, etc.).
6440 Together with the impossibility to change any VM settings when it is
6441 in the Saved state, this guarantees adequate hardware
6442 configuration of the machine when it is restored from the saved
6443 state file.
6444 </note>
6445
6446 <note>
6447 The machine must be in the Running or Paused state, otherwise
6448 the operation will fail.
6449 </note>
6450 <result name="VBOX_E_INVALID_VM_STATE">
6451 Virtual machine state neither Running nor Paused.
6452 </result>
6453 <result name="VBOX_E_FILE_ERROR">
6454 Failed to create directory for saved state file.
6455 </result>
6456
6457 <see><link to="#takeSnapshot"/></see>
6458 </desc>
6459 <param name="progress" type="IProgress" dir="return">
6460 <desc>Progress object to track the operation completion.</desc>
6461 </param>
6462 </method>
6463
6464 <method name="adoptSavedState">
6465 <desc>
6466 Associates the given saved state file to the virtual machine.
6467
6468 On success, the machine will go to the Saved state. Next time it is
6469 powered up, it will be restored from the adopted saved state and
6470 continue execution from the place where the saved state file was
6471 created.
6472
6473 The specified saved state file path may be absolute or relative to the
6474 folder the VM normally saves the state to (usually,
6475 <link to="IMachine::snapshotFolder"/>).
6476
6477 <note>
6478 It's a caller's responsibility to make sure the given saved state
6479 file is compatible with the settings of this virtual machine that
6480 represent its virtual hardware (memory size, storage disk configuration
6481 etc.). If there is a mismatch, the behavior of the virtual machine
6482 is undefined.
6483 </note>
6484 <result name="VBOX_E_INVALID_VM_STATE">
6485 Virtual machine state neither PoweredOff nor Aborted.
6486 </result>
6487 </desc>
6488 <param name="savedStateFile" type="wstring" dir="in">
6489 <desc>Path to the saved state file to adopt.</desc>
6490 </param>
6491 </method>
6492
6493 <method name="forgetSavedState">
6494 <desc>
6495 Forgets the saved state of the virtual machine previously created
6496 by <link to="#saveState"/>. Next time the machine is powered up, a
6497 clean boot will occur. If @a remove is @c true the saved state file
6498 is deleted.
6499 <note>
6500 This operation is equivalent to resetting or powering off
6501 the machine without doing a proper shutdown in the guest OS.
6502 </note>
6503 <result name="VBOX_E_INVALID_VM_STATE">
6504 Virtual machine not in state Saved.
6505 </result>
6506 </desc>
6507 <param name="remove" type="boolean" dir="in">
6508 <desc>If @c true remove the saved state file.</desc>
6509 </param>
6510 </method>
6511
6512 <method name="getDeviceActivity">
6513 <desc>
6514 Gets the current activity type of a given device or device group.
6515 <result name="E_INVALIDARG">
6516 Invalid device type.
6517 </result>
6518 </desc>
6519 <param name="type" type="DeviceType" dir="in"/>
6520 <param name="activity" type="DeviceActivity" dir="return"/>
6521 </method>
6522
6523 <method name="attachUSBDevice">
6524 <desc>
6525 Attaches a host USB device with the given UUID to the
6526 USB controller of the virtual machine.
6527
6528 The device needs to be in one of the following states:
6529 <link to="USBDeviceState_Busy"/>,
6530 <link to="USBDeviceState_Available"/> or
6531 <link to="USBDeviceState_Held"/>,
6532 otherwise an error is immediately returned.
6533
6534 When the device state is
6535 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6536 be returned if the host computer refuses to release it for some reason.
6537
6538 <see>IUSBController::deviceFilters, USBDeviceState</see>
6539 <result name="VBOX_E_INVALID_VM_STATE">
6540 Virtual machine state neither Running nor Paused.
6541 </result>
6542 <result name="VBOX_E_PDM_ERROR">
6543 Virtual machine does not have a USB controller.
6544 </result>
6545 </desc>
6546 <param name="id" type="uuid" mod="string" dir="in">
6547 <desc>UUID of the host USB device to attach.</desc>
6548 </param>
6549 </method>
6550
6551 <method name="detachUSBDevice">
6552 <desc>
6553 Detaches an USB device with the given UUID from the USB controller
6554 of the virtual machine.
6555
6556 After this method succeeds, the VirtualBox server re-initiates
6557 all USB filters as if the device were just physically attached
6558 to the host, but filters of this machine are ignored to avoid
6559 a possible automatic re-attachment.
6560
6561 <see>IUSBController::deviceFilters, USBDeviceState</see>
6562
6563 <result name="VBOX_E_PDM_ERROR">
6564 Virtual machine does not have a USB controller.
6565 </result>
6566 <result name="E_INVALIDARG">
6567 USB device not attached to this virtual machine.
6568 </result>
6569 </desc>
6570 <param name="id" type="uuid" mod="string" dir="in">
6571 <desc>UUID of the USB device to detach.</desc>
6572 </param>
6573 <param name="device" type="IUSBDevice" dir="return">
6574 <desc>Detached USB device.</desc>
6575 </param>
6576 </method>
6577
6578 <method name="findUSBDeviceByAddress">
6579 <desc>
6580 Searches for a USB device with the given host address.
6581
6582 <result name="VBOX_E_OBJECT_NOT_FOUND">
6583 Given @c name does not correspond to any USB device.
6584 </result>
6585
6586 <see>IUSBDevice::address</see>
6587 </desc>
6588 <param name="name" type="wstring" dir="in">
6589 <desc>
6590 Address of the USB device (as assigned by the host) to
6591 search for.
6592 </desc>
6593 </param>
6594 <param name="device" type="IUSBDevice" dir="return">
6595 <desc>Found USB device object.</desc>
6596 </param>
6597 </method>
6598
6599 <method name="findUSBDeviceById">
6600 <desc>
6601 Searches for a USB device with the given UUID.
6602
6603 <result name="VBOX_E_OBJECT_NOT_FOUND">
6604 Given @c id does not correspond to any USB device.
6605 </result>
6606
6607 <see>IUSBDevice::id</see>
6608 </desc>
6609 <param name="id" type="uuid" mod="string" dir="in">
6610 <desc>UUID of the USB device to search for.</desc>
6611 </param>
6612 <param name="device" type="IUSBDevice" dir="return">
6613 <desc>Found USB device object.</desc>
6614 </param>
6615 </method>
6616
6617 <method name="createSharedFolder">
6618 <desc>
6619 Creates a transient new shared folder by associating the given logical
6620 name with the given host path, adds it to the collection of shared
6621 folders and starts sharing it. Refer to the description of
6622 <link to="ISharedFolder"/> to read more about logical names.
6623
6624 <result name="VBOX_E_INVALID_VM_STATE">
6625 Virtual machine in Saved state or currently changing state.
6626 </result>
6627 <result name="VBOX_E_FILE_ERROR">
6628 Shared folder already exists or not accessible.
6629 </result>
6630 </desc>
6631 <param name="name" type="wstring" dir="in">
6632 <desc>Unique logical name of the shared folder.</desc>
6633 </param>
6634 <param name="hostPath" type="wstring" dir="in">
6635 <desc>Full path to the shared folder in the host file system.</desc>
6636 </param>
6637 <param name="writable" type="boolean" dir="in">
6638 <desc>Whether the share is writable or readonly</desc>
6639 </param>
6640 </method>
6641
6642 <method name="removeSharedFolder">
6643 <desc>
6644 Removes a transient shared folder with the given name previously
6645 created by <link to="#createSharedFolder"/> from the collection of
6646 shared folders and stops sharing it.
6647 <result name="VBOX_E_INVALID_VM_STATE">
6648 Virtual machine in Saved state or currently changing state.
6649 </result>
6650 <result name="VBOX_E_FILE_ERROR">
6651 Shared folder does not exists.
6652 </result>
6653 </desc>
6654 <param name="name" type="wstring" dir="in">
6655 <desc>Logical name of the shared folder to remove.</desc>
6656 </param>
6657 </method>
6658
6659 <method name="takeSnapshot">
6660 <desc>
6661 Saves the current execution state
6662 and all settings of the machine and creates differencing images
6663 for all normal (non-independent) media.
6664 See <link to="ISnapshot" /> for an introduction to snapshots.
6665
6666 This method can be called for a PoweredOff, Saved (see
6667 <link to="#saveState"/>), Running or
6668 Paused virtual machine. When the machine is PoweredOff, an
6669 offline snapshot is created. When the machine is Running a live
6670 snapshot is created, and an online snapshot is is created when Paused.
6671
6672 The taken snapshot is always based on the
6673 <link to="IMachine::currentSnapshot">current snapshot</link>
6674 of the associated virtual machine and becomes a new current snapshot.
6675
6676 <note>
6677 This method implicitly calls <link to="IMachine::saveSettings"/> to
6678 save all current machine settings before taking an offline snapshot.
6679 </note>
6680
6681 <result name="VBOX_E_INVALID_VM_STATE">
6682 Virtual machine currently changing state.
6683 </result>
6684 </desc>
6685 <param name="name" type="wstring" dir="in">
6686 <desc>Short name for the snapshot.</desc>
6687 </param>
6688 <param name="description" type="wstring" dir="in">
6689 <desc>Optional description of the snapshot.</desc>
6690 </param>
6691 <param name="progress" type="IProgress" dir="return">
6692 <desc>Progress object to track the operation completion.</desc>
6693 </param>
6694 </method>
6695
6696 <method name="deleteSnapshot">
6697 <desc>
6698 Starts discarding the specified snapshot asynchronously.
6699 See <link to="ISnapshot" /> for an introduction to snapshots.
6700
6701 The execution state and settings of the associated machine stored in
6702 the snapshot will be deleted. The contents of all differencing media of
6703 this snapshot will be merged with the contents of their dependent child
6704 media to keep the medium chain valid (in other words, all changes
6705 represented by media being discarded will be propagated to their child
6706 medium). After that, this snapshot's differencing medium will be
6707 deleted. The parent of this snapshot will become a new parent for all
6708 its child snapshots.
6709
6710 If the discarded snapshot is the current one, its parent
6711 snapshot will become a new current snapshot. The current machine
6712 state is not directly affected in this case, except that
6713 currently attached differencing media based on media
6714 of the discarded snapshot will be also merged as described
6715 above.
6716
6717 If the discarded snapshot is the first one (the root snapshot)
6718 and it has exactly one child snapshot, this child snapshot will
6719 become the first snapshot after discarding. If there are no
6720 children at all (i.e. the first snapshot is the only snapshot of
6721 the machine), both the current and the first snapshot of the
6722 machine will be set to @c null. In all other cases, the first
6723 snapshot cannot be discarded.
6724
6725 You cannot discard the snapshot if it
6726 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6727 media that have differencing media based on them. Snapshots of
6728 such kind can be discarded only when every normal medium has either
6729 no children at all or exactly one child. In the former case, the normal
6730 medium simply becomes unused (i.e. not attached to any VM). In the
6731 latter case, it receives all the changes stored in the child medium,
6732 and then it replaces the child medium in the configuration of the
6733 corresponding snapshot or machine.
6734
6735 Also, you cannot discard the snapshot if it stores media
6736 (of any type) having differencing child media that belong
6737 to other machines. Such snapshots can be only discarded after
6738 you discard all snapshots of other machines containing "foreign"
6739 child media, or detach these "foreign" child media from machines
6740 they are attached to.
6741
6742 One particular example of the snapshot storing normal media
6743 is the first snapshot of a virtual machine that had normal media
6744 attached when taking the snapshot. Be careful when
6745 discarding such snapshots because this implicitly commits
6746 changes (made since the snapshot being discarded has been taken)
6747 to normal media (as described above), which may be not what
6748 you want.
6749
6750 The virtual machine is put to
6751 the <link to="MachineState_Discarding">Discarding</link> state until
6752 the discard operation is completed.
6753
6754 <note>
6755 The machine must not be running, otherwise the operation
6756 will fail.
6757 </note>
6758
6759 <note>
6760 Child media of all normal media of the discarded snapshot
6761 must be accessible (see <link to="IMedium::state"/>) for this
6762 operation to succeed. In particular, this means that all virtual
6763 machines, whose media are directly or indirectly based on the
6764 media of discarded snapshot, must be powered off.
6765 </note>
6766 <note>
6767 Merging medium contents can be very time and disk space
6768 consuming, if these media are big in size and have many
6769 children. However, if the snapshot being discarded is the last
6770 (head) snapshot on the branch, the operation will be rather
6771 quick.
6772 </note>
6773 <note>
6774 Note that discarding the current snapshot
6775 will implicitly call <link to="IMachine::saveSettings"/> to
6776 make all current machine settings permanent.
6777 </note>
6778 <result name="VBOX_E_INVALID_VM_STATE">
6779 Virtual machine is running.
6780 </result>
6781 </desc>
6782 <param name="id" type="uuid" mod="string" dir="in">
6783 <desc>UUID of the snapshot to discard.</desc>
6784 </param>
6785 <param name="progress" type="IProgress" dir="return">
6786 <desc>Progress object to track the operation completion.</desc>
6787 </param>
6788 </method>
6789
6790 <method name="restoreSnapshot">
6791 <desc>
6792 Starts resetting the machine's current state to the state contained
6793 in the given snapshot, asynchronously. All current settings of the
6794 machine will be reset and changes stored in differencing media
6795 will be lost.
6796 See <link to="ISnapshot" /> for an introduction to snapshots.
6797
6798 After this operation is successfully completed, new empty differencing
6799 media are created for all normal media of the machine.
6800
6801 If the given snapshot is an online snapshot, the machine will go to
6802 the <link to="MachineState_Saved"> saved state</link>, so that the
6803 next time it is powered on, the execution state will be restored
6804 from the state of the snapshot.
6805
6806 <note>
6807 The machine must not be running, otherwise the operation will fail.
6808 </note>
6809
6810 <note>
6811 If the machine state is <link to="MachineState_Saved">Saved</link>
6812 prior to this operation, the saved state file will be implicitly
6813 discarded (as if <link to="IConsole::forgetSavedState"/> were
6814 called).
6815 </note>
6816
6817 <result name="VBOX_E_INVALID_VM_STATE">
6818 Virtual machine is running.
6819 </result>
6820 </desc>
6821 <param name="snapshot" type="ISnapshot" dir="in">
6822 <desc>The snapshot to restore the VM state from.</desc>
6823 </param>
6824 <param name="progress" type="IProgress" dir="return">
6825 <desc>Progress object to track the operation completion.</desc>
6826 </param>
6827 </method>
6828
6829 <method name="teleport">
6830 <desc>
6831 Teleport the VM to a different host machine or process.
6832
6833 TODO explain the details.
6834
6835 <result name="VBOX_E_INVALID_VM_STATE">
6836 Virtual machine not running or paused.
6837 </result>
6838 </desc>
6839 <param name="hostname" type="wstring" dir="in">
6840 <desc>The name or IP of the host to teleport to.</desc>
6841 </param>
6842 <param name="tcpport" type="unsigned long" dir="in">
6843 <desc>The TCP port to connect to (1..65535).</desc>
6844 </param>
6845 <param name="password" type="wstring" dir="in">
6846 <desc>The password.</desc>
6847 </param>
6848 <param name="progress" type="IProgress" dir="return">
6849 <desc>Progress object to track the operation completion.</desc>
6850 </param>
6851 </method>
6852
6853 <method name="registerCallback">
6854 <desc>
6855 Registers a new console callback on this instance. The methods of the
6856 callback interface will be called by this instance when the appropriate
6857 event occurs.
6858 </desc>
6859 <param name="callback" type="IConsoleCallback" dir="in"/>
6860 </method>
6861
6862 <method name="unregisterCallback">
6863 <desc>
6864 Unregisters the console callback previously registered using
6865 <link to="#registerCallback"/>.
6866 <result name="E_INVALIDARG">
6867 Given @a callback handler is not registered.
6868 </result>
6869 </desc>
6870 <param name="callback" type="IConsoleCallback" dir="in"/>
6871 </method>
6872 </interface>
6873
6874 <!--
6875 // IHost
6876 /////////////////////////////////////////////////////////////////////////
6877 -->
6878
6879 <enum
6880 name="HostNetworkInterfaceMediumType"
6881 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6882 >
6883 <desc>
6884 Type of encapsulation. Ethernet encapsulation includes both wired and
6885 wireless Ethernet connections.
6886 <see>IHostNetworkInterface</see>
6887 </desc>
6888
6889 <const name="Unknown" value="0">
6890 <desc>
6891 The type of interface cannot be determined.
6892 </desc>
6893 </const>
6894 <const name="Ethernet" value="1">
6895 <desc>
6896 Ethernet frame encapsulation.
6897 </desc>
6898 </const>
6899 <const name="PPP" value="2">
6900 <desc>
6901 Point-to-point protocol encapsulation.
6902 </desc>
6903 </const>
6904 <const name="SLIP" value="3">
6905 <desc>
6906 Serial line IP encapsulation.
6907 </desc>
6908 </const>
6909 </enum>
6910
6911 <enum
6912 name="HostNetworkInterfaceStatus"
6913 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6914 >
6915 <desc>
6916 Current status of the interface.
6917 <see>IHostNetworkInterface</see>
6918 </desc>
6919
6920 <const name="Unknown" value="0">
6921 <desc>
6922 The state of interface cannot be determined.
6923 </desc>
6924 </const>
6925 <const name="Up" value="1">
6926 <desc>
6927 The interface is fully operational.
6928 </desc>
6929 </const>
6930 <const name="Down" value="2">
6931 <desc>
6932 The interface is not functioning.
6933 </desc>
6934 </const>
6935 </enum>
6936
6937 <enum
6938 name="HostNetworkInterfaceType"
6939 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6940 >
6941 <desc>
6942 Network interface type.
6943 </desc>
6944 <const name="Bridged" value="1"/>
6945 <const name="HostOnly" value="2"/>
6946 </enum>
6947
6948 <interface
6949 name="IHostNetworkInterface" extends="$unknown"
6950 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6951 wsmap="managed"
6952 >
6953 <desc>
6954 Represents one of host's network interfaces. IP V6 address and network
6955 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6956 separated by colons.
6957 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6958 </desc>
6959 <attribute name="name" type="wstring" readonly="yes">
6960 <desc>Returns the host network interface name.</desc>
6961 </attribute>
6962
6963 <attribute name="id" type="uuid" mod="string" readonly="yes">
6964 <desc>Returns the interface UUID.</desc>
6965 </attribute>
6966
6967 <attribute name="networkName" type="wstring" readonly="yes">
6968 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6969 </attribute>
6970
6971 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6972 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6973 </attribute>
6974
6975 <attribute name="IPAddress" type="wstring" readonly="yes">
6976 <desc>Returns the IP V4 address of the interface.</desc>
6977 </attribute>
6978
6979 <attribute name="networkMask" type="wstring" readonly="yes">
6980 <desc>Returns the network mask of the interface.</desc>
6981 </attribute>
6982
6983 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6984 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6985 </attribute>
6986
6987 <attribute name="IPV6Address" type="wstring" readonly="yes">
6988 <desc>Returns the IP V6 address of the interface.</desc>
6989 </attribute>
6990
6991 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6992 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6993 </attribute>
6994
6995 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6996 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6997 </attribute>
6998
6999 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7000 <desc>Type of protocol encapsulation used.</desc>
7001 </attribute>
7002
7003 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7004 <desc>Status of the interface.</desc>
7005 </attribute>
7006
7007 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7008 <desc>specifies the host interface type.</desc>
7009 </attribute>
7010
7011 <method name="enableStaticIpConfig">
7012 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7013 <param name="IPAddress" type="wstring" dir="in">
7014 <desc>
7015 IP address.
7016 </desc>
7017 </param>
7018 <param name="networkMask" type="wstring" dir="in">
7019 <desc>
7020 network mask.
7021 </desc>
7022 </param>
7023 </method>
7024
7025 <method name="enableStaticIpConfigV6">
7026 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7027 <param name="IPV6Address" type="wstring" dir="in">
7028 <desc>
7029 IP address.
7030 </desc>
7031 </param>
7032 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7033 <desc>
7034 network mask.
7035 </desc>
7036 </param>
7037 </method>
7038
7039 <method name="enableDynamicIpConfig">
7040 <desc>enables the dynamic IP configuration.</desc>
7041 </method>
7042
7043 <method name="dhcpRediscover">
7044 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7045 </method>
7046
7047 </interface>
7048
7049 <interface
7050 name="IHost" extends="$unknown"
7051 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7052 wsmap="managed"
7053 >
7054 <desc>
7055 The IHost interface represents the physical machine that this VirtualBox
7056 installation runs on.
7057
7058 An object implementing this interface is returned by the
7059 <link to="IVirtualBox::host" /> attribute. This interface contains
7060 read-only information about the host's physical hardware (such as what
7061 processors and disks are available, what the host operating system is,
7062 and so on) and also allows for manipulating some of the host's hardware,
7063 such as global USB device filters and host interface networking.
7064
7065 </desc>
7066 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7067 <desc>List of DVD drives available on the host.</desc>
7068 </attribute>
7069
7070 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7071 <desc>List of floppy drives available on the host.</desc>
7072 </attribute>
7073
7074 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7075 <desc>
7076 List of USB devices currently attached to the host.
7077 Once a new device is physically attached to the host computer,
7078 it appears in this list and remains there until detached.
7079
7080 <note>
7081 If USB functionality is not available in the given edition of
7082 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7083 </note>
7084 </desc>
7085 </attribute>
7086
7087 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7088 <desc>
7089 List of USB device filters in action.
7090 When a new device is physically attached to the host computer,
7091 filters from this list are applied to it (in order they are stored
7092 in the list). The first matched filter will determine the
7093 <link to="IHostUSBDeviceFilter::action">action</link>
7094 performed on the device.
7095
7096 Unless the device is ignored by these filters, filters of all
7097 currently running virtual machines
7098 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7099
7100 <note>
7101 If USB functionality is not available in the given edition of
7102 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7103 </note>
7104
7105 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7106 </desc>
7107 </attribute>
7108
7109 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7110 <desc>List of host network interfaces currently defined on the host.</desc>
7111 </attribute>
7112
7113 <attribute name="processorCount" type="unsigned long" readonly="yes">
7114 <desc>Number of (logical) CPUs installed in the host system.</desc>
7115 </attribute>
7116
7117 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7118 <desc>Number of (logical) CPUs online in the host system.</desc>
7119 </attribute>
7120
7121 <method name="getProcessorSpeed">
7122 <desc>Query the (approximate) maximum speed of a specified host CPU in
7123 Megahertz.
7124 </desc>
7125 <param name="cpuId" type="unsigned long" dir="in">
7126 <desc>
7127 Identifier of the CPU.
7128 </desc>
7129 </param>
7130 <param name="speed" type="unsigned long" dir="return">
7131 <desc>
7132 Speed value. 0 is returned if value is not known or @a cpuId is
7133 invalid.
7134 </desc>
7135 </param>
7136 </method>
7137
7138 <method name="getProcessorFeature">
7139 <desc>Query whether a CPU feature is supported or not.</desc>
7140 <param name="feature" type="ProcessorFeature" dir="in">
7141 <desc>
7142 CPU Feature identifier.
7143 </desc>
7144 </param>
7145 <param name="supported" type="boolean" dir="return">
7146 <desc>
7147 Feature is supported or not.
7148 </desc>
7149 </param>
7150 </method>
7151
7152 <method name="getProcessorDescription">
7153 <desc>Query the model string of a specified host CPU.
7154 </desc>
7155 <param name="cpuId" type="unsigned long" dir="in">
7156 <desc>
7157 Identifier of the CPU.
7158 </desc>
7159 </param>
7160 <param name="description" type="wstring" dir="return">
7161 <desc>
7162 Model string. An empty string is returned if value is not known or
7163 @a cpuId is invalid.
7164 </desc>
7165 </param>
7166 </method>
7167
7168 <attribute name="memorySize" type="unsigned long" readonly="yes">
7169 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7170 </attribute>
7171
7172 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7173 <desc>Available system memory in the host system.</desc>
7174 </attribute>
7175
7176 <attribute name="operatingSystem" type="wstring" readonly="yes">
7177 <desc>Name of the host system's operating system.</desc>
7178 </attribute>
7179
7180 <attribute name="OSVersion" type="wstring" readonly="yes">
7181 <desc>Host operating system's version string.</desc>
7182 </attribute>
7183
7184 <attribute name="UTCTime" type="long long" readonly="yes">
7185 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7186 </attribute>
7187
7188 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7189 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7190 </attribute>
7191
7192 <method name="createHostOnlyNetworkInterface">
7193 <desc>
7194 Creates a new adapter for Host Only Networking.
7195 <result name="E_INVALIDARG">
7196 Host network interface @a name already exists.
7197 </result>
7198 </desc>
7199 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7200 <desc>
7201 Created host interface object.
7202 </desc>
7203 </param>
7204 <param name="progress" type="IProgress" dir="return">
7205 <desc>
7206 Progress object to track the operation completion.
7207 </desc>
7208 </param>
7209 </method>
7210
7211 <method name="removeHostOnlyNetworkInterface">
7212 <desc>
7213 Removes the given Host Only Networking interface.
7214 <result name="VBOX_E_OBJECT_NOT_FOUND">
7215 No host network interface matching @a id found.
7216 </result>
7217 </desc>
7218 <param name="id" type="uuid" mod="string" dir="in">
7219 <desc>
7220 Adapter GUID.
7221 </desc>
7222 </param>
7223 <param name="progress" type="IProgress" dir="return">
7224 <desc>
7225 Progress object to track the operation completion.
7226 </desc>
7227 </param>
7228 </method>
7229
7230 <method name="createUSBDeviceFilter">
7231 <desc>
7232 Creates a new USB device filter. All attributes except
7233 the filter name are set to empty (any match),
7234 <i>active</i> is @c false (the filter is not active).
7235
7236 The created filter can be added to the list of filters using
7237 <link to="#insertUSBDeviceFilter"/>.
7238
7239 <see>#USBDeviceFilters</see>
7240 </desc>
7241 <param name="name" type="wstring" dir="in">
7242 <desc>
7243 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7244 for more info.
7245 </desc>
7246 </param>
7247 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7248 <desc>Created filter object.</desc>
7249 </param>
7250 </method>
7251
7252 <method name="insertUSBDeviceFilter">
7253 <desc>
7254 Inserts the given USB device to the specified position
7255 in the list of filters.
7256
7257 Positions are numbered starting from @c 0. If the specified
7258 position is equal to or greater than the number of elements in
7259 the list, the filter is added at the end of the collection.
7260
7261 <note>
7262 Duplicates are not allowed, so an attempt to insert a
7263 filter already in the list is an error.
7264 </note>
7265 <note>
7266 If USB functionality is not available in the given edition of
7267 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7268 </note>
7269
7270 <see>#USBDeviceFilters</see>
7271
7272 <result name="VBOX_E_INVALID_OBJECT_STATE">
7273 USB device filter is not created within this VirtualBox instance.
7274 </result>
7275 <result name="E_INVALIDARG">
7276 USB device filter already in list.
7277 </result>
7278
7279 </desc>
7280 <param name="position" type="unsigned long" dir="in">
7281 <desc>Position to insert the filter to.</desc>
7282 </param>
7283 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7284 <desc>USB device filter to insert.</desc>
7285 </param>
7286 </method>
7287
7288 <method name="removeUSBDeviceFilter">
7289 <desc>
7290 Removes a USB device filter from the specified position in the
7291 list of filters.
7292
7293 Positions are numbered starting from @c 0. Specifying a
7294 position equal to or greater than the number of elements in
7295 the list will produce an error.
7296
7297 <note>
7298 If USB functionality is not available in the given edition of
7299 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7300 </note>
7301
7302 <see>#USBDeviceFilters</see>
7303
7304 <result name="E_INVALIDARG">
7305 USB device filter list empty or invalid @a position.
7306 </result>
7307
7308 </desc>
7309 <param name="position" type="unsigned long" dir="in">
7310 <desc>Position to remove the filter from.</desc>
7311 </param>
7312 </method>
7313
7314 <method name="findHostDVDDrive">
7315 <desc>
7316 Searches for a host DVD drive with the given @c name.
7317
7318 <result name="VBOX_E_OBJECT_NOT_FOUND">
7319 Given @c name does not correspond to any host drive.
7320 </result>
7321
7322 </desc>
7323 <param name="name" type="wstring" dir="in">
7324 <desc>Name of the host drive to search for</desc>
7325 </param>
7326 <param name="drive" type="IMedium" dir="return">
7327 <desc>Found host drive object</desc>
7328 </param>
7329 </method>
7330
7331 <method name="findHostFloppyDrive">
7332 <desc>
7333 Searches for a host floppy drive with the given @c name.
7334
7335 <result name="VBOX_E_OBJECT_NOT_FOUND">
7336 Given @c name does not correspond to any host floppy drive.
7337 </result>
7338
7339 </desc>
7340 <param name="name" type="wstring" dir="in">
7341 <desc>Name of the host floppy drive to search for</desc>
7342 </param>
7343 <param name="drive" type="IMedium" dir="return">
7344 <desc>Found host floppy drive object</desc>
7345 </param>
7346 </method>
7347
7348 <method name="findHostNetworkInterfaceByName">
7349 <desc>
7350 Searches through all host network interfaces for an interface with
7351 the given @c name.
7352 <note>
7353 The method returns an error if the given @c name does not
7354 correspond to any host network interface.
7355 </note>
7356 </desc>
7357 <param name="name" type="wstring" dir="in">
7358 <desc>Name of the host network interface to search for.</desc>
7359 </param>
7360 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7361 <desc>Found host network interface object.</desc>
7362 </param>
7363 </method>
7364 <method name="findHostNetworkInterfaceById">
7365 <desc>
7366 Searches through all host network interfaces for an interface with
7367 the given GUID.
7368 <note>
7369 The method returns an error if the given GUID does not
7370 correspond to any host network interface.
7371 </note>
7372 </desc>
7373 <param name="id" type="uuid" mod="string" dir="in">
7374 <desc>GUID of the host network interface to search for.</desc>
7375 </param>
7376 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7377 <desc>Found host network interface object.</desc>
7378 </param>
7379 </method>
7380 <method name="findHostNetworkInterfacesOfType">
7381 <desc>
7382 Searches through all host network interfaces and returns a list of interfaces of the specified type
7383 </desc>
7384 <param name="type" type="HostNetworkInterfaceType" dir="in">
7385 <desc>type of the host network interfaces to search for.</desc>
7386 </param>
7387 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7388 <desc>Found host network interface objects.</desc>
7389 </param>
7390 </method>
7391
7392 <method name="findUSBDeviceById">
7393 <desc>
7394 Searches for a USB device with the given UUID.
7395
7396 <result name="VBOX_E_OBJECT_NOT_FOUND">
7397 Given @c id does not correspond to any USB device.
7398 </result>
7399
7400 <see>IHostUSBDevice::id</see>
7401 </desc>
7402 <param name="id" type="uuid" mod="string" dir="in">
7403 <desc>UUID of the USB device to search for.</desc>
7404 </param>
7405 <param name="device" type="IHostUSBDevice" dir="return">
7406 <desc>Found USB device object.</desc>
7407 </param>
7408 </method>
7409
7410 <method name="findUSBDeviceByAddress">
7411 <desc>
7412 Searches for a USB device with the given host address.
7413
7414 <result name="VBOX_E_OBJECT_NOT_FOUND">
7415 Given @c name does not correspond to any USB device.
7416 </result>
7417
7418 <see>IHostUSBDevice::address</see>
7419 </desc>
7420 <param name="name" type="wstring" dir="in">
7421 <desc>
7422 Address of the USB device (as assigned by the host) to
7423 search for.
7424 </desc>
7425 </param>
7426 <param name="device" type="IHostUSBDevice" dir="return">
7427 <desc>Found USB device object.</desc>
7428 </param>
7429 </method>
7430
7431 </interface>
7432
7433 <!--
7434 // ISystemProperties
7435 /////////////////////////////////////////////////////////////////////////
7436 -->
7437
7438 <interface
7439 name="ISystemProperties"
7440 extends="$unknown"
7441 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7442 wsmap="managed"
7443 >
7444 <desc>
7445 The ISystemProperties interface represents global properties of the given
7446 VirtualBox installation.
7447
7448 These properties define limits and default values for various attributes
7449 and parameters. Most of the properties are read-only, but some can be
7450 changed by a user.
7451 </desc>
7452
7453 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7454 <desc>Minimum guest system memory in Megabytes.</desc>
7455 </attribute>
7456
7457 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7458 <desc>Maximum guest system memory in Megabytes.</desc>
7459 </attribute>
7460
7461 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7462 <desc>Minimum guest video memory in Megabytes.</desc>
7463 </attribute>
7464
7465 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7466 <desc>Maximum guest video memory in Megabytes.</desc>
7467 </attribute>
7468
7469 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7470 <desc>Minimum CPU count.</desc>
7471 </attribute>
7472
7473 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7474 <desc>Maximum CPU count.</desc>
7475 </attribute>
7476
7477 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7478 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7479 </attribute>
7480
7481 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7482 <desc>
7483 Number of network adapters associated with every
7484 <link to="IMachine"/> instance.
7485 </desc>
7486 </attribute>
7487
7488 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7489 <desc>
7490 Number of serial ports associated with every
7491 <link to="IMachine"/> instance.
7492 </desc>
7493 </attribute>
7494
7495 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7496 <desc>
7497 Number of parallel ports associated with every
7498 <link to="IMachine"/> instance.
7499 </desc>
7500 </attribute>
7501
7502 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7503 <desc>
7504 Maximum device position in the boot order. This value corresponds
7505 to the total number of devices a machine can boot from, to make it
7506 possible to include all possible devices to the boot list.
7507 <see><link to="IMachine::setBootOrder"/></see>
7508 </desc>
7509 </attribute>
7510
7511 <attribute name="defaultMachineFolder" type="wstring">
7512 <desc>
7513 Full path to the default directory used to create new or open
7514 existing machines when a settings file name contains no
7515 path.
7516
7517 The initial value of this property is
7518 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7519 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7520
7521 <note>
7522 Setting this property to @c null or an empty string will restore the
7523 initial value.
7524 </note>
7525 <note>
7526 When settings this property, the specified path can be
7527 absolute (full path) or relative
7528 to the <link to="IVirtualBox::homeFolder">
7529 VirtualBox home directory</link>.
7530 When reading this property, a full path is
7531 always returned.
7532 </note>
7533 <note>
7534 The specified path may not exist, it will be created
7535 when necessary.
7536 </note>
7537
7538 <see>
7539 <link to="IVirtualBox::createMachine"/>,
7540 <link to="IVirtualBox::openMachine"/>
7541 </see>
7542 </desc>
7543 </attribute>
7544
7545 <attribute name="defaultHardDiskFolder" type="wstring">
7546 <desc>
7547 Full path to the default directory used to create new or open existing
7548 virtual disks.
7549
7550 This path is used when the storage unit of a hard disk is a regular file
7551 in the host's file system and only a file name that contains no path is
7552 given.
7553
7554 The initial value of this property is
7555 <tt>&lt;</tt>
7556 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7557 <tt>&gt;/HardDisks</tt>.
7558
7559 <note>
7560 Setting this property to @c null or empty string will restore the
7561 initial value.
7562 </note>
7563 <note>
7564 When settings this property, the specified path can be relative
7565 to the
7566 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7567 absolute. When reading this property, a full path is
7568 always returned.
7569 </note>
7570 <note>
7571 The specified path may not exist, it will be created
7572 when necessary.
7573 </note>
7574
7575 <see>
7576 IMedium,
7577 <link to="IVirtualBox::createHardDisk"/>,
7578 <link to="IVirtualBox::openHardDisk"/>,
7579 <link to="IMedium::location"/>
7580 </see>
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7585 <desc>
7586 List of all medium storage formats supported by this VirtualBox
7587 installation.
7588
7589 Keep in mind that the medium format identifier
7590 (<link to="IMediumFormat::id"/>) used in other API calls like
7591 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7592 medium format is a case-insensitive string. This means that, for
7593 example, all of the following strings:
7594 <pre>
7595 "VDI"
7596 "vdi"
7597 "VdI"</pre>
7598 refer to the same medium format.
7599
7600 Note that the virtual medium framework is backend-based, therefore
7601 the list of supported formats depends on what backends are currently
7602 installed.
7603
7604 <see>
7605 <link to="IMediumFormat"/>,
7606 </see>
7607 </desc>
7608 </attribute>
7609
7610 <attribute name="defaultHardDiskFormat" type="wstring">
7611 <desc>
7612 Identifier of the default medium format used by VirtualBox.
7613
7614 The medium format set by this attribute is used by VirtualBox
7615 when the medium format was not specified explicitly. One example is
7616 <link to="IVirtualBox::createHardDisk"/> with the empty
7617 format argument. A more complex example is implicit creation of
7618 differencing media when taking a snapshot of a virtual machine:
7619 this operation will try to use a format of the parent medium first
7620 and if this format does not support differencing media the default
7621 format specified by this argument will be used.
7622
7623 The list of supported medium formats may be obtained by the
7624 <link to="#mediaFormats"/> call. Note that the default medium
7625 format must have a capability to create differencing media;
7626 otherwise operations that create media implicitly may fail
7627 unexpectedly.
7628
7629 The initial value of this property is <tt>"VDI"</tt> in the current
7630 version of the VirtualBox product, but may change in the future.
7631
7632 <note>
7633 Setting this property to @c null or empty string will restore the
7634 initial value.
7635 </note>
7636
7637 <see>
7638 <link to="#mediaFormats"/>,
7639 <link to="IMediumFormat::id"/>,
7640 <link to="IVirtualBox::createHardDisk"/>
7641 </see>
7642 </desc>
7643 </attribute>
7644
7645 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7646 <desc>
7647 Library that provides authentication for VRDP clients. The library
7648 is used if a virtual machine's authentication type is set to "external"
7649 in the VM RemoteDisplay configuration.
7650
7651 The system library extension (".DLL" or ".so") must be omitted.
7652 A full path can be specified; if not, then the library must reside on the
7653 system's default library path.
7654
7655 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7656 of that name in one of the default VirtualBox library directories.
7657
7658 For details about VirtualBox authentication libraries and how to implement
7659 them, please refer to the VirtualBox manual.
7660
7661 <note>
7662 Setting this property to @c null or empty string will restore the
7663 initial value.
7664 </note>
7665 </desc>
7666 </attribute>
7667
7668 <attribute name="webServiceAuthLibrary" type="wstring">
7669 <desc>
7670 Library that provides authentication for webservice clients. The library
7671 is used if a virtual machine's authentication type is set to "external"
7672 in the VM RemoteDisplay configuration and will be called from
7673 within the <link to="IWebsessionManager::logon" /> implementation.
7674
7675 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7676 there is no per-VM setting for this, as the webservice is a global
7677 resource (if it is running). Only for this setting (for the webservice),
7678 setting this value to a literal <tt>"null"</tt> string disables authentication,
7679 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7680 no matter what user name and password are supplied.
7681
7682 The initial value of this property is <tt>"VRDPAuth"</tt>,
7683 meaning that the webservice will use the same authentication
7684 library that is used by default for VBoxVRDP (again, see
7685 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7686 The format and calling convention of authentication libraries
7687 is the same for the webservice as it is for VBoxVRDP.
7688
7689 <note>
7690 Setting this property to @c null or empty string will restore the
7691 initial value.
7692 </note>
7693 </desc>
7694 </attribute>
7695
7696 <attribute name="LogHistoryCount" type="unsigned long">
7697 <desc>
7698 This value specifies how many old release log files are kept.
7699 </desc>
7700 </attribute>
7701
7702 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7703 <desc>This value hold the default audio driver for the current
7704 system.</desc>
7705 </attribute>
7706
7707 <method name="getMaxDevicesPerPortForStorageBus">
7708 <desc>Returns the maximum number of devices which can be attached to a port
7709 for the given storage bus.</desc>
7710
7711 <param name="bus" type="StorageBus" dir="in">
7712 <desc>The storage bus type to get the value for.</desc>
7713 </param>
7714
7715 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7716 <desc>The maximum number of devices which can eb attached to the port for the given
7717 storage bus.</desc>
7718 </param>
7719 </method>
7720
7721 <method name="getMinPortCountForStorageBus">
7722 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7723
7724 <param name="bus" type="StorageBus" dir="in">
7725 <desc>The storage bus type to get the value for.</desc>
7726 </param>
7727
7728 <param name="minPortCount" type="unsigned long" dir="return">
7729 <desc>The minimum number of ports for the given storage bus.</desc>
7730 </param>
7731 </method>
7732
7733 <method name="getMaxPortCountForStorageBus">
7734 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7735
7736 <param name="bus" type="StorageBus" dir="in">
7737 <desc>The storage bus type to get the value for.</desc>
7738 </param>
7739
7740 <param name="maxPortCount" type="unsigned long" dir="return">
7741 <desc>The maximum number of ports for the given storage bus.</desc>
7742 </param>
7743 </method>
7744
7745 <method name="getMaxInstancesOfStorageBus">
7746 <desc>Returns the maximum number of storage bus instances which
7747 can be configured for each VM. This corresponds to the number of
7748 storage controllers one can have.</desc>
7749
7750 <param name="bus" type="StorageBus" dir="in">
7751 <desc>The storage bus type to get the value for.</desc>
7752 </param>
7753
7754 <param name="maxInstances" type="unsigned long" dir="return">
7755 <desc>The maximum number of instances for the given storage bus.</desc>
7756 </param>
7757 </method>
7758 </interface>
7759
7760 <!--
7761 // IGuest
7762 /////////////////////////////////////////////////////////////////////////
7763 -->
7764
7765 <interface
7766 name="IGuestOSType" extends="$unknown"
7767 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7768 wsmap="struct"
7769 >
7770 <desc>
7771 </desc>
7772
7773 <attribute name="familyId" type="wstring" readonly="yes">
7774 <desc>Guest OS family identifier string.</desc>
7775 </attribute>
7776
7777 <attribute name="familyDescription" type="wstring" readonly="yes">
7778 <desc>Human readable description of the guest OS family.</desc>
7779 </attribute>
7780
7781 <attribute name="id" type="wstring" readonly="yes">
7782 <desc>Guest OS identifier string.</desc>
7783 </attribute>
7784
7785 <attribute name="description" type="wstring" readonly="yes">
7786 <desc>Human readable description of the guest OS.</desc>
7787 </attribute>
7788
7789 <attribute name="is64Bit" type="boolean" readonly="yes">
7790 <desc>Returns @c true if the given OS is 64-bit</desc>
7791 </attribute>
7792
7793 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7794 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7795 </attribute>
7796
7797 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7798 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7799 </attribute>
7800
7801 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7802 <desc>Recommended RAM size in Megabytes.</desc>
7803 </attribute>
7804
7805 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7806 <desc>Recommended video RAM size in Megabytes.</desc>
7807 </attribute>
7808
7809 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7810 <desc>Recommended hard disk size in Megabytes.</desc>
7811 </attribute>
7812
7813 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7814 <desc>Returns recommended network adapter for this OS type.</desc>
7815 </attribute>
7816 </interface>
7817
7818 <interface
7819 name="IGuest" extends="$unknown"
7820 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7821 wsmap="managed"
7822 >
7823 <desc>
7824 The IGuest interface represents information about the operating system
7825 running inside the virtual machine. Used in
7826 <link to="IConsole::guest"/>.
7827
7828 IGuest provides information about the guest operating system, whether
7829 Guest Additions are installed and other OS-specific virtual machine
7830 properties.
7831 </desc>
7832
7833 <attribute name="OSTypeId" type="wstring" readonly="yes">
7834 <desc>
7835 Identifier of the Guest OS type as reported by the Guest
7836 Additions.
7837 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7838 an IGuestOSType object representing details about the given
7839 Guest OS type.
7840 <note>
7841 If Guest Additions are not installed, this value will be
7842 the same as <link to="IMachine::OSTypeId"/>.
7843 </note>
7844 </desc>
7845 </attribute>
7846
7847 <attribute name="additionsActive" type="boolean" readonly="yes">
7848 <desc>
7849 Flag whether the Guest Additions are installed and active
7850 in which case their version will be returned by the
7851 <link to="#additionsVersion"/> property.
7852 </desc>
7853 </attribute>
7854
7855 <attribute name="additionsVersion" type="wstring" readonly="yes">
7856 <desc>
7857 Version of the Guest Additions (3 decimal numbers separated
7858 by dots) or empty when the Additions are not installed. The
7859 Additions may also report a version but yet not be active as
7860 the version might be refused by VirtualBox (incompatible) or
7861 other failures occurred.
7862 </desc>
7863 </attribute>
7864
7865 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7866 <desc>
7867 Flag whether seamless guest display rendering (seamless desktop
7868 integration) is supported.
7869 </desc>
7870 </attribute>
7871
7872 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7873 <desc>
7874 Flag whether the guest is in graphics mode. If it is not, then
7875 seamless rendering will not work, resize hints are not immediately
7876 acted on and guest display resizes are probably not initiated by
7877 the guest additions.
7878 </desc>
7879 </attribute>
7880
7881 <attribute name="memoryBalloonSize" type="unsigned long">
7882 <desc>Guest system memory balloon size in megabytes.</desc>
7883 </attribute>
7884
7885 <attribute name="statisticsUpdateInterval" type="unsigned long">
7886 <desc>Interval to update guest statistics in seconds.</desc>
7887 </attribute>
7888
7889 <method name="setCredentials">
7890 <desc>
7891 Store login credentials that can be queried by guest operating
7892 systems with Additions installed. The credentials are transient
7893 to the session and the guest may also choose to erase them. Note
7894 that the caller cannot determine whether the guest operating system
7895 has queried or made use of the credentials.
7896
7897 <result name="VBOX_E_VM_ERROR">
7898 VMM device is not available.
7899 </result>
7900
7901 </desc>
7902 <param name="userName" type="wstring" dir="in">
7903 <desc>User name string, can be empty</desc>
7904 </param>
7905 <param name="password" type="wstring" dir="in">
7906 <desc>Password string, can be empty</desc>
7907 </param>
7908 <param name="domain" type="wstring" dir="in">
7909 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7910 </param>
7911 <param name="allowInteractiveLogon" type="boolean" dir="in">
7912 <desc>
7913 Flag whether the guest should alternatively allow the user to
7914 interactively specify different credentials. This flag might
7915 not be supported by all versions of the Additions.
7916 </desc>
7917 </param>
7918 </method>
7919
7920 <method name="getStatistic">
7921 <desc>
7922 Query specified guest statistics as reported by the VirtualBox Additions.
7923 </desc>
7924 <param name="cpuId" type="unsigned long" dir="in">
7925 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7926 </param>
7927 <param name="statistic" type="GuestStatisticType" dir="in">
7928 <desc>Statistic type.</desc>
7929 </param>
7930 <param name="statVal" type="unsigned long" dir="return">
7931 <desc>Statistics value</desc>
7932 </param>
7933 </method>
7934
7935 </interface>
7936
7937
7938 <!--
7939 // IProgress
7940 /////////////////////////////////////////////////////////////////////////
7941 -->
7942
7943 <interface
7944 name="IProgress" extends="$unknown"
7945 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7946 wsmap="managed"
7947 >
7948 <desc>
7949 The IProgress interface is used to track and control
7950 asynchronous tasks within VirtualBox.
7951
7952 An instance of this is returned every time VirtualBox starts
7953 an asynchronous task (in other words, a separate thread) which
7954 continues to run after a method call returns. For example,
7955 <link to="IConsole::saveState" />, which saves the state of
7956 a running virtual machine, can take a long time to complete.
7957 To be able to display a progress bar, a user interface such as
7958 the VirtualBox graphical user interface can use the IProgress
7959 object returned by that method.
7960
7961 Note that IProgress is a "read-only" interface in the sense
7962 that only the VirtualBox internals behind the Main API can
7963 create and manipulate progress objects, whereas client code
7964 can only use the IProgress object to monitor a task's
7965 progress and, if <link to="#cancelable" /> is @c true,
7966 cancel the task by calling <link to="#cancel" />.
7967
7968 A task represented by IProgress consists of either one or
7969 several sub-operations that run sequentially, one by one (see
7970 <link to="#operation" /> and <link to="#operationCount" />).
7971 Every operation is identified by a number (starting from 0)
7972 and has a separate description.
7973
7974 You can find the individual percentage of completion of the current
7975 operation in <link to="#operationPercent" /> and the
7976 percentage of completion of the task as a whole
7977 in <link to="#percent" />.
7978
7979 Similarly, you can wait for the completion of a particular
7980 operation via <link to="#waitForOperationCompletion" /> or
7981 for the completion of the whole task via
7982 <link to="#waitForCompletion" />.
7983 </desc>
7984
7985 <attribute name="id" type="uuid" mod="string" readonly="yes">
7986 <desc>ID of the task.</desc>
7987 </attribute>
7988
7989 <attribute name="description" type="wstring" readonly="yes">
7990 <desc>Description of the task.</desc>
7991 </attribute>
7992
7993 <attribute name="initiator" type="$unknown" readonly="yes">
7994 <desc>Initiator of the task.</desc>
7995 </attribute>
7996
7997 <attribute name="cancelable" type="boolean" readonly="yes">
7998 <desc>Whether the task can be interrupted.</desc>
7999 </attribute>
8000
8001 <attribute name="percent" type="unsigned long" readonly="yes">
8002 <desc>
8003 Current progress value of the task as a whole, in percent.
8004 This value depends on how many operations are already complete.
8005 Returns 100 if <link to="#completed" /> is @c true.
8006 </desc>
8007 </attribute>
8008
8009 <attribute name="timeRemaining" type="long" readonly="yes">
8010 <desc>
8011 Estimated remaining time until the task completes, in
8012 seconds. Returns 0 once the task has completed; returns -1
8013 if the remaining time cannot be computed, in particular if
8014 the current progress is 0.
8015
8016 Even if a value is returned, the estimate will be unreliable
8017 for low progress values. It will become more reliable as the
8018 task progresses; it is not recommended to display an ETA
8019 before at least 20% of a task have completed.
8020 </desc>
8021 </attribute>
8022
8023 <attribute name="completed" type="boolean" readonly="yes">
8024 <desc>Whether the task has been completed.</desc>
8025 </attribute>
8026
8027 <attribute name="canceled" type="boolean" readonly="yes">
8028 <desc>Whether the task has been canceled.</desc>
8029 </attribute>
8030
8031 <attribute name="resultCode" type="long" readonly="yes">
8032 <desc>
8033 Result code of the progress task.
8034 Valid only if <link to="#completed"/> is @c true.
8035 </desc>
8036 </attribute>
8037
8038 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8039 <desc>
8040 Extended information about the unsuccessful result of the
8041 progress operation. May be @c null if no extended information
8042 is available.
8043 Valid only if <link to="#completed"/> is @c true and
8044 <link to="#resultCode"/> indicates a failure.
8045 </desc>
8046 </attribute>
8047
8048 <attribute name="operationCount" type="unsigned long" readonly="yes">
8049 <desc>
8050 Number of sub-operations this task is divided into.
8051 Every task consists of at least one suboperation.
8052 </desc>
8053 </attribute>
8054
8055 <attribute name="operation" type="unsigned long" readonly="yes">
8056 <desc>Number of the sub-operation being currently executed.</desc>
8057 </attribute>
8058
8059 <attribute name="operationDescription" type="wstring" readonly="yes">
8060 <desc>
8061 Description of the sub-operation being currently executed.
8062 </desc>
8063 </attribute>
8064
8065 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8066 <desc>Progress value of the current sub-operation only, in percent.</desc>
8067 </attribute>
8068
8069 <method name="setCurrentOperationProgress">
8070 <desc>Internal method, not to be called externally.</desc>
8071 <param name="percent" type="unsigned long" dir="in" />
8072 </method>
8073 <method name="setNextOperation">
8074 <desc>Internal method, not to be called externally.</desc>
8075 <param name="nextOperationDescription" type="wstring" dir="in" />
8076 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8077 </method>
8078
8079 <method name="waitForCompletion">
8080 <desc>
8081 Waits until the task is done (including all sub-operations)
8082 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8083
8084 <result name="VBOX_E_IPRT_ERROR">
8085 Failed to wait for task completion.
8086 </result>
8087 </desc>
8088
8089 <param name="timeout" type="long" dir="in">
8090 <desc>
8091 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8092 </desc>
8093 </param>
8094 </method>
8095
8096 <method name="waitForOperationCompletion">
8097 <desc>
8098 Waits until the given operation is done with a given timeout in
8099 milliseconds; specify -1 for an indefinite wait.
8100
8101 <result name="VBOX_E_IPRT_ERROR">
8102 Failed to wait for operation completion.
8103 </result>
8104
8105 </desc>
8106 <param name="operation" type="unsigned long" dir="in">
8107 <desc>
8108 Number of the operation to wait for.
8109 Must be less than <link to="#operationCount"/>.
8110 </desc>
8111 </param>
8112 <param name="timeout" type="long" dir="in">
8113 <desc>
8114 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8115 </desc>
8116 </param>
8117 </method>
8118
8119 <method name="cancel">
8120 <desc>
8121 Cancels the task.
8122 <note>
8123 If <link to="#cancelable"/> is @c false, then this method will fail.
8124 </note>
8125
8126 <result name="VBOX_E_INVALID_OBJECT_STATE">
8127 Operation cannot be canceled.
8128 </result>
8129
8130 </desc>
8131 </method>
8132
8133 </interface>
8134
8135
8136 <!--
8137 // ISnapshot
8138 /////////////////////////////////////////////////////////////////////////
8139 -->
8140
8141 <interface
8142 name="ISnapshot" extends="$unknown"
8143 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8144 wsmap="managed"
8145 >
8146 <desc>
8147 The ISnapshot interface represents a snapshot of the virtual
8148 machine.
8149
8150 Together with the differencing media that are created
8151 when a snapshot is taken, a machine can be brought back to
8152 the exact state it was in when the snapshot was taken.
8153
8154 The ISnapshot interface has no methods, only attributes; snapshots
8155 are controlled through methods of the <link to="IConsole" /> interface
8156 which also manage the media associated with the snapshot.
8157 The following operations exist:
8158
8159 <ul>
8160 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8161 by creating new, empty differencing images for the machine's
8162 media and saving the VM settings and (if the VM is running)
8163 the current VM state in the snapshot.
8164
8165 The differencing images will then receive all data written to
8166 the machine's media, while their parent (base) images
8167 remain unmodified after the snapshot has been taken (see
8168 <link to="IMedium" /> for details about differencing images).
8169 This simplifies restoring a machine to the state of a snapshot:
8170 only the differencing images need to be deleted.
8171
8172 The current machine state is not changed by taking a snapshot.
8173 If the machine is running, it will resume execution after the
8174 snapshot has been taken.
8175 </li>
8176
8177 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8178 a previous snapshot. This resets the machine's state to that of
8179 the previous snapshot by deleting the differencing image of each
8180 of the machine's media and setting the machine's settings
8181 and state to the state that was saved in the snapshot (if any).
8182
8183 This destroys the machine's current state.
8184 </li>
8185
8186 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8187 without affecting the current machine state.
8188
8189 This does not change the machine, but instead frees the resources
8190 allocated when the snapshot was taken: the settings and machine state
8191 is deleted (if any), and the snapshot's differencing image for each
8192 of the machine's media gets merged with its parent image.
8193
8194 Neither the current machine state nor other snapshots are affected
8195 by this operation, except that parent media will be modified
8196 to contain the disk data associated with the snapshot being deleted.
8197 </li>
8198 </ul>
8199
8200 Each snapshot contains the settings of the virtual machine (hardware
8201 configuration etc.). In addition, if the machine was running when the
8202 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8203 the current VM state is saved in the snapshot (similarly to what happens
8204 when a VM's state is saved). The snapshot is then said to
8205 be <i>online</i> because when restoring it, the VM will be running.
8206
8207 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8208 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8209
8210 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8211 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8212 it then contains a so-called "zero execution state", representing a
8213 machine that is powered off.
8214
8215 <h3>Snapshot branches and the "current" snapshot</h3>
8216
8217 Snapshots can be chained, whereby every next snapshot is based on the
8218 previous one. This chaining is related to medium branching
8219 (see the <link to="IMedium"/> description) in that every time
8220 a new snapshot is created, a new differencing medium is implicitly
8221 created for all normal media attached to the machine.
8222
8223 Each virtual machine has a "current snapshot", identified by
8224 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8225 to the last snapshot in the chain. In a future version of VirtualBox,
8226 it will be possible to reset a machine's current state to that of an
8227 earlier snapshot without discarding the current state so that it will be
8228 possible to create alternative snapshot paths in a snapshot tree.
8229
8230 In the current implementation, multiple snapshot branches within one
8231 virtual machine are not allowed. Every machine has a single branch,
8232 and <link to="IConsole::takeSnapshot"/> operation adds a new
8233 snapshot to the top of that branch.
8234 </desc>
8235
8236 <attribute name="id" type="uuid" mod="string" readonly="yes">
8237 <desc>UUID of the snapshot.</desc>
8238 </attribute>
8239
8240 <attribute name="name" type="wstring">
8241 <desc>Short name of the snapshot.</desc>
8242 </attribute>
8243
8244 <attribute name="description" type="wstring">
8245 <desc>Optional description of the snapshot.</desc>
8246 </attribute>
8247
8248 <attribute name="timeStamp" type="long long" readonly="yes">
8249 <desc>
8250 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8251 </desc>
8252 </attribute>
8253
8254 <attribute name="online" type="boolean" readonly="yes">
8255 <desc>
8256 @c true if this snapshot is an online snapshot and @c false otherwise.
8257
8258 When this attribute is @c true, the
8259 <link to="IMachine::stateFilePath"/> attribute of the
8260 <link to="#machine"/> object associated with this snapshot
8261 will point to the saved state file. Otherwise, it will be
8262 an empty string.
8263 </desc>
8264 </attribute>
8265
8266 <attribute name="machine" type="IMachine" readonly="yes">
8267 <desc>
8268 Virtual machine this snapshot is taken on. This object
8269 stores all settings the machine had when taking this snapshot.
8270 <note>
8271 The returned machine object is immutable, i.e. no
8272 any settings can be changed.
8273 </note>
8274 </desc>
8275 </attribute>
8276
8277 <attribute name="parent" type="ISnapshot" readonly="yes">
8278 <desc>
8279 Parent snapshot (a snapshot this one is based on), or
8280 @c null if the snapshot has no parent.
8281 </desc>
8282 </attribute>
8283
8284 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8285 <desc>
8286 Child snapshots (all snapshots having this one as a parent).
8287 <note>
8288 In the current implementation, there can be only one
8289 child snapshot, or no children at all, meaning this is the
8290 last (head) snapshot.
8291 </note>
8292 </desc>
8293 </attribute>
8294
8295 </interface>
8296
8297
8298 <!--
8299 // IMedium
8300 /////////////////////////////////////////////////////////////////////////
8301 -->
8302
8303 <enum
8304 name="MediumState"
8305 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8306 >
8307 <desc>
8308 Virtual medium state.
8309 <see>IMedium</see>
8310 </desc>
8311
8312 <const name="NotCreated" value="0">
8313 <desc>
8314 Associated medium storage does not exist (either was not created yet or
8315 was deleted).
8316 </desc>
8317 </const>
8318 <const name="Created" value="1">
8319 <desc>
8320 Associated storage exists and accessible; this gets set if the
8321 accessibility check performed by <link to="IMedium::refreshState" />
8322 was successful.
8323 </desc>
8324 </const>
8325 <const name="LockedRead" value="2">
8326 <desc>
8327 Medium is locked for reading, no data modification is possible. A
8328 medium is typically locked for reading while it is used by a running
8329 virtual machine but has a depending differencing image that receives
8330 the actual write operations. This way one base medium can have multiple
8331 child differencing images which can be written to simultaneously.
8332 </desc>
8333 </const>
8334 <const name="LockedWrite" value="3">
8335 <desc>
8336 Medium is locked for writing, no concurrent data reading or modification
8337 is possible. A medium is typically locked for writing when it receives
8338 write operations from a running virtual machine. If a medium has
8339 differencing images, then while the machine is running, only the last
8340 ("leaf") differencing image is locked for writing, whereas its parents
8341 are locked for reading only.
8342 </desc>
8343 </const>
8344 <const name="Inaccessible" value="4">
8345 <desc>
8346 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8347 not yet been performed, or else, associated medium storage is not
8348 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8349 is empty, in the second case, it describes the error that occured.
8350 </desc>
8351 </const>
8352 <const name="Creating" value="5">
8353 <desc>
8354 Associated medium storage is being created.
8355 </desc>
8356 </const>
8357 <const name="Deleting" value="6">
8358 <desc>
8359 Associated medium storage is being deleted.
8360 </desc>
8361 </const>
8362 </enum>
8363
8364 <enum
8365 name="MediumType"
8366 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8367 >
8368 <desc>
8369 Virtual medium type.
8370 <see>IMedium</see>
8371 </desc>
8372
8373 <const name="Normal" value="0">
8374 <desc>
8375 Normal medium (attached directly or indirectly, preserved
8376 when taking snapshots).
8377 </desc>
8378 </const>
8379 <const name="Immutable" value="1">
8380 <desc>
8381 Immutable medium (attached indirectly, changes are wiped out
8382 the next time the virtual machine is started).
8383 </desc>
8384 </const>
8385 <const name="Writethrough" value="2">
8386 <desc>
8387 Write through medium (attached directly, ignored when
8388 taking snapshots).
8389 </desc>
8390 </const>
8391 </enum>
8392
8393 <enum
8394 name="MediumVariant"
8395 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8396 >
8397 <desc>
8398 Virtual medium image variant. More than one flag may be set.
8399 <see>IMedium</see>
8400 </desc>
8401
8402 <const name="Standard" value="0">
8403 <desc>
8404 No particular variant requested, results in using the backend default.
8405 </desc>
8406 </const>
8407 <const name="VmdkSplit2G" value="0x01">
8408 <desc>
8409 VMDK image split in chunks of less than 2GByte.
8410 </desc>
8411 </const>
8412 <const name="VmdkStreamOptimized" value="0x04">
8413 <desc>
8414 VMDK streamOptimized image. Special import/export format which is
8415 read-only/append-only.
8416 </desc>
8417 </const>
8418 <const name="VmdkESX" value="0x08">
8419 <desc>
8420 VMDK format variant used on ESX products.
8421 </desc>
8422 </const>
8423 <const name="Fixed" value="0x10000">
8424 <desc>
8425 Fixed image. Only allowed for base images.
8426 </desc>
8427 </const>
8428 <const name="Diff" value="0x20000">
8429 <desc>
8430 Fixed image. Only allowed for base images.
8431 </desc>
8432 </const>
8433 </enum>
8434
8435 <interface
8436 name="IMediumAttachment" extends="$unknown"
8437 uuid="7bb6ac41-8c03-4863-9eea-d9c76561b8d1"
8438 wsmap="struct"
8439 >
8440 <desc>
8441 The IMediumAttachment interface represents the attachment
8442 of a storage medium to a virtual machine. Each machine contains
8443 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8444
8445 Each medium attachment specifies a storage controller as well as a port
8446 and device number. Fixed media (hard disks) will always also specify
8447 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8448 medium. For removeable media, the IMedia instance is optional; it can be
8449 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8450 </desc>
8451
8452 <attribute name="medium" type="IMedium" readonly="yes">
8453 <desc>Medium object associated with this attachment; it
8454 can be @c null for removable devices.</desc>
8455 </attribute>
8456
8457 <attribute name="controller" type="IStorageController" readonly="yes">
8458 <desc>Storage controller object to which this attachment belongs.</desc>
8459 </attribute>
8460
8461 <attribute name="port" type="long" readonly="yes">
8462 <desc>Port number of this attachment.</desc>
8463 </attribute>
8464
8465 <attribute name="device" type="long" readonly="yes">
8466 <desc>Device slot number of this attachment.</desc>
8467 </attribute>
8468
8469 <attribute name="type" type="DeviceType" readonly="yes">
8470 <desc>Device type of this attachment.</desc>
8471 </attribute>
8472
8473 <attribute name="passthrough" type="boolean" readonly="yes">
8474 <desc>Pass I/O requests through to a device on the host.</desc>
8475 </attribute>
8476
8477 </interface>
8478
8479 <interface
8480 name="IMedium" extends="$unknown"
8481 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8482 wsmap="managed"
8483 >
8484 <desc>
8485 The IMedium interface represents virtual storage for a machine's
8486 hard disks, CD/DVD or floppy drives. It will typically represent
8487 a disk image on the host, for example a VDI or VMDK file representing
8488 a virtual hard disk, or an ISO or RAW file representing virtual
8489 removable media, but can also point to a network location (e.g.
8490 for iSCSI targets).
8491
8492 Instances of IMedium are connected to virtual machines by way of
8493 medium attachments (see <link to="IMediumAttachment" />), which link
8494 the storage medium to a particular device slot of a storage controller
8495 of the virtual machine.
8496 In the VirtualBox API, virtual storage is therefore always represented
8497 by the following chain of object links:
8498
8499 <ul>
8500 <li><link to="IMachine::storageControllers"/> contains an array of
8501 storage controllers (IDE, SATA, SCSI or a floppy controller;
8502 these are instances of <link to="IStorageController"/>).</li>
8503 <li><link to="IMachine::mediumAttachments"/> contains an array of
8504 medium attachments (instances of <link to="IMediumAttachment"/>),
8505 each containing the name of a storage controller from the above
8506 array, a port/device specification, and an instance of
8507 IMedium representing the medium storage (image file). For removable
8508 media, the storage medium is optional; a medium attachment with no
8509 medium represents a CD/DVD or floppy drive with no medium inserted.
8510 By contrast, hard disk attachments will always have an IMedium
8511 object attached.</li>
8512 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8513 computer or a network resource) that holds actual data. The location of
8514 the storage unit is represented by the <link to="#location"/> attribute.
8515 The value of this attribute is medium type dependent.</li>
8516 </ul>
8517
8518 Existing media are opened using the following methods, depending on the
8519 media type:
8520 <ul>
8521 <li><link to="IVirtualBox::openHardDisk"/></li>
8522 <li><link to="IVirtualBox::openDVDImage"/></li>
8523 <li><link to="IVirtualBox::openFloppyImage"/></li>
8524 </ul>
8525
8526 New hard disk media can be created with the VirtualBox API using the
8527 <link to="IVirtualBox::createHardDisk"/> method.
8528
8529 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8530 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8531 type in a regular file.
8532
8533 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8534 drive; in that case the <link to="#id" /> attribute contains the UUID of
8535 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8536
8537 <h3>Known media</h3>
8538
8539 When an existing medium is opened for the first time, it is automatically
8540 remembered by the given VirtualBox installation or, in other words, becomes
8541 a <i>known medium</i>. Known media are stored in the media
8542 registry transparently maintained by VirtualBox and stored in settings
8543 files so that this registry is preserved when VirtualBox is not running.
8544
8545 Newly created virtual media are remembered only when the associated
8546 storage unit is actually created.
8547
8548 All known media can be enumerated using
8549 <link to="IVirtualBox::hardDisks"/>,
8550 <link to="IVirtualBox::DVDImages"/> and
8551 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8552 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8553 and similar methods or by location using
8554 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8555
8556 Only known media can be attached to virtual machines.
8557
8558 Removing known media from the media registry is performed when the given
8559 medium is closed using the <link to="#close"/> method or when its
8560 associated storage unit is deleted.
8561
8562 <h3>Accessibility checks</h3>
8563
8564 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8565 method is called explicitly on a medium. This is done to make the VirtualBox object
8566 ready for serving requests as fast as possible and let the end-user
8567 application decide if it needs to check media accessibility right away or not.
8568
8569 As a result, when VirtualBox starts up (e.g. the VirtualBox
8570 object gets created for the first time), all known media are in the
8571 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8572 attribute is an empty string because no actual accessibility check has
8573 been made yet.
8574
8575 After calling <link to="#refreshState" />, a medium is considered
8576 <i>accessible</i> if its storage unit can be read. In that case, the
8577 <link to="#state"/> attribute has a value of "Created". If the storage
8578 unit cannot be read (for example, because it is located on a disconnected
8579 network resource, or was accidentally deleted outside VirtualBox),
8580 the medium is considered <i>inaccessible</i>, which is indicated by the
8581 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8582 obtained by reading the <link to="#lastAccessError"/> attribute.
8583
8584 <h3>Medium types</h3>
8585
8586 There are three types of medium behavior (see <link to="MediumType" />):
8587 "normal", "immutable" and "writethrough", represented by the
8588 <link to="#type"/> attribute. The type of the medium defines how the
8589 medium is attached to a virtual machine and what happens when a
8590 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8591 attached medium is taken. At the moment DVD and floppy media are always
8592 of type "writethrough".
8593
8594 All media can be also divided in two groups: <i>base</i> media and
8595 <i>differencing</i> media. A base medium contains all sectors of the
8596 medium data in its own storage and therefore can be used independently.
8597 In contrast, a differencing mediun is a "delta" to some other medium and
8598 contains only those sectors which differ from that other medium, which is
8599 then called a <i>parent</i>. The differencing medium is said to be
8600 <i>linked to</i> that parent. The parent may be itself a differencing
8601 medium, thus forming a chain of linked media. The last element in that
8602 chain must always be a base medium. Note that several differencing
8603 media may be linked to the same parent medium.
8604
8605 Differencing media can be distinguished from base media by querying the
8606 <link to="#parent"/> attribute: base media do not have parents they would
8607 depend on, so the value of this attribute is always @c null for them.
8608 Using this attribute, it is possible to walk up the medium tree (from the
8609 child medium to its parent). It is also possible to walk down the tree
8610 using the <link to="#children"/> attribute.
8611
8612 Note that the type of all differencing media is
8613 <link to="MediumType_Normal" />; all other values are meaningless for
8614 them. Base media may be of any type.
8615
8616 <h3>Creating hard disks</h3>
8617
8618 New base hard disks are created using
8619 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8620 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8621 disks are usually implicitly created by VirtualBox when needed but may
8622 also be created explicitly using <link to="#createDiffStorage"/>.
8623
8624 After the hard disk is successfully created (including the storage unit)
8625 or opened, it becomes a known hard disk (remembered in the internal media
8626 registry). Known hard disks can be attached to a virtual machine, accessed
8627 through <link to="IVirtualBox::getHardDisk"/> and
8628 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8629 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8630
8631 The following methods, besides <link to="IMedium::close"/>,
8632 automatically remove the hard disk from the media registry:
8633 <ul>
8634 <li><link to="#deleteStorage"/></li>
8635 <li><link to="#mergeTo"/></li>
8636 </ul>
8637
8638 If the storage unit of the hard disk is a regular file in the host's
8639 file system then the rules stated in the description of the
8640 <link to="IMedium::location"/> attribute apply when setting its value. In
8641 addition, a plain file name without any path may be given, in which case
8642 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8643 folder</link> will be prepended to it.
8644
8645 <h4>Automatic composition of the file name part</h4>
8646
8647 Another extension to the <link to="IMedium::location"/> attribute is that
8648 there is a possibility to cause VirtualBox to compose a unique value for
8649 the file name part of the location using the UUID of the hard disk. This
8650 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8651 e.g. before the storage unit is created, and works as follows. You set the
8652 value of the <link to="IMedium::location"/> attribute to a location
8653 specification which only contains the path specification but not the file
8654 name part and ends with either a forward slash or a backslash character.
8655 In response, VirtualBox will generate a new UUID for the hard disk and
8656 compose the file name using the following pattern:
8657 <pre>
8658 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8659 </pre>
8660 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8661 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8662 is the default extension for the storage format of this hard disk. After
8663 that, you may call any of the methods that create a new hard disk storage
8664 unit and they will use the generated UUID and file name.
8665
8666 <h3>Attaching Hard Disks</h3>
8667
8668 Hard disks are attached to virtual machines using the
8669 <link to="IMachine::attachDevice"/> method and detached using the
8670 <link to="IMachine::detachDevice"/> method. Depending on their
8671 <link to="#type"/>, hard disks are attached either
8672 <i>directly</i> or <i>indirectly</i>.
8673
8674 When a hard disk is being attached directly, it is associated with the
8675 virtual machine and used for hard disk operations when the machine is
8676 running. When a hard disk is being attached indirectly, a new differencing
8677 hard disk linked to it is implicitly created and this differencing hard
8678 disk is associated with the machine and used for hard disk operations.
8679 This also means that if <link to="IMachine::attachDevice"/> performs
8680 a direct attachment then the same hard disk will be returned in response
8681 to the subsequent <link to="IMachine::getMedium"/> call; however if
8682 an indirect attachment is performed then
8683 <link to="IMachine::getMedium"/> will return the implicitly created
8684 differencing hard disk, not the original one passed to <link
8685 to="IMachine::attachDevice"/>. In detail:
8686
8687 <ul>
8688 <li><b>Normal base</b> hard disks that do not have children (i.e.
8689 differencing hard disks linked to them) and that are not already
8690 attached to virtual machines in snapshots are attached <b>directly</b>.
8691 Otherwise, they are attached <b>indirectly</b> because having
8692 dependent children or being part of the snapshot makes it impossible
8693 to modify hard disk contents without breaking the integrity of the
8694 dependent party. The <link to="#readOnly"/> attribute allows to
8695 quickly determine the kind of the attachment for the given hard
8696 disk. Note that if a normal base hard disk is to be indirectly
8697 attached to a virtual machine with snapshots then a special
8698 procedure called <i>smart attachment</i> is performed (see below).</li>
8699 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8700 they are attached <b>directly</b> if they do not have children and are
8701 not attached to virtual machines in snapshots, and <b>indirectly</b>
8702 otherwise. Note that the smart attachment procedure is never performed
8703 for differencing hard disks.</li>
8704 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8705 they are designed to be non-writable. If an immutable hard disk is
8706 attached to a virtual machine with snapshots then a special
8707 procedure called smart attachment is performed (see below).</li>
8708 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8709 also as designed. This also means that writethrough hard disks cannot
8710 have other hard disks linked to them at all.</li>
8711 </ul>
8712
8713 Note that the same hard disk, regardless of its type, may be attached to
8714 more than one virtual machine at a time. In this case, the machine that is
8715 started first gains exclusive access to the hard disk and attempts to
8716 start other machines having this hard disk attached will fail until the
8717 first machine is powered down.
8718
8719 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8720 that the given hard disk remains associated with the given machine after a
8721 successful <link to="IMachine::detachDevice"/> call until
8722 <link to="IMachine::saveSettings"/> is called to save all changes to
8723 machine settings to disk. This deferring is necessary to guarantee that
8724 the hard disk configuration may be restored at any time by a call to
8725 <link to="IMachine::discardSettings"/> before the settings
8726 are saved (committed).
8727
8728 Note that if <link to="IMachine::discardSettings"/> is called after
8729 indirectly attaching some hard disks to the machine but before a call to
8730 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8731 all differencing hard disks implicitly created by
8732 <link to="IMachine::attachDevice"/> for these indirect attachments.
8733 Such implicitly created hard disks will also be immediately deleted when
8734 detached explicitly using the <link to="IMachine::detachDevice"/>
8735 call if it is made before <link to="IMachine::saveSettings"/>. This
8736 implicit deletion is safe because newly created differencing hard
8737 disks do not contain any user data.
8738
8739 However, keep in mind that detaching differencing hard disks that were
8740 implicitly created by <link to="IMachine::attachDevice"/>
8741 before the last <link to="IMachine::saveSettings"/> call will
8742 <b>not</b> implicitly delete them as they may already contain some data
8743 (for example, as a result of virtual machine execution). If these hard
8744 disks are no more necessary, the caller can always delete them explicitly
8745 using <link to="#deleteStorage"/> after they are actually de-associated
8746 from this machine by the <link to="IMachine::saveSettings"/> call.
8747
8748 <h3>Smart Attachment</h3>
8749
8750 When normal base or immutable hard disks are indirectly attached to a
8751 virtual machine then some additional steps are performed to make sure the
8752 virtual machine will have the most recent "view" of the hard disk being
8753 attached. These steps include walking through the machine's snapshots
8754 starting from the current one and going through ancestors up to the first
8755 snapshot. Hard disks attached to the virtual machine in all
8756 of the encountered snapshots are checked whether they are descendants of
8757 the given normal base or immutable hard disk. The first found child (which
8758 is the differencing hard disk) will be used instead of the normal base or
8759 immutable hard disk as a parent for creating a new differencing hard disk
8760 that will be actually attached to the machine. And only if no descendants
8761 are found or if the virtual machine does not have any snapshots then the
8762 normal base or immutable hard disk will be used itself as a parent for
8763 this differencing hard disk.
8764
8765 It is easier to explain what smart attachment does using the
8766 following example:
8767 <pre>
8768BEFORE attaching B.vdi: AFTER attaching B.vdi:
8769
8770Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8771 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8772 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8773 Snapshot 4 (none) Snapshot 4 (none)
8774 CurState (none) CurState (D3->D2.vdi)
8775
8776 NOT
8777 ...
8778 CurState (D3->B.vdi)
8779 </pre>
8780 The first column is the virtual machine configuration before the base hard
8781 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8782 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8783 mean that the hard disk that is actually attached to the machine is a
8784 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8785 another hard disk, <tt>B.vdi</tt>.
8786
8787 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8788 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8789 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8790 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8791 it cannot be attached directly and needs an indirect attachment (i.e.
8792 implicit creation of a new differencing hard disk). Due to the smart
8793 attachment procedure, the new differencing hard disk
8794 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8795 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8796 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8797 machine.
8798
8799 Note that if there is more than one descendant hard disk of the given base
8800 hard disk found in a snapshot, and there is an exact device, channel and
8801 bus match, then this exact match will be used. Otherwise, the youngest
8802 descendant will be picked up.
8803
8804 There is one more important aspect of the smart attachment procedure which
8805 is not related to snapshots at all. Before walking through the snapshots
8806 as described above, the backup copy of the current list of hard disk
8807 attachment is searched for descendants. This backup copy is created when
8808 the hard disk configuration is changed for the first time after the last
8809 <link to="IMachine::saveSettings"/> call and used by
8810 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8811 changes. When such a descendant is found in this backup copy, it will be
8812 simply re-attached back, without creating a new differencing hard disk for
8813 it. This optimization is necessary to make it possible to re-attach the
8814 base or immutable hard disk to a different bus, channel or device slot
8815 without losing the contents of the differencing hard disk actually
8816 attached to the machine in place of it.
8817 </desc>
8818
8819 <attribute name="id" type="uuid" mod="string" readonly="yes">
8820 <desc>
8821 UUID of the medium. For a newly created medium, this value is a randomly
8822 generated UUID.
8823
8824 <note>
8825 For media in one of MediumState_NotCreated, MediumState_Creating or
8826 MediumState_Deleting states, the value of this property is undefined
8827 and will most likely be an empty UUID.
8828 </note>
8829 </desc>
8830 </attribute>
8831
8832 <attribute name="description" type="wstring">
8833 <desc>
8834 Optional description of the medium. For a newly created medium the value
8835 of this attribute is an empty string.
8836
8837 Medium types that don't support this attribute will return E_NOTIMPL in
8838 attempt to get or set this attribute's value.
8839
8840 <note>
8841 For some storage types, reading this attribute may return an outdated
8842 (last known) value when <link to="#state"/> is <link
8843 to="MediumState_Inaccessible"/> or <link
8844 to="MediumState_LockedWrite"/> because the value of this attribute is
8845 stored within the storage unit itself. Also note that changing the
8846 attribute value is not possible in such case, as well as when the
8847 medium is the <link to="MediumState_LockedRead"/> state.
8848 </note>
8849 </desc>
8850 </attribute>
8851
8852 <attribute name="state" type="MediumState" readonly="yes">
8853 <desc>
8854 Returns the current medium state, which is the last state set by
8855 the accessibility check performed by <link to="#refreshState"/>.
8856 If that method has not yet been called on the medium, the state
8857 is "Inaccessible"; as opposed to truly inaccessible media, the
8858 value of <link to="#lastAccessError"/> will be an empty string in
8859 that case.
8860
8861 <note>As of version 3.1, this no longer performs an accessibility check
8862 automatically; call <link to="#refreshState"/> for that.
8863 </note>
8864 </desc>
8865 </attribute>
8866
8867 <attribute name="location" type="wstring">
8868 <desc>
8869 Location of the storage unit holding medium data.
8870
8871 The format of the location string is medium type specific. For medium
8872 types using regular files in a host's file system, the location
8873 string is the full file name.
8874
8875 Some medium types may support changing the storage unit location by
8876 simply changing the value of this property. If this operation is not
8877 supported, the implementation will return E_NOTIMPL in attempt to set
8878 this attribute's value.
8879
8880 When setting a value of the location attribute which is a regular file
8881 in the host's file system, the given file name may be either relative to
8882 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8883 absolute. Note that if the given location specification does not contain
8884 the file extension part then a proper default extension will be
8885 automatically appended by the implementation depending on the medium type.
8886 </desc>
8887 </attribute>
8888
8889 <attribute name="name" type="wstring" readonly="yes">
8890 <desc>
8891 Name of the storage unit holding medium data.
8892
8893 The returned string is a short version of the <link to="#location"/>
8894 attribute that is suitable for representing the medium in situations
8895 where the full location specification is too long (such as lists
8896 and comboboxes in GUI frontends). This string is also used by frontends
8897 to sort the media list alphabetically when needed.
8898
8899 For example, for locations that are regular files in the host's file
8900 system, the value of this attribute is just the file name (+ extension),
8901 without the path specification.
8902
8903 Note that as opposed to the <link to="#location"/> attribute, the name
8904 attribute will not necessary be unique for a list of media of the
8905 given type and format.
8906 </desc>
8907 </attribute>
8908
8909 <attribute name="deviceType" type="DeviceType" readonly="yes">
8910 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8911 medium.</desc>
8912 </attribute>
8913
8914 <attribute name="hostDrive" type="boolean" readonly="yes">
8915 <desc>True if this corresponds to a drive on the host.</desc>
8916 </attribute>
8917
8918 <attribute name="size" type="unsigned long long" readonly="yes">
8919 <desc>
8920 Physical size of the storage unit used to hold medium data (in bytes).
8921
8922 <note>
8923 For media whose <link to="#state"/> is <link
8924 to="MediumState_Inaccessible"/>, the value of this property is the
8925 last known size. For <link to="MediumState_NotCreated"/> media,
8926 the returned value is zero.
8927 </note>
8928 </desc>
8929 </attribute>
8930
8931 <attribute name="format" type="wstring" readonly="yes">
8932 <desc>
8933 Storage format of this medium.
8934
8935 The value of this attribute is a string that specifies a backend used
8936 to store medium data. The storage format is defined when you create a
8937 new medium or automatically detected when you open an existing medium,
8938 and cannot be changed later.
8939
8940 The list of all storage formats supported by this VirtualBox
8941 installation can be obtained using
8942 <link to="ISystemProperties::mediumFormats"/>.
8943 </desc>
8944 </attribute>
8945
8946 <attribute name="type" type="MediumType">
8947 <desc>
8948 Type (role) of this medium.
8949
8950 The following constraints apply when changing the value of this
8951 attribute:
8952 <ul>
8953 <li>If a medium is attached to a virtual machine (either in the
8954 current state or in one of the snapshots), its type cannot be
8955 changed.
8956 </li>
8957 <li>As long as the medium has children, its type cannot be set
8958 to <link to="MediumType_Writethrough"/>.
8959 </li>
8960 <li>The type of all differencing media is
8961 <link to="MediumType_Normal"/> and cannot be changed.
8962 </li>
8963 </ul>
8964
8965 The type of a newly created or opened medium is set to
8966 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8967 which have a type of <link to="MediumType_Writethrough"/>.
8968 </desc>
8969 </attribute>
8970
8971 <attribute name="parent" type="IMedium" readonly="yes">
8972 <desc>
8973 Parent of this medium (the medium this medium is directly based
8974 on).
8975
8976 Only differencing media have parents. For base (non-differencing)
8977 media, @c null is returned.
8978 </desc>
8979 </attribute>
8980
8981 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8982 <desc>
8983 Children of this medium (all differencing media directly based
8984 on this medium). A @c null array is returned if this medium
8985 does not have any children.
8986 </desc>
8987 </attribute>
8988
8989 <attribute name="base" type="IMedium" readonly="yes">
8990 <desc>
8991 Base medium of this medium.
8992
8993 If this is a differencing medium, its base medium is the medium
8994 the given medium branch starts from. For all other types of media, this
8995 property returns the medium object itself (i.e. the same object this
8996 property is read on).
8997 </desc>
8998 </attribute>
8999
9000 <attribute name="readOnly" type="boolean" readonly="yes">
9001 <desc>
9002 Returns @c true if this medium is read-only and @c false otherwise.
9003
9004 A medium is considered to be read-only when its contents cannot be
9005 modified without breaking the integrity of other parties that depend on
9006 this medium such as its child media or snapshots of virtual machines
9007 where this medium is attached to these machines. If there are no
9008 children and no such snapshots then there is no dependency and the
9009 medium is not read-only.
9010
9011 The value of this attribute can be used to determine the kind of the
9012 attachment that will take place when attaching this medium to a
9013 virtual machine. If the value is @c false then the medium will
9014 be attached directly. If the value is @c true then the medium
9015 will be attached indirectly by creating a new differencing child
9016 medium for that. See the interface description for more information.
9017
9018 Note that all <link to="MediumType_Immutable">Immutable</link> media
9019 are always read-only while all
9020 <link to="MediumType_Writethrough">Writethrough</link> media are
9021 always not.
9022
9023 <note>
9024 The read-only condition represented by this attribute is related to
9025 the medium type and usage, not to the current
9026 <link to="IMedium::state">medium state</link> and not to the read-only
9027 state of the storage unit.
9028 </note>
9029 </desc>
9030 </attribute>
9031
9032 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9033 <desc>
9034 Logical size of this medium (in megabytes), as reported to the
9035 guest OS running inside the virtual machine this medium is
9036 attached to. The logical size is defined when the medium is created
9037 and cannot be changed later.
9038
9039 <note>
9040 Reading this property on a differencing medium will return the size
9041 of its <link to="#base"/> medium.
9042 </note>
9043 <note>
9044 For media whose state is <link to="#state"/> is <link
9045 to="MediumState_Inaccessible"/>, the value of this property is the
9046 last known logical size. For <link to="MediumaState_NotCreated"/>
9047 media, the returned value is zero.
9048 </note>
9049 </desc>
9050 </attribute>
9051
9052 <attribute name="autoReset" type="boolean">
9053 <desc>
9054 Whether this differencing medium will be automatically reset each
9055 time a virtual machine it is attached to is powered up.
9056
9057 See <link to="#reset()"/> for more information about resetting
9058 differencing media.
9059
9060 <note>
9061 Reading this property on a base (non-differencing) medium will
9062 always @c false. Changing the value of this property in this
9063 case is not supported.
9064 </note>
9065
9066 <result name="VBOX_E_NOT_SUPPORTED">
9067 This is not a differencing medium (when changing the attribute
9068 value).
9069 </result>
9070 </desc>
9071 </attribute>
9072
9073 <attribute name="lastAccessError" type="wstring" readonly="yes">
9074 <desc>
9075 Text message that represents the result of the last accessibility
9076 check performed by <link to="#refreshState"/>.
9077
9078 An empty string is returned if the last accessibility check
9079 was successful or has not yet been called. As a result, if
9080 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9081 then <link to="#refreshState"/> has yet to be called; this is the
9082 default value of media after VirtualBox initialization.
9083 A non-empty string indicates a failure and should normally describe
9084 a reason of the failure (for example, a file read error).
9085 </desc>
9086 </attribute>
9087
9088 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9089 <desc>
9090 Array of UUIDs of all machines this medium is attached to.
9091
9092 A @c null array is returned if this medium is not attached to any
9093 machine or to any machine's snapshot.
9094
9095 <note>
9096 The returned array will include a machine even if this medium is not
9097 attached to that machine in the current state but attached to it in
9098 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9099 details.
9100 </note>
9101 </desc>
9102 </attribute>
9103
9104 <method name="refreshState">
9105 <desc>
9106 If the current medium state (see <link to="MediumState"/>) is one of
9107 "Created", "Inaccessible" or "LockedRead", then this performs an
9108 accessibility check on the medium and sets the value of the <link to="#state"/>
9109 attribute accordingly; that value is also returned for convenience.
9110
9111 For all other state values, this does not perform a refresh but returns
9112 the state only.
9113
9114 The refresh, if performed, may take a long time (several seconds or even
9115 minutes, depending on the storage unit location and format) because it performs an
9116 accessibility check of the storage unit. This check may cause a significant
9117 delay if the storage unit of the given medium is, for example, a file located
9118 on a network share which is not currently accessible due to connectivity
9119 problems. In that case, the call will not return until a timeout
9120 interval defined by the host OS for this operation expires. For this reason,
9121 it is recommended to never read this attribute on the main UI thread to avoid
9122 making the UI unresponsive.
9123
9124 If the last known state of the medium is "Created" and the accessibility
9125 check fails, then the state would be set to "Inaccessible", and
9126 <link to="#lastAccessError"/> may be used to get more details about the
9127 failure. If the state of the medium is "LockedRead", then it remains the
9128 same, and a non-empty value of <link to="#lastAccessError"/> will
9129 indicate a failed accessibility check in this case.
9130
9131 Note that not all medium states are applicable to all medium types.
9132 </desc>
9133 <param name="state" type="MediumState" dir="return">
9134 <desc>
9135 New medium state.
9136 </desc>
9137 </param>
9138 </method>
9139
9140 <method name="getSnapshotIds">
9141 <desc>
9142 Returns an array of UUIDs of all snapshots of the given machine where
9143 this medium is attached to.
9144
9145 If the medium is attached to the machine in the current state, then the
9146 first element in the array will always be the ID of the queried machine
9147 (i.e. the value equal to the @c machineId argument), followed by
9148 snapshot IDs (if any).
9149
9150 If the medium is not attached to the machine in the current state, then
9151 the array will contain only snapshot IDs.
9152
9153 The returned array may be @c null if this medium is not attached
9154 to the given machine at all, neither in the current state nor in one of
9155 the snapshots.
9156 </desc>
9157 <param name="machineId" type="uuid" mod="string" dir="in">
9158 <desc>
9159 UUID of the machine to query.
9160 </desc>
9161 </param>
9162 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9163 <desc>
9164 Array of snapshot UUIDs of the given machine using this medium.
9165 </desc>
9166 </param>
9167 </method>
9168
9169 <method name="lockRead">
9170 <desc>
9171 Locks this medium for reading.
9172
9173 The read lock is shared: many clients can simultaneously lock the
9174 same medium for reading unless it is already locked for writing (see
9175 <link to="#lockWrite"/>) in which case an error is returned.
9176
9177 When the medium is locked for reading, it cannot be modified
9178 from within VirtualBox. This means that any method that changes
9179 the properties of this medium or contents of the storage unit
9180 will return an error (unless explicitly stated otherwise) and
9181 that an attempt to start a virtual machine that wants to modify
9182 the medium will also fail.
9183
9184 When the virtual machine is started up, it locks for reading all
9185 media it uses in read-only mode. If some medium cannot be locked
9186 for reading, the startup procedure will fail.
9187
9188 The medium locked for reading must be unlocked using the <link
9189 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9190 can be nested and must be followed by the same number of paired
9191 <link to="#unlockRead"/> calls.
9192
9193 This method sets the medium state to <link
9194 to="MediumState_LockedRead" /> on success. The state prior to
9195 this call must be <link to="MediumState_Created" />,
9196 <link to="MediumState_Inaccessible" /> or
9197 <link to="MediumState_LockedRead" />.
9198 As you can see, an inaccessible medium can be locked too. This is
9199 not an error; this method performs a logical lock that prevents
9200 modifications of this medium through the VirtualBox API, not a
9201 physical lock of the underlying storage unit.
9202
9203 This method returns the current state of the medium
9204 <b>before</b> the operation.
9205
9206 <result name="VBOX_E_INVALID_OBJECT_STATE">
9207 Invalid medium state (e.g. not created, locked, inaccessible,
9208 creating, deleting).
9209 </result>
9210
9211 </desc>
9212 <param name="state" type="MediumState" dir="return">
9213 <desc>
9214 State of the medium after the operation.
9215 </desc>
9216 </param>
9217 </method>
9218
9219 <method name="unlockRead">
9220 <desc>
9221 Cancels the read lock previously set by <link to="#lockRead"/>.
9222
9223 For both, success and failure, this method returns the current state
9224 of the medium <b>after</b> the operation.
9225
9226 See <link to="#lockRead"/> for more details.
9227
9228 <result name="VBOX_E_INVALID_OBJECT_STATE">
9229 Medium not locked for reading.
9230 </result>
9231
9232 </desc>
9233 <param name="state" type="MediumState" dir="return">
9234 <desc>
9235 State of the medium after the operation.
9236 </desc>
9237 </param>
9238 </method>
9239
9240 <method name="lockWrite">
9241 <desc>
9242 Locks this medium for writing.
9243
9244 The write lock, as opposed to <link to="#lockRead"/>, is
9245 exclusive: there may be only one client holding a write lock
9246 and there may be no read locks while the write lock is held.
9247
9248 When the medium is locked for writing, it cannot be modified
9249 from within VirtualBox and it is not guaranteed that the values
9250 of its properties are up-to-date. Any method that changes the
9251 properties of this medium or contents of the storage unit will
9252 return an error (unless explicitly stated otherwise) and an
9253 attempt to start a virtual machine wanting to modify or to
9254 read the medium will fail.
9255
9256 When the virtual machine is started up, it locks for writing all
9257 media it uses to write data to. If any medium could not be locked
9258 for writing, the startup procedure will fail.
9259
9260 The medium locked for writing must be unlocked using the <link
9261 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9262 can <b>not</b> be nested and must be followed by a<link
9263 to="#unlockWrite"/> call before the next lockWrite call.
9264
9265 This method sets the medium state to <link to="MediumState_LockedWrite" />
9266 on success. The state prior to this call must be <link to="MediumState_Created"/>
9267 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9268 medium can be locked too. This is not an error; this method
9269 performs a logical lock preventing modifications of this
9270 medium through the VirtualBox API, not a physical lock of the
9271 underlying storage unit.
9272
9273 For both, success and failure, this method returns the current
9274 state of the medium <b>before</b> the operation.
9275
9276 <result name="VBOX_E_INVALID_OBJECT_STATE">
9277 Invalid medium state (e.g. not created, locked, inaccessible,
9278 creating, deleting).
9279 </result>
9280
9281 </desc>
9282 <param name="state" type="MediumState" dir="return">
9283 <desc>
9284 State of the medium after the operation.
9285 </desc>
9286 </param>
9287 </method>
9288
9289 <method name="unlockWrite">
9290 <desc>
9291 Cancels the write lock previously set by <link to="#lockWrite"/>.
9292
9293 For both, success and failure, this method returns the current
9294 state of the medium <b>after</b> the operation.
9295
9296 See <link to="#lockWrite"/> for more details.
9297
9298 <result name="VBOX_E_INVALID_OBJECT_STATE">
9299 Medium not locked for writing.
9300 </result>
9301
9302 </desc>
9303 <param name="state" type="MediumState" dir="return">
9304 <desc>
9305 State of the medium after the operation.
9306 </desc>
9307 </param>
9308 </method>
9309
9310 <method name="close">
9311 <desc>
9312 Closes this medium.
9313
9314 The medium must not be attached to any known virtual machine
9315 and must not have any known child media, otherwise the
9316 operation will fail.
9317
9318 When the medium is successfully closed, it gets removed from
9319 the list of remembered media, but its storage unit is not
9320 deleted. In particular, this means that this medium can be
9321 later opened again using the <link
9322 to="IVirtualBox::openHardDisk"/> call.
9323
9324 Note that after this method successfully returns, the given medium
9325 object becomes uninitialized. This means that any attempt
9326 to call any of its methods or attributes will fail with the
9327 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9328
9329 <result name="VBOX_E_INVALID_OBJECT_STATE">
9330 Invalid medium state (other than not created, created or
9331 inaccessible).
9332 </result>
9333 <result name="VBOX_E_OBJECT_IN_USE">
9334 Medium attached to virtual machine.
9335 </result>
9336 <result name="VBOX_E_FILE_ERROR">
9337 Settings file not accessible.
9338 </result>
9339 <result name="VBOX_E_XML_ERROR">
9340 Could not parse the settings file.
9341 </result>
9342
9343 </desc>
9344 </method>
9345
9346 <!-- storage methods -->
9347
9348 <method name="getProperty">
9349 <desc>
9350 Returns the value of the custom medium property with the given name.
9351
9352 The list of all properties supported by the given medium format can
9353 be obtained with <link to="IMediumFormat::describeProperties"/>.
9354
9355 Note that if this method returns an empty string in @a value, the
9356 requested property is supported but currently not assigned any value.
9357
9358 <result name="VBOX_E_OBJECT_NOT_FOUND">
9359 Requested property does not exist (not supported by the format).
9360 </result>
9361 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9362 </desc>
9363 <param name="name" type="wstring" dir="in">
9364 <desc>Name of the property to get.</desc>
9365 </param>
9366 <param name="value" type="wstring" dir="return">
9367 <desc>Current property value.</desc>
9368 </param>
9369 </method>
9370
9371 <method name="setProperty">
9372 <desc>
9373 Sets the value of the custom medium property with the given name.
9374
9375 The list of all properties supported by the given medium format can
9376 be obtained with <link to="IMediumFormat::describeProperties"/>.
9377
9378 Note that setting the property value to @c null or an empty string is
9379 equivalent to deleting the existing value. A default value (if it is
9380 defined for this property) will be used by the format backend in this
9381 case.
9382
9383 <result name="VBOX_E_OBJECT_NOT_FOUND">
9384 Requested property does not exist (not supported by the format).
9385 </result>
9386 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9387 </desc>
9388 <param name="name" type="wstring" dir="in">
9389 <desc>Name of the property to set.</desc>
9390 </param>
9391 <param name="value" type="wstring" dir="in">
9392 <desc>Property value to set.</desc>
9393 </param>
9394 </method>
9395
9396 <method name="getProperties">
9397 <desc>
9398 Returns values for a group of properties in one call.
9399
9400 The names of the properties to get are specified using the @a names
9401 argument which is a list of comma-separated property names or
9402 an empty string if all properties are to be returned. Note that currently
9403 the value of this argument is ignored and the method always returns all
9404 existing properties.
9405
9406 The list of all properties supported by the given medium format can
9407 be obtained with <link to="IMediumFormat::describeProperties"/>.
9408
9409 The method returns two arrays, the array of property names corresponding
9410 to the @a names argument and the current values of these properties.
9411 Both arrays have the same number of elements with each elemend at the
9412 given index in the first array corresponds to an element at the same
9413 index in the second array.
9414
9415 Note that for properties that do not have assigned values,
9416 an empty string is returned at the appropriate index in the
9417 @a returnValues array.
9418
9419 </desc>
9420 <param name="names" type="wstring" dir="in">
9421 <desc>
9422 Names of properties to get.
9423 </desc>
9424 </param>
9425 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9426 <desc>Names of returned properties.</desc>
9427 </param>
9428 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9429 <desc>Values of returned properties.</desc>
9430 </param>
9431 </method>
9432
9433 <method name="setProperties">
9434 <desc>
9435 Sets values for a group of properties in one call.
9436
9437 The names of the properties to set are passed in the @a names
9438 array along with the new values for them in the @a values array. Both
9439 arrays have the same number of elements with each elemend at the given
9440 index in the first array corresponding to an element at the same index
9441 in the second array.
9442
9443 If there is at least one property name in @a names that is not valid,
9444 the method will fail before changing the values of any other properties
9445 from the @a names array.
9446
9447 Using this method over <link to="#setProperty"/> is preferred if you
9448 need to set several properties at once since it will result into less
9449 IPC calls.
9450
9451 The list of all properties supported by the given medium format can
9452 be obtained with <link to="IMediumFormat::describeProperties"/>.
9453
9454 Note that setting the property value to @c null or an empty string is
9455 equivalent to deleting the existing value. A default value (if it is
9456 defined for this property) will be used by the format backend in this
9457 case.
9458 </desc>
9459 <param name="names" type="wstring" safearray="yes" dir="in">
9460 <desc>Names of properties to set.</desc>
9461 </param>
9462 <param name="values" type="wstring" safearray="yes" dir="in">
9463 <desc>Values of properties to set.</desc>
9464 </param>
9465 </method>
9466
9467 <!-- storage methods -->
9468
9469 <method name="createBaseStorage">
9470 <desc>
9471 Starts creating a hard disk storage unit (fixed/dynamic, according
9472 to the variant flags) in in the background. The previous storage unit
9473 created for this object, if any, must first be deleted using
9474 <link to="#deleteStorage"/>, otherwise the operation will fail.
9475
9476 Before the operation starts, the medium is placed in
9477 <link to="MediumState_Creating"/> state. If the create operation
9478 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9479 state.
9480
9481 After the returned progress object reports that the operation has
9482 successfully completed, the medium state will be set to <link
9483 to="MediumState_Created"/>, the medium will be remembered by this
9484 VirtualBox installation and may be attached to virtual machines.
9485
9486 <result name="VBOX_E_NOT_SUPPORTED">
9487 The variant of storage creation operation is not supported. See <link
9488 to="IMediumFormat::capabilities"/>.
9489 </result>
9490 </desc>
9491 <param name="logicalSize" type="unsigned long long" dir="in">
9492 <desc>Maximum logical size of the medium in megabytes.</desc>
9493 </param>
9494 <param name="variant" type="MediumVariant" dir="in">
9495 <desc>Exact image variant which should be created.</desc>
9496 </param>
9497 <param name="progress" type="IProgress" dir="return">
9498 <desc>Progress object to track the operation completion.</desc>
9499 </param>
9500 </method>
9501
9502 <method name="deleteStorage">
9503 <desc>
9504 Starts deleting the storage unit of this medium.
9505
9506 The medium must not be attached to any known virtual machine and must
9507 not have any known child media, otherwise the operation will fail.
9508 It will also fail if there is no storage unit to delete or if deletion
9509 is already in progress, or if the medium is being in use (locked for
9510 read or for write) or inaccessible. Therefore, the only valid state for
9511 this operation to succeed is <link to="MediumState_Created"/>.
9512
9513 Before the operation starts, the medium is placed in
9514 <link to="MediumState_Deleting"/> state and gets removed from the list
9515 of remembered hard disks (media registry). If the delete operation
9516 fails, the medium will be remembered again and placed back to
9517 <link to="MediumState_Created"/> state.
9518
9519 After the returned progress object reports that the operation is
9520 complete, the medium state will be set to
9521 <link to="MediumState_NotCreated"/> and you will be able to use one of
9522 the storage creation methods to create it again.
9523
9524 <see>#close()</see>
9525
9526 <result name="VBOX_E_OBJECT_IN_USE">
9527 Medium is attached to a virtual machine.
9528 </result>
9529 <result name="VBOX_E_NOT_SUPPORTED">
9530 Storage deletion is not allowed because neither of storage creation
9531 operations are supported. See
9532 <link to="IMediumFormat::capabilities"/>.
9533 </result>
9534
9535 <note>
9536 If the deletion operation fails, it is not guaranteed that the storage
9537 unit still exists. You may check the <link to="IMedium::state"/> value
9538 to answer this question.
9539 </note>
9540 </desc>
9541 <param name="progress" type="IProgress" dir="return">
9542 <desc>Progress object to track the operation completion.</desc>
9543 </param>
9544 </method>
9545
9546 <!-- diff methods -->
9547
9548 <method name="createDiffStorage">
9549 <desc>
9550 Starts creating an empty differencing storage unit based on this
9551 medium in the format and at the location defined by the @a target
9552 argument.
9553
9554 The target medium must be in <link to="MediumState_NotCreated"/>
9555 state (i.e. must not have an existing storage unit). Upon successful
9556 completion, this operation will set the type of the target medium to
9557 <link to="MediumType_Normal"/> and create a storage unit necessary to
9558 represent the differencing medium data in the given format (according
9559 to the storage format of the target object).
9560
9561 After the returned progress object reports that the operation is
9562 successfully complete, the target medium gets remembered by this
9563 VirtualBox installation and may be attached to virtual machines.
9564
9565 <note>
9566 The medium will be set to <link to="MediumState_LockedRead"/>
9567 state for the duration of this operation.
9568 </note>
9569 <result name="VBOX_E_OBJECT_IN_USE">
9570 Medium not in @c NotCreated state.
9571 </result>
9572 </desc>
9573 <param name="target" type="IMedium" dir="in">
9574 <desc>Target medium.</desc>
9575 </param>
9576 <param name="variant" type="MediumVariant" dir="in">
9577 <desc>Exact image variant which should be created.</desc>
9578 </param>
9579 <param name="progress" type="IProgress" dir="return">
9580 <desc>Progress object to track the operation completion.</desc>
9581 </param>
9582 </method>
9583
9584 <method name="mergeTo">
9585 <desc>
9586 Starts merging the contents of this medium and all intermediate
9587 differencing media in the chain to the given target medium.
9588
9589 The target medium must be either a descendant of this medium or
9590 its ancestor (otherwise this method will immediately return a failure).
9591 It follows that there are two logical directions of the merge operation:
9592 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9593 ancestor (<i>backward merge</i>). Let us consider the following medium
9594 chain:
9595
9596 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9597
9598 Here, calling this method on the <tt>Base</tt> medium object with
9599 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9600 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9601 merge. Note that in both cases the contents of the resulting medium
9602 will be the same, the only difference is the medium object that takes
9603 the result of the merge operation. In case of the forward merge in the
9604 above example, the result will be written to <tt>Diff_2</tt>; in case of
9605 the backward merge, the result will be written to <tt>Base</tt>. In
9606 other words, the result of the operation is always stored in the target
9607 medium.
9608
9609 Upon successful operation completion, the storage units of all media in
9610 the chain between this (source) medium and the target medium, including
9611 the source medium itself, will be automatically deleted and the
9612 relevant medium objects (including this medium) will become
9613 uninitialized. This means that any attempt to call any of
9614 their methods or attributes will fail with the
9615 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9616 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9617 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9618 Note that <tt>Diff_2</tt> in this case will become a base medium
9619 itself since it will no longer be based on any other medium.
9620
9621 Considering the above, all of the following conditions must be met in
9622 order for the merge operation to succeed:
9623 <ul>
9624 <li>
9625 Neither this (source) medium nor any intermediate
9626 differencing medium in the chain between it and the target
9627 medium is attached to any virtual machine.
9628 </li>
9629 <li>
9630 Neither the source medium nor the target medium is an
9631 <link to="MediumType_Immutable"/> medium.
9632 </li>
9633 <li>
9634 The part of the medium tree from the source medium to the
9635 target medium is a linear chain, i.e. all medium in this
9636 chain have exactly one child which is the next medium in this
9637 chain. The only exception from this rule is the target medium in
9638 the forward merge operation; it is allowed to have any number of
9639 child media because the merge operation will not change its
9640 logical contents (as it is seen by the guest OS or by children).
9641 </li>
9642 <li>
9643 None of the involved media are in
9644 <link to="MediumState_LockedRead"/> or
9645 <link to="MediumState_LockedWrite"/> state.
9646 </li>
9647 </ul>
9648
9649 <note>
9650 This (source) medium and all intermediates will be placed to <link
9651 to="MediumState_Deleting"/> state and the target medium will be
9652 placed to <link to="MediumState_LockedWrite"/> state and for the
9653 duration of this operation.
9654 </note>
9655 </desc>
9656 <param name="targetId" type="uuid" mod="string" dir="in">
9657 <desc>UUID of the target ancestor or descendant medium.</desc>
9658 </param>
9659 <param name="progress" type="IProgress" dir="return">
9660 <desc>Progress object to track the operation completion.</desc>
9661 </param>
9662 </method>
9663
9664 <!-- clone method -->
9665
9666 <method name="cloneTo">
9667 <desc>
9668 Starts creating a clone of this medium in the format and at the
9669 location defined by the @a target argument.
9670
9671 The target medium must be either in <link to="MediumState_NotCreated"/>
9672 state (i.e. must not have an existing storage unit) or in
9673 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9674 big enough to hold the data or else the copy will be partial). Upon
9675 successful completion, the cloned medium will contain exactly the
9676 same sector data as the medium being cloned, except that in the
9677 first case a new UUID for the clone will be randomly generated, and in
9678 the second case the UUID will remain unchanged.
9679
9680 The @a parent argument defines which medium will be the parent
9681 of the clone. Passing a @c null reference indicates that the clone will
9682 be a base image, i.e. completely independent. It is possible to specify
9683 an arbitrary medium for this parameter, including the parent of the
9684 medium which is being cloned. Even cloning to a child of the source
9685 medium is possible. Note that when cloning to an existing image, the
9686 @a parent irgument is ignored.
9687
9688 After the returned progress object reports that the operation is
9689 successfully complete, the target medium gets remembered by this
9690 VirtualBox installation and may be attached to virtual machines.
9691
9692 <note>
9693 This medium will be placed to <link to="MediumState_LockedRead"/>
9694 state for the duration of this operation.
9695 </note>
9696 <result name="E_NOTIMPL">
9697 The specified cloning variant is not supported at the moment.
9698 </result>
9699 </desc>
9700 <param name="target" type="IMedium" dir="in">
9701 <desc>Target medium.</desc>
9702 </param>
9703 <param name="variant" type="MediumVariant" dir="in">
9704 <desc>Exact image variant which should be created.</desc>
9705 </param>
9706 <param name="parent" type="IMedium" dir="in">
9707 <desc>Parent of the cloned medium.</desc>
9708 </param>
9709 <param name="progress" type="IProgress" dir="return">
9710 <desc>Progress object to track the operation completion.</desc>
9711 </param>
9712 </method>
9713
9714 <!-- other methods -->
9715
9716 <method name="compact">
9717 <desc>
9718 Starts compacting of this medium. This means that the medium is
9719 transformed into a possibly more compact storage representation.
9720 This potentially creates temporary images, which can require a
9721 substantial amount of additional disk space.
9722
9723 This medium will be placed to <link to="MediumState_LockedWrite"/>
9724 state and all its parent media (if any) will be placed to
9725 <link to="MediumState_LockedRead"/> state for the duration of this
9726 operation.
9727
9728 Please note that the results can be either returned straight away,
9729 or later as the result of the background operation via the object
9730 returned via the @a progress parameter.
9731
9732 <result name="VBOX_E_NOT_SUPPORTED">
9733 Medium format does not support compacting (but potentially
9734 needs it).
9735 </result>
9736 </desc>
9737 <param name="progress" type="IProgress" dir="return">
9738 <desc>Progress object to track the operation completion.</desc>
9739 </param>
9740 </method>
9741
9742 <method name="resize">
9743 <desc>
9744 Starts resizing this medium. This means that the nominal size of the
9745 medium is set to the new value. Both increasing and decreasing the
9746 size is possible, and there are no safety checks, since VirtualBox
9747 does not make any assumptions about the medium contents.
9748
9749 Resizing usually needs additional disk space, and possibly also
9750 some temporary disk space. Note that resize does not create a full
9751 temporary copy of the medium, so the additional disk space requirement
9752 is usually much lower than using the clone operation.
9753
9754 This medium will be placed to <link to="MediumState_LockedWrite"/>
9755 state for the duration of this operation.
9756
9757 Please note that the results can be either returned straight away,
9758 or later as the result of the background operation via the object
9759 returned via the @a progress parameter.
9760
9761 <result name="VBOX_E_NOT_SUPPORTED">
9762 Medium format does not support resizing.
9763 </result>
9764 </desc>
9765 <param name="logicalSize" type="unsigned long long" dir="in">
9766 <desc>New nominal capacity of the medium in megabytes.</desc>
9767 </param>
9768 <param name="progress" type="IProgress" dir="return">
9769 <desc>Progress object to track the operation completion.</desc>
9770 </param>
9771 </method>
9772
9773 <method name="reset">
9774 <desc>
9775 Starts erasing the contents of this differencing medium.
9776
9777 This operation will reset the differencing medium to its initial
9778 state when it does not contain any sector data and any read operation is
9779 redirected to its parent medium.
9780
9781 This medium will be placed to <link to="MediumState_LockedWrite"/>
9782 for the duration of this operation.
9783
9784 <result name="VBOX_E_NOT_SUPPORTED">
9785 This is not a differencing medium.
9786 </result>
9787 <result name="VBOX_E_INVALID_OBJECT_STATE">
9788 Medium is not in <link to="MediumState_Created"/> or
9789 <link to="MediumState_Inaccessible"/> state.
9790 </result>
9791 </desc>
9792 <param name="progress" type="IProgress" dir="return">
9793 <desc>Progress object to track the operation completion.</desc>
9794 </param>
9795 </method>
9796
9797 </interface>
9798
9799
9800 <!--
9801 // IMediumFormat
9802 /////////////////////////////////////////////////////////////////////////
9803 -->
9804
9805 <enum
9806 name="DataType"
9807 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9808 >
9809 <const name="Int32" value="0"/>
9810 <const name="Int8" value="1"/>
9811 <const name="String" value="2"/>
9812 </enum>
9813
9814 <enum
9815 name="DataFlags"
9816 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9817 >
9818 <const name="None" value="0x00"/>
9819 <const name="Mandatory" value="0x01"/>
9820 <const name="Expert" value="0x02"/>
9821 <const name="Array" value="0x04"/>
9822 <const name="FlagMask" value="0x07"/>
9823 </enum>
9824
9825 <enum
9826 name="MediumFormatCapabilities"
9827 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9828 >
9829 <desc>
9830 Medium format capability flags.
9831 </desc>
9832
9833 <const name="Uuid" value="0x01">
9834 <desc>
9835 Supports UUIDs as expected by VirtualBox code.
9836 </desc>
9837 </const>
9838
9839 <const name="CreateFixed" value="0x02">
9840 <desc>
9841 Supports creating fixed size images, allocating all space instantly.
9842 </desc>
9843 </const>
9844
9845 <const name="CreateDynamic" value="0x04">
9846 <desc>
9847 Supports creating dynamically growing images, allocating space on
9848 demand.
9849 </desc>
9850 </const>
9851
9852 <const name="CreateSplit2G" value="0x08">
9853 <desc>
9854 Supports creating images split in chunks of a bit less than 2 GBytes.
9855 </desc>
9856 </const>
9857
9858 <const name="Differencing" value="0x10">
9859 <desc>
9860 Supports being used as a format for differencing media (see <link
9861 to="IMedium::createDiffStorage"/>).
9862 </desc>
9863 </const>
9864
9865 <const name="Asynchronous" value="0x20">
9866 <desc>
9867 Supports asynchronous I/O operations for at least some configurations.
9868 </desc>
9869 </const>
9870
9871 <const name="File" value="0x40">
9872 <desc>
9873 The format backend operates on files (the <link to="IMedium::location"/>
9874 attribute of the medium specifies a file used to store medium
9875 data; for a list of supported file extensions see
9876 <link to="IMediumFormat::fileExtensions"/>).
9877 </desc>
9878 </const>
9879
9880 <const name="Properties" value="0x80">
9881 <desc>
9882 The format backend uses the property interface to configure the storage
9883 location and properties (the <link to="IMediumFormat::describeProperties"/>
9884 method is used to get access to properties supported by the given medium format).
9885 </desc>
9886 </const>
9887
9888 <const name="CapabilityMask" value="0xFF"/>
9889 </enum>
9890
9891 <interface
9892 name="IMediumFormat" extends="$unknown"
9893 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9894 wsmap="managed"
9895 >
9896 <desc>
9897 The IMediumFormat interface represents a medium format.
9898
9899 Each medium format has an associated backend which is used to handle
9900 media stored in this format. This interface provides information
9901 about the properties of the associated backend.
9902
9903 Each medium format is identified by a string represented by the
9904 <link to="#id"/> attribute. This string is used in calls like
9905 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9906 format.
9907
9908 The list of all supported medium formats can be obtained using
9909 <link to="ISystemProperties::mediaFormats"/>.
9910
9911 <see>IMedium</see>
9912 </desc>
9913
9914 <attribute name="id" type="wstring" readonly="yes">
9915 <desc>
9916 Identifier of this format.
9917
9918 The format identifier is a non-@c null non-empty ASCII string. Note that
9919 this string is case-insensitive. This means that, for example, all of
9920 the following strings:
9921 <pre>
9922 "VDI"
9923 "vdi"
9924 "VdI"</pre>
9925 refer to the same medium format.
9926
9927 This string is used in methods of other interfaces where it is necessary
9928 to specify a medium format, such as
9929 <link to="IVirtualBox::createHardDisk"/>.
9930 </desc>
9931 </attribute>
9932
9933 <attribute name="name" type="wstring" readonly="yes">
9934 <desc>
9935 Human readable description of this format.
9936
9937 Mainly for use in file open dialogs.
9938 </desc>
9939 </attribute>
9940
9941 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9942 <desc>
9943 Array of strings containing the supported file extensions.
9944
9945 The first extension in the array is the extension preferred by the
9946 backend. It is recommended to use this extension when specifying a
9947 location of the storage unit for a new medium.
9948
9949 Note that some backends do not work on files, so this array may be
9950 empty.
9951
9952 <see>IMediumFormat::capabilities</see>
9953 </desc>
9954 </attribute>
9955
9956 <attribute name="capabilities" type="unsigned long" readonly="yes">
9957 <desc>
9958 Capabilities of the format as a set of bit flags.
9959
9960 For the meaning of individual capability flags see
9961 <link to="MediumFormatCapabilities"/>.
9962 </desc>
9963 </attribute>
9964
9965 <method name="describeProperties">
9966 <desc>
9967 Returns several arrays describing the properties supported by this
9968 format.
9969
9970 An element with the given index in each array describes one
9971 property. Thus, the number of elements in each returned array is the
9972 same and corresponds to the number of supported properties.
9973
9974 The returned arrays are filled in only if the
9975 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9976 All arguments must be non-@c null.
9977
9978 <see>DataType</see>
9979 <see>DataFlags</see>
9980 </desc>
9981
9982 <param name="names" type="wstring" safearray="yes" dir="out">
9983 <desc>Array of property names.</desc>
9984 </param>
9985 <param name="description" type="wstring" safearray="yes" dir="out">
9986 <desc>Array of property descriptions.</desc>
9987 </param>
9988 <param name="types" type="DataType" safearray="yes" dir="out">
9989 <desc>Array of property types.</desc>
9990 </param>
9991 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9992 <desc>Array of property flags.</desc>
9993 </param>
9994 <param name="defaults" type="wstring" safearray="yes" dir="out">
9995 <desc>Array of default property values.</desc>
9996 </param>
9997 </method>
9998
9999 </interface>
10000
10001
10002 <!--
10003 // IKeyboard
10004 /////////////////////////////////////////////////////////////////////////
10005 -->
10006
10007 <interface
10008 name="IKeyboard" extends="$unknown"
10009 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10010 wsmap="managed"
10011 >
10012 <desc>
10013 The IKeyboard interface represents the virtual machine's keyboard. Used
10014 in <link to="IConsole::keyboard"/>.
10015
10016 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10017 to the virtual machine.
10018
10019 </desc>
10020 <method name="putScancode">
10021 <desc>Sends a scancode to the keyboard.
10022
10023 <result name="VBOX_E_IPRT_ERROR">
10024 Could not send scan code to virtual keyboard.
10025 </result>
10026
10027 </desc>
10028 <param name="scancode" type="long" dir="in"/>
10029 </method>
10030
10031 <method name="putScancodes">
10032 <desc>Sends an array of scancodes to the keyboard.
10033
10034 <result name="VBOX_E_IPRT_ERROR">
10035 Could not send all scan codes to virtual keyboard.
10036 </result>
10037
10038 </desc>
10039 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10040 <param name="codesStored" type="unsigned long" dir="return"/>
10041 </method>
10042
10043 <method name="putCAD">
10044 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10045 function is nothing special, it is just a convenience function
10046 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10047
10048 <result name="VBOX_E_IPRT_ERROR">
10049 Could not send all scan codes to virtual keyboard.
10050 </result>
10051
10052 </desc>
10053 </method>
10054
10055 </interface>
10056
10057
10058 <!--
10059 // IMouse
10060 /////////////////////////////////////////////////////////////////////////
10061 -->
10062
10063 <enum
10064 name="MouseButtonState"
10065 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10066 >
10067 <desc>
10068 Mouse button state.
10069 </desc>
10070
10071 <const name="LeftButton" value="0x01"/>
10072 <const name="RightButton" value="0x02"/>
10073 <const name="MiddleButton" value="0x04"/>
10074 <const name="WheelUp" value="0x08"/>
10075 <const name="WheelDown" value="0x10"/>
10076 <const name="XButton1" value="0x20"/>
10077 <const name="XButton2" value="0x40"/>
10078 <const name="MouseStateMask" value="0x7F"/>
10079 </enum>
10080
10081 <interface
10082 name="IMouse" extends="$unknown"
10083 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10084 wsmap="managed"
10085 >
10086 <desc>
10087 The IMouse interface represents the virtual machine's mouse. Used in
10088 <link to="IConsole::mouse"/>.
10089
10090 Through this interface, the virtual machine's virtual mouse can be
10091 controlled.
10092 </desc>
10093
10094 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10095 <desc>
10096 Whether the guest OS supports absolute mouse pointer positioning
10097 or not.
10098 <note>
10099 VirtualBox Guest Tools need to be installed to the guest OS
10100 in order to enable absolute mouse positioning support.
10101 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10102 callback to be instantly informed about changes of this attribute
10103 during virtual machine execution.
10104 </note>
10105 <see><link to="#putMouseEventAbsolute"/></see>
10106 </desc>
10107 </attribute>
10108
10109 <method name="putMouseEvent">
10110 <desc>
10111 Initiates a mouse event using relative pointer movements
10112 along x and y axis.
10113
10114 <result name="E_ACCESSDENIED">
10115 Console not powered up.
10116 </result>
10117 <result name="VBOX_E_IPRT_ERROR">
10118 Could not send mouse event to virtual mouse.
10119 </result>
10120
10121 </desc>
10122
10123 <param name="dx" type="long" dir="in">
10124 <desc>
10125 Amount of pixels the mouse should move to the right.
10126 Negative values move the mouse to the left.
10127 </desc>
10128 </param>
10129 <param name="dy" type="long" dir="in">
10130 <desc>
10131 Amount of pixels the mouse should move downwards.
10132 Negative values move the mouse upwards.
10133 </desc>
10134 </param>
10135 <param name="dz" type="long" dir="in">
10136 <desc>
10137 Amount of mouse wheel moves.
10138 Positive values describe clockwise wheel rotations,
10139 negative values describe counterclockwise rotations.
10140 </desc>
10141 </param>
10142 <param name="dw" type="long" dir="in">
10143 <desc>
10144 Amount of horizontal mouse wheel moves.
10145 Positive values describe a movement to the left,
10146 negative values describe a movement to the right.
10147 </desc>
10148 </param>
10149 <param name="buttonState" type="long" dir="in">
10150 <desc>
10151 The current state of mouse buttons. Every bit represents
10152 a mouse button as follows:
10153 <table>
10154 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10155 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10156 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10157 </table>
10158 A value of <tt>1</tt> means the corresponding button is pressed.
10159 otherwise it is released.
10160 </desc>
10161 </param>
10162 </method>
10163
10164 <method name="putMouseEventAbsolute">
10165 <desc>
10166 Positions the mouse pointer using absolute x and y coordinates.
10167 These coordinates are expressed in pixels and
10168 start from <tt>[1,1]</tt> which corresponds to the top left
10169 corner of the virtual display.
10170
10171 <result name="E_ACCESSDENIED">
10172 Console not powered up.
10173 </result>
10174 <result name="VBOX_E_IPRT_ERROR">
10175 Could not send mouse event to virtual mouse.
10176 </result>
10177
10178 <note>
10179 This method will have effect only if absolute mouse
10180 positioning is supported by the guest OS.
10181 </note>
10182
10183 <see><link to="#absoluteSupported"/></see>
10184 </desc>
10185
10186 <param name="x" type="long" dir="in">
10187 <desc>
10188 X coordinate of the pointer in pixels, starting from @c 1.
10189 </desc>
10190 </param>
10191 <param name="y" type="long" dir="in">
10192 <desc>
10193 Y coordinate of the pointer in pixels, starting from @c 1.
10194 </desc>
10195 </param>
10196 <param name="dz" type="long" dir="in">
10197 <desc>
10198 Amount of mouse wheel moves.
10199 Positive values describe clockwise wheel rotations,
10200 negative values describe counterclockwise rotations.
10201 </desc>
10202 </param>
10203 <param name="dw" type="long" dir="in">
10204 <desc>
10205 Amount of horizontal mouse wheel moves.
10206 Positive values describe a movement to the left,
10207 negative values describe a movement to the right.
10208 </desc>
10209 </param>
10210 <param name="buttonState" type="long" dir="in">
10211 <desc>
10212 The current state of mouse buttons. Every bit represents
10213 a mouse button as follows:
10214 <table>
10215 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10216 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10217 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10218 </table>
10219 A value of @c 1 means the corresponding button is pressed.
10220 otherwise it is released.
10221 </desc>
10222 </param>
10223 </method>
10224
10225 </interface>
10226
10227 <!--
10228 // IDisplay
10229 /////////////////////////////////////////////////////////////////////////
10230 -->
10231
10232 <enum
10233 name="FramebufferPixelFormat"
10234 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10235 >
10236 <desc>
10237 Format of the video memory buffer. Constants represented by this enum can
10238 be used to test for particular values of <link
10239 to="IFramebuffer::pixelFormat"/>. See also <link
10240 to="IFramebuffer::requestResize"/>.
10241
10242 See also www.fourcc.org for more information about FOURCC pixel formats.
10243 </desc>
10244
10245 <const name="Opaque" value="0">
10246 <desc>
10247 Unknown buffer format (the user may not assume any particular format of
10248 the buffer).
10249 </desc>
10250 </const>
10251 <const name="FOURCC_RGB" value="0x32424752">
10252 <desc>
10253 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10254 bit layout).
10255 </desc>
10256 </const>
10257 </enum>
10258
10259 <interface
10260 name="IFramebuffer" extends="$unknown"
10261 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10262 wsmap="suppress"
10263 >
10264 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10265 <desc>Address of the start byte of the frame buffer.</desc>
10266 </attribute>
10267
10268 <attribute name="width" type="unsigned long" readonly="yes">
10269 <desc>Frame buffer width, in pixels.</desc>
10270 </attribute>
10271
10272 <attribute name="height" type="unsigned long" readonly="yes">
10273 <desc>Frame buffer height, in pixels.</desc>
10274 </attribute>
10275
10276 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10277 <desc>
10278 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10279 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10280 are: 8, 15, 16, 24 and 32.
10281 </desc>
10282 </attribute>
10283
10284 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10285 <desc>
10286 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10287 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10288 size of the scan line must be aligned to 32 bits.
10289 </desc>
10290 </attribute>
10291
10292 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10293 <desc>
10294 Frame buffer pixel format. It's either one of the values defined by <link
10295 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10296 <note>
10297 This attribute must never return <link
10298 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10299 <link to="#address"/> points to must be always known.
10300 </note>
10301 </desc>
10302 </attribute>
10303
10304 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10305 <desc>
10306 Defines whether this frame buffer uses the virtual video card's memory
10307 buffer (guest VRAM) directly or not. See <link
10308 to="IFramebuffer::requestResize"/> for more information.
10309 </desc>
10310 </attribute>
10311
10312 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10313 <desc>
10314 Hint from the frame buffer about how much of the standard
10315 screen height it wants to use for itself. This information is
10316 exposed to the guest through the VESA BIOS and VMMDev interface
10317 so that it can use it for determining its video mode table. It
10318 is not guaranteed that the guest respects the value.
10319 </desc>
10320 </attribute>
10321
10322 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10323 <desc>
10324 An alpha-blended overlay which is superposed over the frame buffer.
10325 The initial purpose is to allow the display of icons providing
10326 information about the VM state, including disk activity, in front
10327 ends which do not have other means of doing that. The overlay is
10328 designed to controlled exclusively by IDisplay. It has no locking
10329 of its own, and any changes made to it are not guaranteed to be
10330 visible until the affected portion of IFramebuffer is updated. The
10331 overlay can be created lazily the first time it is requested. This
10332 attribute can also return @c null to signal that the overlay is not
10333 implemented.
10334 </desc>
10335 </attribute>
10336
10337 <attribute name="winId" type="unsigned long long" readonly="yes">
10338 <desc>
10339 Platform-dependent identifier of the window where context of this
10340 frame buffer is drawn, or zero if there's no such window.
10341 </desc>
10342 </attribute>
10343
10344 <method name="lock">
10345 <desc>
10346 Locks the frame buffer.
10347 Gets called by the IDisplay object where this frame buffer is
10348 bound to.
10349 </desc>
10350 </method>
10351
10352 <method name="unlock">
10353 <desc>
10354 Unlocks the frame buffer.
10355 Gets called by the IDisplay object where this frame buffer is
10356 bound to.
10357 </desc>
10358 </method>
10359
10360 <method name="notifyUpdate">
10361 <desc>
10362 Informs about an update.
10363 Gets called by the display object where this buffer is
10364 registered.
10365 </desc>
10366 <param name="x" type="unsigned long" dir="in"/>
10367 <param name="y" type="unsigned long" dir="in"/>
10368 <param name="width" type="unsigned long" dir="in"/>
10369 <param name="height" type="unsigned long" dir="in"/>
10370 </method>
10371
10372 <method name="requestResize">
10373 <desc>
10374 Requests a size and pixel format change.
10375
10376 There are two modes of working with the video buffer of the virtual
10377 machine. The <i>indirect</i> mode implies that the IFramebuffer
10378 implementation allocates a memory buffer for the requested display mode
10379 and provides it to the virtual machine. In <i>direct</i> mode, the
10380 IFramebuffer implementation uses the memory buffer allocated and owned
10381 by the virtual machine. This buffer represents the video memory of the
10382 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10383 usually faster because the implementation gets a raw pointer to the
10384 guest VRAM buffer which it can directly use for visualizing the contents
10385 of the virtual display, as opposed to the indirect mode where the
10386 contents of guest VRAM are copied to the memory buffer provided by
10387 the implementation every time a display update occurs.
10388
10389 It is important to note that the direct mode is really fast only when
10390 the implementation uses the given guest VRAM buffer directly, for
10391 example, by blitting it to the window representing the virtual machine's
10392 display, which saves at least one copy operation comparing to the
10393 indirect mode. However, using the guest VRAM buffer directly is not
10394 always possible: the format and the color depth of this buffer may be
10395 not supported by the target window, or it may be unknown (opaque) as in
10396 case of text or non-linear multi-plane VGA video modes. In this case,
10397 the indirect mode (that is always available) should be used as a
10398 fallback: when the guest VRAM contents are copied to the
10399 implementation-provided memory buffer, color and format conversion is
10400 done automatically by the underlying code.
10401
10402 The @a pixelFormat parameter defines whether the direct mode is
10403 available or not. If @a pixelFormat is <link
10404 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10405 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10406 @a bytesPerLine parameters must be ignored and the implementation must use
10407 the indirect mode (where it provides its own buffer in one of the
10408 supported formats). In all other cases, @a pixelFormat together with
10409 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10410 buffer pointed to by the @a VRAM parameter and the implementation is
10411 free to choose which mode to use. To indicate that this frame buffer uses
10412 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10413 attribute must return @c true and <link to="#address"/> must
10414 return exactly the same address that is passed in the @a VRAM parameter
10415 of this method; otherwise it is assumed that the indirect strategy is
10416 chosen.
10417
10418 The @a width and @a height parameters represent the size of the
10419 requested display mode in both modes. In case of indirect mode, the
10420 provided memory buffer should be big enough to store data of the given
10421 display mode. In case of direct mode, it is guaranteed that the given
10422 @a VRAM buffer contains enough space to represent the display mode of the
10423 given size. Note that this frame buffer's <link to="#width"/> and <link
10424 to="#height"/> attributes must return exactly the same values as
10425 passed to this method after the resize is completed (see below).
10426
10427 The @a finished output parameter determines if the implementation has
10428 finished resizing the frame buffer or not. If, for some reason, the
10429 resize cannot be finished immediately during this call, @a finished
10430 must be set to @c false, and the implementation must call
10431 <link to="IDisplay::resizeCompleted"/> after it has returned from
10432 this method as soon as possible. If @a finished is @c false, the
10433 machine will not call any frame buffer methods until
10434 <link to="IDisplay::resizeCompleted"/> is called.
10435
10436 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10437 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10438 this frame buffer must return exactly the same values as specified in the
10439 parameters of this method, after the resize is completed. If the
10440 indirect mode is chosen, these attributes must return values describing
10441 the format of the implementation's own memory buffer <link
10442 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10443 value must always correlate with <link to="#pixelFormat"/>. Note that
10444 the <link to="#pixelFormat"/> attribute must never return <link
10445 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10446
10447 <note>
10448 This method is called by the IDisplay object under the
10449 <link to="#lock"/> provided by this IFramebuffer
10450 implementation. If this method returns @c false in @a finished, then
10451 this lock is not released until
10452 <link to="IDisplay::resizeCompleted"/> is called.
10453 </note>
10454 </desc>
10455 <param name="screenId" type="unsigned long" dir="in">
10456 <desc>
10457 Logical screen number. Must be used in the corresponding call to
10458 <link to="IDisplay::resizeCompleted"/> if this call is made.
10459 </desc>
10460 </param>
10461 <param name="pixelFormat" type="unsigned long" dir="in">
10462 <desc>
10463 Pixel format of the memory buffer pointed to by @a VRAM.
10464 See also <link to="FramebufferPixelFormat"/>.
10465 </desc>
10466 </param>
10467 <param name="VRAM" type="octet" mod="ptr" dir="in">
10468 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10469 </param>
10470 <param name="bitsPerPixel" type="unsigned long" dir="in">
10471 <desc>Color depth, bits per pixel.</desc>
10472 </param>
10473 <param name="bytesPerLine" type="unsigned long" dir="in">
10474 <desc>Size of one scan line, in bytes.</desc>
10475 </param>
10476 <param name="width" type="unsigned long" dir="in">
10477 <desc>Width of the guest display, in pixels.</desc>
10478 </param>
10479 <param name="height" type="unsigned long" dir="in">
10480 <desc>Height of the guest display, in pixels.</desc>
10481 </param>
10482 <param name="finished" type="boolean" dir="return">
10483 <desc>
10484 Can the VM start using the new frame buffer immediately
10485 after this method returns or it should wait for
10486 <link to="IDisplay::resizeCompleted"/>.
10487 </desc>
10488 </param>
10489 </method>
10490
10491 <method name="videoModeSupported">
10492 <desc>
10493 Returns whether the frame buffer implementation is willing to
10494 support a given video mode. In case it is not able to render
10495 the video mode (or for some reason not willing), it should
10496 return @c false. Usually this method is called when the guest
10497 asks the VMM device whether a given video mode is supported
10498 so the information returned is directly exposed to the guest.
10499 It is important that this method returns very quickly.
10500 </desc>
10501 <param name="width" type="unsigned long" dir="in"/>
10502 <param name="height" type="unsigned long" dir="in"/>
10503 <param name="bpp" type="unsigned long" dir="in"/>
10504 <param name="supported" type="boolean" dir="return"/>
10505 </method>
10506
10507 <method name="getVisibleRegion">
10508 <desc>
10509 Returns the visible region of this frame buffer.
10510
10511 If the @a rectangles parameter is @c null then the value of the
10512 @a count parameter is ignored and the number of elements necessary to
10513 describe the current visible region is returned in @a countCopied.
10514
10515 If @a rectangles is not @c null but @a count is less
10516 than the required number of elements to store region data, the method
10517 will report a failure. If @a count is equal or greater than the
10518 required number of elements, then the actual number of elements copied
10519 to the provided array will be returned in @a countCopied.
10520
10521 <note>
10522 The address of the provided array must be in the process space of
10523 this IFramebuffer object.
10524 </note>
10525 <note>
10526 Method not yet implemented.
10527 </note>
10528 </desc>
10529 <param name="rectangles" type="octet" mod="ptr" dir="in">
10530 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10531 </param>
10532 <param name="count" type="unsigned long" dir="in">
10533 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10534 </param>
10535 <param name="countCopied" type="unsigned long" dir="return">
10536 <desc>Number of elements copied to the @a rectangles array.</desc>
10537 </param>
10538 </method>
10539
10540 <method name="setVisibleRegion">
10541 <desc>
10542 Suggests a new visible region to this frame buffer. This region
10543 represents the area of the VM display which is a union of regions of
10544 all top-level windows of the guest operating system running inside the
10545 VM (if the Guest Additions for this system support this
10546 functionality). This information may be used by the frontends to
10547 implement the seamless desktop integration feature.
10548
10549 <note>
10550 The address of the provided array must be in the process space of
10551 this IFramebuffer object.
10552 </note>
10553 <note>
10554 The IFramebuffer implementation must make a copy of the provided
10555 array of rectangles.
10556 </note>
10557 <note>
10558 Method not yet implemented.
10559 </note>
10560 </desc>
10561 <param name="rectangles" type="octet" mod="ptr" dir="in">
10562 <desc>Pointer to the @c RTRECT array.</desc>
10563 </param>
10564 <param name="count" type="unsigned long" dir="in">
10565 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10566 </param>
10567 </method>
10568
10569 <method name="processVHWACommand">
10570 <desc>
10571 Posts a Video HW Acceleration Command to the frame buffer for processing.
10572 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10573 are posted from quest to the host to be processed by the host hardware.
10574
10575 <note>
10576 The address of the provided command must be in the process space of
10577 this IFramebuffer object.
10578 </note>
10579 </desc>
10580
10581 <param name="command" type="octet" mod="ptr" dir="in">
10582 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10583 </param>
10584 </method>
10585
10586 </interface>
10587
10588 <interface
10589 name="IFramebufferOverlay" extends="IFramebuffer"
10590 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10591 wsmap="suppress"
10592 >
10593 <desc>
10594 The IFramebufferOverlay interface represents an alpha blended overlay
10595 for displaying status icons above an IFramebuffer. It is always created
10596 not visible, so that it must be explicitly shown. It only covers a
10597 portion of the IFramebuffer, determined by its width, height and
10598 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10599 that order) format, and may be written to directly. Do re-read the
10600 width though, after setting it, as it may be adjusted (increased) to
10601 make it more suitable for the front end.
10602 </desc>
10603 <attribute name="x" type="unsigned long" readonly="yes">
10604 <desc>X position of the overlay, relative to the frame buffer.</desc>
10605 </attribute>
10606
10607 <attribute name="y" type="unsigned long" readonly="yes">
10608 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10609 </attribute>
10610
10611 <attribute name="visible" type="boolean" readonly="no">
10612 <desc>
10613 Whether the overlay is currently visible.
10614 </desc>
10615 </attribute>
10616
10617 <attribute name="alpha" type="unsigned long" readonly="no">
10618 <desc>
10619 The global alpha value for the overlay. This may or may not be
10620 supported by a given front end.
10621 </desc>
10622 </attribute>
10623
10624 <method name="move">
10625 <desc>
10626 Changes the overlay's position relative to the IFramebuffer.
10627 </desc>
10628 <param name="x" type="unsigned long" dir="in"/>
10629 <param name="y" type="unsigned long" dir="in"/>
10630 </method>
10631
10632 </interface>
10633
10634 <interface
10635 name="IDisplay" extends="$unknown"
10636 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10637 wsmap="managed"
10638 >
10639 <desc>
10640 The IDisplay interface represents the virtual machine's display.
10641
10642 The object implementing this interface is contained in each
10643 <link to="IConsole::display"/> attribute and represents the visual
10644 output of the virtual machine.
10645
10646 The virtual display supports pluggable output targets represented by the
10647 IFramebuffer interface. Examples of the output target are a window on
10648 the host computer or an RDP session's display on a remote computer.
10649 </desc>
10650 <attribute name="width" type="unsigned long" readonly="yes">
10651 <desc>Current display width.</desc>
10652 </attribute>
10653
10654 <attribute name="height" type="unsigned long" readonly="yes">
10655 <desc>Current display height.</desc>
10656 </attribute>
10657
10658 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10659 <desc>
10660 Current guest display color depth. Note that this may differ
10661 from <link to="IFramebuffer::bitsPerPixel"/>.
10662 </desc>
10663 </attribute>
10664
10665 <method name="setFramebuffer">
10666 <desc>
10667 Sets the framebuffer for given screen.
10668 </desc>
10669 <param name="screenId" type="unsigned long" dir="in"/>
10670 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10671 </method>
10672
10673 <method name="getFramebuffer">
10674 <desc>
10675 Queries the framebuffer for given screen.
10676 </desc>
10677 <param name="screenId" type="unsigned long" dir="in"/>
10678 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10679 <param name="xOrigin" type="long" dir="out"/>
10680 <param name="yOrigin" type="long" dir="out"/>
10681 </method>
10682
10683 <method name="setVideoModeHint">
10684 <desc>
10685 Asks VirtualBox to request the given video mode from
10686 the guest. This is just a hint and it cannot be guaranteed
10687 that the requested resolution will be used. Guest Additions
10688 are required for the request to be seen by guests. The caller
10689 should issue the request and wait for a resolution change and
10690 after a timeout retry.
10691
10692 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10693 parameters means that the corresponding values should be taken from the
10694 current video mode (i.e. left unchanged).
10695
10696 If the guest OS supports multi-monitor configuration then the @a display
10697 parameter specifies the number of the guest display to send the hint to:
10698 @c 0 is the primary display, @c 1 is the first secondary and
10699 so on. If the multi-monitor configuration is not supported, @a display
10700 must be @c 0.
10701
10702 <result name="E_INVALIDARG">
10703 The @a display is not associated with any monitor.
10704 </result>
10705
10706 </desc>
10707 <param name="width" type="unsigned long" dir="in"/>
10708 <param name="height" type="unsigned long" dir="in"/>
10709 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10710 <param name="display" type="unsigned long" dir="in"/>
10711 </method>
10712
10713 <method name="setSeamlessMode">
10714 <desc>
10715 Enables or disables seamless guest display rendering (seamless desktop
10716 integration) mode.
10717 <note>
10718 Calling this method has no effect if <link
10719 to="IGuest::supportsSeamless"/> returns @c false.
10720 </note>
10721 </desc>
10722 <param name="enabled" type="boolean" dir="in"/>
10723 </method>
10724
10725 <method name="takeScreenShot">
10726 <desc>
10727 Takes a screen shot of the requested size and copies it to the
10728 32-bpp buffer allocated by the caller and pointed to by @a address.
10729
10730 <note>This API can be used only by the COM/XPCOM C++ API as it
10731 requires pointer support. Use <link to="#takeScreenShotSlow" />
10732 with other language bindings.
10733 </note>
10734
10735 <result name="E_NOTIMPL">
10736 Feature not implemented.
10737 </result>
10738 <result name="VBOX_E_IPRT_ERROR">
10739 Could not take a screenshot.
10740 </result>
10741
10742 </desc>
10743 <param name="address" type="octet" mod="ptr" dir="in"/>
10744 <param name="width" type="unsigned long" dir="in"/>
10745 <param name="height" type="unsigned long" dir="in"/>
10746 </method>
10747
10748 <method name="takeScreenShotSlow">
10749 <desc>
10750 Takes a guest screen shot of the requested size and returns it as
10751 an array of bytes in uncompressed 32-bit ARGB format.
10752 This API is slow, but could be the only option to get guest screenshot
10753 for scriptable languages not allowed to manipulate with addresses
10754 directly.
10755
10756 <result name="E_NOTIMPL">
10757 Feature not implemented.
10758 </result>
10759 <result name="VBOX_E_IPRT_ERROR">
10760 Could not take a screenshot.
10761 </result>
10762 </desc>
10763 <param name="width" type="unsigned long" dir="in">
10764 <desc>
10765 Desired image width.
10766 </desc>
10767 </param>
10768 <param name="height" type="unsigned long" dir="in">
10769 <desc>
10770 Desired image height.
10771 </desc>
10772 </param>
10773 <param name="screenData" type="octet" dir="return" safearray="yes">
10774 <desc>
10775 Array with resulting screen data.
10776 </desc>
10777 </param>
10778 </method>
10779
10780 <method name="drawToScreen">
10781 <desc>
10782 Draws a 32-bpp image of the specified size from the given buffer
10783 to the given point on the VM display.
10784
10785 <result name="E_NOTIMPL">
10786 Feature not implemented.
10787 </result>
10788 <result name="VBOX_E_IPRT_ERROR">
10789 Could not draw to screen.
10790 </result>
10791
10792 </desc>
10793 <param name="address" type="octet" mod="ptr" dir="in"/>
10794 <param name="x" type="unsigned long" dir="in"/>
10795 <param name="y" type="unsigned long" dir="in"/>
10796 <param name="width" type="unsigned long" dir="in"/>
10797 <param name="height" type="unsigned long" dir="in"/>
10798 </method>
10799
10800 <method name="invalidateAndUpdate">
10801 <desc>
10802 Does a full invalidation of the VM display and instructs the VM
10803 to update it.
10804
10805 <result name="VBOX_E_IPRT_ERROR">
10806 Could not invalidate and update screen.
10807 </result>
10808
10809 </desc>
10810 </method>
10811
10812 <method name="resizeCompleted">
10813 <desc>
10814 Signals that a framebuffer has completed the resize operation.
10815
10816 <result name="VBOX_E_NOT_SUPPORTED">
10817 Operation only valid for external frame buffers.
10818 </result>
10819
10820 </desc>
10821 <param name="screenId" type="unsigned long" dir="in"/>
10822 </method>
10823
10824 <method name="updateCompleted">
10825 <desc>
10826 Signals that a framebuffer has completed the update operation.
10827
10828 <result name="VBOX_E_NOT_SUPPORTED">
10829 Operation only valid for external frame buffers.
10830 </result>
10831
10832 </desc>
10833 </method>
10834
10835 <method name="completeVHWACommand">
10836 <desc>
10837 Signals that the Video HW Acceleration command has completed.
10838 </desc>
10839
10840 <param name="command" type="octet" mod="ptr" dir="in">
10841 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10842 </param>
10843 </method>
10844
10845 </interface>
10846
10847 <!--
10848 // INetworkAdapter
10849 /////////////////////////////////////////////////////////////////////////
10850 -->
10851
10852 <enum
10853 name="NetworkAttachmentType"
10854 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10855 >
10856 <desc>
10857 Network attachment type.
10858 </desc>
10859
10860 <const name="Null" value="0">
10861 <desc>Null value, also means "not attached".</desc>
10862 </const>
10863 <const name="NAT" value="1"/>
10864 <const name="Bridged" value="2"/>
10865 <const name="Internal" value="3"/>
10866 <const name="HostOnly" value="4"/>
10867 </enum>
10868
10869 <enum
10870 name="NetworkAdapterType"
10871 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10872 >
10873 <desc>
10874 Network adapter type.
10875 </desc>
10876
10877 <const name="Null" value="0">
10878 <desc>Null value (never used by the API).</desc>
10879 </const>
10880 <const name="Am79C970A" value="1">
10881 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10882 </const>
10883 <const name="Am79C973" value="2">
10884 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10885 </const>
10886 <const name="I82540EM" value="3">
10887 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10888 </const>
10889 <const name="I82543GC" value="4">
10890 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10891 </const>
10892 <const name="I82545EM" value="5">
10893 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10894 </const>
10895 <const name="Virtio" value="6">
10896 <desc>Virtio network device.</desc>
10897 </const>
10898 </enum>
10899
10900 <interface
10901 name="INetworkAdapter" extends="$unknown"
10902 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10903 wsmap="managed"
10904 >
10905 <desc>
10906 Represents a virtual network adapter that is attached to a virtual machine.
10907 Each virtual machine has a fixed number of network adapter slots with one
10908 instance of this attached to each of them. Call
10909 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10910 is attached to a given slot in a given machine.
10911
10912 Each network adapter can be in one of five attachment modes, which are
10913 represented by the <link to="NetworkAttachmentType" /> enumeration;
10914 see the <link to="#attachmentType" /> attribute.
10915 </desc>
10916
10917 <attribute name="adapterType" type="NetworkAdapterType">
10918 <desc>
10919 Type of the virtual network adapter. Depending on this value,
10920 VirtualBox will provide a different virtual network hardware
10921 to the guest.
10922 </desc>
10923 </attribute>
10924
10925 <attribute name="slot" type="unsigned long" readonly="yes">
10926 <desc>
10927 Slot number this adapter is plugged into. Corresponds to
10928 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10929 to obtain this instance.
10930 </desc>
10931 </attribute>
10932
10933 <attribute name="enabled" type="boolean">
10934 <desc>
10935 Flag whether the network adapter is present in the
10936 guest system. If disabled, the virtual guest hardware will
10937 not contain this network adapter. Can only be changed when
10938 the VM is not running.
10939 </desc>
10940 </attribute>
10941
10942 <attribute name="MACAddress" type="wstring">
10943 <desc>
10944 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10945 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10946 </desc>
10947 </attribute>
10948
10949 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10950
10951 <attribute name="hostInterface" type="wstring">
10952 <desc>
10953 Name of the host network interface the VM is attached to.
10954 </desc>
10955 </attribute>
10956
10957 <attribute name="internalNetwork" type="wstring">
10958 <desc>
10959 Name of the internal network the VM is attached to.
10960 </desc>
10961 </attribute>
10962
10963 <attribute name="NATNetwork" type="wstring">
10964 <desc>
10965 Name of the NAT network the VM is attached to.
10966 </desc>
10967 </attribute>
10968
10969 <attribute name="cableConnected" type="boolean">
10970 <desc>
10971 Flag whether the adapter reports the cable as connected or not.
10972 It can be used to report offline situations to a VM.
10973 </desc>
10974 </attribute>
10975
10976 <attribute name="lineSpeed" type="unsigned long">
10977 <desc>
10978 Line speed reported by custom drivers, in units of 1 kbps.
10979 </desc>
10980 </attribute>
10981
10982 <attribute name="traceEnabled" type="boolean">
10983 <desc>
10984 Flag whether network traffic from/to the network card should be traced.
10985 Can only be toggled when the VM is turned off.
10986 </desc>
10987 </attribute>
10988
10989 <attribute name="traceFile" type="wstring">
10990 <desc>
10991 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10992 will be used.
10993 </desc>
10994 </attribute>
10995
10996 <method name="attachToNAT">
10997 <desc>
10998 Attach the network adapter to the Network Address Translation (NAT) interface.
10999 </desc>
11000 </method>
11001
11002 <method name="attachToBridgedInterface">
11003 <desc>
11004 Attach the network adapter to a bridged host interface.
11005 </desc>
11006 </method>
11007
11008 <method name="attachToInternalNetwork">
11009 <desc>
11010 Attach the network adapter to an internal network.
11011 </desc>
11012 </method>
11013
11014 <method name="attachToHostOnlyInterface">
11015 <desc>
11016 Attach the network adapter to the host-only network.
11017 </desc>
11018 </method>
11019
11020 <method name="detach">
11021 <desc>
11022 Detach the network adapter
11023 </desc>
11024 </method>
11025 </interface>
11026
11027
11028 <!--
11029 // ISerialPort
11030 /////////////////////////////////////////////////////////////////////////
11031 -->
11032
11033 <enum
11034 name="PortMode"
11035 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11036 >
11037 <desc>
11038 The PortMode enumeration represents possible communication modes for
11039 the virtual serial port device.
11040 </desc>
11041
11042 <const name="Disconnected" value="0">
11043 <desc>Virtual device is not attached to any real host device.</desc>
11044 </const>
11045 <const name="HostPipe" value="1">
11046 <desc>Virtual device is attached to a host pipe.</desc>
11047 </const>
11048 <const name="HostDevice" value="2">
11049 <desc>Virtual device is attached to a host device.</desc>
11050 </const>
11051 <const name="RawFile" value="3">
11052 <desc>Virtual device is attached to a raw file.</desc>
11053 </const>
11054 </enum>
11055
11056 <interface
11057 name="ISerialPort" extends="$unknown"
11058 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11059 wsmap="managed"
11060 >
11061
11062 <desc>
11063 The ISerialPort interface represents the virtual serial port device.
11064
11065 The virtual serial port device acts like an ordinary serial port
11066 inside the virtual machine. This device communicates to the real
11067 serial port hardware in one of two modes: host pipe or host device.
11068
11069 In host pipe mode, the #path attribute specifies the path to the pipe on
11070 the host computer that represents a serial port. The #server attribute
11071 determines if this pipe is created by the virtual machine process at
11072 machine startup or it must already exist before starting machine
11073 execution.
11074
11075 In host device mode, the #path attribute specifies the name of the
11076 serial port device on the host computer.
11077
11078 There is also a third communication mode: the disconnected mode. In this
11079 mode, the guest OS running inside the virtual machine will be able to
11080 detect the serial port, but all port write operations will be discarded
11081 and all port read operations will return no data.
11082
11083 <see>IMachine::getSerialPort</see>
11084 </desc>
11085
11086 <attribute name="slot" type="unsigned long" readonly="yes">
11087 <desc>
11088 Slot number this serial port is plugged into. Corresponds to
11089 the value you pass to <link to="IMachine::getSerialPort"/>
11090 to obtain this instance.
11091 </desc>
11092 </attribute>
11093
11094 <attribute name="enabled" type="boolean">
11095 <desc>
11096 Flag whether the serial port is enabled. If disabled,
11097 the serial port will not be reported to the guest OS.
11098 </desc>
11099 </attribute>
11100
11101 <attribute name="IOBase" type="unsigned long">
11102 <desc>Base I/O address of the serial port.</desc>
11103 </attribute>
11104
11105 <attribute name="IRQ" type="unsigned long">
11106 <desc>IRQ number of the serial port.</desc>
11107 </attribute>
11108
11109 <attribute name="hostMode" type="PortMode">
11110 <desc>
11111 How is this port connected to the host.
11112 <note>
11113 Changing this attribute may fail if the conditions for
11114 <link to="#path"/> are not met.
11115 </note>
11116 </desc>
11117 </attribute>
11118
11119 <attribute name="server" type="boolean">
11120 <desc>
11121 Flag whether this serial port acts as a server (creates a new pipe on
11122 the host) or as a client (uses the existing pipe). This attribute is
11123 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11124 </desc>
11125 </attribute>
11126
11127 <attribute name="path" type="wstring">
11128 <desc>
11129 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11130 PortMode_HostPipe, or the host serial device name when
11131 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11132 cases, setting a @c null or empty string as the attribute's value
11133 is an error. Otherwise, the value of this property is ignored.
11134 </desc>
11135 </attribute>
11136
11137 </interface>
11138
11139 <!--
11140 // IParallelPort
11141 /////////////////////////////////////////////////////////////////////////
11142 -->
11143
11144 <interface
11145 name="IParallelPort" extends="$unknown"
11146 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11147 wsmap="managed"
11148 >
11149
11150 <desc>
11151 The IParallelPort interface represents the virtual parallel port device.
11152
11153 The virtual parallel port device acts like an ordinary parallel port
11154 inside the virtual machine. This device communicates to the real
11155 parallel port hardware using the name of the parallel device on the host
11156 computer specified in the #path attribute.
11157
11158 Each virtual parallel port device is assigned a base I/O address and an
11159 IRQ number that will be reported to the guest operating system and used
11160 to operate the given parallel port from within the virtual machine.
11161
11162 <see>IMachine::getParallelPort</see>
11163 </desc>
11164
11165 <attribute name="slot" type="unsigned long" readonly="yes">
11166 <desc>
11167 Slot number this parallel port is plugged into. Corresponds to
11168 the value you pass to <link to="IMachine::getParallelPort"/>
11169 to obtain this instance.
11170 </desc>
11171 </attribute>
11172
11173 <attribute name="enabled" type="boolean">
11174 <desc>
11175 Flag whether the parallel port is enabled. If disabled,
11176 the parallel port will not be reported to the guest OS.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="IOBase" type="unsigned long">
11181 <desc>Base I/O address of the parallel port.</desc>
11182 </attribute>
11183
11184 <attribute name="IRQ" type="unsigned long">
11185 <desc>IRQ number of the parallel port.</desc>
11186 </attribute>
11187
11188 <attribute name="path" type="wstring">
11189 <desc>
11190 Host parallel device name. If this parallel port is enabled, setting a
11191 @c null or an empty string as this attribute's value will result into
11192 an error.
11193 </desc>
11194 </attribute>
11195
11196 </interface>
11197
11198
11199 <!--
11200 // IMachineDebugger
11201 /////////////////////////////////////////////////////////////////////////
11202 -->
11203
11204 <interface
11205 name="IMachineDebugger" extends="$unknown"
11206 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11207 wsmap="suppress"
11208 >
11209 <method name="resetStats">
11210 <desc>
11211 Reset VM statistics.
11212 </desc>
11213 <param name="pattern" type="wstring" dir="in">
11214 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11215 </param>
11216 </method>
11217
11218 <method name="dumpStats">
11219 <desc>
11220 Dumps VM statistics.
11221 </desc>
11222 <param name="pattern" type="wstring" dir="in">
11223 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11224 </param>
11225 </method>
11226
11227 <method name="getStats">
11228 <desc>
11229 Get the VM statistics in a XMLish format.
11230 </desc>
11231 <param name="pattern" type="wstring" dir="in">
11232 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11233 </param>
11234 <param name="withDescriptions" type="boolean" dir="in">
11235 <desc>Whether to include the descriptions.</desc>
11236 </param>
11237 <param name="stats" type="wstring" dir="out">
11238 <desc>The XML document containing the statistics.</desc>
11239 </param>
11240 </method>
11241
11242 <method name="injectNMI">
11243 <desc>
11244 Inject an NMI into a running VT-x/AMD-V VM.
11245 </desc>
11246 </method>
11247
11248 <attribute name="singlestep" type="boolean">
11249 <desc>Switch for enabling singlestepping.</desc>
11250 </attribute>
11251
11252 <attribute name="recompileUser" type="boolean">
11253 <desc>Switch for forcing code recompilation for user mode code.</desc>
11254 </attribute>
11255
11256 <attribute name="recompileSupervisor" type="boolean">
11257 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11258 </attribute>
11259
11260 <attribute name="PATMEnabled" type="boolean">
11261 <desc>Switch for enabling and disabling the PATM component.</desc>
11262 </attribute>
11263
11264 <attribute name="CSAMEnabled" type="boolean">
11265 <desc>Switch for enabling and disabling the CSAM component.</desc>
11266 </attribute>
11267
11268 <attribute name="logEnabled" type="boolean">
11269 <desc>Switch for enabling and disabling logging.</desc>
11270 </attribute>
11271
11272 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11273 <desc>
11274 Flag indicating whether the VM is currently making use of CPU hardware
11275 virtualization extensions.
11276 </desc>
11277 </attribute>
11278
11279 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11280 <desc>
11281 Flag indicating whether the VM is currently making use of the nested paging
11282 CPU hardware virtualization extension.
11283 </desc>
11284 </attribute>
11285
11286 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11287 <desc>
11288 Flag indicating whether the VM is currently making use of the VPID
11289 VT-x extension.
11290 </desc>
11291 </attribute>
11292
11293 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11294 <desc>
11295 Flag indicating whether the VM is currently making use of the Physical
11296 Address Extension CPU feature.
11297 </desc>
11298 </attribute>
11299
11300 <attribute name="virtualTimeRate" type="unsigned long">
11301 <desc>
11302 The rate at which the virtual time runs expressed as a percentage.
11303 The accepted range is 2% to 20000%.
11304 </desc>
11305 </attribute>
11306
11307 <!-- @todo method for setting log flags, groups and destination! -->
11308
11309 <attribute name="VM" type="unsigned long long" readonly="yes">
11310 <desc>
11311 Gets the VM handle. This is only for internal use while
11312 we carve the details of this interface.
11313 </desc>
11314 </attribute>
11315
11316 </interface>
11317
11318 <!--
11319 // IUSBController
11320 /////////////////////////////////////////////////////////////////////////
11321 -->
11322
11323 <interface
11324 name="IUSBController" extends="$unknown"
11325 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11326 wsmap="managed"
11327 >
11328 <attribute name="enabled" type="boolean">
11329 <desc>
11330 Flag whether the USB controller is present in the
11331 guest system. If disabled, the virtual guest hardware will
11332 not contain any USB controller. Can only be changed when
11333 the VM is powered off.
11334 </desc>
11335 </attribute>
11336
11337 <attribute name="enabledEhci" type="boolean">
11338 <desc>
11339 Flag whether the USB EHCI controller is present in the
11340 guest system. If disabled, the virtual guest hardware will
11341 not contain a USB EHCI controller. Can only be changed when
11342 the VM is powered off.
11343 </desc>
11344 </attribute>
11345
11346 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11347 <desc>
11348 USB standard version which the controller implements.
11349 This is a BCD which means that the major version is in the
11350 high byte and minor version is in the low byte.
11351 </desc>
11352 </attribute>
11353
11354 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11355 <desc>
11356 List of USB device filters associated with the machine.
11357
11358 If the machine is currently running, these filters are activated
11359 every time a new (supported) USB device is attached to the host
11360 computer that was not ignored by global filters
11361 (<link to="IHost::USBDeviceFilters"/>).
11362
11363 These filters are also activated when the machine is powered up.
11364 They are run against a list of all currently available USB
11365 devices (in states
11366 <link to="USBDeviceState_Available"/>,
11367 <link to="USBDeviceState_Busy"/>,
11368 <link to="USBDeviceState_Held"/>) that were not previously
11369 ignored by global filters.
11370
11371 If at least one filter matches the USB device in question, this
11372 device is automatically captured (attached to) the virtual USB
11373 controller of this machine.
11374
11375 <see>IUSBDeviceFilter, ::IUSBController</see>
11376 </desc>
11377 </attribute>
11378
11379 <method name="createDeviceFilter">
11380 <desc>
11381 Creates a new USB device filter. All attributes except
11382 the filter name are set to empty (any match),
11383 <i>active</i> is @c false (the filter is not active).
11384
11385 The created filter can then be added to the list of filters using
11386 <link to="#insertDeviceFilter"/>.
11387
11388 <result name="VBOX_E_INVALID_VM_STATE">
11389 The virtual machine is not mutable.
11390 </result>
11391
11392 <see>#deviceFilters</see>
11393 </desc>
11394 <param name="name" type="wstring" dir="in">
11395 <desc>
11396 Filter name. See <link to="IUSBDeviceFilter::name"/>
11397 for more info.
11398 </desc>
11399 </param>
11400 <param name="filter" type="IUSBDeviceFilter" dir="return">
11401 <desc>Created filter object.</desc>
11402 </param>
11403 </method>
11404
11405 <method name="insertDeviceFilter">
11406 <desc>
11407 Inserts the given USB device to the specified position
11408 in the list of filters.
11409
11410 Positions are numbered starting from <tt>0</tt>. If the specified
11411 position is equal to or greater than the number of elements in
11412 the list, the filter is added to the end of the collection.
11413
11414 <note>
11415 Duplicates are not allowed, so an attempt to insert a
11416 filter that is already in the collection, will return an
11417 error.
11418 </note>
11419
11420 <result name="VBOX_E_INVALID_VM_STATE">
11421 Virtual machine is not mutable.
11422 </result>
11423 <result name="E_INVALIDARG">
11424 USB device filter not created within this VirtualBox instance.
11425 </result>
11426 <result name="VBOX_E_INVALID_OBJECT_STATE">
11427 USB device filter already in list.
11428 </result>
11429
11430 <see>#deviceFilters</see>
11431 </desc>
11432 <param name="position" type="unsigned long" dir="in">
11433 <desc>Position to insert the filter to.</desc>
11434 </param>
11435 <param name="filter" type="IUSBDeviceFilter" dir="in">
11436 <desc>USB device filter to insert.</desc>
11437 </param>
11438 </method>
11439
11440 <method name="removeDeviceFilter">
11441 <desc>
11442 Removes a USB device filter from the specified position in the
11443 list of filters.
11444
11445 Positions are numbered starting from <tt>0</tt>. Specifying a
11446 position equal to or greater than the number of elements in
11447 the list will produce an error.
11448
11449 <see>#deviceFilters</see>
11450
11451 <result name="VBOX_E_INVALID_VM_STATE">
11452 Virtual machine is not mutable.
11453 </result>
11454 <result name="E_INVALIDARG">
11455 USB device filter list empty or invalid @a position.
11456 </result>
11457
11458 </desc>
11459 <param name="position" type="unsigned long" dir="in">
11460 <desc>Position to remove the filter from.</desc>
11461 </param>
11462 <param name="filter" type="IUSBDeviceFilter" dir="return">
11463 <desc>Removed USB device filter.</desc>
11464 </param>
11465 </method>
11466
11467 </interface>
11468
11469
11470 <!--
11471 // IUSBDevice
11472 /////////////////////////////////////////////////////////////////////////
11473 -->
11474
11475 <interface
11476 name="IUSBDevice" extends="$unknown"
11477 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11478 wsmap="managed"
11479 >
11480 <desc>
11481 The IUSBDevice interface represents a virtual USB device attached to the
11482 virtual machine.
11483
11484 A collection of objects implementing this interface is stored in the
11485 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11486 attached to a running virtual machine's USB controller.
11487 </desc>
11488
11489 <attribute name="id" type="uuid" mod="string" readonly="yes">
11490 <desc>
11491 Unique USB device ID. This ID is built from #vendorId,
11492 #productId, #revision and #serialNumber.
11493 </desc>
11494 </attribute>
11495
11496 <attribute name="vendorId" type="unsigned short" readonly="yes">
11497 <desc>Vendor ID.</desc>
11498 </attribute>
11499
11500 <attribute name="productId" type="unsigned short" readonly="yes">
11501 <desc>Product ID.</desc>
11502 </attribute>
11503
11504 <attribute name="revision" type="unsigned short" readonly="yes">
11505 <desc>
11506 Product revision number. This is a packed BCD represented as
11507 unsigned short. The high byte is the integer part and the low
11508 byte is the decimal.
11509 </desc>
11510 </attribute>
11511
11512 <attribute name="manufacturer" type="wstring" readonly="yes">
11513 <desc>Manufacturer string.</desc>
11514 </attribute>
11515
11516 <attribute name="product" type="wstring" readonly="yes">
11517 <desc>Product string.</desc>
11518 </attribute>
11519
11520 <attribute name="serialNumber" type="wstring" readonly="yes">
11521 <desc>Serial number string.</desc>
11522 </attribute>
11523
11524 <attribute name="address" type="wstring" readonly="yes">
11525 <desc>Host specific address of the device.</desc>
11526 </attribute>
11527
11528 <attribute name="port" type="unsigned short" readonly="yes">
11529 <desc>
11530 Host USB port number the device is physically
11531 connected to.
11532 </desc>
11533 </attribute>
11534
11535 <attribute name="version" type="unsigned short" readonly="yes">
11536 <desc>
11537 The major USB version of the device - 1 or 2.
11538 </desc>
11539 </attribute>
11540
11541 <attribute name="portVersion" type="unsigned short" readonly="yes">
11542 <desc>
11543 The major USB version of the host USB port the device is
11544 physically connected to - 1 or 2. For devices not connected to
11545 anything this will have the same value as the version attribute.
11546 </desc>
11547 </attribute>
11548
11549 <attribute name="remote" type="boolean" readonly="yes">
11550 <desc>
11551 Whether the device is physically connected to a remote VRDP
11552 client or to a local host machine.
11553 </desc>
11554 </attribute>
11555
11556 </interface>
11557
11558
11559 <!--
11560 // IUSBDeviceFilter
11561 /////////////////////////////////////////////////////////////////////////
11562 -->
11563
11564 <interface
11565 name="IUSBDeviceFilter" extends="$unknown"
11566 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11567 wsmap="managed"
11568 >
11569 <desc>
11570 The IUSBDeviceFilter interface represents an USB device filter used
11571 to perform actions on a group of USB devices.
11572
11573 This type of filters is used by running virtual machines to
11574 automatically capture selected USB devices once they are physically
11575 attached to the host computer.
11576
11577 A USB device is matched to the given device filter if and only if all
11578 attributes of the device match the corresponding attributes of the
11579 filter (that is, attributes are joined together using the logical AND
11580 operation). On the other hand, all together, filters in the list of
11581 filters carry the semantics of the logical OR operation. So if it is
11582 desirable to create a match like "this vendor id OR this product id",
11583 one needs to create two filters and specify "any match" (see below)
11584 for unused attributes.
11585
11586 All filter attributes used for matching are strings. Each string
11587 is an expression representing a set of values of the corresponding
11588 device attribute, that will match the given filter. Currently, the
11589 following filtering expressions are supported:
11590
11591 <ul>
11592 <li><i>Interval filters</i>. Used to specify valid intervals for
11593 integer device attributes (Vendor ID, Product ID and Revision).
11594 The format of the string is:
11595
11596 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11597
11598 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11599 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11600 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11601 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11602 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11603 possible integer is assumed.
11604 </li>
11605 <li><i>Boolean filters</i>. Used to specify acceptable values for
11606 boolean device attributes. The format of the string is:
11607
11608 <tt>true|false|yes|no|0|1</tt>
11609
11610 </li>
11611 <li><i>Exact match</i>. Used to specify a single value for the given
11612 device attribute. Any string that doesn't start with <tt>int:</tt>
11613 represents the exact match. String device attributes are compared to
11614 this string including case of symbols. Integer attributes are first
11615 converted to a string (see individual filter attributes) and then
11616 compared ignoring case.
11617
11618 </li>
11619 <li><i>Any match</i>. Any value of the corresponding device attribute
11620 will match the given filter. An empty or @c null string is
11621 used to construct this type of filtering expressions.
11622
11623 </li>
11624 </ul>
11625
11626 <note>
11627 On the Windows host platform, interval filters are not currently
11628 available. Also all string filter attributes
11629 (<link to="#manufacturer"/>, <link to="#product"/>,
11630 <link to="#serialNumber"/>) are ignored, so they behave as
11631 <i>any match</i> no matter what string expression is specified.
11632 </note>
11633
11634 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11635 </desc>
11636
11637 <attribute name="name" type="wstring">
11638 <desc>
11639 Visible name for this filter.
11640 This name is used to visually distinguish one filter from another,
11641 so it can neither be @c null nor an empty string.
11642 </desc>
11643 </attribute>
11644
11645 <attribute name="active" type="boolean">
11646 <desc>Whether this filter active or has been temporarily disabled.</desc>
11647 </attribute>
11648
11649 <attribute name="vendorId" type="wstring">
11650 <desc>
11651 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11652 The string representation for the <i>exact matching</i>
11653 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11654 (including leading zeroes).
11655 </desc>
11656 </attribute>
11657
11658 <attribute name="productId" type="wstring">
11659 <desc>
11660 <link to="IUSBDevice::productId">Product ID</link> filter.
11661 The string representation for the <i>exact matching</i>
11662 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11663 (including leading zeroes).
11664 </desc>
11665 </attribute>
11666
11667 <attribute name="revision" type="wstring">
11668 <desc>
11669 <link to="IUSBDevice::productId">Product revision number</link>
11670 filter. The string representation for the <i>exact matching</i>
11671 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11672 of the integer part of the revision, and <tt>F</tt> is the
11673 decimal digit of its fractional part (including leading and
11674 trailing zeros).
11675 Note that for interval filters, it's best to use the hexadecimal
11676 form, because the revision is stored as a 16 bit packed BCD value;
11677 so the expression <tt>int:0x0100-0x0199</tt> will match any
11678 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11679 </desc>
11680 </attribute>
11681
11682 <attribute name="manufacturer" type="wstring">
11683 <desc>
11684 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11685 </desc>
11686 </attribute>
11687
11688 <attribute name="product" type="wstring">
11689 <desc>
11690 <link to="IUSBDevice::product">Product</link> filter.
11691 </desc>
11692 </attribute>
11693
11694 <attribute name="serialNumber" type="wstring">
11695 <desc>
11696 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11697 </desc>
11698 </attribute>
11699
11700 <attribute name="port" type="wstring">
11701 <desc>
11702 <link to="IUSBDevice::port">Host USB port</link> filter.
11703 </desc>
11704 </attribute>
11705
11706 <attribute name="remote" type="wstring">
11707 <desc>
11708 <link to="IUSBDevice::remote">Remote state</link> filter.
11709 <note>
11710 This filter makes sense only for machine USB filters,
11711 i.e. it is ignored by IHostUSBDeviceFilter objects.
11712 </note>
11713 </desc>
11714 </attribute>
11715
11716 <attribute name="maskedInterfaces" type="unsigned long">
11717 <desc>
11718 This is an advanced option for hiding one or more USB interfaces
11719 from the guest. The value is a bit mask where the bits that are set
11720 means the corresponding USB interface should be hidden, masked off
11721 if you like.
11722 This feature only works on Linux hosts.
11723 </desc>
11724 </attribute>
11725
11726 </interface>
11727
11728
11729 <!--
11730 // IHostUSBDevice
11731 /////////////////////////////////////////////////////////////////////////
11732 -->
11733
11734 <enum
11735 name="USBDeviceState"
11736 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11737 >
11738 <desc>
11739 USB device state. This enumeration represents all possible states
11740 of the USB device physically attached to the host computer regarding
11741 its state on the host computer and availability to guest computers
11742 (all currently running virtual machines).
11743
11744 Once a supported USB device is attached to the host, global USB
11745 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11746 either ignore the device, or put it to USBDeviceState_Held state, or do
11747 nothing. Unless the device is ignored by global filters, filters of all
11748 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11749 activated that can put it to USBDeviceState_Captured state.
11750
11751 If the device was ignored by global filters, or didn't match
11752 any filters at all (including guest ones), it is handled by the host
11753 in a normal way. In this case, the device state is determined by
11754 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11755 or USBDeviceState_Available, depending on the current device usage.
11756
11757 Besides auto-capturing based on filters, the device can be manually
11758 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11759 state is USBDeviceState_Busy, USBDeviceState_Available or
11760 USBDeviceState_Held.
11761
11762 <note>
11763 Due to differences in USB stack implementations in Linux and Win32,
11764 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11765 only to the Linux version of the product. This also means that (<link
11766 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11767 device state is USBDeviceState_Held.
11768 </note>
11769
11770 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11771 </desc>
11772
11773 <const name="NotSupported" value="0">
11774 <desc>
11775 Not supported by the VirtualBox server, not available to guests.
11776 </desc>
11777 </const>
11778 <const name="Unavailable" value="1">
11779 <desc>
11780 Being used by the host computer exclusively,
11781 not available to guests.
11782 </desc>
11783 </const>
11784 <const name="Busy" value="2">
11785 <desc>
11786 Being used by the host computer, potentially available to guests.
11787 </desc>
11788 </const>
11789 <const name="Available" value="3">
11790 <desc>
11791 Not used by the host computer, available to guests (the host computer
11792 can also start using the device at any time).
11793 </desc>
11794 </const>
11795 <const name="Held" value="4">
11796 <desc>
11797 Held by the VirtualBox server (ignored by the host computer),
11798 available to guests.
11799 </desc>
11800 </const>
11801 <const name="Captured" value="5">
11802 <desc>
11803 Captured by one of the guest computers, not available
11804 to anybody else.
11805 </desc>
11806 </const>
11807 </enum>
11808
11809 <interface
11810 name="IHostUSBDevice" extends="IUSBDevice"
11811 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11812 wsmap="managed"
11813 >
11814 <desc>
11815 The IHostUSBDevice interface represents a physical USB device attached
11816 to the host computer.
11817
11818 Besides properties inherited from IUSBDevice, this interface adds the
11819 <link to="#state"/> property that holds the current state of the USB
11820 device.
11821
11822 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11823 </desc>
11824
11825 <attribute name="state" type="USBDeviceState" readonly="yes">
11826 <desc>
11827 Current state of the device.
11828 </desc>
11829 </attribute>
11830
11831 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11832
11833 </interface>
11834
11835
11836 <!--
11837 // IHostUSBDeviceFilter
11838 /////////////////////////////////////////////////////////////////////////
11839 -->
11840
11841 <enum
11842 name="USBDeviceFilterAction"
11843 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11844 >
11845 <desc>
11846 Actions for host USB device filters.
11847 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11848 </desc>
11849
11850 <const name="Null" value="0">
11851 <desc>Null value (never used by the API).</desc>
11852 </const>
11853 <const name="Ignore" value="1">
11854 <desc>Ignore the matched USB device.</desc>
11855 </const>
11856 <const name="Hold" value="2">
11857 <desc>Hold the matched USB device.</desc>
11858 </const>
11859 </enum>
11860
11861 <interface
11862 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11863 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11864 wsmap="managed"
11865 >
11866 <desc>
11867 The IHostUSBDeviceFilter interface represents a global filter for a
11868 physical USB device used by the host computer. Used indirectly in
11869 <link to="IHost::USBDeviceFilters"/>.
11870
11871 Using filters of this type, the host computer determines the initial
11872 state of the USB device after it is physically attached to the
11873 host's USB controller.
11874
11875 <note>
11876 The <link to="#remote"/> attribute is ignored by this type of
11877 filters, because it makes sense only for
11878 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11879 </note>
11880
11881 <see>IHost::USBDeviceFilters</see>
11882 </desc>
11883
11884 <attribute name="action" type="USBDeviceFilterAction">
11885 <desc>
11886 Action performed by the host when an attached USB device
11887 matches this filter.
11888 </desc>
11889 </attribute>
11890
11891 </interface>
11892
11893 <!--
11894 // IAudioAdapter
11895 /////////////////////////////////////////////////////////////////////////
11896 -->
11897
11898 <enum
11899 name="AudioDriverType"
11900 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11901 >
11902 <desc>
11903 Host audio driver type.
11904 </desc>
11905
11906 <const name="Null" value="0">
11907 <desc>Null value, also means "dummy audio driver".</desc>
11908 </const>
11909 <const name="WinMM" value="1">
11910 <desc>Windows multimedia (Windows hosts only).</desc>
11911 </const>
11912 <const name="OSS" value="2">
11913 <desc>Open Sound System (Linux hosts only).</desc>
11914 </const>
11915 <const name="ALSA" value="3">
11916 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11917 </const>
11918 <const name="DirectSound" value="4">
11919 <desc>DirectSound (Windows hosts only).</desc>
11920 </const>
11921 <const name="CoreAudio" value="5">
11922 <desc>CoreAudio (Mac hosts only).</desc>
11923 </const>
11924 <const name="MMPM" value="6">
11925 <desc>Reserved for historical reasons.</desc>
11926 </const>
11927 <const name="Pulse" value="7">
11928 <desc>PulseAudio (Linux hosts only).</desc>
11929 </const>
11930 <const name="SolAudio" value="8">
11931 <desc>Solaris audio (Solaris hosts only).</desc>
11932 </const>
11933 </enum>
11934
11935 <enum
11936 name="AudioControllerType"
11937 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11938 >
11939 <desc>
11940 Virtual audio controller type.
11941 </desc>
11942
11943 <const name="AC97" value="0"/>
11944 <const name="SB16" value="1"/>
11945 </enum>
11946
11947 <interface
11948 name="IAudioAdapter" extends="$unknown"
11949 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11950 wsmap="managed"
11951 >
11952 <desc>
11953 The IAudioAdapter interface represents the virtual audio adapter of
11954 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11955 </desc>
11956 <attribute name="enabled" type="boolean">
11957 <desc>
11958 Flag whether the audio adapter is present in the
11959 guest system. If disabled, the virtual guest hardware will
11960 not contain any audio adapter. Can only be changed when
11961 the VM is not running.
11962 </desc>
11963 </attribute>
11964 <attribute name="audioController" type="AudioControllerType">
11965 <desc>
11966 The audio hardware we emulate.
11967 </desc>
11968 </attribute>
11969 <attribute name="audioDriver" type="AudioDriverType">
11970 <desc>
11971 Audio driver the adapter is connected to. This setting
11972 can only be changed when the VM is not running.
11973 </desc>
11974 </attribute>
11975 </interface>
11976
11977 <!--
11978 // IVRDPServer
11979 /////////////////////////////////////////////////////////////////////////
11980 -->
11981
11982 <enum
11983 name="VRDPAuthType"
11984 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11985 >
11986 <desc>
11987 VRDP authentication type.
11988 </desc>
11989
11990 <const name="Null" value="0">
11991 <desc>Null value, also means "no authentication".</desc>
11992 </const>
11993 <const name="External" value="1"/>
11994 <const name="Guest" value="2"/>
11995 </enum>
11996
11997 <interface
11998 name="IVRDPServer" extends="$unknown"
11999 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12000 wsmap="managed"
12001 >
12002 <attribute name="enabled" type="boolean">
12003 <desc>VRDP server status.</desc>
12004 </attribute>
12005
12006 <attribute name="ports" type="wstring">
12007 <desc>
12008 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12009 <note>
12010 This is a string of comma separated TCP port numbers or port number ranges.
12011 Example <tt>5000,5010-5012,5015</tt>
12012 </note>
12013 </desc>
12014 </attribute>
12015
12016 <attribute name="netAddress" type="wstring">
12017 <desc>VRDP server address.</desc>
12018 </attribute>
12019
12020 <attribute name="authType" type="VRDPAuthType">
12021 <desc>VRDP authentication method.</desc>
12022 </attribute>
12023
12024 <attribute name="authTimeout" type="unsigned long">
12025 <desc>Timeout for guest authentication. Milliseconds.</desc>
12026 </attribute>
12027
12028 <attribute name="allowMultiConnection" type="boolean">
12029 <desc>
12030 Flag whether multiple simultaneous connections to the VM are permitted.
12031 Note that this will be replaced by a more powerful mechanism in the future.
12032 </desc>
12033 </attribute>
12034
12035 <attribute name="reuseSingleConnection" type="boolean">
12036 <desc>
12037 Flag whether the existing connection must be dropped and a new connection
12038 must be established by the VRDP server, when a new client connects in single
12039 connection mode.
12040 </desc>
12041 </attribute>
12042
12043 </interface>
12044
12045
12046 <!--
12047 // ISharedFolder
12048 /////////////////////////////////////////////////////////////////////////
12049 -->
12050
12051 <interface
12052 name="ISharedFolder" extends="$unknown"
12053 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12054 wsmap="struct"
12055 >
12056 <desc>
12057 The ISharedFolder interface represents a folder in the host computer's
12058 file system accessible from the guest OS running inside a virtual
12059 machine using an associated logical name.
12060
12061 There are three types of shared folders:
12062 <ul>
12063 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12064 folders available to all virtual machines.</li>
12065 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12066 VM-specific shared folders available to the given virtual machine at
12067 startup.</li>
12068 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12069 VM-specific shared folders created in the session context (for
12070 example, when the virtual machine is running) and automatically
12071 discarded when the session is closed (the VM is powered off).</li>
12072 </ul>
12073
12074 Logical names of shared folders must be unique within the given scope
12075 (global, permanent or transient). However, they do not need to be unique
12076 across scopes. In this case, the definition of the shared folder in a
12077 more specific scope takes precedence over definitions in all other
12078 scopes. The order of precedence is (more specific to more general):
12079 <ol>
12080 <li>Transient definitions</li>
12081 <li>Permanent definitions</li>
12082 <li>Global definitions</li>
12083 </ol>
12084
12085 For example, if MyMachine has a shared folder named
12086 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12087 transient shared folder named <tt>C_DRIVE</tt> (that points
12088 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12089 of <tt>C_DRIVE</tt> in the guest OS so
12090 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12091 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12092 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12093 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12094 to <tt>C:\\</tt> if it still exists.
12095
12096 Note that permanent and transient shared folders of different machines
12097 are in different name spaces, so they don't overlap and don't need to
12098 have unique logical names.
12099
12100 <note>
12101 Global shared folders are not implemented in the current version of the
12102 product.
12103 </note>
12104 </desc>
12105
12106 <attribute name="name" type="wstring" readonly="yes">
12107 <desc>Logical name of the shared folder.</desc>
12108 </attribute>
12109
12110 <attribute name="hostPath" type="wstring" readonly="yes">
12111 <desc>Full path to the shared folder in the host file system.</desc>
12112 </attribute>
12113
12114 <attribute name="accessible" type="boolean" readonly="yes">
12115 <desc>
12116 Whether the folder defined by the host path is currently
12117 accessible or not.
12118 For example, the folder can be unaccessible if it is placed
12119 on the network share that is not available by the time
12120 this property is read.
12121 </desc>
12122 </attribute>
12123
12124 <attribute name="writable" type="boolean" readonly="yes">
12125 <desc>
12126 Whether the folder defined by the host path is writable or
12127 not.
12128 </desc>
12129 </attribute>
12130
12131 <attribute name="lastAccessError" type="wstring" readonly="yes">
12132 <desc>
12133 Text message that represents the result of the last accessibility
12134 check.
12135
12136 Accessibility checks are performed each time the <link to="#accessible"/>
12137 attribute is read. An empty string is returned if the last
12138 accessibility check was successful. A non-empty string indicates a
12139 failure and should normally describe a reason of the failure (for
12140 example, a file read error).
12141 </desc>
12142 </attribute>
12143
12144 </interface>
12145
12146 <!--
12147 // ISession
12148 /////////////////////////////////////////////////////////////////////////
12149 -->
12150
12151 <interface
12152 name="IInternalSessionControl" extends="$unknown"
12153 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12154 internal="yes"
12155 wsmap="suppress"
12156 >
12157 <method name="getPID">
12158 <desc>PID of the process that has created this Session object.
12159 </desc>
12160 <param name="pid" type="unsigned long" dir="return"/>
12161 </method>
12162
12163 <method name="getRemoteConsole">
12164 <desc>
12165 Returns the console object suitable for remote control.
12166
12167 <result name="VBOX_E_INVALID_VM_STATE">
12168 Session state prevents operation.
12169 </result>
12170 <result name="VBOX_E_INVALID_OBJECT_STATE">
12171 Session type prevents operation.
12172 </result>
12173
12174 </desc>
12175 <param name="console" type="IConsole" dir="return"/>
12176 </method>
12177
12178 <method name="assignMachine">
12179 <desc>
12180 Assigns the machine object associated with this direct-type
12181 session or informs the session that it will be a remote one
12182 (if @a machine == @c null).
12183
12184 <result name="VBOX_E_INVALID_VM_STATE">
12185 Session state prevents operation.
12186 </result>
12187 <result name="VBOX_E_INVALID_OBJECT_STATE">
12188 Session type prevents operation.
12189 </result>
12190
12191 </desc>
12192 <param name="machine" type="IMachine" dir="in"/>
12193 </method>
12194
12195 <method name="assignRemoteMachine">
12196 <desc>
12197 Assigns the machine and the (remote) console object associated with
12198 this remote-type session.
12199
12200 <result name="VBOX_E_INVALID_VM_STATE">
12201 Session state prevents operation.
12202 </result>
12203
12204 </desc>
12205 <param name="machine" type="IMachine" dir="in"/>
12206 <param name="console" type="IConsole" dir="in"/>
12207 </method>
12208
12209 <method name="updateMachineState">
12210 <desc>
12211 Updates the machine state in the VM process.
12212 Must be called only in certain cases
12213 (see the method implementation).
12214
12215 <result name="VBOX_E_INVALID_VM_STATE">
12216 Session state prevents operation.
12217 </result>
12218 <result name="VBOX_E_INVALID_OBJECT_STATE">
12219 Session type prevents operation.
12220 </result>
12221
12222 </desc>
12223 <param name="aMachineState" type="MachineState" dir="in"/>
12224 </method>
12225
12226 <method name="uninitialize">
12227 <desc>
12228 Uninitializes (closes) this session. Used by VirtualBox to close
12229 the corresponding remote session when the direct session dies
12230 or gets closed.
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Session state prevents operation.
12234 </result>
12235
12236 </desc>
12237 </method>
12238
12239 <method name="onNetworkAdapterChange">
12240 <desc>
12241 Triggered when settings of a network adapter of the
12242 associated virtual machine have changed.
12243
12244 <result name="VBOX_E_INVALID_VM_STATE">
12245 Session state prevents operation.
12246 </result>
12247 <result name="VBOX_E_INVALID_OBJECT_STATE">
12248 Session type prevents operation.
12249 </result>
12250
12251 </desc>
12252 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12253 <param name="changeAdapter" type="boolean" dir="in"/>
12254 </method>
12255
12256 <method name="onSerialPortChange">
12257 <desc>
12258 Triggered when settings of a serial port of the
12259 associated virtual machine have changed.
12260
12261 <result name="VBOX_E_INVALID_VM_STATE">
12262 Session state prevents operation.
12263 </result>
12264 <result name="VBOX_E_INVALID_OBJECT_STATE">
12265 Session type prevents operation.
12266 </result>
12267
12268 </desc>
12269 <param name="serialPort" type="ISerialPort" dir="in"/>
12270 </method>
12271
12272 <method name="onParallelPortChange">
12273 <desc>
12274 Triggered when settings of a parallel port of the
12275 associated virtual machine have changed.
12276
12277 <result name="VBOX_E_INVALID_VM_STATE">
12278 Session state prevents operation.
12279 </result>
12280 <result name="VBOX_E_INVALID_OBJECT_STATE">
12281 Session type prevents operation.
12282 </result>
12283
12284 </desc>
12285 <param name="parallelPort" type="IParallelPort" dir="in"/>
12286 </method>
12287
12288 <method name="onStorageControllerChange">
12289 <desc>
12290 Triggered when settings of a storage controller of the
12291 associated virtual machine have changed.
12292
12293 <result name="VBOX_E_INVALID_VM_STATE">
12294 Session state prevents operation.
12295 </result>
12296 <result name="VBOX_E_INVALID_OBJECT_STATE">
12297 Session type prevents operation.
12298 </result>
12299
12300 </desc>
12301 </method>
12302
12303 <method name="onMediumChange">
12304 <desc>
12305 Triggered when attached media of the
12306 associated virtual machine have changed.
12307
12308 <result name="VBOX_E_INVALID_VM_STATE">
12309 Session state prevents operation.
12310 </result>
12311 <result name="VBOX_E_INVALID_OBJECT_STATE">
12312 Session type prevents operation.
12313 </result>
12314
12315 </desc>
12316
12317 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12318 </method>
12319
12320 <method name="onVRDPServerChange">
12321 <desc>
12322 Triggered when settings of the VRDP server object of the
12323 associated virtual machine have changed.
12324
12325 <result name="VBOX_E_INVALID_VM_STATE">
12326 Session state prevents operation.
12327 </result>
12328 <result name="VBOX_E_INVALID_OBJECT_STATE">
12329 Session type prevents operation.
12330 </result>
12331
12332 </desc>
12333 </method>
12334
12335 <method name="onUSBControllerChange">
12336 <desc>
12337 Triggered when settings of the USB controller object of the
12338 associated virtual machine have changed.
12339
12340 <result name="VBOX_E_INVALID_VM_STATE">
12341 Session state prevents operation.
12342 </result>
12343 <result name="VBOX_E_INVALID_OBJECT_STATE">
12344 Session type prevents operation.
12345 </result>
12346
12347 </desc>
12348 </method>
12349
12350 <method name="onSharedFolderChange">
12351 <desc>
12352 Triggered when a permanent (global or machine) shared folder has been
12353 created or removed.
12354 <note>
12355 We don't pass shared folder parameters in this notification because
12356 the order in which parallel notifications are delivered is not defined,
12357 therefore it could happen that these parameters were outdated by the
12358 time of processing this notification.
12359 </note>
12360
12361 <result name="VBOX_E_INVALID_VM_STATE">
12362 Session state prevents operation.
12363 </result>
12364 <result name="VBOX_E_INVALID_OBJECT_STATE">
12365 Session type prevents operation.
12366 </result>
12367
12368 </desc>
12369 <param name="global" type="boolean" dir="in"/>
12370 </method>
12371
12372 <method name="onUSBDeviceAttach">
12373 <desc>
12374 Triggered when a request to capture a USB device (as a result
12375 of matched USB filters or direct call to
12376 <link to="IConsole::attachUSBDevice"/>) has completed.
12377 A @c null @a error object means success, otherwise it
12378 describes a failure.
12379
12380 <result name="VBOX_E_INVALID_VM_STATE">
12381 Session state prevents operation.
12382 </result>
12383 <result name="VBOX_E_INVALID_OBJECT_STATE">
12384 Session type prevents operation.
12385 </result>
12386
12387 </desc>
12388 <param name="device" type="IUSBDevice" dir="in"/>
12389 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12390 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12391 </method>
12392
12393 <method name="onUSBDeviceDetach">
12394 <desc>
12395 Triggered when a request to release the USB device (as a result
12396 of machine termination or direct call to
12397 <link to="IConsole::detachUSBDevice"/>) has completed.
12398 A @c null @a error object means success, otherwise it
12399 describes a failure.
12400
12401 <result name="VBOX_E_INVALID_VM_STATE">
12402 Session state prevents operation.
12403 </result>
12404 <result name="VBOX_E_INVALID_OBJECT_STATE">
12405 Session type prevents operation.
12406 </result>
12407
12408 </desc>
12409 <param name="id" type="uuid" mod="string" dir="in"/>
12410 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12411 </method>
12412
12413 <method name="onShowWindow">
12414 <desc>
12415 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12416 <link to="IMachine::showConsoleWindow"/> in order to notify
12417 console callbacks
12418 <link to="IConsoleCallback::onCanShowWindow"/>
12419 and <link to="IConsoleCallback::onShowWindow"/>.
12420
12421 <result name="VBOX_E_INVALID_OBJECT_STATE">
12422 Session type prevents operation.
12423 </result>
12424
12425 </desc>
12426 <param name="check" type="boolean" dir="in"/>
12427 <param name="canShow" type="boolean" dir="out"/>
12428 <param name="winId" type="unsigned long long" dir="out"/>
12429 </method>
12430
12431 <method name="accessGuestProperty">
12432 <desc>
12433 Called by <link to="IMachine::getGuestProperty"/> and by
12434 <link to="IMachine::setGuestProperty"/> in order to read and
12435 modify guest properties.
12436
12437 <result name="VBOX_E_INVALID_VM_STATE">
12438 Machine session is not open.
12439 </result>
12440 <result name="VBOX_E_INVALID_OBJECT_STATE">
12441 Session type is not direct.
12442 </result>
12443
12444 </desc>
12445 <param name="name" type="wstring" dir="in"/>
12446 <param name="value" type="wstring" dir="in"/>
12447 <param name="flags" type="wstring" dir="in"/>
12448 <param name="isSetter" type="boolean" dir="in"/>
12449 <param name="retValue" type="wstring" dir="out"/>
12450 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12451 <param name="retFlags" type="wstring" dir="out"/>
12452 </method>
12453
12454 <method name="enumerateGuestProperties">
12455 <desc>
12456 Return a list of the guest properties matching a set of patterns along
12457 with their values, time stamps and flags.
12458
12459 <result name="VBOX_E_INVALID_VM_STATE">
12460 Machine session is not open.
12461 </result>
12462 <result name="VBOX_E_INVALID_OBJECT_STATE">
12463 Session type is not direct.
12464 </result>
12465
12466 </desc>
12467 <param name="patterns" type="wstring" dir="in">
12468 <desc>
12469 The patterns to match the properties against as a comma-separated
12470 string. If this is empty, all properties currently set will be
12471 returned.
12472 </desc>
12473 </param>
12474 <param name="key" type="wstring" dir="out" safearray="yes">
12475 <desc>
12476 The key names of the properties returned.
12477 </desc>
12478 </param>
12479 <param name="value" type="wstring" dir="out" safearray="yes">
12480 <desc>
12481 The values of the properties returned. The array entries match the
12482 corresponding entries in the @a key array.
12483 </desc>
12484 </param>
12485 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12486 <desc>
12487 The time stamps of the properties returned. The array entries match
12488 the corresponding entries in the @a key array.
12489 </desc>
12490 </param>
12491 <param name="flags" type="wstring" dir="out" safearray="yes">
12492 <desc>
12493 The flags of the properties returned. The array entries match the
12494 corresponding entries in the @a key array.
12495 </desc>
12496 </param>
12497 </method>
12498
12499 </interface>
12500
12501 <interface
12502 name="ISession" extends="$dispatched"
12503 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12504 wsmap="managed"
12505 >
12506 <desc>
12507 The ISession interface represents a serialization primitive for virtual
12508 machines.
12509
12510 With VirtualBox, every time one wishes to manipulate a virtual machine
12511 (e.g. change its settings or start execution), a session object is
12512 required. Such an object must be passed to one of the session methods
12513 that open the given session, which then initiates the machine manipulation.
12514
12515 A session serves several purposes: it identifies to the inter-process VirtualBox
12516 code which process is currently working with the virtual machine, and it ensures
12517 that there are no incompatible requests from several processes for the
12518 same virtual machine. Session objects can therefore be thought of as mutex
12519 semaphores that lock virtual machines to prevent conflicting accesses from
12520 several processes.
12521
12522 How sessions objects are used depends on whether you use the Main API
12523 via COM or via the webservice:
12524
12525 <ul>
12526 <li>When using the COM API directly, an object of the Session class from the
12527 VirtualBox type library needs to be created. In regular COM C++ client code,
12528 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12529 This object will then act as a local session object in further calls to open
12530 a session.
12531 </li>
12532
12533 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12534 one session object automatically when <link to="IWebsessionManager::logon" />
12535 is called. A managed object reference to that session object can be retrieved by
12536 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12537 reference can then be used to open sessions.
12538 </li>
12539 </ul>
12540
12541 Sessions are mainly used in two variations:
12542
12543 <ul>
12544 <li>
12545 To start a virtual machine in a separate process, one would call
12546 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12547 object as its first parameter. This session then identifies the caller
12548 and lets him control the started machine (for example, pause machine
12549 execution or power it down) as well as be notified about machine
12550 execution state changes.
12551 </li>
12552
12553 <li>To alter machine settings, or to start machine execution within the
12554 current process, one needs to open a direct session for the machine first by
12555 calling <link to="IVirtualBox::openSession"/>. While a direct session
12556 is open within one process, no any other process may open another direct
12557 session for the same machine. This prevents the machine from being changed
12558 by other processes while it is running or while the machine is being configured.
12559 </li>
12560 </ul>
12561
12562 One also can attach to an existing direct session already opened by
12563 another process (for example, in order to send a control request to the
12564 virtual machine such as the pause or the reset request). This is done by
12565 calling <link to="IVirtualBox::openExistingSession"/>.
12566
12567 <note>
12568 Unless you are trying to write a new VirtualBox front-end that
12569 performs direct machine execution (like the VirtualBox or VBoxSDL
12570 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12571 session opened by <link to="IVirtualBox::openSession"/> and use this
12572 session only to change virtual machine settings. If you simply want to
12573 start virtual machine execution using one of the existing front-ends
12574 (for example the VirtualBox GUI or headless server), simply use
12575 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12576 will power up the machine automatically for you.
12577 </note>
12578 </desc>
12579
12580 <attribute name="state" type="SessionState" readonly="yes">
12581 <desc>Current state of this session.</desc>
12582 </attribute>
12583
12584 <attribute name="type" type="SessionType" readonly="yes">
12585 <desc>
12586 Type of this session. The value of this attribute is valid only
12587 if the session is currently open (i.e. its #state is
12588 SessionType_SessionOpen), otherwise an error will be returned.
12589 </desc>
12590 </attribute>
12591
12592 <attribute name="machine" type="IMachine" readonly="yes">
12593 <desc>Machine object associated with this session.</desc>
12594 </attribute>
12595
12596 <attribute name="console" type="IConsole" readonly="yes">
12597 <desc>Console object associated with this session.</desc>
12598 </attribute>
12599
12600 <method name="close">
12601 <desc>
12602 Closes a session that was previously opened.
12603
12604 It is recommended that every time an "open session" method (such as
12605 <link to="IVirtualBox::openRemoteSession" /> or
12606 <link to="IVirtualBox::openSession" />) has been called to
12607 manipulate a virtual machine, the caller invoke
12608 ISession::close() when it's done doing so. Since sessions are
12609 serialization primitives much like ordinary mutexes, they are
12610 best used the same way: for each "open" call, there should be
12611 a matching "close" call, even when errors occur.
12612
12613 Otherwise, if a direct session for a machine opened with
12614 <link to="IVirtualBox::openSession"/> is not explicitly closed
12615 when the application terminates, the state of the machine will
12616 be set to <link to="MachineState_Aborted" /> on the server.
12617
12618 Generally, it is recommended to close all open sessions explicitly
12619 before terminating the application (regardless of the reason for
12620 the termination).
12621
12622 <note>
12623 Do not expect the session state (<link to="ISession::state" />
12624 to return to "Closed" immediately after you invoke
12625 ISession::close(), particularly if you have started a remote
12626 session to execute the VM in a new process. The session state will
12627 automatically return to "Closed" once the VM is no longer executing,
12628 which can of course take a very long time.
12629 </note>
12630
12631 <result name="E_UNEXPECTED">
12632 Session is not open.
12633 </result>
12634
12635 </desc>
12636 </method>
12637
12638 </interface>
12639
12640 <!--
12641 // IStorageController
12642 /////////////////////////////////////////////////////////////////////////
12643 -->
12644
12645 <enum
12646 name="StorageBus"
12647 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12648 >
12649 <desc>
12650 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12651 see <link to="IStorageController::bus" />.
12652 </desc>
12653 <const name="Null" value="0">
12654 <desc>@c null value. Never used by the API.</desc>
12655 </const>
12656 <const name="IDE" value="1"/>
12657 <const name="SATA" value="2"/>
12658 <const name="SCSI" value="3"/>
12659 <const name="Floppy" value="4"/>
12660 </enum>
12661
12662 <enum
12663 name="StorageControllerType"
12664 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12665 >
12666 <desc>
12667 The exact variant of storage controller hardware presented
12668 to the guest; see <link to="IStorageController::controllerType" />.
12669 </desc>
12670
12671 <const name="Null" value="0">
12672 <desc>@c null value. Never used by the API.</desc>
12673 </const>
12674 <const name="LsiLogic" value="1">
12675 <desc>A SCSI controller of the LsiLogic variant.</desc>
12676 </const>
12677 <const name="BusLogic" value="2">
12678 <desc>A SCSI controller of the BusLogic variant.</desc>
12679 </const>
12680 <const name="IntelAhci" value="3">
12681 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12682 </const>
12683 <const name="PIIX3" value="4">
12684 <desc>An IDE controller of the PIIX3 variant.</desc>
12685 </const>
12686 <const name="PIIX4" value="5">
12687 <desc>An IDE controller of the PIIX4 variant.</desc>
12688 </const>
12689 <const name="ICH6" value="6">
12690 <desc>An IDE controller of the ICH6 variant.</desc>
12691 </const>
12692 <const name="I82078" value="7">
12693 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12694 </const>
12695 </enum>
12696
12697 <interface
12698 name="IStorageController" extends="$unknown"
12699 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12700 wsmap="managed"
12701 >
12702 <desc>
12703 Represents a storage controller that is attached to a virtual machine
12704 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12705 attached to storage controllers in a real computer, virtual drives
12706 (represented by <link to="IMediumAttachment" />) are attached to virtual
12707 storage controllers, represented by this interface.
12708
12709 As opposed to physical hardware, VirtualBox has a very generic concept
12710 of a storage controller, and for purposes of the Main API, all virtual
12711 storage is attached to virtual machines via instances of this interface.
12712 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12713 and Floppy (see <link to="#bus" />). Depending on which of these four is
12714 used, certain sub-types may be available and can be selected in
12715 <link to="#controllerType" />.
12716
12717 Depending on these settings, the guest operating system might see
12718 significantly different virtual hardware.
12719 </desc>
12720
12721 <attribute name="name" type="wstring" readonly="yes">
12722 <desc>
12723 Name of the storage controller, as originally specified with
12724 <link to="IMachine::addStorageController" />. This then uniquely
12725 identifies this controller with other method calls such as
12726 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12727 </desc>
12728 </attribute>
12729
12730 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12731 <desc>
12732 Maximum number of devices which can be attached to one port.
12733 </desc>
12734 </attribute>
12735
12736 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12737 <desc>
12738 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12739 </desc>
12740 </attribute>
12741
12742 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12743 <desc>
12744 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12745 </desc>
12746 </attribute>
12747
12748 <attribute name="instance" type="unsigned long">
12749 <desc>
12750 The instance number of the device in the running VM.
12751 </desc>
12752 </attribute>
12753
12754 <attribute name="portCount" type="unsigned long">
12755 <desc>
12756 The number of currently usable ports on the controller.
12757 The minimum and maximum number of ports for one controller are
12758 stored in <link to="IStorageController::minPortCount"/>
12759 and <link to="IStorageController::maxPortCount"/>.
12760 </desc>
12761 </attribute>
12762
12763 <attribute name="bus" type="StorageBus" readonly="yes">
12764 <desc>
12765 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12766 </desc>
12767 </attribute>
12768
12769 <attribute name="controllerType" type="StorageControllerType">
12770 <desc>
12771 The exact variant of storage controller hardware presented
12772 to the guest.
12773 Depending on this value, VirtualBox will provide a different
12774 virtual storage controller hardware to the guest.
12775 For SATA and floppy controllers, only one variant is available,
12776 but for IDE and SCSI, there are several.
12777
12778 For SCSI controllers, the default type is LsiLogic.
12779 </desc>
12780 </attribute>
12781
12782 <method name="GetIDEEmulationPort">
12783 <desc>
12784 Gets the corresponding port number which is emulated as an IDE device.
12785 Works only with SATA controllers.
12786
12787 <result name="E_INVALIDARG">
12788 The @a devicePosition is not in the range 0 to 3.
12789 </result>
12790 <result name="E_NOTIMPL">
12791 The storage controller type is not SATAIntelAhci.
12792 </result>
12793
12794 </desc>
12795 <param name="devicePosition" type="long" dir="in"/>
12796 <param name="portNumber" type="long" dir="return"/>
12797 </method>
12798
12799 <method name="SetIDEEmulationPort">
12800 <desc>
12801 Sets the port number which is emulated as an IDE device.
12802 Works only with SATA controllers.
12803
12804 <result name="E_INVALIDARG">
12805 The @a devicePosition is not in the range 0 to 3 or the
12806 @a portNumber is not in the range 0 to 29.
12807 </result>
12808 <result name="E_NOTIMPL">
12809 The storage controller type is not SATAIntelAhci.
12810 </result>
12811
12812 </desc>
12813 <param name="devicePosition" type="long" dir="in"/>
12814 <param name="portNumber" type="long" dir="in"/>
12815 </method>
12816
12817 </interface>
12818
12819<if target="wsdl">
12820
12821 <!--
12822 // IManagedObjectRef
12823 /////////////////////////////////////////////////////////////////////////
12824 -->
12825
12826 <interface
12827 name="IManagedObjectRef" extends="$unknown"
12828 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12829 internal="yes"
12830 wsmap="managed"
12831 wscpp="hardcoded"
12832 >
12833 <desc>
12834 Managed object reference.
12835
12836 Only within the webservice, a managed object reference (which is really
12837 an opaque number) allows a webservice client to address an object
12838 that lives in the address space of the webservice server.
12839
12840 Behind each managed object reference, there is a COM object that lives
12841 in the webservice server's address space. The COM object is not freed
12842 until the managed object reference is released, either by an explicit
12843 call to <link to="IManagedObjectRef::release" /> or by logging off from
12844 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12845 all objects created during the webservice session.
12846
12847 Whenever a method call of the VirtualBox API returns a COM object, the
12848 webservice representation of that method will instead return a
12849 managed object reference, which can then be used to invoke methods
12850 on that object.
12851 </desc>
12852
12853 <method name="getInterfaceName">
12854 <desc>
12855 Returns the name of the interface that this managed object represents,
12856 for example, "IMachine", as a string.
12857 </desc>
12858 <param name="return" type="wstring" dir="return"/>
12859 </method>
12860
12861 <method name="release">
12862 <desc>
12863 Releases this managed object reference and frees the resources that
12864 were allocated for it in the webservice server process. After calling
12865 this method, the identifier of the reference can no longer be used.
12866 </desc>
12867 </method>
12868
12869 </interface>
12870
12871 <!--
12872 // IWebsessionManager
12873 /////////////////////////////////////////////////////////////////////////
12874 -->
12875
12876 <interface
12877 name="IWebsessionManager" extends="$unknown"
12878 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12879 internal="yes"
12880 wsmap="global"
12881 wscpp="hardcoded"
12882 >
12883 <desc>
12884 Websession manager. This provides essential services
12885 to webservice clients.
12886 </desc>
12887 <method name="logon">
12888 <desc>
12889 Logs a new client onto the webservice and returns a managed object reference to
12890 the IVirtualBox instance, which the client can then use as a basis to further
12891 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12892 interface, in one way or the other.
12893 </desc>
12894 <param name="username" type="wstring" dir="in"/>
12895 <param name="password" type="wstring" dir="in"/>
12896 <param name="return" type="IVirtualBox" dir="return"/>
12897 </method>
12898
12899 <method name="getSessionObject">
12900 <desc>
12901 Returns a managed object reference to the internal ISession object that was created
12902 for this web service session when the client logged on.
12903
12904 <see>ISession</see>
12905 </desc>
12906 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12907 <param name="return" type="ISession" dir="return"/>
12908 </method>
12909
12910 <method name="logoff">
12911 <desc>
12912 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12913 and destroys all resources associated with the session (most importantly, all
12914 managed objects created in the server while the session was active).
12915 </desc>
12916 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12917 </method>
12918
12919 </interface>
12920
12921</if>
12922
12923 <!--
12924 // IPerformanceCollector & friends
12925 /////////////////////////////////////////////////////////////////////////
12926 -->
12927
12928 <interface
12929 name="IPerformanceMetric" extends="$unknown"
12930 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12931 >
12932 <desc>
12933 The IPerformanceMetric interface represents parameters of the given
12934 performance metric.
12935 </desc>
12936
12937 <attribute name="metricName" type="wstring" readonly="yes">
12938 <desc>
12939 Name of the metric.
12940 </desc>
12941 </attribute>
12942
12943 <attribute name="object" type="$unknown" readonly="yes">
12944 <desc>
12945 Object this metric belongs to.
12946 </desc>
12947 </attribute>
12948
12949 <attribute name="description" type="wstring" readonly="yes">
12950 <desc>
12951 Textual description of the metric.
12952 </desc>
12953 </attribute>
12954
12955 <attribute name="period" type="unsigned long" readonly="yes">
12956 <desc>
12957 Time interval between samples, measured in seconds.
12958 </desc>
12959 </attribute>
12960
12961 <attribute name="count" type="unsigned long" readonly="yes">
12962 <desc>
12963 Number of recent samples retained by the performance collector for this
12964 metric.
12965
12966 When the collected sample count exceeds this number, older samples
12967 are discarded.
12968 </desc>
12969 </attribute>
12970
12971 <attribute name="unit" type="wstring" readonly="yes">
12972 <desc>
12973 Unit of measurement.
12974 </desc>
12975 </attribute>
12976
12977 <attribute name="minimumValue" type="long" readonly="yes">
12978 <desc>
12979 Minimum possible value of this metric.
12980 </desc>
12981 </attribute>
12982
12983 <attribute name="maximumValue" type="long" readonly="yes">
12984 <desc>
12985 Maximum possible value of this metric.
12986 </desc>
12987 </attribute>
12988 </interface>
12989
12990 <interface
12991 name="IPerformanceCollector" extends="$unknown"
12992 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12993 wsmap="managed"
12994 >
12995 <desc>
12996 The IPerformanceCollector interface represents a service that collects and
12997 stores performance metrics data.
12998
12999 Performance metrics are associated with objects of interfaces like IHost and
13000 IMachine. Each object has a distinct set of performance metrics.
13001 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13002
13003 Metric data is collected at the specified intervals and is retained
13004 internally. The interval and the number of retained samples can be set
13005 with <link to="IPerformanceCollector::setupMetrics" />.
13006
13007 Metrics are organized hierarchically, with each level separated by a
13008 slash (/) character. Generally, the scheme for metric names is like this:
13009
13010 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13011
13012 "Category/Metric" together form the base metric name. A base metric is the
13013 smallest unit for which a sampling interval and the number of retained
13014 samples can be set. Only base metrics can be enabled and disabled. All
13015 sub-metrics are collected when their base metric is collected.
13016 Collected values for any set of sub-metrics can be queried with
13017 <link to="IPerformanceCollector::queryMetricsData" />.
13018
13019 For example "CPU/Load/User:avg"
13020 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13021 "average" aggregate. An aggregate function is computed over all retained
13022 data. Valid aggregate functions are:
13023
13024 <ul>
13025 <li>avg -- average</li>
13026 <li>min -- minimum</li>
13027 <li>max -- maximum</li>
13028 </ul>
13029
13030 When setting up
13031 metric parameters, querying metric data, enabling or disabling metrics
13032 wildcards can be used in metric names to specify a subset of metrics. For
13033 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13034 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13035 values without aggregates <tt>*:</tt> can be used.
13036
13037 The valid names for base metrics are:
13038
13039 <ul>
13040 <li>CPU/Load</li>
13041 <li>CPU/MHz</li>
13042 <li>RAM/Usage</li>
13043 </ul>
13044
13045 The general sequence for collecting and retrieving the metrics is:
13046 <ul>
13047 <li>
13048 Obtain an instance of IPerformanceCollector with
13049 <link to="IVirtualBox::performanceCollector" />
13050 </li>
13051 <li>
13052 Allocate and populate an array with references to objects the metrics
13053 will be collected for. Use references to IHost and IMachine objects.
13054 </li>
13055 <li>
13056 Allocate and populate an array with base metric names the data will be
13057 collected for.
13058 </li>
13059 <li>
13060 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13061 metric data will be collected and stored.
13062 </li>
13063 <li>
13064 Wait for the data to get collected.
13065 </li>
13066 <li>
13067 Allocate and populate an array with references to objects the metric
13068 values will be queried for. You can re-use the object array used for
13069 setting base metrics.
13070 </li>
13071 <li>
13072 Allocate and populate an array with metric names the data will be
13073 collected for. Note that metric names differ from base metric names.
13074 </li>
13075 <li>
13076 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13077 have been collected so far are returned. Note that the values are still
13078 retained internally and data collection continues.
13079 </li>
13080 </ul>
13081
13082 For an example of usage refer to the following files in VirtualBox SDK:
13083 <ul>
13084 <li>
13085 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13086 </li>
13087 <li>
13088 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13089 </li>
13090 </ul>
13091 </desc>
13092
13093 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13094 <desc>
13095 Array of unique names of metrics.
13096
13097 This array represents all metrics supported by the performance
13098 collector. Individual objects do not necessarily support all of them.
13099 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13100 list of supported metrics for a particular object.
13101 </desc>
13102 </attribute>
13103
13104 <method name="getMetrics">
13105 <desc>
13106 Returns parameters of specified metrics for a set of objects.
13107 <note>
13108 @c Null metrics array means all metrics. @c Null object array means
13109 all existing objects.
13110 </note>
13111 </desc>
13112 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13113 <desc>
13114 Metric name filter. Currently, only a comma-separated list of metrics
13115 is supported.
13116 </desc>
13117 </param>
13118 <param name="objects" type="$unknown" dir="in" safearray="yes">
13119 <desc>
13120 Set of objects to return metric parameters for.
13121 </desc>
13122 </param>
13123 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13124 <desc>
13125 Array of returned metric parameters.
13126 </desc>
13127 </param>
13128 </method>
13129
13130 <method name="setupMetrics">
13131 <desc>
13132 Sets parameters of specified base metrics for a set of objects. Returns
13133 an array of <link to="IPerformanceMetric" /> describing the metrics have
13134 been affected.
13135 <note>
13136 @c Null or empty metric name array means all metrics. @c Null or empty
13137 object array means all existing objects. If metric name array contains
13138 a single element and object array contains many, the single metric
13139 name array element is applied to each object array element to form
13140 metric/object pairs.
13141 </note>
13142 </desc>
13143 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13144 <desc>
13145 Metric name filter. Comma-separated list of metrics with wildcard
13146 support.
13147 </desc>
13148 </param>
13149 <param name="objects" type="$unknown" dir="in" safearray="yes">
13150 <desc>
13151 Set of objects to setup metric parameters for.
13152 </desc>
13153 </param>
13154 <param name="period" type="unsigned long" dir="in">
13155 <desc>
13156 Time interval in seconds between two consecutive samples of performance
13157 data.
13158 </desc>
13159 </param>
13160 <param name="count" type="unsigned long" dir="in">
13161 <desc>
13162 Number of samples to retain in performance data history. Older samples
13163 get discarded.
13164 </desc>
13165 </param>
13166 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13167 <desc>
13168 Array of metrics that have been modified by the call to this method.
13169 </desc>
13170 </param>
13171 </method>
13172
13173 <method name="enableMetrics">
13174 <desc>
13175 Turns on collecting specified base metrics. Returns an array of
13176 <link to="IPerformanceMetric" /> describing the metrics have been
13177 affected.
13178 <note>
13179 @c Null or empty metric name array means all metrics. @c Null or empty
13180 object array means all existing objects. If metric name array contains
13181 a single element and object array contains many, the single metric
13182 name array element is applied to each object array element to form
13183 metric/object pairs.
13184 </note>
13185 </desc>
13186 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13187 <desc>
13188 Metric name filter. Comma-separated list of metrics with wildcard
13189 support.
13190 </desc>
13191 </param>
13192 <param name="objects" type="$unknown" dir="in" safearray="yes">
13193 <desc>
13194 Set of objects to enable metrics for.
13195 </desc>
13196 </param>
13197 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13198 <desc>
13199 Array of metrics that have been modified by the call to this method.
13200 </desc>
13201 </param>
13202 </method>
13203
13204 <method name="disableMetrics">
13205 <desc>
13206 Turns off collecting specified base metrics. Returns an array of
13207 <link to="IPerformanceMetric" /> describing the metrics have been
13208 affected.
13209 <note>
13210 @c Null or empty metric name array means all metrics. @c Null or empty
13211 object array means all existing objects. If metric name array contains
13212 a single element and object array contains many, the single metric
13213 name array element is applied to each object array element to form
13214 metric/object pairs.
13215 </note>
13216 </desc>
13217 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13218 <desc>
13219 Metric name filter. Comma-separated list of metrics with wildcard
13220 support.
13221 </desc>
13222 </param>
13223 <param name="objects" type="$unknown" dir="in" safearray="yes">
13224 <desc>
13225 Set of objects to disable metrics for.
13226 </desc>
13227 </param>
13228 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13229 <desc>
13230 Array of metrics that have been modified by the call to this method.
13231 </desc>
13232 </param>
13233 </method>
13234
13235 <method name="queryMetricsData">
13236 <desc>
13237 Queries collected metrics data for a set of objects.
13238
13239 The data itself and related metric information are returned in seven
13240 parallel and one flattened array of arrays. Elements of
13241 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13242 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13243 the same index describe one set of values corresponding to a single
13244 metric.
13245
13246 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13247 start and length of a sub-array is indicated by
13248 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13249 value for metric <tt>metricNames[i]</tt> is at
13250 <tt>returnData[returnIndices[i]]</tt>.
13251
13252 <note>
13253 @c Null or empty metric name array means all metrics. @c Null or empty
13254 object array means all existing objects. If metric name array contains
13255 a single element and object array contains many, the single metric
13256 name array element is applied to each object array element to form
13257 metric/object pairs.
13258 </note>
13259 <note>
13260 Data collection continues behind the scenes after call to
13261 @c queryMetricsData. The return data can be seen as the snapshot of
13262 the current state at the time of @c queryMetricsData call. The
13263 internally kept metric values are not cleared by the call. This makes
13264 possible querying different subsets of metrics or aggregates with
13265 subsequent calls. If periodic querying is needed it is highly
13266 suggested to query the values with @c interval*count period to avoid
13267 confusion. This way a completely new set of data values will be
13268 provided by each query.
13269 </note>
13270 </desc>
13271 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13272 <desc>
13273 Metric name filter. Comma-separated list of metrics with wildcard
13274 support.
13275 </desc>
13276 </param>
13277 <param name="objects" type="$unknown" dir="in" safearray="yes">
13278 <desc>
13279 Set of objects to query metrics for.
13280 </desc>
13281 </param>
13282 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13283 <desc>
13284 Names of metrics returned in @c returnData.
13285 </desc>
13286 </param>
13287 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13288 <desc>
13289 Objects associated with metrics returned in @c returnData.
13290 </desc>
13291 </param>
13292 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13293 <desc>
13294 Units of measurement for each returned metric.
13295 </desc>
13296 </param>
13297 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13298 <desc>
13299 Divisor that should be applied to return values in order to get
13300 floating point values. For example:
13301 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13302 will retrieve the floating point value of i-th sample of the first
13303 metric.
13304 </desc>
13305 </param>
13306 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13307 <desc>
13308 Sequence numbers of the first elements of value sequences of particular metrics
13309 returned in @c returnData. For aggregate metrics it is the sequence number of
13310 the sample the aggregate started calculation from.
13311 </desc>
13312 </param>
13313 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13314 <desc>
13315 Indices of the first elements of value sequences of particular metrics
13316 returned in @c returnData.
13317 </desc>
13318 </param>
13319 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13320 <desc>
13321 Lengths of value sequences of particular metrics.
13322 </desc>
13323 </param>
13324 <param name="returnData" type="long" dir="return" safearray="yes">
13325 <desc>
13326 Flattened array of all metric data containing sequences of values for
13327 each metric.
13328 </desc>
13329 </param>
13330 </method>
13331
13332 </interface>
13333
13334 <module name="VBoxSVC" context="LocalServer">
13335 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13336 namespace="virtualbox.org">
13337 <interface name="IVirtualBox" default="yes"/>
13338 </class>
13339 </module>
13340
13341 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13342 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13343 namespace="virtualbox.org">
13344 <interface name="ISession" default="yes"/>
13345 </class>
13346 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13347 namespace="virtualbox.org">
13348 <interface name="ILocalOwner" default="yes"/>
13349 <interface name="IVirtualBoxCallback"/>
13350 <interface name="IConsoleCallback"/>
13351 </class>
13352 </module>
13353
13354</library>
13355
13356</idl>
13357
13358<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
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