VirtualBox

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

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

StorageController: added support for Instance number

  • Property svn:eol-style set to native
File size: 491.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.
8321 </desc>
8322 </const>
8323 <const name="LockedRead" value="2">
8324 <desc>
8325 Medium is locked for reading, no data modification is possible.
8326 </desc>
8327 </const>
8328 <const name="LockedWrite" value="3">
8329 <desc>
8330 Medium is locked for writing, no concurrent data reading or modification
8331 is possible.
8332 </desc>
8333 </const>
8334 <const name="Inaccessible" value="4">
8335 <desc>
8336 Associated medium storage is not accessible.
8337 </desc>
8338 </const>
8339 <const name="Creating" value="5">
8340 <desc>
8341 Associated medium storage is being created.
8342 </desc>
8343 </const>
8344 <const name="Deleting" value="6">
8345 <desc>
8346 Associated medium storage is being deleted.
8347 </desc>
8348 </const>
8349 </enum>
8350
8351 <enum
8352 name="MediumType"
8353 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8354 >
8355 <desc>
8356 Virtual medium type.
8357 <see>IMedium</see>
8358 </desc>
8359
8360 <const name="Normal" value="0">
8361 <desc>
8362 Normal medium (attached directly or indirectly, preserved
8363 when taking snapshots).
8364 </desc>
8365 </const>
8366 <const name="Immutable" value="1">
8367 <desc>
8368 Immutable medium (attached indirectly, changes are wiped out
8369 the next time the virtual machine is started).
8370 </desc>
8371 </const>
8372 <const name="Writethrough" value="2">
8373 <desc>
8374 Write through medium (attached directly, ignored when
8375 taking snapshots).
8376 </desc>
8377 </const>
8378 </enum>
8379
8380 <enum
8381 name="MediumVariant"
8382 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8383 >
8384 <desc>
8385 Virtual medium image variant. More than one flag may be set.
8386 <see>IMedium</see>
8387 </desc>
8388
8389 <const name="Standard" value="0">
8390 <desc>
8391 No particular variant requested, results in using the backend default.
8392 </desc>
8393 </const>
8394 <const name="VmdkSplit2G" value="0x01">
8395 <desc>
8396 VMDK image split in chunks of less than 2GByte.
8397 </desc>
8398 </const>
8399 <const name="VmdkStreamOptimized" value="0x04">
8400 <desc>
8401 VMDK streamOptimized image. Special import/export format which is
8402 read-only/append-only.
8403 </desc>
8404 </const>
8405 <const name="VmdkESX" value="0x08">
8406 <desc>
8407 VMDK format variant used on ESX products.
8408 </desc>
8409 </const>
8410 <const name="Fixed" value="0x10000">
8411 <desc>
8412 Fixed image. Only allowed for base images.
8413 </desc>
8414 </const>
8415 <const name="Diff" value="0x20000">
8416 <desc>
8417 Fixed image. Only allowed for base images.
8418 </desc>
8419 </const>
8420 </enum>
8421
8422 <interface
8423 name="IMediumAttachment" extends="$unknown"
8424 uuid="7bb6ac41-8c03-4863-9eea-d9c76561b8d1"
8425 wsmap="struct"
8426 >
8427 <desc>
8428 The IMediumAttachment interface represents the attachment
8429 of a storage medium to a virtual machine. Each machine contains
8430 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8431
8432 Each medium attachment specifies a storage controller as well as a port
8433 and device number. Fixed media (hard disks) will always also specify
8434 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8435 medium. For removeable media, the IMedia instance is optional; it can be
8436 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8437 </desc>
8438
8439 <attribute name="medium" type="IMedium" readonly="yes">
8440 <desc>Medium object associated with this attachment; it
8441 can be @c null for removable devices.</desc>
8442 </attribute>
8443
8444 <attribute name="controller" type="IStorageController" readonly="yes">
8445 <desc>Storage controller object to which this attachment belongs.</desc>
8446 </attribute>
8447
8448 <attribute name="port" type="long" readonly="yes">
8449 <desc>Port number of this attachment.</desc>
8450 </attribute>
8451
8452 <attribute name="device" type="long" readonly="yes">
8453 <desc>Device slot number of this attachment.</desc>
8454 </attribute>
8455
8456 <attribute name="type" type="DeviceType" readonly="yes">
8457 <desc>Device type of this attachment.</desc>
8458 </attribute>
8459
8460 <attribute name="passthrough" type="boolean" readonly="yes">
8461 <desc>Pass I/O requests through to a device on the host.</desc>
8462 </attribute>
8463
8464 </interface>
8465
8466 <interface
8467 name="IMedium" extends="$unknown"
8468 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8469 wsmap="managed"
8470 >
8471 <desc>
8472 The IMedium interface represents virtual storage for a machine's
8473 hard disks, CD/DVD or floppy drives. It will typically represent
8474 a disk image on the host, for example a VDI or VMDK file representing
8475 a virtual hard disk, or an ISO or RAW file representing virtual
8476 removable media, but can also point to a network location (e.g.
8477 for iSCSI targets).
8478
8479 Instances of IMedium are connected to virtual machines by way of
8480 medium attachments (see <link to="IMediumAttachment" />), which link
8481 the storage medium to a particular device slot of a storage controller
8482 of the virtual machine.
8483 In the VirtualBox API, virtual storage is therefore always represented
8484 by the following chain of object links:
8485
8486 <ul>
8487 <li><link to="IMachine::storageControllers"/> contains an array of
8488 storage controllers (IDE, SATA, SCSI or a floppy controller;
8489 these are instances of <link to="IStorageController"/>).</li>
8490 <li><link to="IMachine::mediumAttachments"/> contains an array of
8491 medium attachments (instances of <link to="IMediumAttachment"/>),
8492 each containing the name of a storage controller from the above
8493 array, a port/device specification, and an instance of
8494 IMedium representing the medium storage (image file). For removable
8495 media, the storage medium is optional; a medium attachment with no
8496 medium represents a CD/DVD or floppy drive with no medium inserted.
8497 By contrast, hard disk attachments will always have an IMedium
8498 object attached.</li>
8499 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8500 computer or a network resource) that holds actual data. The location of
8501 the storage unit is represented by the <link to="#location"/> attribute.
8502 The value of this attribute is medium type dependent.</li>
8503 </ul>
8504
8505 Existing media are opened using the following methods, depending on the
8506 media type:
8507 <ul>
8508 <li><link to="IVirtualBox::openHardDisk"/></li>
8509 <li><link to="IVirtualBox::openDVDImage"/></li>
8510 <li><link to="IVirtualBox::openFloppyImage"/></li>
8511 </ul>
8512
8513 New hard disk media can be created with the VirtualBox API using the
8514 <link to="IVirtualBox::createHardDisk"/> method.
8515
8516 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8517 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8518 type in a regular file.
8519
8520 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8521 drive; in that case the <link to="#id" /> attribute contains the UUID of
8522 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8523
8524 <h3>Known media</h3>
8525
8526 When an existing medium is opened for the first time, it is automatically
8527 remembered by the given VirtualBox installation or, in other words, becomes
8528 a <i>known medium</i>. Known media are stored in the media
8529 registry transparently maintained by VirtualBox and stored in settings
8530 files so that this registry is preserved when VirtualBox is not running.
8531
8532 Newly created virtual media are remembered only when the associated
8533 storage unit is actually created.
8534
8535 All known media can be enumerated using
8536 <link to="IVirtualBox::hardDisks"/>,
8537 <link to="IVirtualBox::DVDImages"/> and
8538 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8539 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8540 and similar methods or by location using
8541 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8542
8543 Only known media can be attached to virtual machines.
8544
8545 Removing known media from the media registry is performed when the given
8546 medium is closed using the <link to="#close"/> method or when its
8547 associated storage unit is deleted.
8548
8549 <h3>Accessibility checks</h3>
8550
8551 The given medium (with the created storage unit) is considered to be
8552 <i>accessible</i> when its storage unit can be read. In that case, the
8553 <link to="#state"/> attribute has a value of "Created".
8554 When the storage unit cannot be read (for example, because it is located on
8555 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8556 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8557 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8558 obtained by reading the <link to="#lastAccessError"/> attribute.
8559
8560 A new accessibility check is performed each time the <link to="#state"/>
8561 attribute is read. This check may take long time (several seconds or even
8562 minutes, depending on the storage unit location and format), and will
8563 block the calling thread until finished. For this reason, it is recommended
8564 to never read this attribute on the main UI thread to avoid making the UI
8565 unresponsive.
8566
8567 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8568 created for the first time), all known media are in the
8569 <link to="MediumState_Inaccessible"/> state but the value of the <link
8570 to="#lastAccessError"/> attribute is an empty string because no actual
8571 accessibility check is made on startup. This is done to make the
8572 VirtualBox object ready for serving requests as
8573 fast as possible and let the end-user application decide if it needs to
8574 check media accessibility right away or not.
8575
8576 <h3>Medium types</h3>
8577
8578 There are three types of medium behavior (see <link to="MediumType" />):
8579 "normal", "immutable" and "writethrough", represented by the
8580 <link to="#type"/> attribute. The type of the medium defines how the
8581 medium is attached to a virtual machine and what happens when a
8582 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8583 attached medium is taken. At the moment DVD and floppy media are always
8584 of type "writethrough".
8585
8586 All media can be also divided in two groups: <i>base</i> media and
8587 <i>differencing</i> media. A base medium contains all sectors of the
8588 medium data in its own storage and therefore can be used independently.
8589 In contrast, a differencing mediun is a "delta" to some other medium and
8590 contains only those sectors which differ from that other medium, which is
8591 then called a <i>parent</i>. The differencing medium is said to be
8592 <i>linked to</i> that parent. The parent may be itself a differencing
8593 medium, thus forming a chain of linked media. The last element in that
8594 chain must always be a base medium. Note that several differencing
8595 media may be linked to the same parent medium.
8596
8597 Differencing media can be distinguished from base media by querying the
8598 <link to="#parent"/> attribute: base media do not have parents they would
8599 depend on, so the value of this attribute is always @c null for them.
8600 Using this attribute, it is possible to walk up the medium tree (from the
8601 child medium to its parent). It is also possible to walk down the tree
8602 using the <link to="#children"/> attribute.
8603
8604 Note that the type of all differencing media is
8605 <link to="MediumType_Normal" />; all other values are meaningless for
8606 them. Base media may be of any type.
8607
8608 <h3>Creating hard disks</h3>
8609
8610 New base hard disks are created using
8611 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8612 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8613 disks are usually implicitly created by VirtualBox when needed but may
8614 also be created explicitly using <link to="#createDiffStorage"/>.
8615
8616 After the hard disk is successfully created (including the storage unit)
8617 or opened, it becomes a known hard disk (remembered in the internal media
8618 registry). Known hard disks can be attached to a virtual machine, accessed
8619 through <link to="IVirtualBox::getHardDisk"/> and
8620 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8621 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8622
8623 The following methods, besides <link to="IMedium::close"/>,
8624 automatically remove the hard disk from the media registry:
8625 <ul>
8626 <li><link to="#deleteStorage"/></li>
8627 <li><link to="#mergeTo"/></li>
8628 </ul>
8629
8630 If the storage unit of the hard disk is a regular file in the host's
8631 file system then the rules stated in the description of the
8632 <link to="IMedium::location"/> attribute apply when setting its value. In
8633 addition, a plain file name without any path may be given, in which case
8634 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8635 folder</link> will be prepended to it.
8636
8637 <h4>Automatic composition of the file name part</h4>
8638
8639 Another extension to the <link to="IMedium::location"/> attribute is that
8640 there is a possibility to cause VirtualBox to compose a unique value for
8641 the file name part of the location using the UUID of the hard disk. This
8642 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8643 e.g. before the storage unit is created, and works as follows. You set the
8644 value of the <link to="IMedium::location"/> attribute to a location
8645 specification which only contains the path specification but not the file
8646 name part and ends with either a forward slash or a backslash character.
8647 In response, VirtualBox will generate a new UUID for the hard disk and
8648 compose the file name using the following pattern:
8649 <pre>
8650 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8651 </pre>
8652 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8653 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8654 is the default extension for the storage format of this hard disk. After
8655 that, you may call any of the methods that create a new hard disk storage
8656 unit and they will use the generated UUID and file name.
8657
8658 <h3>Attaching Hard Disks</h3>
8659
8660 Hard disks are attached to virtual machines using the
8661 <link to="IMachine::attachDevice"/> method and detached using the
8662 <link to="IMachine::detachDevice"/> method. Depending on their
8663 <link to="#type"/>, hard disks are attached either
8664 <i>directly</i> or <i>indirectly</i>.
8665
8666 When a hard disk is being attached directly, it is associated with the
8667 virtual machine and used for hard disk operations when the machine is
8668 running. When a hard disk is being attached indirectly, a new differencing
8669 hard disk linked to it is implicitly created and this differencing hard
8670 disk is associated with the machine and used for hard disk operations.
8671 This also means that if <link to="IMachine::attachDevice"/> performs
8672 a direct attachment then the same hard disk will be returned in response
8673 to the subsequent <link to="IMachine::getMedium"/> call; however if
8674 an indirect attachment is performed then
8675 <link to="IMachine::getMedium"/> will return the implicitly created
8676 differencing hard disk, not the original one passed to <link
8677 to="IMachine::attachDevice"/>. In detail:
8678
8679 <ul>
8680 <li><b>Normal base</b> hard disks that do not have children (i.e.
8681 differencing hard disks linked to them) and that are not already
8682 attached to virtual machines in snapshots are attached <b>directly</b>.
8683 Otherwise, they are attached <b>indirectly</b> because having
8684 dependent children or being part of the snapshot makes it impossible
8685 to modify hard disk contents without breaking the integrity of the
8686 dependent party. The <link to="#readOnly"/> attribute allows to
8687 quickly determine the kind of the attachment for the given hard
8688 disk. Note that if a normal base hard disk is to be indirectly
8689 attached to a virtual machine with snapshots then a special
8690 procedure called <i>smart attachment</i> is performed (see below).</li>
8691 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8692 they are attached <b>directly</b> if they do not have children and are
8693 not attached to virtual machines in snapshots, and <b>indirectly</b>
8694 otherwise. Note that the smart attachment procedure is never performed
8695 for differencing hard disks.</li>
8696 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8697 they are designed to be non-writable. If an immutable hard disk is
8698 attached to a virtual machine with snapshots then a special
8699 procedure called smart attachment is performed (see below).</li>
8700 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8701 also as designed. This also means that writethrough hard disks cannot
8702 have other hard disks linked to them at all.</li>
8703 </ul>
8704
8705 Note that the same hard disk, regardless of its type, may be attached to
8706 more than one virtual machine at a time. In this case, the machine that is
8707 started first gains exclusive access to the hard disk and attempts to
8708 start other machines having this hard disk attached will fail until the
8709 first machine is powered down.
8710
8711 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8712 that the given hard disk remains associated with the given machine after a
8713 successful <link to="IMachine::detachDevice"/> call until
8714 <link to="IMachine::saveSettings"/> is called to save all changes to
8715 machine settings to disk. This deferring is necessary to guarantee that
8716 the hard disk configuration may be restored at any time by a call to
8717 <link to="IMachine::discardSettings"/> before the settings
8718 are saved (committed).
8719
8720 Note that if <link to="IMachine::discardSettings"/> is called after
8721 indirectly attaching some hard disks to the machine but before a call to
8722 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8723 all differencing hard disks implicitly created by
8724 <link to="IMachine::attachDevice"/> for these indirect attachments.
8725 Such implicitly created hard disks will also be immediately deleted when
8726 detached explicitly using the <link to="IMachine::detachDevice"/>
8727 call if it is made before <link to="IMachine::saveSettings"/>. This
8728 implicit deletion is safe because newly created differencing hard
8729 disks do not contain any user data.
8730
8731 However, keep in mind that detaching differencing hard disks that were
8732 implicitly created by <link to="IMachine::attachDevice"/>
8733 before the last <link to="IMachine::saveSettings"/> call will
8734 <b>not</b> implicitly delete them as they may already contain some data
8735 (for example, as a result of virtual machine execution). If these hard
8736 disks are no more necessary, the caller can always delete them explicitly
8737 using <link to="#deleteStorage"/> after they are actually de-associated
8738 from this machine by the <link to="IMachine::saveSettings"/> call.
8739
8740 <h3>Smart Attachment</h3>
8741
8742 When normal base or immutable hard disks are indirectly attached to a
8743 virtual machine then some additional steps are performed to make sure the
8744 virtual machine will have the most recent "view" of the hard disk being
8745 attached. These steps include walking through the machine's snapshots
8746 starting from the current one and going through ancestors up to the first
8747 snapshot. Hard disks attached to the virtual machine in all
8748 of the encountered snapshots are checked whether they are descendants of
8749 the given normal base or immutable hard disk. The first found child (which
8750 is the differencing hard disk) will be used instead of the normal base or
8751 immutable hard disk as a parent for creating a new differencing hard disk
8752 that will be actually attached to the machine. And only if no descendants
8753 are found or if the virtual machine does not have any snapshots then the
8754 normal base or immutable hard disk will be used itself as a parent for
8755 this differencing hard disk.
8756
8757 It is easier to explain what smart attachment does using the
8758 following example:
8759 <pre>
8760BEFORE attaching B.vdi: AFTER attaching B.vdi:
8761
8762Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8763 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8764 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8765 Snapshot 4 (none) Snapshot 4 (none)
8766 CurState (none) CurState (D3->D2.vdi)
8767
8768 NOT
8769 ...
8770 CurState (D3->B.vdi)
8771 </pre>
8772 The first column is the virtual machine configuration before the base hard
8773 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8774 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8775 mean that the hard disk that is actually attached to the machine is a
8776 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8777 another hard disk, <tt>B.vdi</tt>.
8778
8779 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8780 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8781 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8782 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8783 it cannot be attached directly and needs an indirect attachment (i.e.
8784 implicit creation of a new differencing hard disk). Due to the smart
8785 attachment procedure, the new differencing hard disk
8786 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8787 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8788 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8789 machine.
8790
8791 Note that if there is more than one descendant hard disk of the given base
8792 hard disk found in a snapshot, and there is an exact device, channel and
8793 bus match, then this exact match will be used. Otherwise, the youngest
8794 descendant will be picked up.
8795
8796 There is one more important aspect of the smart attachment procedure which
8797 is not related to snapshots at all. Before walking through the snapshots
8798 as described above, the backup copy of the current list of hard disk
8799 attachment is searched for descendants. This backup copy is created when
8800 the hard disk configuration is changed for the first time after the last
8801 <link to="IMachine::saveSettings"/> call and used by
8802 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8803 changes. When such a descendant is found in this backup copy, it will be
8804 simply re-attached back, without creating a new differencing hard disk for
8805 it. This optimization is necessary to make it possible to re-attach the
8806 base or immutable hard disk to a different bus, channel or device slot
8807 without losing the contents of the differencing hard disk actually
8808 attached to the machine in place of it.
8809 </desc>
8810
8811 <attribute name="id" type="uuid" mod="string" readonly="yes">
8812 <desc>
8813 UUID of the medium. For a newly created medium, this value is a randomly
8814 generated UUID.
8815
8816 <note>
8817 For media in one of MediumState_NotCreated, MediumState_Creating or
8818 MediumState_Deleting states, the value of this property is undefined
8819 and will most likely be an empty UUID.
8820 </note>
8821 </desc>
8822 </attribute>
8823
8824 <attribute name="description" type="wstring">
8825 <desc>
8826 Optional description of the medium. For a newly created medium the value
8827 of this attribute is an empty string.
8828
8829 Medium types that don't support this attribute will return E_NOTIMPL in
8830 attempt to get or set this attribute's value.
8831
8832 <note>
8833 For some storage types, reading this attribute may return an outdated
8834 (last known) value when <link to="#state"/> is <link
8835 to="MediumState_Inaccessible"/> or <link
8836 to="MediumState_LockedWrite"/> because the value of this attribute is
8837 stored within the storage unit itself. Also note that changing the
8838 attribute value is not possible in such case, as well as when the
8839 medium is the <link to="MediumState_LockedRead"/> state.
8840 </note>
8841 </desc>
8842 </attribute>
8843
8844 <attribute name="state" type="MediumState" readonly="yes">
8845 <desc>
8846 Current medium state. Inspect <link to="MediumState"/> values for details.
8847
8848 Reading this attribute may take a long time because an accessibility
8849 check of the storage unit is performed each time the attribute is read.
8850 This check may cause a significant delay if the storage unit of the
8851 given medium is, for example, a file located on a network share which is
8852 not currently accessible due to connectivity problems -- the call will
8853 not return until a timeout interval defined by the host OS for this
8854 operation expires.
8855
8856 If the last known state of the medium is <link to="MediumState_Created"/>
8857 and the accessibility check fails then the state would be set to
8858 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8859 may be used to get more details about the failure. If the state of the
8860 medium is <link to="MediumState_LockedRead"/> or
8861 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8862 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8863 accessibility check in this case.
8864
8865 Note that not all medium states are applicable to all medium types.
8866 </desc>
8867 </attribute>
8868
8869 <attribute name="location" type="wstring">
8870 <desc>
8871 Location of the storage unit holding medium data.
8872
8873 The format of the location string is medium type specific. For medium
8874 types using regular files in a host's file system, the location
8875 string is the full file name.
8876
8877 Some medium types may support changing the storage unit location by
8878 simply changing the value of this property. If this operation is not
8879 supported, the implementation will return E_NOTIMPL in attempt to set
8880 this attribute's value.
8881
8882 When setting a value of the location attribute which is a regular file
8883 in the host's file system, the given file name may be either relative to
8884 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8885 absolute. Note that if the given location specification does not contain
8886 the file extension part then a proper default extension will be
8887 automatically appended by the implementation depending on the medium type.
8888 </desc>
8889 </attribute>
8890
8891 <attribute name="name" type="wstring" readonly="yes">
8892 <desc>
8893 Name of the storage unit holding medium data.
8894
8895 The returned string is a short version of the <link to="#location"/>
8896 attribute that is suitable for representing the medium in situations
8897 where the full location specification is too long (such as lists
8898 and comboboxes in GUI frontends). This string is also used by frontends
8899 to sort the media list alphabetically when needed.
8900
8901 For example, for locations that are regular files in the host's file
8902 system, the value of this attribute is just the file name (+ extension),
8903 without the path specification.
8904
8905 Note that as opposed to the <link to="#location"/> attribute, the name
8906 attribute will not necessary be unique for a list of media of the
8907 given type and format.
8908 </desc>
8909 </attribute>
8910
8911 <attribute name="deviceType" type="DeviceType" readonly="yes">
8912 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8913 medium.</desc>
8914 </attribute>
8915
8916 <attribute name="hostDrive" type="boolean" readonly="yes">
8917 <desc>True if this corresponds to a drive on the host.</desc>
8918 </attribute>
8919
8920 <attribute name="size" type="unsigned long long" readonly="yes">
8921 <desc>
8922 Physical size of the storage unit used to hold medium data (in bytes).
8923
8924 <note>
8925 For media whose <link to="#state"/> is <link
8926 to="MediumState_Inaccessible"/>, the value of this property is the
8927 last known size. For <link to="MediumState_NotCreated"/> media,
8928 the returned value is zero.
8929 </note>
8930 </desc>
8931 </attribute>
8932
8933 <attribute name="format" type="wstring" readonly="yes">
8934 <desc>
8935 Storage format of this medium.
8936
8937 The value of this attribute is a string that specifies a backend used
8938 to store medium data. The storage format is defined when you create a
8939 new medium or automatically detected when you open an existing medium,
8940 and cannot be changed later.
8941
8942 The list of all storage formats supported by this VirtualBox
8943 installation can be obtained using
8944 <link to="ISystemProperties::mediumFormats"/>.
8945 </desc>
8946 </attribute>
8947
8948 <attribute name="type" type="MediumType">
8949 <desc>
8950 Type (role) of this medium.
8951
8952 The following constraints apply when changing the value of this
8953 attribute:
8954 <ul>
8955 <li>If a medium is attached to a virtual machine (either in the
8956 current state or in one of the snapshots), its type cannot be
8957 changed.
8958 </li>
8959 <li>As long as the medium has children, its type cannot be set
8960 to <link to="MediumType_Writethrough"/>.
8961 </li>
8962 <li>The type of all differencing media is
8963 <link to="MediumType_Normal"/> and cannot be changed.
8964 </li>
8965 </ul>
8966
8967 The type of a newly created or opened medium is set to
8968 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8969 which have a type of <link to="MediumType_Writethrough"/>.
8970 </desc>
8971 </attribute>
8972
8973 <attribute name="parent" type="IMedium" readonly="yes">
8974 <desc>
8975 Parent of this medium (the medium this medium is directly based
8976 on).
8977
8978 Only differencing media have parents. For base (non-differencing)
8979 media, @c null is returned.
8980 </desc>
8981 </attribute>
8982
8983 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8984 <desc>
8985 Children of this medium (all differencing media directly based
8986 on this medium). A @c null array is returned if this medium
8987 does not have any children.
8988 </desc>
8989 </attribute>
8990
8991 <attribute name="base" type="IMedium" readonly="yes">
8992 <desc>
8993 Base medium of this medium.
8994
8995 If this is a differencing medium, its base medium is the medium
8996 the given medium branch starts from. For all other types of media, this
8997 property returns the medium object itself (i.e. the same object this
8998 property is read on).
8999 </desc>
9000 </attribute>
9001
9002 <attribute name="readOnly" type="boolean" readonly="yes">
9003 <desc>
9004 Returns @c true if this medium is read-only and @c false otherwise.
9005
9006 A medium is considered to be read-only when its contents cannot be
9007 modified without breaking the integrity of other parties that depend on
9008 this medium such as its child media or snapshots of virtual machines
9009 where this medium is attached to these machines. If there are no
9010 children and no such snapshots then there is no dependency and the
9011 medium is not read-only.
9012
9013 The value of this attribute can be used to determine the kind of the
9014 attachment that will take place when attaching this medium to a
9015 virtual machine. If the value is @c false then the medium will
9016 be attached directly. If the value is @c true then the medium
9017 will be attached indirectly by creating a new differencing child
9018 medium for that. See the interface description for more information.
9019
9020 Note that all <link to="MediumType_Immutable">Immutable</link> media
9021 are always read-only while all
9022 <link to="MediumType_Writethrough">Writethrough</link> media are
9023 always not.
9024
9025 <note>
9026 The read-only condition represented by this attribute is related to
9027 the medium type and usage, not to the current
9028 <link to="IMedium::state">medium state</link> and not to the read-only
9029 state of the storage unit.
9030 </note>
9031 </desc>
9032 </attribute>
9033
9034 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9035 <desc>
9036 Logical size of this medium (in megabytes), as reported to the
9037 guest OS running inside the virtual machine this medium is
9038 attached to. The logical size is defined when the medium is created
9039 and cannot be changed later.
9040
9041 <note>
9042 Reading this property on a differencing medium will return the size
9043 of its <link to="#base"/> medium.
9044 </note>
9045 <note>
9046 For media whose state is <link to="#state"/> is <link
9047 to="MediumState_Inaccessible"/>, the value of this property is the
9048 last known logical size. For <link to="MediumaState_NotCreated"/>
9049 media, the returned value is zero.
9050 </note>
9051 </desc>
9052 </attribute>
9053
9054 <attribute name="autoReset" type="boolean">
9055 <desc>
9056 Whether this differencing medium will be automatically reset each
9057 time a virtual machine it is attached to is powered up.
9058
9059 See <link to="#reset()"/> for more information about resetting
9060 differencing media.
9061
9062 <note>
9063 Reading this property on a base (non-differencing) medium will
9064 always @c false. Changing the value of this property in this
9065 case is not supported.
9066 </note>
9067
9068 <result name="VBOX_E_NOT_SUPPORTED">
9069 This is not a differencing medium (when changing the attribute
9070 value).
9071 </result>
9072 </desc>
9073 </attribute>
9074
9075 <attribute name="lastAccessError" type="wstring" readonly="yes">
9076 <desc>
9077 Text message that represents the result of the last accessibility
9078 check.
9079
9080 Accessibility checks are performed each time the <link to="#state"/>
9081 attribute is read. An empty string is returned if the last
9082 accessibility check was successful. A non-empty string indicates a
9083 failure and should normally describe a reason of the failure (for
9084 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="getSnapshotIds">
9105 <desc>
9106 Returns an array of UUIDs of all snapshots of the given machine where
9107 this medium is attached to.
9108
9109 If the medium is attached to the machine in the current state, then the
9110 first element in the array will always be the ID of the queried machine
9111 (i.e. the value equal to the @c machineId argument), followed by
9112 snapshot IDs (if any).
9113
9114 If the medium is not attached to the machine in the current state, then
9115 the array will contain only snapshot IDs.
9116
9117 The returned array may be @c null if this medium is not attached
9118 to the given machine at all, neither in the current state nor in one of
9119 the snapshots.
9120 </desc>
9121 <param name="machineId" type="uuid" mod="string" dir="in">
9122 <desc>
9123 UUID of the machine to query.
9124 </desc>
9125 </param>
9126 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9127 <desc>
9128 Array of snapshot UUIDs of the given machine using this medium.
9129 </desc>
9130 </param>
9131 </method>
9132
9133 <method name="lockRead">
9134 <desc>
9135 Locks this medium for reading.
9136
9137 The read lock is shared: many clients can simultaneously lock the
9138 same medium for reading unless it is already locked for writing (see
9139 <link to="#lockWrite"/>) in which case an error is returned.
9140
9141 When the medium is locked for reading, it cannot be modified
9142 from within VirtualBox. This means that any method that changes
9143 the properties of this medium or contents of the storage unit
9144 will return an error (unless explicitly stated otherwise) and
9145 that an attempt to start a virtual machine that wants to modify
9146 the medium will also fail.
9147
9148 When the virtual machine is started up, it locks for reading all
9149 media it uses in read-only mode. If some medium cannot be locked
9150 for reading, the startup procedure will fail.
9151
9152 The medium locked for reading must be unlocked using the <link
9153 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9154 can be nested and must be followed by the same number of paired
9155 <link to="#unlockRead"/> calls.
9156
9157 This method sets the medium state to <link
9158 to="MediumState_LockedRead" /> on success. The state prior to
9159 this call must be <link to="MediumState_Created" />,
9160 <link to="MediumState_Inaccessible" /> or
9161 <link to="MediumState_LockedRead" />.
9162 As you can see, an inaccessible medium can be locked too. This is
9163 not an error; this method performs a logical lock that prevents
9164 modifications of this medium through the VirtualBox API, not a
9165 physical lock of the underlying storage unit.
9166
9167 This method returns the current state of the medium
9168 <b>before</b> the operation.
9169
9170 <result name="VBOX_E_INVALID_OBJECT_STATE">
9171 Invalid medium state (e.g. not created, locked, inaccessible,
9172 creating, deleting).
9173 </result>
9174
9175 </desc>
9176 <param name="state" type="MediumState" dir="return">
9177 <desc>
9178 State of the medium after the operation.
9179 </desc>
9180 </param>
9181 </method>
9182
9183 <method name="unlockRead">
9184 <desc>
9185 Cancels the read lock previously set by <link to="#lockRead"/>.
9186
9187 For both, success and failure, this method returns the current state
9188 of the medium <b>after</b> the operation.
9189
9190 See <link to="#lockRead"/> for more details.
9191
9192 <result name="VBOX_E_INVALID_OBJECT_STATE">
9193 Medium not locked for reading.
9194 </result>
9195
9196 </desc>
9197 <param name="state" type="MediumState" dir="return">
9198 <desc>
9199 State of the medium after the operation.
9200 </desc>
9201 </param>
9202 </method>
9203
9204 <method name="lockWrite">
9205 <desc>
9206 Locks this medium for writing.
9207
9208 The write lock, as opposed to <link to="#lockRead"/>, is
9209 exclusive: there may be only one client holding a write lock
9210 and there may be no read locks while the write lock is held.
9211
9212 When the medium is locked for writing, it cannot be modified
9213 from within VirtualBox and it is not guaranteed that the values
9214 of its properties are up-to-date. Any method that changes the
9215 properties of this medium or contents of the storage unit will
9216 return an error (unless explicitly stated otherwise) and an
9217 attempt to start a virtual machine wanting to modify or to
9218 read the medium will fail.
9219
9220 When the virtual machine is started up, it locks for writing all
9221 media it uses to write data to. If any medium could not be locked
9222 for writing, the startup procedure will fail.
9223
9224 The medium locked for writing must be unlocked using the <link
9225 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9226 can <b>not</b> be nested and must be followed by a<link
9227 to="#unlockWrite"/> call before the next lockWrite call.
9228
9229 This method sets the medium state to <link to="MediumState_LockedWrite" />
9230 on success. The state prior to this call must be <link to="MediumState_Created"/>
9231 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9232 medium can be locked too. This is not an error; this method
9233 performs a logical lock preventing modifications of this
9234 medium through the VirtualBox API, not a physical lock of the
9235 underlying storage unit.
9236
9237 For both, success and failure, this method returns the current
9238 state of the medium <b>before</b> the operation.
9239
9240 <result name="VBOX_E_INVALID_OBJECT_STATE">
9241 Invalid medium state (e.g. not created, locked, inaccessible,
9242 creating, deleting).
9243 </result>
9244
9245 </desc>
9246 <param name="state" type="MediumState" dir="return">
9247 <desc>
9248 State of the medium after the operation.
9249 </desc>
9250 </param>
9251 </method>
9252
9253 <method name="unlockWrite">
9254 <desc>
9255 Cancels the write lock previously set by <link to="#lockWrite"/>.
9256
9257 For both, success and failure, this method returns the current
9258 state of the medium <b>after</b> the operation.
9259
9260 See <link to="#lockWrite"/> for more details.
9261
9262 <result name="VBOX_E_INVALID_OBJECT_STATE">
9263 Medium not locked for writing.
9264 </result>
9265
9266 </desc>
9267 <param name="state" type="MediumState" dir="return">
9268 <desc>
9269 State of the medium after the operation.
9270 </desc>
9271 </param>
9272 </method>
9273
9274 <method name="close">
9275 <desc>
9276 Closes this medium.
9277
9278 The medium must not be attached to any known virtual machine
9279 and must not have any known child media, otherwise the
9280 operation will fail.
9281
9282 When the medium is successfully closed, it gets removed from
9283 the list of remembered media, but its storage unit is not
9284 deleted. In particular, this means that this medium can be
9285 later opened again using the <link
9286 to="IVirtualBox::openHardDisk"/> call.
9287
9288 Note that after this method successfully returns, the given medium
9289 object becomes uninitialized. This means that any attempt
9290 to call any of its methods or attributes will fail with the
9291 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9292
9293 <result name="VBOX_E_INVALID_OBJECT_STATE">
9294 Invalid medium state (other than not created, created or
9295 inaccessible).
9296 </result>
9297 <result name="VBOX_E_OBJECT_IN_USE">
9298 Medium attached to virtual machine.
9299 </result>
9300 <result name="VBOX_E_FILE_ERROR">
9301 Settings file not accessible.
9302 </result>
9303 <result name="VBOX_E_XML_ERROR">
9304 Could not parse the settings file.
9305 </result>
9306
9307 </desc>
9308 </method>
9309
9310 <!-- storage methods -->
9311
9312 <method name="getProperty">
9313 <desc>
9314 Returns the value of the custom medium property with the given name.
9315
9316 The list of all properties supported by the given medium format can
9317 be obtained with <link to="IMediumFormat::describeProperties"/>.
9318
9319 Note that if this method returns an empty string in @a value, the
9320 requested property is supported but currently not assigned any value.
9321
9322 <result name="VBOX_E_OBJECT_NOT_FOUND">
9323 Requested property does not exist (not supported by the format).
9324 </result>
9325 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9326 </desc>
9327 <param name="name" type="wstring" dir="in">
9328 <desc>Name of the property to get.</desc>
9329 </param>
9330 <param name="value" type="wstring" dir="return">
9331 <desc>Current property value.</desc>
9332 </param>
9333 </method>
9334
9335 <method name="setProperty">
9336 <desc>
9337 Sets the value of the custom medium property with the given name.
9338
9339 The list of all properties supported by the given medium format can
9340 be obtained with <link to="IMediumFormat::describeProperties"/>.
9341
9342 Note that setting the property value to @c null or an empty string is
9343 equivalent to deleting the existing value. A default value (if it is
9344 defined for this property) will be used by the format backend in this
9345 case.
9346
9347 <result name="VBOX_E_OBJECT_NOT_FOUND">
9348 Requested property does not exist (not supported by the format).
9349 </result>
9350 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9351 </desc>
9352 <param name="name" type="wstring" dir="in">
9353 <desc>Name of the property to set.</desc>
9354 </param>
9355 <param name="value" type="wstring" dir="in">
9356 <desc>Property value to set.</desc>
9357 </param>
9358 </method>
9359
9360 <method name="getProperties">
9361 <desc>
9362 Returns values for a group of properties in one call.
9363
9364 The names of the properties to get are specified using the @a names
9365 argument which is a list of comma-separated property names or
9366 an empty string if all properties are to be returned. Note that currently
9367 the value of this argument is ignored and the method always returns all
9368 existing properties.
9369
9370 The list of all properties supported by the given medium format can
9371 be obtained with <link to="IMediumFormat::describeProperties"/>.
9372
9373 The method returns two arrays, the array of property names corresponding
9374 to the @a names argument and the current values of these properties.
9375 Both arrays have the same number of elements with each elemend at the
9376 given index in the first array corresponds to an element at the same
9377 index in the second array.
9378
9379 Note that for properties that do not have assigned values,
9380 an empty string is returned at the appropriate index in the
9381 @a returnValues array.
9382
9383 </desc>
9384 <param name="names" type="wstring" dir="in">
9385 <desc>
9386 Names of properties to get.
9387 </desc>
9388 </param>
9389 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9390 <desc>Names of returned properties.</desc>
9391 </param>
9392 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9393 <desc>Values of returned properties.</desc>
9394 </param>
9395 </method>
9396
9397 <method name="setProperties">
9398 <desc>
9399 Sets values for a group of properties in one call.
9400
9401 The names of the properties to set are passed in the @a names
9402 array along with the new values for them in the @a values array. Both
9403 arrays have the same number of elements with each elemend at the given
9404 index in the first array corresponding to an element at the same index
9405 in the second array.
9406
9407 If there is at least one property name in @a names that is not valid,
9408 the method will fail before changing the values of any other properties
9409 from the @a names array.
9410
9411 Using this method over <link to="#setProperty"/> is preferred if you
9412 need to set several properties at once since it will result into less
9413 IPC calls.
9414
9415 The list of all properties supported by the given medium format can
9416 be obtained with <link to="IMediumFormat::describeProperties"/>.
9417
9418 Note that setting the property value to @c null or an empty string is
9419 equivalent to deleting the existing value. A default value (if it is
9420 defined for this property) will be used by the format backend in this
9421 case.
9422 </desc>
9423 <param name="names" type="wstring" safearray="yes" dir="in">
9424 <desc>Names of properties to set.</desc>
9425 </param>
9426 <param name="values" type="wstring" safearray="yes" dir="in">
9427 <desc>Values of properties to set.</desc>
9428 </param>
9429 </method>
9430
9431 <!-- storage methods -->
9432
9433 <method name="createBaseStorage">
9434 <desc>
9435 Starts creating a hard disk storage unit (fixed/dynamic, according
9436 to the variant flags) in in the background. The previous storage unit
9437 created for this object, if any, must first be deleted using
9438 <link to="#deleteStorage"/>, otherwise the operation will fail.
9439
9440 Before the operation starts, the medium is placed in
9441 <link to="MediumState_Creating"/> state. If the create operation
9442 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9443 state.
9444
9445 After the returned progress object reports that the operation has
9446 successfully completed, the medium state will be set to <link
9447 to="MediumState_Created"/>, the medium will be remembered by this
9448 VirtualBox installation and may be attached to virtual machines.
9449
9450 <result name="VBOX_E_NOT_SUPPORTED">
9451 The variant of storage creation operation is not supported. See <link
9452 to="IMediumFormat::capabilities"/>.
9453 </result>
9454 </desc>
9455 <param name="logicalSize" type="unsigned long long" dir="in">
9456 <desc>Maximum logical size of the medium in megabytes.</desc>
9457 </param>
9458 <param name="variant" type="MediumVariant" dir="in">
9459 <desc>Exact image variant which should be created.</desc>
9460 </param>
9461 <param name="progress" type="IProgress" dir="return">
9462 <desc>Progress object to track the operation completion.</desc>
9463 </param>
9464 </method>
9465
9466 <method name="deleteStorage">
9467 <desc>
9468 Starts deleting the storage unit of this medium.
9469
9470 The medium must not be attached to any known virtual machine and must
9471 not have any known child media, otherwise the operation will fail.
9472 It will also fail if there is no storage unit to delete or if deletion
9473 is already in progress, or if the medium is being in use (locked for
9474 read or for write) or inaccessible. Therefore, the only valid state for
9475 this operation to succeed is <link to="MediumState_Created"/>.
9476
9477 Before the operation starts, the medium is placed in
9478 <link to="MediumState_Deleting"/> state and gets removed from the list
9479 of remembered hard disks (media registry). If the delete operation
9480 fails, the medium will be remembered again and placed back to
9481 <link to="MediumState_Created"/> state.
9482
9483 After the returned progress object reports that the operation is
9484 complete, the medium state will be set to
9485 <link to="MediumState_NotCreated"/> and you will be able to use one of
9486 the storage creation methods to create it again.
9487
9488 <see>#close()</see>
9489
9490 <result name="VBOX_E_OBJECT_IN_USE">
9491 Medium is attached to a virtual machine.
9492 </result>
9493 <result name="VBOX_E_NOT_SUPPORTED">
9494 Storage deletion is not allowed because neither of storage creation
9495 operations are supported. See
9496 <link to="IMediumFormat::capabilities"/>.
9497 </result>
9498
9499 <note>
9500 If the deletion operation fails, it is not guaranteed that the storage
9501 unit still exists. You may check the <link to="IMedium::state"/> value
9502 to answer this question.
9503 </note>
9504 </desc>
9505 <param name="progress" type="IProgress" dir="return">
9506 <desc>Progress object to track the operation completion.</desc>
9507 </param>
9508 </method>
9509
9510 <!-- diff methods -->
9511
9512 <method name="createDiffStorage">
9513 <desc>
9514 Starts creating an empty differencing storage unit based on this
9515 medium in the format and at the location defined by the @a target
9516 argument.
9517
9518 The target medium must be in <link to="MediumState_NotCreated"/>
9519 state (i.e. must not have an existing storage unit). Upon successful
9520 completion, this operation will set the type of the target medium to
9521 <link to="MediumType_Normal"/> and create a storage unit necessary to
9522 represent the differencing medium data in the given format (according
9523 to the storage format of the target object).
9524
9525 After the returned progress object reports that the operation is
9526 successfully complete, the target medium gets remembered by this
9527 VirtualBox installation and may be attached to virtual machines.
9528
9529 <note>
9530 The medium will be set to <link to="MediumState_LockedRead"/>
9531 state for the duration of this operation.
9532 </note>
9533 <result name="VBOX_E_OBJECT_IN_USE">
9534 Medium not in @c NotCreated state.
9535 </result>
9536 </desc>
9537 <param name="target" type="IMedium" dir="in">
9538 <desc>Target medium.</desc>
9539 </param>
9540 <param name="variant" type="MediumVariant" dir="in">
9541 <desc>Exact image variant which should be created.</desc>
9542 </param>
9543 <param name="progress" type="IProgress" dir="return">
9544 <desc>Progress object to track the operation completion.</desc>
9545 </param>
9546 </method>
9547
9548 <method name="mergeTo">
9549 <desc>
9550 Starts merging the contents of this medium and all intermediate
9551 differencing media in the chain to the given target medium.
9552
9553 The target medium must be either a descendant of this medium or
9554 its ancestor (otherwise this method will immediately return a failure).
9555 It follows that there are two logical directions of the merge operation:
9556 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9557 ancestor (<i>backward merge</i>). Let us consider the following medium
9558 chain:
9559
9560 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9561
9562 Here, calling this method on the <tt>Base</tt> medium object with
9563 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9564 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9565 merge. Note that in both cases the contents of the resulting medium
9566 will be the same, the only difference is the medium object that takes
9567 the result of the merge operation. In case of the forward merge in the
9568 above example, the result will be written to <tt>Diff_2</tt>; in case of
9569 the backward merge, the result will be written to <tt>Base</tt>. In
9570 other words, the result of the operation is always stored in the target
9571 medium.
9572
9573 Upon successful operation completion, the storage units of all media in
9574 the chain between this (source) medium and the target medium, including
9575 the source medium itself, will be automatically deleted and the
9576 relevant medium objects (including this medium) will become
9577 uninitialized. This means that any attempt to call any of
9578 their methods or attributes will fail with the
9579 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9580 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9581 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9582 Note that <tt>Diff_2</tt> in this case will become a base medium
9583 itself since it will no longer be based on any other medium.
9584
9585 Considering the above, all of the following conditions must be met in
9586 order for the merge operation to succeed:
9587 <ul>
9588 <li>
9589 Neither this (source) medium nor any intermediate
9590 differencing medium in the chain between it and the target
9591 medium is attached to any virtual machine.
9592 </li>
9593 <li>
9594 Neither the source medium nor the target medium is an
9595 <link to="MediumType_Immutable"/> medium.
9596 </li>
9597 <li>
9598 The part of the medium tree from the source medium to the
9599 target medium is a linear chain, i.e. all medium in this
9600 chain have exactly one child which is the next medium in this
9601 chain. The only exception from this rule is the target medium in
9602 the forward merge operation; it is allowed to have any number of
9603 child media because the merge operation will not change its
9604 logical contents (as it is seen by the guest OS or by children).
9605 </li>
9606 <li>
9607 None of the involved media are in
9608 <link to="MediumState_LockedRead"/> or
9609 <link to="MediumState_LockedWrite"/> state.
9610 </li>
9611 </ul>
9612
9613 <note>
9614 This (source) medium and all intermediates will be placed to <link
9615 to="MediumState_Deleting"/> state and the target medium will be
9616 placed to <link to="MediumState_LockedWrite"/> state and for the
9617 duration of this operation.
9618 </note>
9619 </desc>
9620 <param name="targetId" type="uuid" mod="string" dir="in">
9621 <desc>UUID of the target ancestor or descendant medium.</desc>
9622 </param>
9623 <param name="progress" type="IProgress" dir="return">
9624 <desc>Progress object to track the operation completion.</desc>
9625 </param>
9626 </method>
9627
9628 <!-- clone method -->
9629
9630 <method name="cloneTo">
9631 <desc>
9632 Starts creating a clone of this medium in the format and at the
9633 location defined by the @a target argument.
9634
9635 The target medium must be either in <link to="MediumState_NotCreated"/>
9636 state (i.e. must not have an existing storage unit) or in
9637 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9638 big enough to hold the data or else the copy will be partial). Upon
9639 successful completion, the cloned medium will contain exactly the
9640 same sector data as the medium being cloned, except that in the
9641 first case a new UUID for the clone will be randomly generated, and in
9642 the second case the UUID will remain unchanged.
9643
9644 The @a parent argument defines which medium will be the parent
9645 of the clone. Passing a @c null reference indicates that the clone will
9646 be a base image, i.e. completely independent. It is possible to specify
9647 an arbitrary medium for this parameter, including the parent of the
9648 medium which is being cloned. Even cloning to a child of the source
9649 medium is possible. Note that when cloning to an existing image, the
9650 @a parent irgument is ignored.
9651
9652 After the returned progress object reports that the operation is
9653 successfully complete, the target medium gets remembered by this
9654 VirtualBox installation and may be attached to virtual machines.
9655
9656 <note>
9657 This medium will be placed to <link to="MediumState_LockedRead"/>
9658 state for the duration of this operation.
9659 </note>
9660 <result name="E_NOTIMPL">
9661 The specified cloning variant is not supported at the moment.
9662 </result>
9663 </desc>
9664 <param name="target" type="IMedium" dir="in">
9665 <desc>Target medium.</desc>
9666 </param>
9667 <param name="variant" type="MediumVariant" dir="in">
9668 <desc>Exact image variant which should be created.</desc>
9669 </param>
9670 <param name="parent" type="IMedium" dir="in">
9671 <desc>Parent of the cloned medium.</desc>
9672 </param>
9673 <param name="progress" type="IProgress" dir="return">
9674 <desc>Progress object to track the operation completion.</desc>
9675 </param>
9676 </method>
9677
9678 <!-- other methods -->
9679
9680 <method name="compact">
9681 <desc>
9682 Starts compacting of this medium. This means that the medium is
9683 transformed into a possibly more compact storage representation.
9684 This potentially creates temporary images, which can require a
9685 substantial amount of additional disk space.
9686
9687 This medium will be placed to <link to="MediumState_LockedWrite"/>
9688 state and all its parent media (if any) will be placed to
9689 <link to="MediumState_LockedRead"/> state for the duration of this
9690 operation.
9691
9692 Please note that the results can be either returned straight away,
9693 or later as the result of the background operation via the object
9694 returned via the @a progress parameter.
9695
9696 <result name="VBOX_E_NOT_SUPPORTED">
9697 Medium format does not support compacting (but potentially
9698 needs it).
9699 </result>
9700 </desc>
9701 <param name="progress" type="IProgress" dir="return">
9702 <desc>Progress object to track the operation completion.</desc>
9703 </param>
9704 </method>
9705
9706 <method name="resize">
9707 <desc>
9708 Starts resizing this medium. This means that the nominal size of the
9709 medium is set to the new value. Both increasing and decreasing the
9710 size is possible, and there are no safety checks, since VirtualBox
9711 does not make any assumptions about the medium contents.
9712
9713 Resizing usually needs additional disk space, and possibly also
9714 some temporary disk space. Note that resize does not create a full
9715 temporary copy of the medium, so the additional disk space requirement
9716 is usually much lower than using the clone operation.
9717
9718 This medium will be placed to <link to="MediumState_LockedWrite"/>
9719 state for the duration of this operation.
9720
9721 Please note that the results can be either returned straight away,
9722 or later as the result of the background operation via the object
9723 returned via the @a progress parameter.
9724
9725 <result name="VBOX_E_NOT_SUPPORTED">
9726 Medium format does not support resizing.
9727 </result>
9728 </desc>
9729 <param name="logicalSize" type="unsigned long long" dir="in">
9730 <desc>New nominal capacity of the medium in megabytes.</desc>
9731 </param>
9732 <param name="progress" type="IProgress" dir="return">
9733 <desc>Progress object to track the operation completion.</desc>
9734 </param>
9735 </method>
9736
9737 <method name="reset">
9738 <desc>
9739 Starts erasing the contents of this differencing medium.
9740
9741 This operation will reset the differencing medium to its initial
9742 state when it does not contain any sector data and any read operation is
9743 redirected to its parent medium.
9744
9745 This medium will be placed to <link to="MediumState_LockedWrite"/>
9746 for the duration of this operation.
9747
9748 <result name="VBOX_E_NOT_SUPPORTED">
9749 This is not a differencing medium.
9750 </result>
9751 <result name="VBOX_E_INVALID_OBJECT_STATE">
9752 Medium is not in <link to="MediumState_Created"/> or
9753 <link to="MediumState_Inaccessible"/> state.
9754 </result>
9755 </desc>
9756 <param name="progress" type="IProgress" dir="return">
9757 <desc>Progress object to track the operation completion.</desc>
9758 </param>
9759 </method>
9760
9761 </interface>
9762
9763
9764 <!--
9765 // IMediumFormat
9766 /////////////////////////////////////////////////////////////////////////
9767 -->
9768
9769 <enum
9770 name="DataType"
9771 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9772 >
9773 <const name="Int32" value="0"/>
9774 <const name="Int8" value="1"/>
9775 <const name="String" value="2"/>
9776 </enum>
9777
9778 <enum
9779 name="DataFlags"
9780 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9781 >
9782 <const name="None" value="0x00"/>
9783 <const name="Mandatory" value="0x01"/>
9784 <const name="Expert" value="0x02"/>
9785 <const name="Array" value="0x04"/>
9786 <const name="FlagMask" value="0x07"/>
9787 </enum>
9788
9789 <enum
9790 name="MediumFormatCapabilities"
9791 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9792 >
9793 <desc>
9794 Medium format capability flags.
9795 </desc>
9796
9797 <const name="Uuid" value="0x01">
9798 <desc>
9799 Supports UUIDs as expected by VirtualBox code.
9800 </desc>
9801 </const>
9802
9803 <const name="CreateFixed" value="0x02">
9804 <desc>
9805 Supports creating fixed size images, allocating all space instantly.
9806 </desc>
9807 </const>
9808
9809 <const name="CreateDynamic" value="0x04">
9810 <desc>
9811 Supports creating dynamically growing images, allocating space on
9812 demand.
9813 </desc>
9814 </const>
9815
9816 <const name="CreateSplit2G" value="0x08">
9817 <desc>
9818 Supports creating images split in chunks of a bit less than 2 GBytes.
9819 </desc>
9820 </const>
9821
9822 <const name="Differencing" value="0x10">
9823 <desc>
9824 Supports being used as a format for differencing media (see <link
9825 to="IMedium::createDiffStorage"/>).
9826 </desc>
9827 </const>
9828
9829 <const name="Asynchronous" value="0x20">
9830 <desc>
9831 Supports asynchronous I/O operations for at least some configurations.
9832 </desc>
9833 </const>
9834
9835 <const name="File" value="0x40">
9836 <desc>
9837 The format backend operates on files (the <link to="IMedium::location"/>
9838 attribute of the medium specifies a file used to store medium
9839 data; for a list of supported file extensions see
9840 <link to="IMediumFormat::fileExtensions"/>).
9841 </desc>
9842 </const>
9843
9844 <const name="Properties" value="0x80">
9845 <desc>
9846 The format backend uses the property interface to configure the storage
9847 location and properties (the <link to="IMediumFormat::describeProperties"/>
9848 method is used to get access to properties supported by the given medium format).
9849 </desc>
9850 </const>
9851
9852 <const name="CapabilityMask" value="0xFF"/>
9853 </enum>
9854
9855 <interface
9856 name="IMediumFormat" extends="$unknown"
9857 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9858 wsmap="managed"
9859 >
9860 <desc>
9861 The IMediumFormat interface represents a medium format.
9862
9863 Each medium format has an associated backend which is used to handle
9864 media stored in this format. This interface provides information
9865 about the properties of the associated backend.
9866
9867 Each medium format is identified by a string represented by the
9868 <link to="#id"/> attribute. This string is used in calls like
9869 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9870 format.
9871
9872 The list of all supported medium formats can be obtained using
9873 <link to="ISystemProperties::mediaFormats"/>.
9874
9875 <see>IMedium</see>
9876 </desc>
9877
9878 <attribute name="id" type="wstring" readonly="yes">
9879 <desc>
9880 Identifier of this format.
9881
9882 The format identifier is a non-@c null non-empty ASCII string. Note that
9883 this string is case-insensitive. This means that, for example, all of
9884 the following strings:
9885 <pre>
9886 "VDI"
9887 "vdi"
9888 "VdI"</pre>
9889 refer to the same medium format.
9890
9891 This string is used in methods of other interfaces where it is necessary
9892 to specify a medium format, such as
9893 <link to="IVirtualBox::createHardDisk"/>.
9894 </desc>
9895 </attribute>
9896
9897 <attribute name="name" type="wstring" readonly="yes">
9898 <desc>
9899 Human readable description of this format.
9900
9901 Mainly for use in file open dialogs.
9902 </desc>
9903 </attribute>
9904
9905 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9906 <desc>
9907 Array of strings containing the supported file extensions.
9908
9909 The first extension in the array is the extension preferred by the
9910 backend. It is recommended to use this extension when specifying a
9911 location of the storage unit for a new medium.
9912
9913 Note that some backends do not work on files, so this array may be
9914 empty.
9915
9916 <see>IMediumFormat::capabilities</see>
9917 </desc>
9918 </attribute>
9919
9920 <attribute name="capabilities" type="unsigned long" readonly="yes">
9921 <desc>
9922 Capabilities of the format as a set of bit flags.
9923
9924 For the meaning of individual capability flags see
9925 <link to="MediumFormatCapabilities"/>.
9926 </desc>
9927 </attribute>
9928
9929 <method name="describeProperties">
9930 <desc>
9931 Returns several arrays describing the properties supported by this
9932 format.
9933
9934 An element with the given index in each array describes one
9935 property. Thus, the number of elements in each returned array is the
9936 same and corresponds to the number of supported properties.
9937
9938 The returned arrays are filled in only if the
9939 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9940 All arguments must be non-@c null.
9941
9942 <see>DataType</see>
9943 <see>DataFlags</see>
9944 </desc>
9945
9946 <param name="names" type="wstring" safearray="yes" dir="out">
9947 <desc>Array of property names.</desc>
9948 </param>
9949 <param name="description" type="wstring" safearray="yes" dir="out">
9950 <desc>Array of property descriptions.</desc>
9951 </param>
9952 <param name="types" type="DataType" safearray="yes" dir="out">
9953 <desc>Array of property types.</desc>
9954 </param>
9955 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9956 <desc>Array of property flags.</desc>
9957 </param>
9958 <param name="defaults" type="wstring" safearray="yes" dir="out">
9959 <desc>Array of default property values.</desc>
9960 </param>
9961 </method>
9962
9963 </interface>
9964
9965
9966 <!--
9967 // IKeyboard
9968 /////////////////////////////////////////////////////////////////////////
9969 -->
9970
9971 <interface
9972 name="IKeyboard" extends="$unknown"
9973 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9974 wsmap="managed"
9975 >
9976 <desc>
9977 The IKeyboard interface represents the virtual machine's keyboard. Used
9978 in <link to="IConsole::keyboard"/>.
9979
9980 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9981 to the virtual machine.
9982
9983 </desc>
9984 <method name="putScancode">
9985 <desc>Sends a scancode to the keyboard.
9986
9987 <result name="VBOX_E_IPRT_ERROR">
9988 Could not send scan code to virtual keyboard.
9989 </result>
9990
9991 </desc>
9992 <param name="scancode" type="long" dir="in"/>
9993 </method>
9994
9995 <method name="putScancodes">
9996 <desc>Sends an array of scancodes to the keyboard.
9997
9998 <result name="VBOX_E_IPRT_ERROR">
9999 Could not send all scan codes to virtual keyboard.
10000 </result>
10001
10002 </desc>
10003 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10004 <param name="codesStored" type="unsigned long" dir="return"/>
10005 </method>
10006
10007 <method name="putCAD">
10008 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10009 function is nothing special, it is just a convenience function
10010 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10011
10012 <result name="VBOX_E_IPRT_ERROR">
10013 Could not send all scan codes to virtual keyboard.
10014 </result>
10015
10016 </desc>
10017 </method>
10018
10019 </interface>
10020
10021
10022 <!--
10023 // IMouse
10024 /////////////////////////////////////////////////////////////////////////
10025 -->
10026
10027 <enum
10028 name="MouseButtonState"
10029 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10030 >
10031 <desc>
10032 Mouse button state.
10033 </desc>
10034
10035 <const name="LeftButton" value="0x01"/>
10036 <const name="RightButton" value="0x02"/>
10037 <const name="MiddleButton" value="0x04"/>
10038 <const name="WheelUp" value="0x08"/>
10039 <const name="WheelDown" value="0x10"/>
10040 <const name="XButton1" value="0x20"/>
10041 <const name="XButton2" value="0x40"/>
10042 <const name="MouseStateMask" value="0x7F"/>
10043 </enum>
10044
10045 <interface
10046 name="IMouse" extends="$unknown"
10047 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10048 wsmap="managed"
10049 >
10050 <desc>
10051 The IMouse interface represents the virtual machine's mouse. Used in
10052 <link to="IConsole::mouse"/>.
10053
10054 Through this interface, the virtual machine's virtual mouse can be
10055 controlled.
10056 </desc>
10057
10058 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10059 <desc>
10060 Whether the guest OS supports absolute mouse pointer positioning
10061 or not.
10062 <note>
10063 VirtualBox Guest Tools need to be installed to the guest OS
10064 in order to enable absolute mouse positioning support.
10065 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10066 callback to be instantly informed about changes of this attribute
10067 during virtual machine execution.
10068 </note>
10069 <see><link to="#putMouseEventAbsolute"/></see>
10070 </desc>
10071 </attribute>
10072
10073 <method name="putMouseEvent">
10074 <desc>
10075 Initiates a mouse event using relative pointer movements
10076 along x and y axis.
10077
10078 <result name="E_ACCESSDENIED">
10079 Console not powered up.
10080 </result>
10081 <result name="VBOX_E_IPRT_ERROR">
10082 Could not send mouse event to virtual mouse.
10083 </result>
10084
10085 </desc>
10086
10087 <param name="dx" type="long" dir="in">
10088 <desc>
10089 Amount of pixels the mouse should move to the right.
10090 Negative values move the mouse to the left.
10091 </desc>
10092 </param>
10093 <param name="dy" type="long" dir="in">
10094 <desc>
10095 Amount of pixels the mouse should move downwards.
10096 Negative values move the mouse upwards.
10097 </desc>
10098 </param>
10099 <param name="dz" type="long" dir="in">
10100 <desc>
10101 Amount of mouse wheel moves.
10102 Positive values describe clockwise wheel rotations,
10103 negative values describe counterclockwise rotations.
10104 </desc>
10105 </param>
10106 <param name="dw" type="long" dir="in">
10107 <desc>
10108 Amount of horizontal mouse wheel moves.
10109 Positive values describe a movement to the left,
10110 negative values describe a movement to the right.
10111 </desc>
10112 </param>
10113 <param name="buttonState" type="long" dir="in">
10114 <desc>
10115 The current state of mouse buttons. Every bit represents
10116 a mouse button as follows:
10117 <table>
10118 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10119 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10120 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10121 </table>
10122 A value of <tt>1</tt> means the corresponding button is pressed.
10123 otherwise it is released.
10124 </desc>
10125 </param>
10126 </method>
10127
10128 <method name="putMouseEventAbsolute">
10129 <desc>
10130 Positions the mouse pointer using absolute x and y coordinates.
10131 These coordinates are expressed in pixels and
10132 start from <tt>[1,1]</tt> which corresponds to the top left
10133 corner of the virtual display.
10134
10135 <result name="E_ACCESSDENIED">
10136 Console not powered up.
10137 </result>
10138 <result name="VBOX_E_IPRT_ERROR">
10139 Could not send mouse event to virtual mouse.
10140 </result>
10141
10142 <note>
10143 This method will have effect only if absolute mouse
10144 positioning is supported by the guest OS.
10145 </note>
10146
10147 <see><link to="#absoluteSupported"/></see>
10148 </desc>
10149
10150 <param name="x" type="long" dir="in">
10151 <desc>
10152 X coordinate of the pointer in pixels, starting from @c 1.
10153 </desc>
10154 </param>
10155 <param name="y" type="long" dir="in">
10156 <desc>
10157 Y coordinate of the pointer in pixels, starting from @c 1.
10158 </desc>
10159 </param>
10160 <param name="dz" type="long" dir="in">
10161 <desc>
10162 Amount of mouse wheel moves.
10163 Positive values describe clockwise wheel rotations,
10164 negative values describe counterclockwise rotations.
10165 </desc>
10166 </param>
10167 <param name="dw" type="long" dir="in">
10168 <desc>
10169 Amount of horizontal mouse wheel moves.
10170 Positive values describe a movement to the left,
10171 negative values describe a movement to the right.
10172 </desc>
10173 </param>
10174 <param name="buttonState" type="long" dir="in">
10175 <desc>
10176 The current state of mouse buttons. Every bit represents
10177 a mouse button as follows:
10178 <table>
10179 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10180 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10181 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10182 </table>
10183 A value of @c 1 means the corresponding button is pressed.
10184 otherwise it is released.
10185 </desc>
10186 </param>
10187 </method>
10188
10189 </interface>
10190
10191 <!--
10192 // IDisplay
10193 /////////////////////////////////////////////////////////////////////////
10194 -->
10195
10196 <enum
10197 name="FramebufferPixelFormat"
10198 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10199 >
10200 <desc>
10201 Format of the video memory buffer. Constants represented by this enum can
10202 be used to test for particular values of <link
10203 to="IFramebuffer::pixelFormat"/>. See also <link
10204 to="IFramebuffer::requestResize"/>.
10205
10206 See also www.fourcc.org for more information about FOURCC pixel formats.
10207 </desc>
10208
10209 <const name="Opaque" value="0">
10210 <desc>
10211 Unknown buffer format (the user may not assume any particular format of
10212 the buffer).
10213 </desc>
10214 </const>
10215 <const name="FOURCC_RGB" value="0x32424752">
10216 <desc>
10217 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10218 bit layout).
10219 </desc>
10220 </const>
10221 </enum>
10222
10223 <interface
10224 name="IFramebuffer" extends="$unknown"
10225 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10226 wsmap="suppress"
10227 >
10228 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10229 <desc>Address of the start byte of the frame buffer.</desc>
10230 </attribute>
10231
10232 <attribute name="width" type="unsigned long" readonly="yes">
10233 <desc>Frame buffer width, in pixels.</desc>
10234 </attribute>
10235
10236 <attribute name="height" type="unsigned long" readonly="yes">
10237 <desc>Frame buffer height, in pixels.</desc>
10238 </attribute>
10239
10240 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10241 <desc>
10242 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10243 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10244 are: 8, 15, 16, 24 and 32.
10245 </desc>
10246 </attribute>
10247
10248 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10249 <desc>
10250 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10251 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10252 size of the scan line must be aligned to 32 bits.
10253 </desc>
10254 </attribute>
10255
10256 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10257 <desc>
10258 Frame buffer pixel format. It's either one of the values defined by <link
10259 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10260 <note>
10261 This attribute must never return <link
10262 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10263 <link to="#address"/> points to must be always known.
10264 </note>
10265 </desc>
10266 </attribute>
10267
10268 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10269 <desc>
10270 Defines whether this frame buffer uses the virtual video card's memory
10271 buffer (guest VRAM) directly or not. See <link
10272 to="IFramebuffer::requestResize"/> for more information.
10273 </desc>
10274 </attribute>
10275
10276 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10277 <desc>
10278 Hint from the frame buffer about how much of the standard
10279 screen height it wants to use for itself. This information is
10280 exposed to the guest through the VESA BIOS and VMMDev interface
10281 so that it can use it for determining its video mode table. It
10282 is not guaranteed that the guest respects the value.
10283 </desc>
10284 </attribute>
10285
10286 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10287 <desc>
10288 An alpha-blended overlay which is superposed over the frame buffer.
10289 The initial purpose is to allow the display of icons providing
10290 information about the VM state, including disk activity, in front
10291 ends which do not have other means of doing that. The overlay is
10292 designed to controlled exclusively by IDisplay. It has no locking
10293 of its own, and any changes made to it are not guaranteed to be
10294 visible until the affected portion of IFramebuffer is updated. The
10295 overlay can be created lazily the first time it is requested. This
10296 attribute can also return @c null to signal that the overlay is not
10297 implemented.
10298 </desc>
10299 </attribute>
10300
10301 <attribute name="winId" type="unsigned long long" readonly="yes">
10302 <desc>
10303 Platform-dependent identifier of the window where context of this
10304 frame buffer is drawn, or zero if there's no such window.
10305 </desc>
10306 </attribute>
10307
10308 <method name="lock">
10309 <desc>
10310 Locks the frame buffer.
10311 Gets called by the IDisplay object where this frame buffer is
10312 bound to.
10313 </desc>
10314 </method>
10315
10316 <method name="unlock">
10317 <desc>
10318 Unlocks the frame buffer.
10319 Gets called by the IDisplay object where this frame buffer is
10320 bound to.
10321 </desc>
10322 </method>
10323
10324 <method name="notifyUpdate">
10325 <desc>
10326 Informs about an update.
10327 Gets called by the display object where this buffer is
10328 registered.
10329 </desc>
10330 <param name="x" type="unsigned long" dir="in"/>
10331 <param name="y" type="unsigned long" dir="in"/>
10332 <param name="width" type="unsigned long" dir="in"/>
10333 <param name="height" type="unsigned long" dir="in"/>
10334 </method>
10335
10336 <method name="requestResize">
10337 <desc>
10338 Requests a size and pixel format change.
10339
10340 There are two modes of working with the video buffer of the virtual
10341 machine. The <i>indirect</i> mode implies that the IFramebuffer
10342 implementation allocates a memory buffer for the requested display mode
10343 and provides it to the virtual machine. In <i>direct</i> mode, the
10344 IFramebuffer implementation uses the memory buffer allocated and owned
10345 by the virtual machine. This buffer represents the video memory of the
10346 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10347 usually faster because the implementation gets a raw pointer to the
10348 guest VRAM buffer which it can directly use for visualizing the contents
10349 of the virtual display, as opposed to the indirect mode where the
10350 contents of guest VRAM are copied to the memory buffer provided by
10351 the implementation every time a display update occurs.
10352
10353 It is important to note that the direct mode is really fast only when
10354 the implementation uses the given guest VRAM buffer directly, for
10355 example, by blitting it to the window representing the virtual machine's
10356 display, which saves at least one copy operation comparing to the
10357 indirect mode. However, using the guest VRAM buffer directly is not
10358 always possible: the format and the color depth of this buffer may be
10359 not supported by the target window, or it may be unknown (opaque) as in
10360 case of text or non-linear multi-plane VGA video modes. In this case,
10361 the indirect mode (that is always available) should be used as a
10362 fallback: when the guest VRAM contents are copied to the
10363 implementation-provided memory buffer, color and format conversion is
10364 done automatically by the underlying code.
10365
10366 The @a pixelFormat parameter defines whether the direct mode is
10367 available or not. If @a pixelFormat is <link
10368 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10369 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10370 @a bytesPerLine parameters must be ignored and the implementation must use
10371 the indirect mode (where it provides its own buffer in one of the
10372 supported formats). In all other cases, @a pixelFormat together with
10373 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10374 buffer pointed to by the @a VRAM parameter and the implementation is
10375 free to choose which mode to use. To indicate that this frame buffer uses
10376 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10377 attribute must return @c true and <link to="#address"/> must
10378 return exactly the same address that is passed in the @a VRAM parameter
10379 of this method; otherwise it is assumed that the indirect strategy is
10380 chosen.
10381
10382 The @a width and @a height parameters represent the size of the
10383 requested display mode in both modes. In case of indirect mode, the
10384 provided memory buffer should be big enough to store data of the given
10385 display mode. In case of direct mode, it is guaranteed that the given
10386 @a VRAM buffer contains enough space to represent the display mode of the
10387 given size. Note that this frame buffer's <link to="#width"/> and <link
10388 to="#height"/> attributes must return exactly the same values as
10389 passed to this method after the resize is completed (see below).
10390
10391 The @a finished output parameter determines if the implementation has
10392 finished resizing the frame buffer or not. If, for some reason, the
10393 resize cannot be finished immediately during this call, @a finished
10394 must be set to @c false, and the implementation must call
10395 <link to="IDisplay::resizeCompleted"/> after it has returned from
10396 this method as soon as possible. If @a finished is @c false, the
10397 machine will not call any frame buffer methods until
10398 <link to="IDisplay::resizeCompleted"/> is called.
10399
10400 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10401 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10402 this frame buffer must return exactly the same values as specified in the
10403 parameters of this method, after the resize is completed. If the
10404 indirect mode is chosen, these attributes must return values describing
10405 the format of the implementation's own memory buffer <link
10406 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10407 value must always correlate with <link to="#pixelFormat"/>. Note that
10408 the <link to="#pixelFormat"/> attribute must never return <link
10409 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10410
10411 <note>
10412 This method is called by the IDisplay object under the
10413 <link to="#lock"/> provided by this IFramebuffer
10414 implementation. If this method returns @c false in @a finished, then
10415 this lock is not released until
10416 <link to="IDisplay::resizeCompleted"/> is called.
10417 </note>
10418 </desc>
10419 <param name="screenId" type="unsigned long" dir="in">
10420 <desc>
10421 Logical screen number. Must be used in the corresponding call to
10422 <link to="IDisplay::resizeCompleted"/> if this call is made.
10423 </desc>
10424 </param>
10425 <param name="pixelFormat" type="unsigned long" dir="in">
10426 <desc>
10427 Pixel format of the memory buffer pointed to by @a VRAM.
10428 See also <link to="FramebufferPixelFormat"/>.
10429 </desc>
10430 </param>
10431 <param name="VRAM" type="octet" mod="ptr" dir="in">
10432 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10433 </param>
10434 <param name="bitsPerPixel" type="unsigned long" dir="in">
10435 <desc>Color depth, bits per pixel.</desc>
10436 </param>
10437 <param name="bytesPerLine" type="unsigned long" dir="in">
10438 <desc>Size of one scan line, in bytes.</desc>
10439 </param>
10440 <param name="width" type="unsigned long" dir="in">
10441 <desc>Width of the guest display, in pixels.</desc>
10442 </param>
10443 <param name="height" type="unsigned long" dir="in">
10444 <desc>Height of the guest display, in pixels.</desc>
10445 </param>
10446 <param name="finished" type="boolean" dir="return">
10447 <desc>
10448 Can the VM start using the new frame buffer immediately
10449 after this method returns or it should wait for
10450 <link to="IDisplay::resizeCompleted"/>.
10451 </desc>
10452 </param>
10453 </method>
10454
10455 <method name="videoModeSupported">
10456 <desc>
10457 Returns whether the frame buffer implementation is willing to
10458 support a given video mode. In case it is not able to render
10459 the video mode (or for some reason not willing), it should
10460 return @c false. Usually this method is called when the guest
10461 asks the VMM device whether a given video mode is supported
10462 so the information returned is directly exposed to the guest.
10463 It is important that this method returns very quickly.
10464 </desc>
10465 <param name="width" type="unsigned long" dir="in"/>
10466 <param name="height" type="unsigned long" dir="in"/>
10467 <param name="bpp" type="unsigned long" dir="in"/>
10468 <param name="supported" type="boolean" dir="return"/>
10469 </method>
10470
10471 <method name="getVisibleRegion">
10472 <desc>
10473 Returns the visible region of this frame buffer.
10474
10475 If the @a rectangles parameter is @c null then the value of the
10476 @a count parameter is ignored and the number of elements necessary to
10477 describe the current visible region is returned in @a countCopied.
10478
10479 If @a rectangles is not @c null but @a count is less
10480 than the required number of elements to store region data, the method
10481 will report a failure. If @a count is equal or greater than the
10482 required number of elements, then the actual number of elements copied
10483 to the provided array will be returned in @a countCopied.
10484
10485 <note>
10486 The address of the provided array must be in the process space of
10487 this IFramebuffer object.
10488 </note>
10489 <note>
10490 Method not yet implemented.
10491 </note>
10492 </desc>
10493 <param name="rectangles" type="octet" mod="ptr" dir="in">
10494 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10495 </param>
10496 <param name="count" type="unsigned long" dir="in">
10497 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10498 </param>
10499 <param name="countCopied" type="unsigned long" dir="return">
10500 <desc>Number of elements copied to the @a rectangles array.</desc>
10501 </param>
10502 </method>
10503
10504 <method name="setVisibleRegion">
10505 <desc>
10506 Suggests a new visible region to this frame buffer. This region
10507 represents the area of the VM display which is a union of regions of
10508 all top-level windows of the guest operating system running inside the
10509 VM (if the Guest Additions for this system support this
10510 functionality). This information may be used by the frontends to
10511 implement the seamless desktop integration feature.
10512
10513 <note>
10514 The address of the provided array must be in the process space of
10515 this IFramebuffer object.
10516 </note>
10517 <note>
10518 The IFramebuffer implementation must make a copy of the provided
10519 array of rectangles.
10520 </note>
10521 <note>
10522 Method not yet implemented.
10523 </note>
10524 </desc>
10525 <param name="rectangles" type="octet" mod="ptr" dir="in">
10526 <desc>Pointer to the @c RTRECT array.</desc>
10527 </param>
10528 <param name="count" type="unsigned long" dir="in">
10529 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10530 </param>
10531 </method>
10532
10533 <method name="processVHWACommand">
10534 <desc>
10535 Posts a Video HW Acceleration Command to the frame buffer for processing.
10536 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10537 are posted from quest to the host to be processed by the host hardware.
10538
10539 <note>
10540 The address of the provided command must be in the process space of
10541 this IFramebuffer object.
10542 </note>
10543 </desc>
10544
10545 <param name="command" type="octet" mod="ptr" dir="in">
10546 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10547 </param>
10548 </method>
10549
10550 </interface>
10551
10552 <interface
10553 name="IFramebufferOverlay" extends="IFramebuffer"
10554 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10555 wsmap="suppress"
10556 >
10557 <desc>
10558 The IFramebufferOverlay interface represents an alpha blended overlay
10559 for displaying status icons above an IFramebuffer. It is always created
10560 not visible, so that it must be explicitly shown. It only covers a
10561 portion of the IFramebuffer, determined by its width, height and
10562 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10563 that order) format, and may be written to directly. Do re-read the
10564 width though, after setting it, as it may be adjusted (increased) to
10565 make it more suitable for the front end.
10566 </desc>
10567 <attribute name="x" type="unsigned long" readonly="yes">
10568 <desc>X position of the overlay, relative to the frame buffer.</desc>
10569 </attribute>
10570
10571 <attribute name="y" type="unsigned long" readonly="yes">
10572 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10573 </attribute>
10574
10575 <attribute name="visible" type="boolean" readonly="no">
10576 <desc>
10577 Whether the overlay is currently visible.
10578 </desc>
10579 </attribute>
10580
10581 <attribute name="alpha" type="unsigned long" readonly="no">
10582 <desc>
10583 The global alpha value for the overlay. This may or may not be
10584 supported by a given front end.
10585 </desc>
10586 </attribute>
10587
10588 <method name="move">
10589 <desc>
10590 Changes the overlay's position relative to the IFramebuffer.
10591 </desc>
10592 <param name="x" type="unsigned long" dir="in"/>
10593 <param name="y" type="unsigned long" dir="in"/>
10594 </method>
10595
10596 </interface>
10597
10598 <interface
10599 name="IDisplay" extends="$unknown"
10600 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10601 wsmap="managed"
10602 >
10603 <desc>
10604 The IDisplay interface represents the virtual machine's display.
10605
10606 The object implementing this interface is contained in each
10607 <link to="IConsole::display"/> attribute and represents the visual
10608 output of the virtual machine.
10609
10610 The virtual display supports pluggable output targets represented by the
10611 IFramebuffer interface. Examples of the output target are a window on
10612 the host computer or an RDP session's display on a remote computer.
10613 </desc>
10614 <attribute name="width" type="unsigned long" readonly="yes">
10615 <desc>Current display width.</desc>
10616 </attribute>
10617
10618 <attribute name="height" type="unsigned long" readonly="yes">
10619 <desc>Current display height.</desc>
10620 </attribute>
10621
10622 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10623 <desc>
10624 Current guest display color depth. Note that this may differ
10625 from <link to="IFramebuffer::bitsPerPixel"/>.
10626 </desc>
10627 </attribute>
10628
10629 <method name="setFramebuffer">
10630 <desc>
10631 Sets the framebuffer for given screen.
10632 </desc>
10633 <param name="screenId" type="unsigned long" dir="in"/>
10634 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10635 </method>
10636
10637 <method name="getFramebuffer">
10638 <desc>
10639 Queries the framebuffer for given screen.
10640 </desc>
10641 <param name="screenId" type="unsigned long" dir="in"/>
10642 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10643 <param name="xOrigin" type="long" dir="out"/>
10644 <param name="yOrigin" type="long" dir="out"/>
10645 </method>
10646
10647 <method name="setVideoModeHint">
10648 <desc>
10649 Asks VirtualBox to request the given video mode from
10650 the guest. This is just a hint and it cannot be guaranteed
10651 that the requested resolution will be used. Guest Additions
10652 are required for the request to be seen by guests. The caller
10653 should issue the request and wait for a resolution change and
10654 after a timeout retry.
10655
10656 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10657 parameters means that the corresponding values should be taken from the
10658 current video mode (i.e. left unchanged).
10659
10660 If the guest OS supports multi-monitor configuration then the @a display
10661 parameter specifies the number of the guest display to send the hint to:
10662 @c 0 is the primary display, @c 1 is the first secondary and
10663 so on. If the multi-monitor configuration is not supported, @a display
10664 must be @c 0.
10665
10666 <result name="E_INVALIDARG">
10667 The @a display is not associated with any monitor.
10668 </result>
10669
10670 </desc>
10671 <param name="width" type="unsigned long" dir="in"/>
10672 <param name="height" type="unsigned long" dir="in"/>
10673 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10674 <param name="display" type="unsigned long" dir="in"/>
10675 </method>
10676
10677 <method name="setSeamlessMode">
10678 <desc>
10679 Enables or disables seamless guest display rendering (seamless desktop
10680 integration) mode.
10681 <note>
10682 Calling this method has no effect if <link
10683 to="IGuest::supportsSeamless"/> returns @c false.
10684 </note>
10685 </desc>
10686 <param name="enabled" type="boolean" dir="in"/>
10687 </method>
10688
10689 <method name="takeScreenShot">
10690 <desc>
10691 Takes a screen shot of the requested size and copies it to the
10692 32-bpp buffer allocated by the caller and pointed to by @a address.
10693
10694 <note>This API can be used only by the COM/XPCOM C++ API as it
10695 requires pointer support. Use <link to="#takeScreenShotSlow" />
10696 with other language bindings.
10697 </note>
10698
10699 <result name="E_NOTIMPL">
10700 Feature not implemented.
10701 </result>
10702 <result name="VBOX_E_IPRT_ERROR">
10703 Could not take a screenshot.
10704 </result>
10705
10706 </desc>
10707 <param name="address" type="octet" mod="ptr" dir="in"/>
10708 <param name="width" type="unsigned long" dir="in"/>
10709 <param name="height" type="unsigned long" dir="in"/>
10710 </method>
10711
10712 <method name="takeScreenShotSlow">
10713 <desc>
10714 Takes a guest screen shot of the requested size and returns it as
10715 an array of bytes in uncompressed 32-bit ARGB format.
10716 This API is slow, but could be the only option to get guest screenshot
10717 for scriptable languages not allowed to manipulate with addresses
10718 directly.
10719
10720 <result name="E_NOTIMPL">
10721 Feature not implemented.
10722 </result>
10723 <result name="VBOX_E_IPRT_ERROR">
10724 Could not take a screenshot.
10725 </result>
10726 </desc>
10727 <param name="width" type="unsigned long" dir="in">
10728 <desc>
10729 Desired image width.
10730 </desc>
10731 </param>
10732 <param name="height" type="unsigned long" dir="in">
10733 <desc>
10734 Desired image height.
10735 </desc>
10736 </param>
10737 <param name="screenData" type="octet" dir="return" safearray="yes">
10738 <desc>
10739 Array with resulting screen data.
10740 </desc>
10741 </param>
10742 </method>
10743
10744 <method name="drawToScreen">
10745 <desc>
10746 Draws a 32-bpp image of the specified size from the given buffer
10747 to the given point on the VM display.
10748
10749 <result name="E_NOTIMPL">
10750 Feature not implemented.
10751 </result>
10752 <result name="VBOX_E_IPRT_ERROR">
10753 Could not draw to screen.
10754 </result>
10755
10756 </desc>
10757 <param name="address" type="octet" mod="ptr" dir="in"/>
10758 <param name="x" type="unsigned long" dir="in"/>
10759 <param name="y" type="unsigned long" dir="in"/>
10760 <param name="width" type="unsigned long" dir="in"/>
10761 <param name="height" type="unsigned long" dir="in"/>
10762 </method>
10763
10764 <method name="invalidateAndUpdate">
10765 <desc>
10766 Does a full invalidation of the VM display and instructs the VM
10767 to update it.
10768
10769 <result name="VBOX_E_IPRT_ERROR">
10770 Could not invalidate and update screen.
10771 </result>
10772
10773 </desc>
10774 </method>
10775
10776 <method name="resizeCompleted">
10777 <desc>
10778 Signals that a framebuffer has completed the resize operation.
10779
10780 <result name="VBOX_E_NOT_SUPPORTED">
10781 Operation only valid for external frame buffers.
10782 </result>
10783
10784 </desc>
10785 <param name="screenId" type="unsigned long" dir="in"/>
10786 </method>
10787
10788 <method name="updateCompleted">
10789 <desc>
10790 Signals that a framebuffer has completed the update operation.
10791
10792 <result name="VBOX_E_NOT_SUPPORTED">
10793 Operation only valid for external frame buffers.
10794 </result>
10795
10796 </desc>
10797 </method>
10798
10799 <method name="completeVHWACommand">
10800 <desc>
10801 Signals that the Video HW Acceleration command has completed.
10802 </desc>
10803
10804 <param name="command" type="octet" mod="ptr" dir="in">
10805 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10806 </param>
10807 </method>
10808
10809 </interface>
10810
10811 <!--
10812 // INetworkAdapter
10813 /////////////////////////////////////////////////////////////////////////
10814 -->
10815
10816 <enum
10817 name="NetworkAttachmentType"
10818 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10819 >
10820 <desc>
10821 Network attachment type.
10822 </desc>
10823
10824 <const name="Null" value="0">
10825 <desc>Null value, also means "not attached".</desc>
10826 </const>
10827 <const name="NAT" value="1"/>
10828 <const name="Bridged" value="2"/>
10829 <const name="Internal" value="3"/>
10830 <const name="HostOnly" value="4"/>
10831 </enum>
10832
10833 <enum
10834 name="NetworkAdapterType"
10835 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10836 >
10837 <desc>
10838 Network adapter type.
10839 </desc>
10840
10841 <const name="Null" value="0">
10842 <desc>Null value (never used by the API).</desc>
10843 </const>
10844 <const name="Am79C970A" value="1">
10845 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10846 </const>
10847 <const name="Am79C973" value="2">
10848 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10849 </const>
10850 <const name="I82540EM" value="3">
10851 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10852 </const>
10853 <const name="I82543GC" value="4">
10854 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10855 </const>
10856 <const name="I82545EM" value="5">
10857 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10858 </const>
10859 <const name="Virtio" value="6">
10860 <desc>Virtio network device.</desc>
10861 </const>
10862 </enum>
10863
10864 <interface
10865 name="INetworkAdapter" extends="$unknown"
10866 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10867 wsmap="managed"
10868 >
10869 <desc>
10870 Represents a virtual network adapter that is attached to a virtual machine.
10871 Each virtual machine has a fixed number of network adapter slots with one
10872 instance of this attached to each of them. Call
10873 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10874 is attached to a given slot in a given machine.
10875
10876 Each network adapter can be in one of five attachment modes, which are
10877 represented by the <link to="NetworkAttachmentType" /> enumeration;
10878 see the <link to="#attachmentType" /> attribute.
10879 </desc>
10880
10881 <attribute name="adapterType" type="NetworkAdapterType">
10882 <desc>
10883 Type of the virtual network adapter. Depending on this value,
10884 VirtualBox will provide a different virtual network hardware
10885 to the guest.
10886 </desc>
10887 </attribute>
10888
10889 <attribute name="slot" type="unsigned long" readonly="yes">
10890 <desc>
10891 Slot number this adapter is plugged into. Corresponds to
10892 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10893 to obtain this instance.
10894 </desc>
10895 </attribute>
10896
10897 <attribute name="enabled" type="boolean">
10898 <desc>
10899 Flag whether the network adapter is present in the
10900 guest system. If disabled, the virtual guest hardware will
10901 not contain this network adapter. Can only be changed when
10902 the VM is not running.
10903 </desc>
10904 </attribute>
10905
10906 <attribute name="MACAddress" type="wstring">
10907 <desc>
10908 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10909 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10910 </desc>
10911 </attribute>
10912
10913 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10914
10915 <attribute name="hostInterface" type="wstring">
10916 <desc>
10917 Name of the host network interface the VM is attached to.
10918 </desc>
10919 </attribute>
10920
10921 <attribute name="internalNetwork" type="wstring">
10922 <desc>
10923 Name of the internal network the VM is attached to.
10924 </desc>
10925 </attribute>
10926
10927 <attribute name="NATNetwork" type="wstring">
10928 <desc>
10929 Name of the NAT network the VM is attached to.
10930 </desc>
10931 </attribute>
10932
10933 <attribute name="cableConnected" type="boolean">
10934 <desc>
10935 Flag whether the adapter reports the cable as connected or not.
10936 It can be used to report offline situations to a VM.
10937 </desc>
10938 </attribute>
10939
10940 <attribute name="lineSpeed" type="unsigned long">
10941 <desc>
10942 Line speed reported by custom drivers, in units of 1 kbps.
10943 </desc>
10944 </attribute>
10945
10946 <attribute name="traceEnabled" type="boolean">
10947 <desc>
10948 Flag whether network traffic from/to the network card should be traced.
10949 Can only be toggled when the VM is turned off.
10950 </desc>
10951 </attribute>
10952
10953 <attribute name="traceFile" type="wstring">
10954 <desc>
10955 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10956 will be used.
10957 </desc>
10958 </attribute>
10959
10960 <method name="attachToNAT">
10961 <desc>
10962 Attach the network adapter to the Network Address Translation (NAT) interface.
10963 </desc>
10964 </method>
10965
10966 <method name="attachToBridgedInterface">
10967 <desc>
10968 Attach the network adapter to a bridged host interface.
10969 </desc>
10970 </method>
10971
10972 <method name="attachToInternalNetwork">
10973 <desc>
10974 Attach the network adapter to an internal network.
10975 </desc>
10976 </method>
10977
10978 <method name="attachToHostOnlyInterface">
10979 <desc>
10980 Attach the network adapter to the host-only network.
10981 </desc>
10982 </method>
10983
10984 <method name="detach">
10985 <desc>
10986 Detach the network adapter
10987 </desc>
10988 </method>
10989 </interface>
10990
10991
10992 <!--
10993 // ISerialPort
10994 /////////////////////////////////////////////////////////////////////////
10995 -->
10996
10997 <enum
10998 name="PortMode"
10999 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11000 >
11001 <desc>
11002 The PortMode enumeration represents possible communication modes for
11003 the virtual serial port device.
11004 </desc>
11005
11006 <const name="Disconnected" value="0">
11007 <desc>Virtual device is not attached to any real host device.</desc>
11008 </const>
11009 <const name="HostPipe" value="1">
11010 <desc>Virtual device is attached to a host pipe.</desc>
11011 </const>
11012 <const name="HostDevice" value="2">
11013 <desc>Virtual device is attached to a host device.</desc>
11014 </const>
11015 <const name="RawFile" value="3">
11016 <desc>Virtual device is attached to a raw file.</desc>
11017 </const>
11018 </enum>
11019
11020 <interface
11021 name="ISerialPort" extends="$unknown"
11022 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11023 wsmap="managed"
11024 >
11025
11026 <desc>
11027 The ISerialPort interface represents the virtual serial port device.
11028
11029 The virtual serial port device acts like an ordinary serial port
11030 inside the virtual machine. This device communicates to the real
11031 serial port hardware in one of two modes: host pipe or host device.
11032
11033 In host pipe mode, the #path attribute specifies the path to the pipe on
11034 the host computer that represents a serial port. The #server attribute
11035 determines if this pipe is created by the virtual machine process at
11036 machine startup or it must already exist before starting machine
11037 execution.
11038
11039 In host device mode, the #path attribute specifies the name of the
11040 serial port device on the host computer.
11041
11042 There is also a third communication mode: the disconnected mode. In this
11043 mode, the guest OS running inside the virtual machine will be able to
11044 detect the serial port, but all port write operations will be discarded
11045 and all port read operations will return no data.
11046
11047 <see>IMachine::getSerialPort</see>
11048 </desc>
11049
11050 <attribute name="slot" type="unsigned long" readonly="yes">
11051 <desc>
11052 Slot number this serial port is plugged into. Corresponds to
11053 the value you pass to <link to="IMachine::getSerialPort"/>
11054 to obtain this instance.
11055 </desc>
11056 </attribute>
11057
11058 <attribute name="enabled" type="boolean">
11059 <desc>
11060 Flag whether the serial port is enabled. If disabled,
11061 the serial port will not be reported to the guest OS.
11062 </desc>
11063 </attribute>
11064
11065 <attribute name="IOBase" type="unsigned long">
11066 <desc>Base I/O address of the serial port.</desc>
11067 </attribute>
11068
11069 <attribute name="IRQ" type="unsigned long">
11070 <desc>IRQ number of the serial port.</desc>
11071 </attribute>
11072
11073 <attribute name="hostMode" type="PortMode">
11074 <desc>
11075 How is this port connected to the host.
11076 <note>
11077 Changing this attribute may fail if the conditions for
11078 <link to="#path"/> are not met.
11079 </note>
11080 </desc>
11081 </attribute>
11082
11083 <attribute name="server" type="boolean">
11084 <desc>
11085 Flag whether this serial port acts as a server (creates a new pipe on
11086 the host) or as a client (uses the existing pipe). This attribute is
11087 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11088 </desc>
11089 </attribute>
11090
11091 <attribute name="path" type="wstring">
11092 <desc>
11093 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11094 PortMode_HostPipe, or the host serial device name when
11095 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11096 cases, setting a @c null or empty string as the attribute's value
11097 is an error. Otherwise, the value of this property is ignored.
11098 </desc>
11099 </attribute>
11100
11101 </interface>
11102
11103 <!--
11104 // IParallelPort
11105 /////////////////////////////////////////////////////////////////////////
11106 -->
11107
11108 <interface
11109 name="IParallelPort" extends="$unknown"
11110 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11111 wsmap="managed"
11112 >
11113
11114 <desc>
11115 The IParallelPort interface represents the virtual parallel port device.
11116
11117 The virtual parallel port device acts like an ordinary parallel port
11118 inside the virtual machine. This device communicates to the real
11119 parallel port hardware using the name of the parallel device on the host
11120 computer specified in the #path attribute.
11121
11122 Each virtual parallel port device is assigned a base I/O address and an
11123 IRQ number that will be reported to the guest operating system and used
11124 to operate the given parallel port from within the virtual machine.
11125
11126 <see>IMachine::getParallelPort</see>
11127 </desc>
11128
11129 <attribute name="slot" type="unsigned long" readonly="yes">
11130 <desc>
11131 Slot number this parallel port is plugged into. Corresponds to
11132 the value you pass to <link to="IMachine::getParallelPort"/>
11133 to obtain this instance.
11134 </desc>
11135 </attribute>
11136
11137 <attribute name="enabled" type="boolean">
11138 <desc>
11139 Flag whether the parallel port is enabled. If disabled,
11140 the parallel port will not be reported to the guest OS.
11141 </desc>
11142 </attribute>
11143
11144 <attribute name="IOBase" type="unsigned long">
11145 <desc>Base I/O address of the parallel port.</desc>
11146 </attribute>
11147
11148 <attribute name="IRQ" type="unsigned long">
11149 <desc>IRQ number of the parallel port.</desc>
11150 </attribute>
11151
11152 <attribute name="path" type="wstring">
11153 <desc>
11154 Host parallel device name. If this parallel port is enabled, setting a
11155 @c null or an empty string as this attribute's value will result into
11156 an error.
11157 </desc>
11158 </attribute>
11159
11160 </interface>
11161
11162
11163 <!--
11164 // IMachineDebugger
11165 /////////////////////////////////////////////////////////////////////////
11166 -->
11167
11168 <interface
11169 name="IMachineDebugger" extends="$unknown"
11170 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11171 wsmap="suppress"
11172 >
11173 <method name="resetStats">
11174 <desc>
11175 Reset VM statistics.
11176 </desc>
11177 <param name="pattern" type="wstring" dir="in">
11178 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11179 </param>
11180 </method>
11181
11182 <method name="dumpStats">
11183 <desc>
11184 Dumps VM statistics.
11185 </desc>
11186 <param name="pattern" type="wstring" dir="in">
11187 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11188 </param>
11189 </method>
11190
11191 <method name="getStats">
11192 <desc>
11193 Get the VM statistics in a XMLish format.
11194 </desc>
11195 <param name="pattern" type="wstring" dir="in">
11196 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11197 </param>
11198 <param name="withDescriptions" type="boolean" dir="in">
11199 <desc>Whether to include the descriptions.</desc>
11200 </param>
11201 <param name="stats" type="wstring" dir="out">
11202 <desc>The XML document containing the statistics.</desc>
11203 </param>
11204 </method>
11205
11206 <method name="injectNMI">
11207 <desc>
11208 Inject an NMI into a running VT-x/AMD-V VM.
11209 </desc>
11210 </method>
11211
11212 <attribute name="singlestep" type="boolean">
11213 <desc>Switch for enabling singlestepping.</desc>
11214 </attribute>
11215
11216 <attribute name="recompileUser" type="boolean">
11217 <desc>Switch for forcing code recompilation for user mode code.</desc>
11218 </attribute>
11219
11220 <attribute name="recompileSupervisor" type="boolean">
11221 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11222 </attribute>
11223
11224 <attribute name="PATMEnabled" type="boolean">
11225 <desc>Switch for enabling and disabling the PATM component.</desc>
11226 </attribute>
11227
11228 <attribute name="CSAMEnabled" type="boolean">
11229 <desc>Switch for enabling and disabling the CSAM component.</desc>
11230 </attribute>
11231
11232 <attribute name="logEnabled" type="boolean">
11233 <desc>Switch for enabling and disabling logging.</desc>
11234 </attribute>
11235
11236 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11237 <desc>
11238 Flag indicating whether the VM is currently making use of CPU hardware
11239 virtualization extensions.
11240 </desc>
11241 </attribute>
11242
11243 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11244 <desc>
11245 Flag indicating whether the VM is currently making use of the nested paging
11246 CPU hardware virtualization extension.
11247 </desc>
11248 </attribute>
11249
11250 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11251 <desc>
11252 Flag indicating whether the VM is currently making use of the VPID
11253 VT-x extension.
11254 </desc>
11255 </attribute>
11256
11257 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11258 <desc>
11259 Flag indicating whether the VM is currently making use of the Physical
11260 Address Extension CPU feature.
11261 </desc>
11262 </attribute>
11263
11264 <attribute name="virtualTimeRate" type="unsigned long">
11265 <desc>
11266 The rate at which the virtual time runs expressed as a percentage.
11267 The accepted range is 2% to 20000%.
11268 </desc>
11269 </attribute>
11270
11271 <!-- @todo method for setting log flags, groups and destination! -->
11272
11273 <attribute name="VM" type="unsigned long long" readonly="yes">
11274 <desc>
11275 Gets the VM handle. This is only for internal use while
11276 we carve the details of this interface.
11277 </desc>
11278 </attribute>
11279
11280 </interface>
11281
11282 <!--
11283 // IUSBController
11284 /////////////////////////////////////////////////////////////////////////
11285 -->
11286
11287 <interface
11288 name="IUSBController" extends="$unknown"
11289 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11290 wsmap="managed"
11291 >
11292 <attribute name="enabled" type="boolean">
11293 <desc>
11294 Flag whether the USB controller is present in the
11295 guest system. If disabled, the virtual guest hardware will
11296 not contain any USB controller. Can only be changed when
11297 the VM is powered off.
11298 </desc>
11299 </attribute>
11300
11301 <attribute name="enabledEhci" type="boolean">
11302 <desc>
11303 Flag whether the USB EHCI controller is present in the
11304 guest system. If disabled, the virtual guest hardware will
11305 not contain a USB EHCI controller. Can only be changed when
11306 the VM is powered off.
11307 </desc>
11308 </attribute>
11309
11310 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11311 <desc>
11312 USB standard version which the controller implements.
11313 This is a BCD which means that the major version is in the
11314 high byte and minor version is in the low byte.
11315 </desc>
11316 </attribute>
11317
11318 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11319 <desc>
11320 List of USB device filters associated with the machine.
11321
11322 If the machine is currently running, these filters are activated
11323 every time a new (supported) USB device is attached to the host
11324 computer that was not ignored by global filters
11325 (<link to="IHost::USBDeviceFilters"/>).
11326
11327 These filters are also activated when the machine is powered up.
11328 They are run against a list of all currently available USB
11329 devices (in states
11330 <link to="USBDeviceState_Available"/>,
11331 <link to="USBDeviceState_Busy"/>,
11332 <link to="USBDeviceState_Held"/>) that were not previously
11333 ignored by global filters.
11334
11335 If at least one filter matches the USB device in question, this
11336 device is automatically captured (attached to) the virtual USB
11337 controller of this machine.
11338
11339 <see>IUSBDeviceFilter, ::IUSBController</see>
11340 </desc>
11341 </attribute>
11342
11343 <method name="createDeviceFilter">
11344 <desc>
11345 Creates a new USB device filter. All attributes except
11346 the filter name are set to empty (any match),
11347 <i>active</i> is @c false (the filter is not active).
11348
11349 The created filter can then be added to the list of filters using
11350 <link to="#insertDeviceFilter"/>.
11351
11352 <result name="VBOX_E_INVALID_VM_STATE">
11353 The virtual machine is not mutable.
11354 </result>
11355
11356 <see>#deviceFilters</see>
11357 </desc>
11358 <param name="name" type="wstring" dir="in">
11359 <desc>
11360 Filter name. See <link to="IUSBDeviceFilter::name"/>
11361 for more info.
11362 </desc>
11363 </param>
11364 <param name="filter" type="IUSBDeviceFilter" dir="return">
11365 <desc>Created filter object.</desc>
11366 </param>
11367 </method>
11368
11369 <method name="insertDeviceFilter">
11370 <desc>
11371 Inserts the given USB device to the specified position
11372 in the list of filters.
11373
11374 Positions are numbered starting from <tt>0</tt>. If the specified
11375 position is equal to or greater than the number of elements in
11376 the list, the filter is added to the end of the collection.
11377
11378 <note>
11379 Duplicates are not allowed, so an attempt to insert a
11380 filter that is already in the collection, will return an
11381 error.
11382 </note>
11383
11384 <result name="VBOX_E_INVALID_VM_STATE">
11385 Virtual machine is not mutable.
11386 </result>
11387 <result name="E_INVALIDARG">
11388 USB device filter not created within this VirtualBox instance.
11389 </result>
11390 <result name="VBOX_E_INVALID_OBJECT_STATE">
11391 USB device filter already in list.
11392 </result>
11393
11394 <see>#deviceFilters</see>
11395 </desc>
11396 <param name="position" type="unsigned long" dir="in">
11397 <desc>Position to insert the filter to.</desc>
11398 </param>
11399 <param name="filter" type="IUSBDeviceFilter" dir="in">
11400 <desc>USB device filter to insert.</desc>
11401 </param>
11402 </method>
11403
11404 <method name="removeDeviceFilter">
11405 <desc>
11406 Removes a USB device filter from the specified position in the
11407 list of filters.
11408
11409 Positions are numbered starting from <tt>0</tt>. Specifying a
11410 position equal to or greater than the number of elements in
11411 the list will produce an error.
11412
11413 <see>#deviceFilters</see>
11414
11415 <result name="VBOX_E_INVALID_VM_STATE">
11416 Virtual machine is not mutable.
11417 </result>
11418 <result name="E_INVALIDARG">
11419 USB device filter list empty or invalid @a position.
11420 </result>
11421
11422 </desc>
11423 <param name="position" type="unsigned long" dir="in">
11424 <desc>Position to remove the filter from.</desc>
11425 </param>
11426 <param name="filter" type="IUSBDeviceFilter" dir="return">
11427 <desc>Removed USB device filter.</desc>
11428 </param>
11429 </method>
11430
11431 </interface>
11432
11433
11434 <!--
11435 // IUSBDevice
11436 /////////////////////////////////////////////////////////////////////////
11437 -->
11438
11439 <interface
11440 name="IUSBDevice" extends="$unknown"
11441 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11442 wsmap="managed"
11443 >
11444 <desc>
11445 The IUSBDevice interface represents a virtual USB device attached to the
11446 virtual machine.
11447
11448 A collection of objects implementing this interface is stored in the
11449 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11450 attached to a running virtual machine's USB controller.
11451 </desc>
11452
11453 <attribute name="id" type="uuid" mod="string" readonly="yes">
11454 <desc>
11455 Unique USB device ID. This ID is built from #vendorId,
11456 #productId, #revision and #serialNumber.
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="vendorId" type="unsigned short" readonly="yes">
11461 <desc>Vendor ID.</desc>
11462 </attribute>
11463
11464 <attribute name="productId" type="unsigned short" readonly="yes">
11465 <desc>Product ID.</desc>
11466 </attribute>
11467
11468 <attribute name="revision" type="unsigned short" readonly="yes">
11469 <desc>
11470 Product revision number. This is a packed BCD represented as
11471 unsigned short. The high byte is the integer part and the low
11472 byte is the decimal.
11473 </desc>
11474 </attribute>
11475
11476 <attribute name="manufacturer" type="wstring" readonly="yes">
11477 <desc>Manufacturer string.</desc>
11478 </attribute>
11479
11480 <attribute name="product" type="wstring" readonly="yes">
11481 <desc>Product string.</desc>
11482 </attribute>
11483
11484 <attribute name="serialNumber" type="wstring" readonly="yes">
11485 <desc>Serial number string.</desc>
11486 </attribute>
11487
11488 <attribute name="address" type="wstring" readonly="yes">
11489 <desc>Host specific address of the device.</desc>
11490 </attribute>
11491
11492 <attribute name="port" type="unsigned short" readonly="yes">
11493 <desc>
11494 Host USB port number the device is physically
11495 connected to.
11496 </desc>
11497 </attribute>
11498
11499 <attribute name="version" type="unsigned short" readonly="yes">
11500 <desc>
11501 The major USB version of the device - 1 or 2.
11502 </desc>
11503 </attribute>
11504
11505 <attribute name="portVersion" type="unsigned short" readonly="yes">
11506 <desc>
11507 The major USB version of the host USB port the device is
11508 physically connected to - 1 or 2. For devices not connected to
11509 anything this will have the same value as the version attribute.
11510 </desc>
11511 </attribute>
11512
11513 <attribute name="remote" type="boolean" readonly="yes">
11514 <desc>
11515 Whether the device is physically connected to a remote VRDP
11516 client or to a local host machine.
11517 </desc>
11518 </attribute>
11519
11520 </interface>
11521
11522
11523 <!--
11524 // IUSBDeviceFilter
11525 /////////////////////////////////////////////////////////////////////////
11526 -->
11527
11528 <interface
11529 name="IUSBDeviceFilter" extends="$unknown"
11530 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11531 wsmap="managed"
11532 >
11533 <desc>
11534 The IUSBDeviceFilter interface represents an USB device filter used
11535 to perform actions on a group of USB devices.
11536
11537 This type of filters is used by running virtual machines to
11538 automatically capture selected USB devices once they are physically
11539 attached to the host computer.
11540
11541 A USB device is matched to the given device filter if and only if all
11542 attributes of the device match the corresponding attributes of the
11543 filter (that is, attributes are joined together using the logical AND
11544 operation). On the other hand, all together, filters in the list of
11545 filters carry the semantics of the logical OR operation. So if it is
11546 desirable to create a match like "this vendor id OR this product id",
11547 one needs to create two filters and specify "any match" (see below)
11548 for unused attributes.
11549
11550 All filter attributes used for matching are strings. Each string
11551 is an expression representing a set of values of the corresponding
11552 device attribute, that will match the given filter. Currently, the
11553 following filtering expressions are supported:
11554
11555 <ul>
11556 <li><i>Interval filters</i>. Used to specify valid intervals for
11557 integer device attributes (Vendor ID, Product ID and Revision).
11558 The format of the string is:
11559
11560 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11561
11562 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11563 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11564 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11565 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11566 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11567 possible integer is assumed.
11568 </li>
11569 <li><i>Boolean filters</i>. Used to specify acceptable values for
11570 boolean device attributes. The format of the string is:
11571
11572 <tt>true|false|yes|no|0|1</tt>
11573
11574 </li>
11575 <li><i>Exact match</i>. Used to specify a single value for the given
11576 device attribute. Any string that doesn't start with <tt>int:</tt>
11577 represents the exact match. String device attributes are compared to
11578 this string including case of symbols. Integer attributes are first
11579 converted to a string (see individual filter attributes) and then
11580 compared ignoring case.
11581
11582 </li>
11583 <li><i>Any match</i>. Any value of the corresponding device attribute
11584 will match the given filter. An empty or @c null string is
11585 used to construct this type of filtering expressions.
11586
11587 </li>
11588 </ul>
11589
11590 <note>
11591 On the Windows host platform, interval filters are not currently
11592 available. Also all string filter attributes
11593 (<link to="#manufacturer"/>, <link to="#product"/>,
11594 <link to="#serialNumber"/>) are ignored, so they behave as
11595 <i>any match</i> no matter what string expression is specified.
11596 </note>
11597
11598 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11599 </desc>
11600
11601 <attribute name="name" type="wstring">
11602 <desc>
11603 Visible name for this filter.
11604 This name is used to visually distinguish one filter from another,
11605 so it can neither be @c null nor an empty string.
11606 </desc>
11607 </attribute>
11608
11609 <attribute name="active" type="boolean">
11610 <desc>Whether this filter active or has been temporarily disabled.</desc>
11611 </attribute>
11612
11613 <attribute name="vendorId" type="wstring">
11614 <desc>
11615 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11616 The string representation for the <i>exact matching</i>
11617 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11618 (including leading zeroes).
11619 </desc>
11620 </attribute>
11621
11622 <attribute name="productId" type="wstring">
11623 <desc>
11624 <link to="IUSBDevice::productId">Product ID</link> filter.
11625 The string representation for the <i>exact matching</i>
11626 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11627 (including leading zeroes).
11628 </desc>
11629 </attribute>
11630
11631 <attribute name="revision" type="wstring">
11632 <desc>
11633 <link to="IUSBDevice::productId">Product revision number</link>
11634 filter. The string representation for the <i>exact matching</i>
11635 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11636 of the integer part of the revision, and <tt>F</tt> is the
11637 decimal digit of its fractional part (including leading and
11638 trailing zeros).
11639 Note that for interval filters, it's best to use the hexadecimal
11640 form, because the revision is stored as a 16 bit packed BCD value;
11641 so the expression <tt>int:0x0100-0x0199</tt> will match any
11642 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11643 </desc>
11644 </attribute>
11645
11646 <attribute name="manufacturer" type="wstring">
11647 <desc>
11648 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11649 </desc>
11650 </attribute>
11651
11652 <attribute name="product" type="wstring">
11653 <desc>
11654 <link to="IUSBDevice::product">Product</link> filter.
11655 </desc>
11656 </attribute>
11657
11658 <attribute name="serialNumber" type="wstring">
11659 <desc>
11660 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11661 </desc>
11662 </attribute>
11663
11664 <attribute name="port" type="wstring">
11665 <desc>
11666 <link to="IUSBDevice::port">Host USB port</link> filter.
11667 </desc>
11668 </attribute>
11669
11670 <attribute name="remote" type="wstring">
11671 <desc>
11672 <link to="IUSBDevice::remote">Remote state</link> filter.
11673 <note>
11674 This filter makes sense only for machine USB filters,
11675 i.e. it is ignored by IHostUSBDeviceFilter objects.
11676 </note>
11677 </desc>
11678 </attribute>
11679
11680 <attribute name="maskedInterfaces" type="unsigned long">
11681 <desc>
11682 This is an advanced option for hiding one or more USB interfaces
11683 from the guest. The value is a bit mask where the bits that are set
11684 means the corresponding USB interface should be hidden, masked off
11685 if you like.
11686 This feature only works on Linux hosts.
11687 </desc>
11688 </attribute>
11689
11690 </interface>
11691
11692
11693 <!--
11694 // IHostUSBDevice
11695 /////////////////////////////////////////////////////////////////////////
11696 -->
11697
11698 <enum
11699 name="USBDeviceState"
11700 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11701 >
11702 <desc>
11703 USB device state. This enumeration represents all possible states
11704 of the USB device physically attached to the host computer regarding
11705 its state on the host computer and availability to guest computers
11706 (all currently running virtual machines).
11707
11708 Once a supported USB device is attached to the host, global USB
11709 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11710 either ignore the device, or put it to USBDeviceState_Held state, or do
11711 nothing. Unless the device is ignored by global filters, filters of all
11712 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11713 activated that can put it to USBDeviceState_Captured state.
11714
11715 If the device was ignored by global filters, or didn't match
11716 any filters at all (including guest ones), it is handled by the host
11717 in a normal way. In this case, the device state is determined by
11718 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11719 or USBDeviceState_Available, depending on the current device usage.
11720
11721 Besides auto-capturing based on filters, the device can be manually
11722 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11723 state is USBDeviceState_Busy, USBDeviceState_Available or
11724 USBDeviceState_Held.
11725
11726 <note>
11727 Due to differences in USB stack implementations in Linux and Win32,
11728 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11729 only to the Linux version of the product. This also means that (<link
11730 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11731 device state is USBDeviceState_Held.
11732 </note>
11733
11734 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11735 </desc>
11736
11737 <const name="NotSupported" value="0">
11738 <desc>
11739 Not supported by the VirtualBox server, not available to guests.
11740 </desc>
11741 </const>
11742 <const name="Unavailable" value="1">
11743 <desc>
11744 Being used by the host computer exclusively,
11745 not available to guests.
11746 </desc>
11747 </const>
11748 <const name="Busy" value="2">
11749 <desc>
11750 Being used by the host computer, potentially available to guests.
11751 </desc>
11752 </const>
11753 <const name="Available" value="3">
11754 <desc>
11755 Not used by the host computer, available to guests (the host computer
11756 can also start using the device at any time).
11757 </desc>
11758 </const>
11759 <const name="Held" value="4">
11760 <desc>
11761 Held by the VirtualBox server (ignored by the host computer),
11762 available to guests.
11763 </desc>
11764 </const>
11765 <const name="Captured" value="5">
11766 <desc>
11767 Captured by one of the guest computers, not available
11768 to anybody else.
11769 </desc>
11770 </const>
11771 </enum>
11772
11773 <interface
11774 name="IHostUSBDevice" extends="IUSBDevice"
11775 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11776 wsmap="managed"
11777 >
11778 <desc>
11779 The IHostUSBDevice interface represents a physical USB device attached
11780 to the host computer.
11781
11782 Besides properties inherited from IUSBDevice, this interface adds the
11783 <link to="#state"/> property that holds the current state of the USB
11784 device.
11785
11786 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11787 </desc>
11788
11789 <attribute name="state" type="USBDeviceState" readonly="yes">
11790 <desc>
11791 Current state of the device.
11792 </desc>
11793 </attribute>
11794
11795 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11796
11797 </interface>
11798
11799
11800 <!--
11801 // IHostUSBDeviceFilter
11802 /////////////////////////////////////////////////////////////////////////
11803 -->
11804
11805 <enum
11806 name="USBDeviceFilterAction"
11807 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11808 >
11809 <desc>
11810 Actions for host USB device filters.
11811 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11812 </desc>
11813
11814 <const name="Null" value="0">
11815 <desc>Null value (never used by the API).</desc>
11816 </const>
11817 <const name="Ignore" value="1">
11818 <desc>Ignore the matched USB device.</desc>
11819 </const>
11820 <const name="Hold" value="2">
11821 <desc>Hold the matched USB device.</desc>
11822 </const>
11823 </enum>
11824
11825 <interface
11826 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11827 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11828 wsmap="managed"
11829 >
11830 <desc>
11831 The IHostUSBDeviceFilter interface represents a global filter for a
11832 physical USB device used by the host computer. Used indirectly in
11833 <link to="IHost::USBDeviceFilters"/>.
11834
11835 Using filters of this type, the host computer determines the initial
11836 state of the USB device after it is physically attached to the
11837 host's USB controller.
11838
11839 <note>
11840 The <link to="#remote"/> attribute is ignored by this type of
11841 filters, because it makes sense only for
11842 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11843 </note>
11844
11845 <see>IHost::USBDeviceFilters</see>
11846 </desc>
11847
11848 <attribute name="action" type="USBDeviceFilterAction">
11849 <desc>
11850 Action performed by the host when an attached USB device
11851 matches this filter.
11852 </desc>
11853 </attribute>
11854
11855 </interface>
11856
11857 <!--
11858 // IAudioAdapter
11859 /////////////////////////////////////////////////////////////////////////
11860 -->
11861
11862 <enum
11863 name="AudioDriverType"
11864 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11865 >
11866 <desc>
11867 Host audio driver type.
11868 </desc>
11869
11870 <const name="Null" value="0">
11871 <desc>Null value, also means "dummy audio driver".</desc>
11872 </const>
11873 <const name="WinMM" value="1">
11874 <desc>Windows multimedia (Windows hosts only).</desc>
11875 </const>
11876 <const name="OSS" value="2">
11877 <desc>Open Sound System (Linux hosts only).</desc>
11878 </const>
11879 <const name="ALSA" value="3">
11880 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11881 </const>
11882 <const name="DirectSound" value="4">
11883 <desc>DirectSound (Windows hosts only).</desc>
11884 </const>
11885 <const name="CoreAudio" value="5">
11886 <desc>CoreAudio (Mac hosts only).</desc>
11887 </const>
11888 <const name="MMPM" value="6">
11889 <desc>Reserved for historical reasons.</desc>
11890 </const>
11891 <const name="Pulse" value="7">
11892 <desc>PulseAudio (Linux hosts only).</desc>
11893 </const>
11894 <const name="SolAudio" value="8">
11895 <desc>Solaris audio (Solaris hosts only).</desc>
11896 </const>
11897 </enum>
11898
11899 <enum
11900 name="AudioControllerType"
11901 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11902 >
11903 <desc>
11904 Virtual audio controller type.
11905 </desc>
11906
11907 <const name="AC97" value="0"/>
11908 <const name="SB16" value="1"/>
11909 </enum>
11910
11911 <interface
11912 name="IAudioAdapter" extends="$unknown"
11913 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11914 wsmap="managed"
11915 >
11916 <desc>
11917 The IAudioAdapter interface represents the virtual audio adapter of
11918 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11919 </desc>
11920 <attribute name="enabled" type="boolean">
11921 <desc>
11922 Flag whether the audio adapter is present in the
11923 guest system. If disabled, the virtual guest hardware will
11924 not contain any audio adapter. Can only be changed when
11925 the VM is not running.
11926 </desc>
11927 </attribute>
11928 <attribute name="audioController" type="AudioControllerType">
11929 <desc>
11930 The audio hardware we emulate.
11931 </desc>
11932 </attribute>
11933 <attribute name="audioDriver" type="AudioDriverType">
11934 <desc>
11935 Audio driver the adapter is connected to. This setting
11936 can only be changed when the VM is not running.
11937 </desc>
11938 </attribute>
11939 </interface>
11940
11941 <!--
11942 // IVRDPServer
11943 /////////////////////////////////////////////////////////////////////////
11944 -->
11945
11946 <enum
11947 name="VRDPAuthType"
11948 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11949 >
11950 <desc>
11951 VRDP authentication type.
11952 </desc>
11953
11954 <const name="Null" value="0">
11955 <desc>Null value, also means "no authentication".</desc>
11956 </const>
11957 <const name="External" value="1"/>
11958 <const name="Guest" value="2"/>
11959 </enum>
11960
11961 <interface
11962 name="IVRDPServer" extends="$unknown"
11963 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11964 wsmap="managed"
11965 >
11966 <attribute name="enabled" type="boolean">
11967 <desc>VRDP server status.</desc>
11968 </attribute>
11969
11970 <attribute name="ports" type="wstring">
11971 <desc>
11972 VRDP server port numbers. The server will try to bind to one of free ports from the list.
11973 <note>
11974 This is a string of comma separated TCP port numbers or port number ranges.
11975 Example <tt>5000,5010-5012,5015</tt>
11976 </note>
11977 </desc>
11978 </attribute>
11979
11980 <attribute name="netAddress" type="wstring">
11981 <desc>VRDP server address.</desc>
11982 </attribute>
11983
11984 <attribute name="authType" type="VRDPAuthType">
11985 <desc>VRDP authentication method.</desc>
11986 </attribute>
11987
11988 <attribute name="authTimeout" type="unsigned long">
11989 <desc>Timeout for guest authentication. Milliseconds.</desc>
11990 </attribute>
11991
11992 <attribute name="allowMultiConnection" type="boolean">
11993 <desc>
11994 Flag whether multiple simultaneous connections to the VM are permitted.
11995 Note that this will be replaced by a more powerful mechanism in the future.
11996 </desc>
11997 </attribute>
11998
11999 <attribute name="reuseSingleConnection" type="boolean">
12000 <desc>
12001 Flag whether the existing connection must be dropped and a new connection
12002 must be established by the VRDP server, when a new client connects in single
12003 connection mode.
12004 </desc>
12005 </attribute>
12006
12007 </interface>
12008
12009
12010 <!--
12011 // ISharedFolder
12012 /////////////////////////////////////////////////////////////////////////
12013 -->
12014
12015 <interface
12016 name="ISharedFolder" extends="$unknown"
12017 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12018 wsmap="struct"
12019 >
12020 <desc>
12021 The ISharedFolder interface represents a folder in the host computer's
12022 file system accessible from the guest OS running inside a virtual
12023 machine using an associated logical name.
12024
12025 There are three types of shared folders:
12026 <ul>
12027 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12028 folders available to all virtual machines.</li>
12029 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12030 VM-specific shared folders available to the given virtual machine at
12031 startup.</li>
12032 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12033 VM-specific shared folders created in the session context (for
12034 example, when the virtual machine is running) and automatically
12035 discarded when the session is closed (the VM is powered off).</li>
12036 </ul>
12037
12038 Logical names of shared folders must be unique within the given scope
12039 (global, permanent or transient). However, they do not need to be unique
12040 across scopes. In this case, the definition of the shared folder in a
12041 more specific scope takes precedence over definitions in all other
12042 scopes. The order of precedence is (more specific to more general):
12043 <ol>
12044 <li>Transient definitions</li>
12045 <li>Permanent definitions</li>
12046 <li>Global definitions</li>
12047 </ol>
12048
12049 For example, if MyMachine has a shared folder named
12050 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12051 transient shared folder named <tt>C_DRIVE</tt> (that points
12052 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12053 of <tt>C_DRIVE</tt> in the guest OS so
12054 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12055 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12056 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12057 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12058 to <tt>C:\\</tt> if it still exists.
12059
12060 Note that permanent and transient shared folders of different machines
12061 are in different name spaces, so they don't overlap and don't need to
12062 have unique logical names.
12063
12064 <note>
12065 Global shared folders are not implemented in the current version of the
12066 product.
12067 </note>
12068 </desc>
12069
12070 <attribute name="name" type="wstring" readonly="yes">
12071 <desc>Logical name of the shared folder.</desc>
12072 </attribute>
12073
12074 <attribute name="hostPath" type="wstring" readonly="yes">
12075 <desc>Full path to the shared folder in the host file system.</desc>
12076 </attribute>
12077
12078 <attribute name="accessible" type="boolean" readonly="yes">
12079 <desc>
12080 Whether the folder defined by the host path is currently
12081 accessible or not.
12082 For example, the folder can be unaccessible if it is placed
12083 on the network share that is not available by the time
12084 this property is read.
12085 </desc>
12086 </attribute>
12087
12088 <attribute name="writable" type="boolean" readonly="yes">
12089 <desc>
12090 Whether the folder defined by the host path is writable or
12091 not.
12092 </desc>
12093 </attribute>
12094
12095 <attribute name="lastAccessError" type="wstring" readonly="yes">
12096 <desc>
12097 Text message that represents the result of the last accessibility
12098 check.
12099
12100 Accessibility checks are performed each time the <link to="#accessible"/>
12101 attribute is read. An empty string is returned if the last
12102 accessibility check was successful. A non-empty string indicates a
12103 failure and should normally describe a reason of the failure (for
12104 example, a file read error).
12105 </desc>
12106 </attribute>
12107
12108 </interface>
12109
12110 <!--
12111 // ISession
12112 /////////////////////////////////////////////////////////////////////////
12113 -->
12114
12115 <interface
12116 name="IInternalSessionControl" extends="$unknown"
12117 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12118 internal="yes"
12119 wsmap="suppress"
12120 >
12121 <method name="getPID">
12122 <desc>PID of the process that has created this Session object.
12123 </desc>
12124 <param name="pid" type="unsigned long" dir="return"/>
12125 </method>
12126
12127 <method name="getRemoteConsole">
12128 <desc>
12129 Returns the console object suitable for remote control.
12130
12131 <result name="VBOX_E_INVALID_VM_STATE">
12132 Session state prevents operation.
12133 </result>
12134 <result name="VBOX_E_INVALID_OBJECT_STATE">
12135 Session type prevents operation.
12136 </result>
12137
12138 </desc>
12139 <param name="console" type="IConsole" dir="return"/>
12140 </method>
12141
12142 <method name="assignMachine">
12143 <desc>
12144 Assigns the machine object associated with this direct-type
12145 session or informs the session that it will be a remote one
12146 (if @a machine == @c null).
12147
12148 <result name="VBOX_E_INVALID_VM_STATE">
12149 Session state prevents operation.
12150 </result>
12151 <result name="VBOX_E_INVALID_OBJECT_STATE">
12152 Session type prevents operation.
12153 </result>
12154
12155 </desc>
12156 <param name="machine" type="IMachine" dir="in"/>
12157 </method>
12158
12159 <method name="assignRemoteMachine">
12160 <desc>
12161 Assigns the machine and the (remote) console object associated with
12162 this remote-type session.
12163
12164 <result name="VBOX_E_INVALID_VM_STATE">
12165 Session state prevents operation.
12166 </result>
12167
12168 </desc>
12169 <param name="machine" type="IMachine" dir="in"/>
12170 <param name="console" type="IConsole" dir="in"/>
12171 </method>
12172
12173 <method name="updateMachineState">
12174 <desc>
12175 Updates the machine state in the VM process.
12176 Must be called only in certain cases
12177 (see the method implementation).
12178
12179 <result name="VBOX_E_INVALID_VM_STATE">
12180 Session state prevents operation.
12181 </result>
12182 <result name="VBOX_E_INVALID_OBJECT_STATE">
12183 Session type prevents operation.
12184 </result>
12185
12186 </desc>
12187 <param name="aMachineState" type="MachineState" dir="in"/>
12188 </method>
12189
12190 <method name="uninitialize">
12191 <desc>
12192 Uninitializes (closes) this session. Used by VirtualBox to close
12193 the corresponding remote session when the direct session dies
12194 or gets closed.
12195
12196 <result name="VBOX_E_INVALID_VM_STATE">
12197 Session state prevents operation.
12198 </result>
12199
12200 </desc>
12201 </method>
12202
12203 <method name="onNetworkAdapterChange">
12204 <desc>
12205 Triggered when settings of a network adapter of the
12206 associated virtual machine have changed.
12207
12208 <result name="VBOX_E_INVALID_VM_STATE">
12209 Session state prevents operation.
12210 </result>
12211 <result name="VBOX_E_INVALID_OBJECT_STATE">
12212 Session type prevents operation.
12213 </result>
12214
12215 </desc>
12216 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12217 <param name="changeAdapter" type="boolean" dir="in"/>
12218 </method>
12219
12220 <method name="onSerialPortChange">
12221 <desc>
12222 Triggered when settings of a serial port of the
12223 associated virtual machine have changed.
12224
12225 <result name="VBOX_E_INVALID_VM_STATE">
12226 Session state prevents operation.
12227 </result>
12228 <result name="VBOX_E_INVALID_OBJECT_STATE">
12229 Session type prevents operation.
12230 </result>
12231
12232 </desc>
12233 <param name="serialPort" type="ISerialPort" dir="in"/>
12234 </method>
12235
12236 <method name="onParallelPortChange">
12237 <desc>
12238 Triggered when settings of a parallel port of the
12239 associated virtual machine have changed.
12240
12241 <result name="VBOX_E_INVALID_VM_STATE">
12242 Session state prevents operation.
12243 </result>
12244 <result name="VBOX_E_INVALID_OBJECT_STATE">
12245 Session type prevents operation.
12246 </result>
12247
12248 </desc>
12249 <param name="parallelPort" type="IParallelPort" dir="in"/>
12250 </method>
12251
12252 <method name="onStorageControllerChange">
12253 <desc>
12254 Triggered when settings of a storage controller of the
12255 associated virtual machine have changed.
12256
12257 <result name="VBOX_E_INVALID_VM_STATE">
12258 Session state prevents operation.
12259 </result>
12260 <result name="VBOX_E_INVALID_OBJECT_STATE">
12261 Session type prevents operation.
12262 </result>
12263
12264 </desc>
12265 </method>
12266
12267 <method name="onMediumChange">
12268 <desc>
12269 Triggered when attached media of the
12270 associated virtual machine have changed.
12271
12272 <result name="VBOX_E_INVALID_VM_STATE">
12273 Session state prevents operation.
12274 </result>
12275 <result name="VBOX_E_INVALID_OBJECT_STATE">
12276 Session type prevents operation.
12277 </result>
12278
12279 </desc>
12280
12281 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12282 </method>
12283
12284 <method name="onVRDPServerChange">
12285 <desc>
12286 Triggered when settings of the VRDP server object of the
12287 associated virtual machine have changed.
12288
12289 <result name="VBOX_E_INVALID_VM_STATE">
12290 Session state prevents operation.
12291 </result>
12292 <result name="VBOX_E_INVALID_OBJECT_STATE">
12293 Session type prevents operation.
12294 </result>
12295
12296 </desc>
12297 </method>
12298
12299 <method name="onUSBControllerChange">
12300 <desc>
12301 Triggered when settings of the USB controller object of the
12302 associated virtual machine have changed.
12303
12304 <result name="VBOX_E_INVALID_VM_STATE">
12305 Session state prevents operation.
12306 </result>
12307 <result name="VBOX_E_INVALID_OBJECT_STATE">
12308 Session type prevents operation.
12309 </result>
12310
12311 </desc>
12312 </method>
12313
12314 <method name="onSharedFolderChange">
12315 <desc>
12316 Triggered when a permanent (global or machine) shared folder has been
12317 created or removed.
12318 <note>
12319 We don't pass shared folder parameters in this notification because
12320 the order in which parallel notifications are delivered is not defined,
12321 therefore it could happen that these parameters were outdated by the
12322 time of processing this notification.
12323 </note>
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 <param name="global" type="boolean" dir="in"/>
12334 </method>
12335
12336 <method name="onUSBDeviceAttach">
12337 <desc>
12338 Triggered when a request to capture a USB device (as a result
12339 of matched USB filters or direct call to
12340 <link to="IConsole::attachUSBDevice"/>) has completed.
12341 A @c null @a error object means success, otherwise it
12342 describes a failure.
12343
12344 <result name="VBOX_E_INVALID_VM_STATE">
12345 Session state prevents operation.
12346 </result>
12347 <result name="VBOX_E_INVALID_OBJECT_STATE">
12348 Session type prevents operation.
12349 </result>
12350
12351 </desc>
12352 <param name="device" type="IUSBDevice" dir="in"/>
12353 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12354 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12355 </method>
12356
12357 <method name="onUSBDeviceDetach">
12358 <desc>
12359 Triggered when a request to release the USB device (as a result
12360 of machine termination or direct call to
12361 <link to="IConsole::detachUSBDevice"/>) has completed.
12362 A @c null @a error object means success, otherwise it
12363 describes a failure.
12364
12365 <result name="VBOX_E_INVALID_VM_STATE">
12366 Session state prevents operation.
12367 </result>
12368 <result name="VBOX_E_INVALID_OBJECT_STATE">
12369 Session type prevents operation.
12370 </result>
12371
12372 </desc>
12373 <param name="id" type="uuid" mod="string" dir="in"/>
12374 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12375 </method>
12376
12377 <method name="onShowWindow">
12378 <desc>
12379 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12380 <link to="IMachine::showConsoleWindow"/> in order to notify
12381 console callbacks
12382 <link to="IConsoleCallback::onCanShowWindow"/>
12383 and <link to="IConsoleCallback::onShowWindow"/>.
12384
12385 <result name="VBOX_E_INVALID_OBJECT_STATE">
12386 Session type prevents operation.
12387 </result>
12388
12389 </desc>
12390 <param name="check" type="boolean" dir="in"/>
12391 <param name="canShow" type="boolean" dir="out"/>
12392 <param name="winId" type="unsigned long long" dir="out"/>
12393 </method>
12394
12395 <method name="accessGuestProperty">
12396 <desc>
12397 Called by <link to="IMachine::getGuestProperty"/> and by
12398 <link to="IMachine::setGuestProperty"/> in order to read and
12399 modify guest properties.
12400
12401 <result name="VBOX_E_INVALID_VM_STATE">
12402 Machine session is not open.
12403 </result>
12404 <result name="VBOX_E_INVALID_OBJECT_STATE">
12405 Session type is not direct.
12406 </result>
12407
12408 </desc>
12409 <param name="name" type="wstring" dir="in"/>
12410 <param name="value" type="wstring" dir="in"/>
12411 <param name="flags" type="wstring" dir="in"/>
12412 <param name="isSetter" type="boolean" dir="in"/>
12413 <param name="retValue" type="wstring" dir="out"/>
12414 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12415 <param name="retFlags" type="wstring" dir="out"/>
12416 </method>
12417
12418 <method name="enumerateGuestProperties">
12419 <desc>
12420 Return a list of the guest properties matching a set of patterns along
12421 with their values, time stamps and flags.
12422
12423 <result name="VBOX_E_INVALID_VM_STATE">
12424 Machine session is not open.
12425 </result>
12426 <result name="VBOX_E_INVALID_OBJECT_STATE">
12427 Session type is not direct.
12428 </result>
12429
12430 </desc>
12431 <param name="patterns" type="wstring" dir="in">
12432 <desc>
12433 The patterns to match the properties against as a comma-separated
12434 string. If this is empty, all properties currently set will be
12435 returned.
12436 </desc>
12437 </param>
12438 <param name="key" type="wstring" dir="out" safearray="yes">
12439 <desc>
12440 The key names of the properties returned.
12441 </desc>
12442 </param>
12443 <param name="value" type="wstring" dir="out" safearray="yes">
12444 <desc>
12445 The values of the properties returned. The array entries match the
12446 corresponding entries in the @a key array.
12447 </desc>
12448 </param>
12449 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12450 <desc>
12451 The time stamps of the properties returned. The array entries match
12452 the corresponding entries in the @a key array.
12453 </desc>
12454 </param>
12455 <param name="flags" type="wstring" dir="out" safearray="yes">
12456 <desc>
12457 The flags of the properties returned. The array entries match the
12458 corresponding entries in the @a key array.
12459 </desc>
12460 </param>
12461 </method>
12462
12463 </interface>
12464
12465 <interface
12466 name="ISession" extends="$dispatched"
12467 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12468 wsmap="managed"
12469 >
12470 <desc>
12471 The ISession interface represents a serialization primitive for virtual
12472 machines.
12473
12474 With VirtualBox, every time one wishes to manipulate a virtual machine
12475 (e.g. change its settings or start execution), a session object is
12476 required. Such an object must be passed to one of the session methods
12477 that open the given session, which then initiates the machine manipulation.
12478
12479 A session serves several purposes: it identifies to the inter-process VirtualBox
12480 code which process is currently working with the virtual machine, and it ensures
12481 that there are no incompatible requests from several processes for the
12482 same virtual machine. Session objects can therefore be thought of as mutex
12483 semaphores that lock virtual machines to prevent conflicting accesses from
12484 several processes.
12485
12486 How sessions objects are used depends on whether you use the Main API
12487 via COM or via the webservice:
12488
12489 <ul>
12490 <li>When using the COM API directly, an object of the Session class from the
12491 VirtualBox type library needs to be created. In regular COM C++ client code,
12492 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12493 This object will then act as a local session object in further calls to open
12494 a session.
12495 </li>
12496
12497 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12498 one session object automatically when <link to="IWebsessionManager::logon" />
12499 is called. A managed object reference to that session object can be retrieved by
12500 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12501 reference can then be used to open sessions.
12502 </li>
12503 </ul>
12504
12505 Sessions are mainly used in two variations:
12506
12507 <ul>
12508 <li>
12509 To start a virtual machine in a separate process, one would call
12510 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12511 object as its first parameter. This session then identifies the caller
12512 and lets him control the started machine (for example, pause machine
12513 execution or power it down) as well as be notified about machine
12514 execution state changes.
12515 </li>
12516
12517 <li>To alter machine settings, or to start machine execution within the
12518 current process, one needs to open a direct session for the machine first by
12519 calling <link to="IVirtualBox::openSession"/>. While a direct session
12520 is open within one process, no any other process may open another direct
12521 session for the same machine. This prevents the machine from being changed
12522 by other processes while it is running or while the machine is being configured.
12523 </li>
12524 </ul>
12525
12526 One also can attach to an existing direct session already opened by
12527 another process (for example, in order to send a control request to the
12528 virtual machine such as the pause or the reset request). This is done by
12529 calling <link to="IVirtualBox::openExistingSession"/>.
12530
12531 <note>
12532 Unless you are trying to write a new VirtualBox front-end that
12533 performs direct machine execution (like the VirtualBox or VBoxSDL
12534 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12535 session opened by <link to="IVirtualBox::openSession"/> and use this
12536 session only to change virtual machine settings. If you simply want to
12537 start virtual machine execution using one of the existing front-ends
12538 (for example the VirtualBox GUI or headless server), simply use
12539 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12540 will power up the machine automatically for you.
12541 </note>
12542 </desc>
12543
12544 <attribute name="state" type="SessionState" readonly="yes">
12545 <desc>Current state of this session.</desc>
12546 </attribute>
12547
12548 <attribute name="type" type="SessionType" readonly="yes">
12549 <desc>
12550 Type of this session. The value of this attribute is valid only
12551 if the session is currently open (i.e. its #state is
12552 SessionType_SessionOpen), otherwise an error will be returned.
12553 </desc>
12554 </attribute>
12555
12556 <attribute name="machine" type="IMachine" readonly="yes">
12557 <desc>Machine object associated with this session.</desc>
12558 </attribute>
12559
12560 <attribute name="console" type="IConsole" readonly="yes">
12561 <desc>Console object associated with this session.</desc>
12562 </attribute>
12563
12564 <method name="close">
12565 <desc>
12566 Closes a session that was previously opened.
12567
12568 It is recommended that every time an "open session" method (such as
12569 <link to="IVirtualBox::openRemoteSession" /> or
12570 <link to="IVirtualBox::openSession" />) has been called to
12571 manipulate a virtual machine, the caller invoke
12572 ISession::close() when it's done doing so. Since sessions are
12573 serialization primitives much like ordinary mutexes, they are
12574 best used the same way: for each "open" call, there should be
12575 a matching "close" call, even when errors occur.
12576
12577 Otherwise, if a direct session for a machine opened with
12578 <link to="IVirtualBox::openSession"/> is not explicitly closed
12579 when the application terminates, the state of the machine will
12580 be set to <link to="MachineState_Aborted" /> on the server.
12581
12582 Generally, it is recommended to close all open sessions explicitly
12583 before terminating the application (regardless of the reason for
12584 the termination).
12585
12586 <note>
12587 Do not expect the session state (<link to="ISession::state" />
12588 to return to "Closed" immediately after you invoke
12589 ISession::close(), particularly if you have started a remote
12590 session to execute the VM in a new process. The session state will
12591 automatically return to "Closed" once the VM is no longer executing,
12592 which can of course take a very long time.
12593 </note>
12594
12595 <result name="E_UNEXPECTED">
12596 Session is not open.
12597 </result>
12598
12599 </desc>
12600 </method>
12601
12602 </interface>
12603
12604 <!--
12605 // IStorageController
12606 /////////////////////////////////////////////////////////////////////////
12607 -->
12608
12609 <enum
12610 name="StorageBus"
12611 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12612 >
12613 <desc>
12614 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12615 see <link to="IStorageController::bus" />.
12616 </desc>
12617 <const name="Null" value="0">
12618 <desc>@c null value. Never used by the API.</desc>
12619 </const>
12620 <const name="IDE" value="1"/>
12621 <const name="SATA" value="2"/>
12622 <const name="SCSI" value="3"/>
12623 <const name="Floppy" value="4"/>
12624 </enum>
12625
12626 <enum
12627 name="StorageControllerType"
12628 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12629 >
12630 <desc>
12631 The exact variant of storage controller hardware presented
12632 to the guest; see <link to="IStorageController::controllerType" />.
12633 </desc>
12634
12635 <const name="Null" value="0">
12636 <desc>@c null value. Never used by the API.</desc>
12637 </const>
12638 <const name="LsiLogic" value="1">
12639 <desc>A SCSI controller of the LsiLogic variant.</desc>
12640 </const>
12641 <const name="BusLogic" value="2">
12642 <desc>A SCSI controller of the BusLogic variant.</desc>
12643 </const>
12644 <const name="IntelAhci" value="3">
12645 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12646 </const>
12647 <const name="PIIX3" value="4">
12648 <desc>An IDE controller of the PIIX3 variant.</desc>
12649 </const>
12650 <const name="PIIX4" value="5">
12651 <desc>An IDE controller of the PIIX4 variant.</desc>
12652 </const>
12653 <const name="ICH6" value="6">
12654 <desc>An IDE controller of the ICH6 variant.</desc>
12655 </const>
12656 <const name="I82078" value="7">
12657 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12658 </const>
12659 </enum>
12660
12661 <interface
12662 name="IStorageController" extends="$unknown"
12663 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12664 wsmap="managed"
12665 >
12666 <desc>
12667 Represents a storage controller that is attached to a virtual machine
12668 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12669 attached to storage controllers in a real computer, virtual drives
12670 (represented by <link to="IMediumAttachment" />) are attached to virtual
12671 storage controllers, represented by this interface.
12672
12673 As opposed to physical hardware, VirtualBox has a very generic concept
12674 of a storage controller, and for purposes of the Main API, all virtual
12675 storage is attached to virtual machines via instances of this interface.
12676 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12677 and Floppy (see <link to="#bus" />). Depending on which of these four is
12678 used, certain sub-types may be available and can be selected in
12679 <link to="#controllerType" />.
12680
12681 Depending on these settings, the guest operating system might see
12682 significantly different virtual hardware.
12683 </desc>
12684
12685 <attribute name="name" type="wstring" readonly="yes">
12686 <desc>
12687 Name of the storage controller, as originally specified with
12688 <link to="IMachine::addStorageController" />. This then uniquely
12689 identifies this controller with other method calls such as
12690 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12691 </desc>
12692 </attribute>
12693
12694 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12695 <desc>
12696 Maximum number of devices which can be attached to one port.
12697 </desc>
12698 </attribute>
12699
12700 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12701 <desc>
12702 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12703 </desc>
12704 </attribute>
12705
12706 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12707 <desc>
12708 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12709 </desc>
12710 </attribute>
12711
12712 <attribute name="instance" type="unsigned long">
12713 <desc>
12714 The instance number of the device in the running VM.
12715 </desc>
12716 </attribute>
12717
12718 <attribute name="portCount" type="unsigned long">
12719 <desc>
12720 The number of currently usable ports on the controller.
12721 The minimum and maximum number of ports for one controller are
12722 stored in <link to="IStorageController::minPortCount"/>
12723 and <link to="IStorageController::maxPortCount"/>.
12724 </desc>
12725 </attribute>
12726
12727 <attribute name="bus" type="StorageBus" readonly="yes">
12728 <desc>
12729 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12730 </desc>
12731 </attribute>
12732
12733 <attribute name="controllerType" type="StorageControllerType">
12734 <desc>
12735 The exact variant of storage controller hardware presented
12736 to the guest.
12737 Depending on this value, VirtualBox will provide a different
12738 virtual storage controller hardware to the guest.
12739 For SATA and floppy controllers, only one variant is available,
12740 but for IDE and SCSI, there are several.
12741
12742 For SCSI controllers, the default type is LsiLogic.
12743 </desc>
12744 </attribute>
12745
12746 <method name="GetIDEEmulationPort">
12747 <desc>
12748 Gets the corresponding port number which is emulated as an IDE device.
12749 Works only with SATA controllers.
12750
12751 <result name="E_INVALIDARG">
12752 The @a devicePosition is not in the range 0 to 3.
12753 </result>
12754 <result name="E_NOTIMPL">
12755 The storage controller type is not SATAIntelAhci.
12756 </result>
12757
12758 </desc>
12759 <param name="devicePosition" type="long" dir="in"/>
12760 <param name="portNumber" type="long" dir="return"/>
12761 </method>
12762
12763 <method name="SetIDEEmulationPort">
12764 <desc>
12765 Sets the port number which is emulated as an IDE device.
12766 Works only with SATA controllers.
12767
12768 <result name="E_INVALIDARG">
12769 The @a devicePosition is not in the range 0 to 3 or the
12770 @a portNumber is not in the range 0 to 29.
12771 </result>
12772 <result name="E_NOTIMPL">
12773 The storage controller type is not SATAIntelAhci.
12774 </result>
12775
12776 </desc>
12777 <param name="devicePosition" type="long" dir="in"/>
12778 <param name="portNumber" type="long" dir="in"/>
12779 </method>
12780
12781 </interface>
12782
12783<if target="wsdl">
12784
12785 <!--
12786 // IManagedObjectRef
12787 /////////////////////////////////////////////////////////////////////////
12788 -->
12789
12790 <interface
12791 name="IManagedObjectRef" extends="$unknown"
12792 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12793 internal="yes"
12794 wsmap="managed"
12795 wscpp="hardcoded"
12796 >
12797 <desc>
12798 Managed object reference.
12799
12800 Only within the webservice, a managed object reference (which is really
12801 an opaque number) allows a webservice client to address an object
12802 that lives in the address space of the webservice server.
12803
12804 Behind each managed object reference, there is a COM object that lives
12805 in the webservice server's address space. The COM object is not freed
12806 until the managed object reference is released, either by an explicit
12807 call to <link to="IManagedObjectRef::release" /> or by logging off from
12808 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12809 all objects created during the webservice session.
12810
12811 Whenever a method call of the VirtualBox API returns a COM object, the
12812 webservice representation of that method will instead return a
12813 managed object reference, which can then be used to invoke methods
12814 on that object.
12815 </desc>
12816
12817 <method name="getInterfaceName">
12818 <desc>
12819 Returns the name of the interface that this managed object represents,
12820 for example, "IMachine", as a string.
12821 </desc>
12822 <param name="return" type="wstring" dir="return"/>
12823 </method>
12824
12825 <method name="release">
12826 <desc>
12827 Releases this managed object reference and frees the resources that
12828 were allocated for it in the webservice server process. After calling
12829 this method, the identifier of the reference can no longer be used.
12830 </desc>
12831 </method>
12832
12833 </interface>
12834
12835 <!--
12836 // IWebsessionManager
12837 /////////////////////////////////////////////////////////////////////////
12838 -->
12839
12840 <interface
12841 name="IWebsessionManager" extends="$unknown"
12842 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12843 internal="yes"
12844 wsmap="global"
12845 wscpp="hardcoded"
12846 >
12847 <desc>
12848 Websession manager. This provides essential services
12849 to webservice clients.
12850 </desc>
12851 <method name="logon">
12852 <desc>
12853 Logs a new client onto the webservice and returns a managed object reference to
12854 the IVirtualBox instance, which the client can then use as a basis to further
12855 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12856 interface, in one way or the other.
12857 </desc>
12858 <param name="username" type="wstring" dir="in"/>
12859 <param name="password" type="wstring" dir="in"/>
12860 <param name="return" type="IVirtualBox" dir="return"/>
12861 </method>
12862
12863 <method name="getSessionObject">
12864 <desc>
12865 Returns a managed object reference to the internal ISession object that was created
12866 for this web service session when the client logged on.
12867
12868 <see>ISession</see>
12869 </desc>
12870 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12871 <param name="return" type="ISession" dir="return"/>
12872 </method>
12873
12874 <method name="logoff">
12875 <desc>
12876 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12877 and destroys all resources associated with the session (most importantly, all
12878 managed objects created in the server while the session was active).
12879 </desc>
12880 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12881 </method>
12882
12883 </interface>
12884
12885</if>
12886
12887 <!--
12888 // IPerformanceCollector & friends
12889 /////////////////////////////////////////////////////////////////////////
12890 -->
12891
12892 <interface
12893 name="IPerformanceMetric" extends="$unknown"
12894 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12895 >
12896 <desc>
12897 The IPerformanceMetric interface represents parameters of the given
12898 performance metric.
12899 </desc>
12900
12901 <attribute name="metricName" type="wstring" readonly="yes">
12902 <desc>
12903 Name of the metric.
12904 </desc>
12905 </attribute>
12906
12907 <attribute name="object" type="$unknown" readonly="yes">
12908 <desc>
12909 Object this metric belongs to.
12910 </desc>
12911 </attribute>
12912
12913 <attribute name="description" type="wstring" readonly="yes">
12914 <desc>
12915 Textual description of the metric.
12916 </desc>
12917 </attribute>
12918
12919 <attribute name="period" type="unsigned long" readonly="yes">
12920 <desc>
12921 Time interval between samples, measured in seconds.
12922 </desc>
12923 </attribute>
12924
12925 <attribute name="count" type="unsigned long" readonly="yes">
12926 <desc>
12927 Number of recent samples retained by the performance collector for this
12928 metric.
12929
12930 When the collected sample count exceeds this number, older samples
12931 are discarded.
12932 </desc>
12933 </attribute>
12934
12935 <attribute name="unit" type="wstring" readonly="yes">
12936 <desc>
12937 Unit of measurement.
12938 </desc>
12939 </attribute>
12940
12941 <attribute name="minimumValue" type="long" readonly="yes">
12942 <desc>
12943 Minimum possible value of this metric.
12944 </desc>
12945 </attribute>
12946
12947 <attribute name="maximumValue" type="long" readonly="yes">
12948 <desc>
12949 Maximum possible value of this metric.
12950 </desc>
12951 </attribute>
12952 </interface>
12953
12954 <interface
12955 name="IPerformanceCollector" extends="$unknown"
12956 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12957 wsmap="managed"
12958 >
12959 <desc>
12960 The IPerformanceCollector interface represents a service that collects and
12961 stores performance metrics data.
12962
12963 Performance metrics are associated with objects of interfaces like IHost and
12964 IMachine. Each object has a distinct set of performance metrics.
12965 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12966
12967 Metric data is collected at the specified intervals and is retained
12968 internally. The interval and the number of retained samples can be set
12969 with <link to="IPerformanceCollector::setupMetrics" />.
12970
12971 Metrics are organized hierarchically, with each level separated by a
12972 slash (/) character. Generally, the scheme for metric names is like this:
12973
12974 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12975
12976 "Category/Metric" together form the base metric name. A base metric is the
12977 smallest unit for which a sampling interval and the number of retained
12978 samples can be set. Only base metrics can be enabled and disabled. All
12979 sub-metrics are collected when their base metric is collected.
12980 Collected values for any set of sub-metrics can be queried with
12981 <link to="IPerformanceCollector::queryMetricsData" />.
12982
12983 For example "CPU/Load/User:avg"
12984 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12985 "average" aggregate. An aggregate function is computed over all retained
12986 data. Valid aggregate functions are:
12987
12988 <ul>
12989 <li>avg -- average</li>
12990 <li>min -- minimum</li>
12991 <li>max -- maximum</li>
12992 </ul>
12993
12994 When setting up
12995 metric parameters, querying metric data, enabling or disabling metrics
12996 wildcards can be used in metric names to specify a subset of metrics. For
12997 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12998 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12999 values without aggregates <tt>*:</tt> can be used.
13000
13001 The valid names for base metrics are:
13002
13003 <ul>
13004 <li>CPU/Load</li>
13005 <li>CPU/MHz</li>
13006 <li>RAM/Usage</li>
13007 </ul>
13008
13009 The general sequence for collecting and retrieving the metrics is:
13010 <ul>
13011 <li>
13012 Obtain an instance of IPerformanceCollector with
13013 <link to="IVirtualBox::performanceCollector" />
13014 </li>
13015 <li>
13016 Allocate and populate an array with references to objects the metrics
13017 will be collected for. Use references to IHost and IMachine objects.
13018 </li>
13019 <li>
13020 Allocate and populate an array with base metric names the data will be
13021 collected for.
13022 </li>
13023 <li>
13024 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13025 metric data will be collected and stored.
13026 </li>
13027 <li>
13028 Wait for the data to get collected.
13029 </li>
13030 <li>
13031 Allocate and populate an array with references to objects the metric
13032 values will be queried for. You can re-use the object array used for
13033 setting base metrics.
13034 </li>
13035 <li>
13036 Allocate and populate an array with metric names the data will be
13037 collected for. Note that metric names differ from base metric names.
13038 </li>
13039 <li>
13040 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13041 have been collected so far are returned. Note that the values are still
13042 retained internally and data collection continues.
13043 </li>
13044 </ul>
13045
13046 For an example of usage refer to the following files in VirtualBox SDK:
13047 <ul>
13048 <li>
13049 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13050 </li>
13051 <li>
13052 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13053 </li>
13054 </ul>
13055 </desc>
13056
13057 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13058 <desc>
13059 Array of unique names of metrics.
13060
13061 This array represents all metrics supported by the performance
13062 collector. Individual objects do not necessarily support all of them.
13063 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13064 list of supported metrics for a particular object.
13065 </desc>
13066 </attribute>
13067
13068 <method name="getMetrics">
13069 <desc>
13070 Returns parameters of specified metrics for a set of objects.
13071 <note>
13072 @c Null metrics array means all metrics. @c Null object array means
13073 all existing objects.
13074 </note>
13075 </desc>
13076 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13077 <desc>
13078 Metric name filter. Currently, only a comma-separated list of metrics
13079 is supported.
13080 </desc>
13081 </param>
13082 <param name="objects" type="$unknown" dir="in" safearray="yes">
13083 <desc>
13084 Set of objects to return metric parameters for.
13085 </desc>
13086 </param>
13087 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13088 <desc>
13089 Array of returned metric parameters.
13090 </desc>
13091 </param>
13092 </method>
13093
13094 <method name="setupMetrics">
13095 <desc>
13096 Sets parameters of specified base metrics for a set of objects. Returns
13097 an array of <link to="IPerformanceMetric" /> describing the metrics have
13098 been affected.
13099 <note>
13100 @c Null or empty metric name array means all metrics. @c Null or empty
13101 object array means all existing objects. If metric name array contains
13102 a single element and object array contains many, the single metric
13103 name array element is applied to each object array element to form
13104 metric/object pairs.
13105 </note>
13106 </desc>
13107 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13108 <desc>
13109 Metric name filter. Comma-separated list of metrics with wildcard
13110 support.
13111 </desc>
13112 </param>
13113 <param name="objects" type="$unknown" dir="in" safearray="yes">
13114 <desc>
13115 Set of objects to setup metric parameters for.
13116 </desc>
13117 </param>
13118 <param name="period" type="unsigned long" dir="in">
13119 <desc>
13120 Time interval in seconds between two consecutive samples of performance
13121 data.
13122 </desc>
13123 </param>
13124 <param name="count" type="unsigned long" dir="in">
13125 <desc>
13126 Number of samples to retain in performance data history. Older samples
13127 get discarded.
13128 </desc>
13129 </param>
13130 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13131 <desc>
13132 Array of metrics that have been modified by the call to this method.
13133 </desc>
13134 </param>
13135 </method>
13136
13137 <method name="enableMetrics">
13138 <desc>
13139 Turns on collecting specified base metrics. Returns an array of
13140 <link to="IPerformanceMetric" /> describing the metrics have been
13141 affected.
13142 <note>
13143 @c Null or empty metric name array means all metrics. @c Null or empty
13144 object array means all existing objects. If metric name array contains
13145 a single element and object array contains many, the single metric
13146 name array element is applied to each object array element to form
13147 metric/object pairs.
13148 </note>
13149 </desc>
13150 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13151 <desc>
13152 Metric name filter. Comma-separated list of metrics with wildcard
13153 support.
13154 </desc>
13155 </param>
13156 <param name="objects" type="$unknown" dir="in" safearray="yes">
13157 <desc>
13158 Set of objects to enable metrics for.
13159 </desc>
13160 </param>
13161 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13162 <desc>
13163 Array of metrics that have been modified by the call to this method.
13164 </desc>
13165 </param>
13166 </method>
13167
13168 <method name="disableMetrics">
13169 <desc>
13170 Turns off collecting specified base metrics. Returns an array of
13171 <link to="IPerformanceMetric" /> describing the metrics have been
13172 affected.
13173 <note>
13174 @c Null or empty metric name array means all metrics. @c Null or empty
13175 object array means all existing objects. If metric name array contains
13176 a single element and object array contains many, the single metric
13177 name array element is applied to each object array element to form
13178 metric/object pairs.
13179 </note>
13180 </desc>
13181 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13182 <desc>
13183 Metric name filter. Comma-separated list of metrics with wildcard
13184 support.
13185 </desc>
13186 </param>
13187 <param name="objects" type="$unknown" dir="in" safearray="yes">
13188 <desc>
13189 Set of objects to disable metrics for.
13190 </desc>
13191 </param>
13192 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13193 <desc>
13194 Array of metrics that have been modified by the call to this method.
13195 </desc>
13196 </param>
13197 </method>
13198
13199 <method name="queryMetricsData">
13200 <desc>
13201 Queries collected metrics data for a set of objects.
13202
13203 The data itself and related metric information are returned in seven
13204 parallel and one flattened array of arrays. Elements of
13205 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13206 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13207 the same index describe one set of values corresponding to a single
13208 metric.
13209
13210 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13211 start and length of a sub-array is indicated by
13212 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13213 value for metric <tt>metricNames[i]</tt> is at
13214 <tt>returnData[returnIndices[i]]</tt>.
13215
13216 <note>
13217 @c Null or empty metric name array means all metrics. @c Null or empty
13218 object array means all existing objects. If metric name array contains
13219 a single element and object array contains many, the single metric
13220 name array element is applied to each object array element to form
13221 metric/object pairs.
13222 </note>
13223 <note>
13224 Data collection continues behind the scenes after call to
13225 @c queryMetricsData. The return data can be seen as the snapshot of
13226 the current state at the time of @c queryMetricsData call. The
13227 internally kept metric values are not cleared by the call. This makes
13228 possible querying different subsets of metrics or aggregates with
13229 subsequent calls. If periodic querying is needed it is highly
13230 suggested to query the values with @c interval*count period to avoid
13231 confusion. This way a completely new set of data values will be
13232 provided by each query.
13233 </note>
13234 </desc>
13235 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13236 <desc>
13237 Metric name filter. Comma-separated list of metrics with wildcard
13238 support.
13239 </desc>
13240 </param>
13241 <param name="objects" type="$unknown" dir="in" safearray="yes">
13242 <desc>
13243 Set of objects to query metrics for.
13244 </desc>
13245 </param>
13246 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13247 <desc>
13248 Names of metrics returned in @c returnData.
13249 </desc>
13250 </param>
13251 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13252 <desc>
13253 Objects associated with metrics returned in @c returnData.
13254 </desc>
13255 </param>
13256 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13257 <desc>
13258 Units of measurement for each returned metric.
13259 </desc>
13260 </param>
13261 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13262 <desc>
13263 Divisor that should be applied to return values in order to get
13264 floating point values. For example:
13265 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13266 will retrieve the floating point value of i-th sample of the first
13267 metric.
13268 </desc>
13269 </param>
13270 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13271 <desc>
13272 Sequence numbers of the first elements of value sequences of particular metrics
13273 returned in @c returnData. For aggregate metrics it is the sequence number of
13274 the sample the aggregate started calculation from.
13275 </desc>
13276 </param>
13277 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13278 <desc>
13279 Indices of the first elements of value sequences of particular metrics
13280 returned in @c returnData.
13281 </desc>
13282 </param>
13283 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13284 <desc>
13285 Lengths of value sequences of particular metrics.
13286 </desc>
13287 </param>
13288 <param name="returnData" type="long" dir="return" safearray="yes">
13289 <desc>
13290 Flattened array of all metric data containing sequences of values for
13291 each metric.
13292 </desc>
13293 </param>
13294 </method>
13295
13296 </interface>
13297
13298 <module name="VBoxSVC" context="LocalServer">
13299 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13300 namespace="virtualbox.org">
13301 <interface name="IVirtualBox" default="yes"/>
13302 </class>
13303 </module>
13304
13305 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13306 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13307 namespace="virtualbox.org">
13308 <interface name="ISession" default="yes"/>
13309 </class>
13310 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13311 namespace="virtualbox.org">
13312 <interface name="ILocalOwner" default="yes"/>
13313 <interface name="IVirtualBoxCallback"/>
13314 <interface name="IConsoleCallback"/>
13315 </class>
13316 </module>
13317
13318</library>
13319
13320</idl>
13321
13322<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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