VirtualBox

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

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

Main: Allow setting IMachine::LiveMigrationTarget to TRUE when the VM state is Aborted as well as PoweredOff.

  • Property svn:eol-style set to native
File size: 489.8 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="f532545d-9ae7-4402-8b5f-1ea7d778cfc7"
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;[discardSnapshot() ]-------------&gt; Discarding --+
577 | | [discardCurrentState()] |
578 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
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="MigratingFrom" value="11">
676 <desc>
677 Migrating the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="Discarding" value="12">
681 <desc>
682 Snapshot of the machine is being discarded.
683 </desc>
684 </const>
685 <const name="SettingUp" value="13">
686 <desc>
687 Lengthy setup operation is in progress.
688 </desc>
689 </const>
690
691 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
692 <desc>
693 Pseudo-state: first online state (for use in relational expressions).
694 </desc>
695 </const>
696 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
697 <desc>
698 Pseudo-state: last online state (for use in relational expressions).
699 </desc>
700 </const>
701
702 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
703 <desc>
704 Pseudo-state: first transient state (for use in relational expressions).
705 </desc>
706 </const>
707 <const name="LastTransient" value="13" wsmap="suppress"> <!-- SettingUp -->
708 <desc>
709 Pseudo-state: last transient state (for use in relational expressions).
710 </desc>
711 </const>
712
713 </enum>
714
715 <enum
716 name="SessionState"
717 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
718 >
719 <desc>
720 Session state. This enumeration represents possible values of
721 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
722 attributes. See individual enumerator descriptions for the meaning for
723 every value.
724 </desc>
725
726 <const name="Null" value="0">
727 <desc>Null value (never used by the API).</desc>
728 </const>
729 <const name="Closed" value="1">
730 <desc>
731 The machine has no open sessions (<link to="IMachine::sessionState"/>);
732 the session is closed (<link to="ISession::state"/>)
733 </desc>
734 </const>
735 <const name="Open" value="2">
736 <desc>
737 The machine has an open direct session (<link to="IMachine::sessionState"/>);
738 the session is open (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Spawning" value="3">
742 <desc>
743 A new (direct) session is being opened for the machine
744 as a result of <link to="IVirtualBox::openRemoteSession"/>
745 call (<link to="IMachine::sessionState"/>);
746 the session is currently being opened
747 as a result of <link to="IVirtualBox::openRemoteSession"/>
748 call (<link to="ISession::state"/>)
749 </desc>
750 </const>
751 <const name="Closing" value="4">
752 <desc>
753 The direct session is being closed (<link to="IMachine::sessionState"/>);
754 the session is being closed (<link to="ISession::state"/>)
755 </desc>
756 </const>
757 </enum>
758
759 <enum
760 name="CpuPropertyType"
761 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
762 >
763 <desc>
764 Virtual CPU property type. This enumeration represents possible values of the
765 IMachine get- and setCpuProperty methods.
766 </desc>
767 <const name="Null" value="0">
768 <desc>Null value (never used by the API).</desc>
769 </const>
770 <const name="PAE" value="1">
771 <desc>
772 This setting determines whether VirtualBox will expose the Physical Address
773 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
774 is not available, it will not be reported.
775 </desc>
776 </const>
777 <const name="Synthetic" value="2">
778 <desc>
779 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
780 live migration between host systems that differ significantly.
781 </desc>
782 </const>
783 </enum>
784
785
786 <enum
787 name="HWVirtExPropertyType"
788 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
789 >
790 <desc>
791 HWVirtEx property type. This enumeration represents possible values of the
792 IMachine get- and setHWVirtExProperty methods.
793 </desc>
794 <const name="Null" value="0">
795 <desc>Null value (never used by the API).</desc>
796 </const>
797 <const name="Enabled" value="1">
798 <desc>
799 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
800 they will not be used.
801 </desc>
802 </const>
803 <const name="Exclusive" value="2">
804 <desc>
805 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
806 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
807 </desc>
808 </const>
809 <const name="VPID" value="3">
810 <desc>
811 VT-x VPID boolean property. Note that in case this extension is not available,
812 it will not be used.
813 </desc>
814 </const>
815 <const name="NestedPaging" value="4">
816 <desc>
817 Nested Paging boolean property. Note that in case this extension is not available,
818 it will not be used.
819 </desc>
820 </const>
821 </enum>
822
823 <enum
824 name="SessionType"
825 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
826 >
827 <desc>
828 Session type. This enumeration represents possible values of the
829 <link to="ISession::type"/> attribute.
830 </desc>
831
832 <const name="Null" value="0">
833 <desc>Null value (never used by the API).</desc>
834 </const>
835 <const name="Direct" value="1">
836 <desc>
837 Direct session
838 (opened by <link to="IVirtualBox::openSession"/>)
839 </desc>
840 </const>
841 <const name="Remote" value="2">
842 <desc>
843 Remote session
844 (opened by <link to="IVirtualBox::openRemoteSession"/>)
845 </desc>
846 </const>
847 <const name="Existing" value="3">
848 <desc>
849 Existing session
850 (opened by <link to="IVirtualBox::openExistingSession"/>)
851 </desc>
852 </const>
853 </enum>
854
855 <enum
856 name="DeviceType"
857 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
858 >
859 <desc>
860 Device type.
861 </desc>
862 <const name="Null" value="0">
863 <desc>
864 Null value, may also mean "no device" (not allowed for
865 <link to="IConsole::getDeviceActivity"/>).
866 </desc>
867 </const>
868 <const name="Floppy" value="1">
869 <desc>Floppy device.</desc>
870 </const>
871 <const name="DVD" value="2">
872 <desc>CD/DVD-ROM device.</desc>
873 </const>
874 <const name="HardDisk" value="3">
875 <desc>Hard disk device.</desc>
876 </const>
877 <const name="Network" value="4">
878 <desc>Network device.</desc>
879 </const>
880 <const name="USB" value="5">
881 <desc>USB device.</desc>
882 </const>
883 <const name="SharedFolder" value="6">
884 <desc>Shared folder device.</desc>
885 </const>
886 </enum>
887
888 <enum
889 name="DeviceActivity"
890 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
891 >
892 <desc>
893 Device activity for <link to="IConsole::getDeviceActivity"/>.
894 </desc>
895
896 <const name="Null" value="0"/>
897 <const name="Idle" value="1"/>
898 <const name="Reading" value="2"/>
899 <const name="Writing" value="3"/>
900 </enum>
901
902 <enum
903 name="ClipboardMode"
904 uuid="33364716-4008-4701-8f14-be0fa3d62950"
905 >
906 <desc>
907 Host-Guest clipboard interchange mode.
908 </desc>
909
910 <const name="Disabled" value="0"/>
911 <const name="HostToGuest" value="1"/>
912 <const name="GuestToHost" value="2"/>
913 <const name="Bidirectional" value="3"/>
914 </enum>
915
916 <enum
917 name="Scope"
918 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
919 >
920 <desc>
921 Scope of the operation.
922
923 A generic enumeration used in various methods to define the action or
924 argument scope.
925 </desc>
926
927 <const name="Global" value="0"/>
928 <const name="Machine" value="1"/>
929 <const name="Session" value="2"/>
930 </enum>
931
932 <enum
933 name="GuestStatisticType"
934 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
935 >
936 <desc>
937 Statistics type for <link to="IGuest::getStatistic"/>.
938 </desc>
939
940 <const name="CPULoad_Idle" value="0">
941 <desc>
942 Idle CPU load (0-100%) for last interval.
943 </desc>
944 </const>
945 <const name="CPULoad_Kernel" value="1">
946 <desc>
947 Kernel CPU load (0-100%) for last interval.
948 </desc>
949 </const>
950 <const name="CPULoad_User" value="2">
951 <desc>
952 User CPU load (0-100%) for last interval.
953 </desc>
954 </const>
955 <const name="Threads" value="3">
956 <desc>
957 Total number of threads in the system.
958 </desc>
959 </const>
960 <const name="Processes" value="4">
961 <desc>
962 Total number of processes in the system.
963 </desc>
964 </const>
965 <const name="Handles" value="5">
966 <desc>
967 Total number of handles in the system.
968 </desc>
969 </const>
970 <const name="MemoryLoad" value="6">
971 <desc>
972 Memory load (0-100%).
973 </desc>
974 </const>
975 <const name="PhysMemTotal" value="7">
976 <desc>
977 Total physical memory in megabytes.
978 </desc>
979 </const>
980 <const name="PhysMemAvailable" value="8">
981 <desc>
982 Free physical memory in megabytes.
983 </desc>
984 </const>
985 <const name="PhysMemBalloon" value="9">
986 <desc>
987 Ballooned physical memory in megabytes.
988 </desc>
989 </const>
990 <const name="MemCommitTotal" value="10">
991 <desc>
992 Total amount of memory in the committed state in megabytes.
993 </desc>
994 </const>
995 <const name="MemKernelTotal" value="11">
996 <desc>
997 Total amount of memory used by the guest OS's kernel in megabytes.
998 </desc>
999 </const>
1000 <const name="MemKernelPaged" value="12">
1001 <desc>
1002 Total amount of paged memory used by the guest OS's kernel in megabytes.
1003 </desc>
1004 </const>
1005 <const name="MemKernelNonpaged" value="13">
1006 <desc>
1007 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1008 </desc>
1009 </const>
1010 <const name="MemSystemCache" value="14">
1011 <desc>
1012 Total amount of memory used by the guest OS's system cache in megabytes.
1013 </desc>
1014 </const>
1015 <const name="PageFileSize" value="15">
1016 <desc>
1017 Pagefile size in megabytes.
1018 </desc>
1019 </const>
1020 <const name="SampleNumber" value="16">
1021 <desc>
1022 Statistics sample number
1023 </desc>
1024 </const>
1025 <const name="MaxVal" value="17"/>
1026 </enum>
1027
1028 <enum
1029 name="BIOSBootMenuMode"
1030 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1031 >
1032 <desc>
1033 BIOS boot menu mode.
1034 </desc>
1035
1036 <const name="Disabled" value="0"/>
1037 <const name="MenuOnly" value="1"/>
1038 <const name="MessageAndMenu" value="2"/>
1039 </enum>
1040
1041 <enum
1042 name="ProcessorFeature"
1043 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1044 >
1045 <desc>
1046 CPU features.
1047 </desc>
1048
1049 <const name="HWVirtEx" value="0"/>
1050 <const name="PAE" value="1"/>
1051 <const name="LongMode" value="2"/>
1052 <const name="NestedPaging" value="3"/>
1053 </enum>
1054
1055 <enum
1056 name="FirmwareType"
1057 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1058 >
1059 <desc>
1060 Firmware type.
1061 </desc>
1062 <const name="BIOS" value="1">
1063 <desc>BIOS Firmware.</desc>
1064 </const>
1065 <const name="EFI" value="2">
1066 <desc>Efi firmware.</desc>
1067 </const>
1068 </enum>
1069
1070 <!--
1071 // IVirtualBoxErrorInfo
1072 /////////////////////////////////////////////////////////////////////////
1073 -->
1074
1075 <interface
1076 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1077 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1078 supportsErrorInfo="no"
1079 wsmap="managed"
1080 >
1081 <desc>
1082 The IVirtualBoxErrorInfo interface represents extended error information.
1083
1084 Extended error information can be set by VirtualBox components after
1085 unsuccessful or partially successful method invocation. This information
1086 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1087 and then shown to the client in addition to the plain 32-bit result code.
1088
1089 In MS COM, this interface extends the IErrorInfo interface,
1090 in XPCOM, it extends the nsIException interface. In both cases,
1091 it provides a set of common attributes to retrieve error
1092 information.
1093
1094 Sometimes invocation of some component's method may involve methods of
1095 other components that may also fail (independently of this method's
1096 failure), or a series of non-fatal errors may precede a fatal error that
1097 causes method failure. In cases like that, it may be desirable to preserve
1098 information about all errors happened during method invocation and deliver
1099 it to the caller. The <link to="#next"/> attribute is intended
1100 specifically for this purpose and allows to represent a chain of errors
1101 through a single IVirtualBoxErrorInfo object set after method invocation.
1102
1103 Note that errors are stored to a chain in the reverse order, i.e. the
1104 initial error object you query right after method invocation is the last
1105 error set by the callee, the object it points to in the @a next attribute
1106 is the previous error and so on, up to the first error (which is the last
1107 in the chain).
1108 </desc>
1109
1110 <attribute name="resultCode" type="long" readonly="yes">
1111 <desc>
1112 Result code of the error.
1113 Usually, it will be the same as the result code returned
1114 by the method that provided this error information, but not
1115 always. For example, on Win32, CoCreateInstance() will most
1116 likely return E_NOINTERFACE upon unsuccessful component
1117 instantiation attempt, but not the value the component factory
1118 returned. Value is typed 'long', not 'result',
1119 to make interface usable from scripting languages.
1120 <note>
1121 In MS COM, there is no equivalent.
1122 In XPCOM, it is the same as nsIException::result.
1123 </note>
1124 </desc>
1125 </attribute>
1126
1127 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1128 <desc>
1129 UUID of the interface that defined the error.
1130 <note>
1131 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1132 data type.
1133 In XPCOM, there is no equivalent.
1134 </note>
1135 </desc>
1136 </attribute>
1137
1138 <attribute name="component" type="wstring" readonly="yes">
1139 <desc>
1140 Name of the component that generated the error.
1141 <note>
1142 In MS COM, it is the same as IErrorInfo::GetSource.
1143 In XPCOM, there is no equivalent.
1144 </note>
1145 </desc>
1146 </attribute>
1147
1148 <attribute name="text" type="wstring" readonly="yes">
1149 <desc>
1150 Text description of the error.
1151 <note>
1152 In MS COM, it is the same as IErrorInfo::GetDescription.
1153 In XPCOM, it is the same as nsIException::message.
1154 </note>
1155 </desc>
1156 </attribute>
1157
1158 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1159 <desc>
1160 Next error object if there is any, or @c null otherwise.
1161 <note>
1162 In MS COM, there is no equivalent.
1163 In XPCOM, it is the same as nsIException::inner.
1164 </note>
1165 </desc>
1166 </attribute>
1167
1168 </interface>
1169
1170 <interface
1171 name="ILocalOwner" extends="$dispatched"
1172 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1173 >
1174 <desc>
1175 The ILocalOwner interface allows to register local objects
1176 (created without COM calls, but with new()).
1177 Once registered, calls to methods of such objects can be made
1178 from remote COM processes.
1179 The main usecase is the event callback implementation where
1180 API clients provide callback objects.
1181 </desc>
1182 <method name="setLocalObject">
1183 <desc>
1184 Set local object.
1185 </desc>
1186 <param name="object" type="$unknown" dir="in">
1187 <desc>Local object to forward requests to.
1188 If null, clears currently set local object.</desc>
1189 </param>
1190 </method>
1191 </interface>
1192
1193 <!--
1194 // IVirtualBox
1195 /////////////////////////////////////////////////////////////////////////
1196 -->
1197
1198 <interface
1199 name="IVirtualBoxCallback" extends="$unknown"
1200 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1201 wsmap="suppress"
1202 >
1203
1204 <method name="onMachineStateChange">
1205 <desc>
1206 The execution state of the given machine has changed.
1207 <see>IMachine::state</see>
1208 </desc>
1209 <param name="machineId" type="uuid" mod="string" dir="in">
1210 <desc>ID of the machine this event relates to.</desc>
1211 </param>
1212 <param name="state" type="MachineState" dir="in">
1213 <desc>New execution state.</desc>
1214 </param>
1215 </method>
1216
1217 <method name="onMachineDataChange">
1218 <desc>
1219 Any of the settings of the given machine has changed.
1220 </desc>
1221 <param name="machineId" type="uuid" mod="string" dir="in">
1222 <desc>ID of the machine this event relates to.</desc>
1223 </param>
1224 </method>
1225
1226 <method name="onExtraDataCanChange">
1227 <desc>
1228 Notification when someone tries to change extra data for
1229 either the given machine or (if @c null) global extra data.
1230 This gives the chance to veto against changes.
1231 </desc>
1232 <param name="machineId" type="uuid" mod="string" dir="in">
1233 <desc>
1234 ID of the machine this event relates to
1235 (@c null ID for global extra data change requests).
1236 </desc>
1237 </param>
1238 <param name="key" type="wstring" dir="in">
1239 <desc>
1240 Extra data key for the attempted write.
1241 </desc>
1242 </param>
1243 <param name="value" type="wstring" dir="in">
1244 <desc>
1245 Extra data value for the given key.
1246 </desc>
1247 </param>
1248 <param name="error" type="wstring" dir="out">
1249 <desc>
1250 Optional error message describing the reason of the
1251 veto (ignored if this notification returns @c true).
1252 </desc>
1253 </param>
1254 <param name="allowChange" type="boolean" dir="return">
1255 <desc>
1256 Flag to indicate whether the callee agrees (@c true)
1257 or vetoes against the change (@c false).
1258 </desc>
1259 </param>
1260 </method>
1261
1262 <method name="onExtraDataChange">
1263 <desc>
1264 Notification when machine specific or global extra data
1265 has changed.
1266 </desc>
1267 <param name="machineId" type="uuid" mod="string" dir="in">
1268 <desc>
1269 ID of the machine this event relates to.
1270 Null for global extra data changes.
1271 </desc>
1272 </param>
1273 <param name="key" type="wstring" dir="in">
1274 <desc>
1275 Extra data key that has changed.
1276 </desc>
1277 </param>
1278 <param name="value" type="wstring" dir="in">
1279 <desc>
1280 Extra data value for the given key.
1281 </desc>
1282 </param>
1283 </method>
1284
1285 <method name="onMediumRegistered">
1286 <desc>
1287 The given medium was registered or unregistered
1288 within this VirtualBox installation.
1289
1290 The @a mediumType parameter describes what type of
1291 medium the specified @a mediumId refers to. Possible
1292 values are:
1293
1294 <ul>
1295 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1296 that, if registered, can be obtained using the
1297 <link to="IVirtualBox::getHardDisk"/> call.</li>
1298 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1299 that, if registered, can be obtained using the
1300 <link to="IVirtualBox::getDVDImage"/> call.</li>
1301 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1302 that, if registered, can be obtained using the
1303 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1304 </ul>
1305
1306 Note that if this is a deregistration notification,
1307 there is no way to access the object representing the
1308 unregistered medium. It is supposed that the
1309 application will do required cleanup based on the
1310 @a mediumId value.
1311 </desc>
1312 <param name="mediumId" type="uuid" mod="string" dir="in">
1313 <desc>ID of the medium this event relates to.</desc>
1314 </param>
1315 <param name="mediumType" type="DeviceType" dir="in">
1316 <desc>Type of the medium this event relates to.</desc>
1317 </param>
1318 <param name="registered" type="boolean" dir="in">
1319 <desc>
1320 If @c true, the medium was registered, otherwise it was
1321 unregistered.
1322 </desc>
1323 </param>
1324 </method>
1325
1326 <method name="onMachineRegistered">
1327 <desc>
1328 The given machine was registered or unregistered
1329 within this VirtualBox installation.
1330 </desc>
1331 <param name="machineId" type="uuid" mod="string" dir="in">
1332 <desc>ID of the machine this event relates to.</desc>
1333 </param>
1334 <param name="registered" type="boolean" dir="in">
1335 <desc>
1336 If @c true, the machine was registered, otherwise it was
1337 unregistered.
1338 </desc>
1339 </param>
1340 </method>
1341
1342 <method name="onSessionStateChange">
1343 <desc>
1344 The state of the session for the given machine was changed.
1345 <see>IMachine::sessionState</see>
1346 </desc>
1347 <param name="machineId" type="uuid" mod="string" dir="in">
1348 <desc>ID of the machine this event relates to.</desc>
1349 </param>
1350 <param name="state" type="SessionState" dir="in">
1351 <desc>New session state.</desc>
1352 </param>
1353 </method>
1354
1355 <method name="onSnapshotTaken">
1356 <desc>
1357 A new snapshot of the machine has been taken.
1358 <see>ISnapshot</see>
1359 </desc>
1360 <param name="machineId" type="uuid" mod="string" dir="in">
1361 <desc>ID of the machine this event relates to.</desc>
1362 </param>
1363 <param name="snapshotId" type="uuid" mod="string" dir="in">
1364 <desc>ID of the new snapshot.</desc>
1365 </param>
1366 </method>
1367
1368 <method name="onSnapshotDiscarded">
1369 <desc>
1370 Snapshot of the given machine has been discarded.
1371
1372 <note>
1373 This notification is delivered <b>after</b> the snapshot
1374 object has been uninitialized on the server (so that any
1375 attempt to call its methods will return an error).
1376 </note>
1377
1378 <see>ISnapshot</see>
1379 </desc>
1380 <param name="machineId" type="uuid" mod="string" dir="in">
1381 <desc>ID of the machine this event relates to.</desc>
1382 </param>
1383 <param name="snapshotId" type="uuid" mod="string" dir="in">
1384 <desc>
1385 ID of the discarded snapshot. @c null means the current machine
1386 state has been discarded (restored from the current snapshot).
1387 </desc>
1388 </param>
1389 </method>
1390
1391 <method name="onSnapshotChange">
1392 <desc>
1393 Snapshot properties (name and/or description) have been changed.
1394 <see>ISnapshot</see>
1395 </desc>
1396 <param name="machineId" type="uuid" mod="string" dir="in">
1397 <desc>ID of the machine this event relates to.</desc>
1398 </param>
1399 <param name="snapshotId" type="uuid" mod="string" dir="in">
1400 <desc>ID of the changed snapshot.</desc>
1401 </param>
1402 </method>
1403
1404 <method name="onGuestPropertyChange">
1405 <desc>
1406 Notification when a guest property has changed.
1407 </desc>
1408 <param name="machineId" type="uuid" mod="string" dir="in">
1409 <desc>
1410 ID of the machine this event relates to.
1411 </desc>
1412 </param>
1413 <param name="name" type="wstring" dir="in">
1414 <desc>
1415 The name of the property that has changed.
1416 </desc>
1417 </param>
1418 <param name="value" type="wstring" dir="in">
1419 <desc>
1420 The new property value.
1421 </desc>
1422 </param>
1423 <param name="flags" type="wstring" dir="in">
1424 <desc>
1425 The new property flags.
1426 </desc>
1427 </param>
1428 </method>
1429
1430 </interface>
1431
1432 <interface
1433 name="IDHCPServer" extends="$unknown"
1434 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1435 wsmap="managed"
1436 >
1437 <desc>
1438 The IDHCPServer interface represents the vbox dhcp server configuration.
1439
1440 To enumerate all the dhcp servers on the host, use the
1441 <link to="IVirtualBox::DHCPServers"/> attribute.
1442 </desc>
1443
1444 <attribute name="enabled" type="boolean">
1445 <desc>
1446 specifies if the dhcp server is enabled
1447 </desc>
1448 </attribute>
1449
1450 <attribute name="IPAddress" type="wstring" readonly="yes">
1451 <desc>
1452 specifies server IP
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="networkMask" type="wstring" readonly="yes">
1457 <desc>
1458 specifies server network mask
1459 </desc>
1460 </attribute>
1461
1462 <attribute name="networkName" type="wstring" readonly="yes">
1463 <desc>
1464 specifies internal network name the server is used for
1465 </desc>
1466 </attribute>
1467
1468 <attribute name="lowerIP" type="wstring" readonly="yes">
1469 <desc>
1470 specifies from IP adrres in server address range
1471 </desc>
1472 </attribute>
1473
1474 <attribute name="upperIP" type="wstring" readonly="yes">
1475 <desc>
1476 specifies to IP adrres in server address range
1477 </desc>
1478 </attribute>
1479
1480 <method name="setConfiguration">
1481 <desc>
1482 configures the server
1483 <result name="E_INVALIDARG">
1484 invalid configuration supplied
1485 </result>
1486 </desc>
1487 <param name="IPAddress" type="wstring" dir="in">
1488 <desc>
1489 server IP address
1490 </desc>
1491 </param>
1492 <param name="networkMask" type="wstring" dir="in">
1493 <desc>
1494 server network mask
1495 </desc>
1496 </param>
1497 <param name="FromIPAddress" type="wstring" dir="in">
1498 <desc>
1499 server From IP address for address range
1500 </desc>
1501 </param>
1502 <param name="ToIPAddress" type="wstring" dir="in">
1503 <desc>
1504 server To IP address for address range
1505 </desc>
1506 </param>
1507 </method>
1508
1509 <method name="start">
1510 <desc>
1511 Starts DHCP server process.
1512 <result name="E_FAIL">
1513 Failed to start the process.
1514 </result>
1515 </desc>
1516 <param name="networkName" type="wstring" dir="in">
1517 <desc>
1518 Name of internal network DHCP server should attach to.
1519 </desc>
1520 </param>
1521 <param name="trunkName" type="wstring" dir="in">
1522 <desc>
1523 Name of internal network trunk.
1524 </desc>
1525 </param>
1526 <param name="trunkType" type="wstring" dir="in">
1527 <desc>
1528 Type of internal network trunk.
1529 </desc>
1530 </param>
1531 </method>
1532
1533 <method name="stop">
1534 <desc>
1535 Stops DHCP server process.
1536 <result name="E_FAIL">
1537 Failed to stop the process.
1538 </result>
1539 </desc>
1540 </method>
1541 </interface>
1542
1543 <interface
1544 name="IVirtualBox" extends="$dispatched"
1545 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1546 wsmap="managed"
1547 >
1548 <desc>
1549 The IVirtualBox interface represents the main interface exposed by the
1550 product that provides virtual machine management.
1551
1552 An instance of IVirtualBox is required for the product to do anything
1553 useful. Even though the interface does not expose this, internally,
1554 IVirtualBox is implemented as a singleton and actually lives in the
1555 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1556 IVirtualBox can track the state of all virtual machines on a particular
1557 host, regardless of which frontend started them.
1558
1559 To enumerate all the virtual machines on the host, use the
1560 <link to="IVirtualBox::machines"/> attribute.
1561 </desc>
1562
1563 <attribute name="version" type="wstring" readonly="yes">
1564 <desc>
1565 A string representing the version number of the product. The
1566 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1567 last number represents the build number and will frequently change.
1568 </desc>
1569 </attribute>
1570
1571 <attribute name="revision" type="unsigned long" readonly="yes">
1572 <desc>
1573 The internal build revision number of the product.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="packageType" type="wstring" readonly="yes">
1578 <desc>
1579 A string representing the package type of this product. The
1580 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1581 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1582 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1583 this.
1584 </desc>
1585 </attribute>
1586
1587 <attribute name="homeFolder" type="wstring" readonly="yes">
1588 <desc>
1589 Full path to the directory where the global settings file,
1590 <tt>VirtualBox.xml</tt>, is stored.
1591
1592 In this version of VirtualBox, the value of this property is
1593 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1594 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1595 as determined by the host OS), and cannot be changed.
1596
1597 This path is also used as the base to resolve relative paths in
1598 places where relative paths are allowed (unless otherwise
1599 expressly indicated).
1600 </desc>
1601 </attribute>
1602
1603 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1604 <desc>
1605 Full name of the global settings file.
1606 The value of this property corresponds to the value of
1607 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1608 </desc>
1609 </attribute>
1610
1611 <attribute name="host" type="IHost" readonly="yes">
1612 <desc>Associated host object.</desc>
1613 </attribute>
1614
1615 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1616 <desc>Associated system information object.</desc>
1617 </attribute>
1618
1619 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1620 <desc>
1621 Array of machine objects registered within this VirtualBox instance.
1622 </desc>
1623 </attribute>
1624
1625 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1626 <desc>
1627 Array of medium objects known to this VirtualBox installation.
1628
1629 This array contains only base media. All differencing
1630 media of the given base medium can be enumerated using
1631 <link to="IMedium::children"/>.
1632 </desc>
1633 </attribute>
1634
1635 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1636 <desc>
1637 Array of CD/DVD image objects registered with this VirtualBox instance.
1638 </desc>
1639 </attribute>
1640
1641 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1642 <desc>
1643 Array of floppy image objects registered with this VirtualBox instance.
1644 </desc>
1645 </attribute>
1646
1647 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1648
1649 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1650
1651 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1652 <desc>
1653 Collection of global shared folders. Global shared folders are
1654 available to all virtual machines.
1655
1656 New shared folders are added to the collection using
1657 <link to="#createSharedFolder"/>. Existing shared folders can be
1658 removed using <link to="#removeSharedFolder"/>.
1659
1660 <note>
1661 In the current version of the product, global shared folders are not
1662 implemented and therefore this collection is always empty.
1663 </note>
1664 </desc>
1665 </attribute>
1666
1667 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1668 <desc>
1669 Associated performance collector object.
1670 </desc>
1671 </attribute>
1672
1673 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1674 <desc>
1675 dhcp server settings.
1676 </desc>
1677 </attribute>
1678
1679 <method name="createMachine">
1680 <desc>
1681 Creates a new virtual machine.
1682
1683 The new machine is created unregistered, with the initial configuration
1684 set according to the specified guest OS type. A typical sequence of
1685 actions to create a new virtual machine is as follows:
1686
1687 <ol>
1688 <li>
1689 Call this method to have a new machine created. The returned machine
1690 object will be "mutable" allowing to change any machine property.
1691 </li>
1692
1693 <li>
1694 Configure the machine using the appropriate attributes and methods.
1695 </li>
1696
1697 <li>
1698 Call <link to="IMachine::saveSettings" /> to write the settings
1699 to the machine's XML settings file. The configuration of the newly
1700 created machine will not be saved to disk until this method is
1701 called.
1702 </li>
1703
1704 <li>
1705 Call <link to="#registerMachine" /> to add the machine to the list
1706 of machines known to VirtualBox.
1707 </li>
1708 </ol>
1709
1710 You should specify valid name for the newly created machine when calling
1711 this method. See the <link to="IMachine::name"/> attribute description
1712 for more details about the machine name.
1713
1714 The specified guest OS type identifier must match an ID of one of known
1715 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1716 array.
1717
1718 Every machine has a <i>settings file</i> that is used to store
1719 the machine configuration. This file is stored in a directory called the
1720 <i>machine settings subfolder</i>. Both the settings subfolder and file
1721 will have a name that corresponds to the name of the virtual machine.
1722 You can specify where to create the machine setting subfolder using the
1723 @a baseFolder argument. The base folder can be absolute (full path) or
1724 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1725 directory</link>.
1726
1727 If @a baseFolder is a @c null or empty string (which is recommended), the
1728 <link to="ISystemProperties::defaultMachineFolder">default machine
1729 settings folder</link> will be used as a base folder for the created
1730 machine. Otherwise the given base folder will be used. In either case,
1731 the full path to the resulting settings file has the following
1732 structure:
1733 <pre>
1734 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1735 </pre>
1736
1737 Note that if the resulting settings file already exists, this method
1738 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1739
1740 Optionally, you may specify an UUID of to assign to the created machine.
1741 However, this is not recommended and you should normally pass an empty
1742 (@c null) UUID to this method so that a new UUID will be automatically
1743 generated for every created machine. You can use UUID
1744 00000000-0000-0000-0000-000000000000 as @c null value.
1745
1746 <note>
1747 There is no way to change the name of the settings file or
1748 subfolder of the created machine directly.
1749 </note>
1750
1751 <result name="VBOX_E_OBJECT_NOT_FOUND">
1752 @a osTypeId is invalid.
1753 </result>
1754 <result name="VBOX_E_FILE_ERROR">
1755 Resulting settings file name is invalid or the settings file already
1756 exists or could not be created due to an I/O error.
1757 </result>
1758 <result name="E_INVALIDARG">
1759 @a name is empty or @c null.
1760 </result>
1761 </desc>
1762
1763 <param name="name" type="wstring" dir="in">
1764 <desc>Machine name.</desc>
1765 </param>
1766 <param name="osTypeId" type="wstring" dir="in">
1767 <desc>Guest OS Type ID.</desc>
1768 </param>
1769 <param name="baseFolder" type="wstring" dir="in">
1770 <desc>Base machine folder (optional).</desc>
1771 </param>
1772 <param name="id" type="uuid" mod="string" dir="in">
1773 <desc>Machine UUID (optional).</desc>
1774 </param>
1775 <param name="machine" type="IMachine" dir="return">
1776 <desc>Created machine object.</desc>
1777 </param>
1778 </method>
1779
1780 <method name="createLegacyMachine">
1781 <desc>
1782 Creates a new virtual machine in "legacy" mode, using the specified
1783 settings file to store machine settings.
1784
1785 As opposed to machines created by <link to="#createMachine"/>,
1786 the settings file of the machine created in "legacy" mode is not
1787 automatically renamed when the machine name is changed -- it will always
1788 remain the same as specified in this method call.
1789
1790 The specified settings file name can be absolute (full path) or relative
1791 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1792 directory</link>. If the file name doesn't contain an extension, the
1793 default extension (.xml) will be appended.
1794
1795 Note that the configuration of the newly created machine is not
1796 saved to disk (and therefore no settings file is created)
1797 until <link to="IMachine::saveSettings"/> is called. If the
1798 specified settings file already exists, this method
1799 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1800
1801 See <link to="#createMachine"/> for more information.
1802
1803 @deprecated This method may be removed later. Use <link
1804 to="IVirtualBox::createMachine"/> instead.
1805
1806 <note>
1807 There is no way to change the name of the settings file
1808 of the machine created in "legacy" mode.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 @a osTypeId is invalid.
1813 </result>
1814 <result name="VBOX_E_FILE_ERROR">
1815 @a settingsFile is invalid or the settings file already exists or
1816 could not be created due to an I/O error.
1817 </result>
1818 <result name="E_INVALIDARG">
1819 @a name or @a settingsFile is empty or @c null.
1820 </result>
1821 </desc>
1822
1823 <param name="name" type="wstring" dir="in">
1824 <desc>Machine name.</desc>
1825 </param>
1826 <param name="osTypeId" type="wstring" dir="in">
1827 <desc>Machine OS Type ID.</desc>
1828 </param>
1829 <param name="settingsFile" type="wstring" dir="in">
1830 <desc>Name of the machine settings file.</desc>
1831 </param>
1832 <param name="id" type="uuid" mod="string" dir="in">
1833 <desc>Machine UUID (optional).</desc>
1834 </param>
1835 <param name="machine" type="IMachine" dir="return">
1836 <desc>Created machine object.</desc>
1837 </param>
1838 </method>
1839
1840 <method name="openMachine">
1841 <desc>
1842 Opens a virtual machine from the existing settings file.
1843 The opened machine remains unregistered until you call
1844 <link to="#registerMachine"/>.
1845
1846 The specified settings file name can be absolute
1847 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1848 VirtualBox home directory</link>. This file must exist
1849 and must be a valid machine settings file whose contents
1850 will be used to construct the machine object.
1851
1852 @deprecated Will be removed soon.
1853 <result name="VBOX_E_FILE_ERROR">
1854 Settings file name invalid, not found or sharing violation.
1855 </result>
1856 </desc>
1857 <param name="settingsFile" type="wstring" dir="in">
1858 <desc>
1859 Name of the machine settings file.
1860 </desc>
1861 </param>
1862 <param name="machine" type="IMachine" dir="return">
1863 <desc>Opened machine object.</desc>
1864 </param>
1865 <note>
1866 <link to="IMachine::settingsModified"/> will return
1867 @c false for the created machine, until any of machine settings
1868 are changed.
1869 </note>
1870 </method>
1871
1872 <method name="registerMachine">
1873 <desc>
1874
1875 Registers the machine previously created using
1876 <link to="#createMachine"/> or opened using
1877 <link to="#openMachine"/> within this VirtualBox installation. After
1878 successful method invocation, the
1879 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1880 to all registered callbacks.
1881
1882 <note>
1883 This method implicitly calls <link to="IMachine::saveSettings"/>
1884 to save all current machine settings before registering it.
1885 </note>
1886
1887 <result name="VBOX_E_OBJECT_NOT_FOUND">
1888 No matching virtual machine found.
1889 </result>
1890 <result name="VBOX_E_INVALID_OBJECT_STATE">
1891 Virtual machine was not created within this VirtualBox instance.
1892 </result>
1893
1894 </desc>
1895 <param name="machine" type="IMachine" dir="in"/>
1896 </method>
1897
1898 <method name="getMachine">
1899 <desc>
1900 Attempts to find a virtual machine given its UUID.
1901 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1902 instead.
1903
1904 <result name="VBOX_E_OBJECT_NOT_FOUND">
1905 Could not find registered machine matching @a id.
1906 </result>
1907
1908 </desc>
1909 <param name="id" type="uuid" mod="string" dir="in"/>
1910 <param name="machine" type="IMachine" dir="return"/>
1911 </method>
1912
1913 <method name="findMachine">
1914 <desc>
1915 Attempts to find a virtual machine given its name.
1916 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1917 instead.
1918
1919 <result name="VBOX_E_OBJECT_NOT_FOUND">
1920 Could not find registered machine matching @a name.
1921 </result>
1922
1923 </desc>
1924 <param name="name" type="wstring" dir="in"/>
1925 <param name="machine" type="IMachine" dir="return"/>
1926 </method>
1927
1928 <method name="unregisterMachine">
1929 <desc>
1930
1931 Unregisters the machine previously registered using
1932 <link to="#registerMachine"/>. After successful method invocation, the
1933 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1934 to all registered callbacks.
1935
1936 <note>
1937 The specified machine must not be in the Saved state, have an open
1938 (or a spawning) direct session associated with it, have snapshots or
1939 have hard disks attached.
1940 </note>
1941
1942 <note>
1943 This method implicitly calls <link to="IMachine::saveSettings"/> to
1944 save all current machine settings before unregistering it.
1945 </note>
1946
1947 <note>
1948 If the given machine is inaccessible (see
1949 <link to="IMachine::accessible"/>), it will be unregistered and
1950 fully uninitialized right afterwards. As a result, the returned
1951 machine object will be unusable and an attempt to call
1952 <b>any</b> method will return the "Object not ready" error.
1953 </note>
1954
1955 <result name="VBOX_E_OBJECT_NOT_FOUND">
1956 Could not find registered machine matching @a id.
1957 </result>
1958 <result name="VBOX_E_INVALID_VM_STATE">
1959 Machine is in Saved state.
1960 </result>
1961 <result name="VBOX_E_INVALID_OBJECT_STATE">
1962 Machine has snapshot or open session or hard disk attached.
1963 </result>
1964
1965 </desc>
1966 <param name="id" type="uuid" mod="string" dir="in">
1967 <desc>UUID of the machine to unregister.</desc>
1968 </param>
1969 <param name="machine" type="IMachine" dir="return">
1970 <desc>Unregistered machine object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="createAppliance">
1975 <desc>
1976 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1977 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1978 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1979 </desc>
1980 <param name="appliance" type="IAppliance" dir="return">
1981 <desc>New appliance.</desc>
1982 </param>
1983 </method>
1984
1985 <method name="createHardDisk">
1986 <desc>
1987 Creates a new base medium object that will use the given storage
1988 format and location for medium data.
1989
1990 Note that the actual storage unit is not created by this method. In
1991 order to do it, and before you are able to attach the created medium
1992 to virtual machines, you must call one of the following methods to
1993 allocate a format-specific storage unit at the specified location:
1994 <ul>
1995 <li><link to="IMedium::createBaseStorage"/></li>
1996 <li><link to="IMedium::createDiffStorage"/></li>
1997 </ul>
1998
1999 Some medium attributes, such as <link to="IMedium::id"/>, may
2000 remain uninitialized until the medium storage unit is successfully
2001 created by one of the above methods.
2002
2003 After the storage unit is successfully created, the medium gets
2004 remembered by this VirtualBox installation and will be accessible
2005 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2006 methods. Remembered base medium are also returned as part of
2007 the <link to="#hardDisks"/> array. See IMedium for more details.
2008
2009 The list of all storage formats supported by this VirtualBox
2010 installation can be obtained using
2011 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2012 attribute is empty or @c null then the default storage format
2013 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2014 be used for creating a storage unit of the medium.
2015
2016 Note that the format of the location string is storage format specific.
2017 See <link to="IMedium::location"/>, IMedium and
2018 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2019
2020 <result name="VBOX_E_OBJECT_NOT_FOUND">
2021 @a format identifier is invalid. See
2022 <link to="ISystemProperties::mediumFormats"/>.
2023 </result>
2024 <result name="VBOX_E_FILE_ERROR">
2025 @a location is a not valid file name (for file-based formats only).
2026 </result>
2027 </desc>
2028 <param name="format" type="wstring" dir="in">
2029 <desc>
2030 Identifier of the storage format to use for the new medium.
2031 </desc>
2032 </param>
2033 <param name="location" type="wstring" dir="in">
2034 <desc>
2035 Location of the storage unit for the new medium.
2036 </desc>
2037 </param>
2038 <param name="medium" type="IMedium" dir="return">
2039 <desc>Created medium object.</desc>
2040 </param>
2041 </method>
2042
2043 <method name="openHardDisk">
2044 <desc>
2045 Opens a medium from an existing location, optionally replacing
2046 the image UUID and/or parent UUID.
2047
2048 After the medium is successfully opened by this method, it gets
2049 remembered by (known to) this VirtualBox installation and will be
2050 accessible through <link to="#getHardDisk"/> and
2051 <link to="#findHardDisk"/> methods. Remembered base media
2052 are also returned as part of the <link to="#hardDisks"/> array and can
2053 be attached to virtual machines. See IMedium for more details.
2054
2055 If a differencing medium is to be opened by this method, the
2056 operation will succeed only if its parent medium and all ancestors,
2057 if any, are already known to this VirtualBox installation (for example,
2058 were opened by this method before).
2059
2060 This method tries to guess the storage format of the specified medium
2061 by reading medium data at the specified location.
2062
2063 If @a write is ReadWrite (which it should be), the image is opened for
2064 read/write access and must have according permissions, as VirtualBox
2065 may actually write status information into the disk's metadata sections.
2066
2067 Note that write access is required for all typical image usage in VirtualBox,
2068 since VirtualBox may need to write metadata such as a UUID into the image.
2069 The only exception is opening a source image temporarily for copying and
2070 cloning when the image will quickly be closed again.
2071
2072 Note that the format of the location string is storage format specific.
2073 See <link to="IMedium::location"/>, IMedium and
2074 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2075
2076 <result name="VBOX_E_FILE_ERROR">
2077 Invalid medium storage file location or could not find the medium
2078 at the specified location.
2079 </result>
2080 <result name="VBOX_E_IPRT_ERROR">
2081 Could not get medium storage format.
2082 </result>
2083 <result name="E_INVALIDARG">
2084 Invalid medium storage format.
2085 </result>
2086
2087 </desc>
2088 <param name="location" type="wstring" dir="in">
2089 <desc>
2090 Location of the storage unit that contains medium data in one of
2091 the supported storage formats.
2092 </desc>
2093 </param>
2094 <param name="accessMode" type="AccessMode" dir="in">
2095 <desc>
2096 Determines whether to open the image in read/write or read-only mode.
2097 </desc>
2098 </param>
2099 <param name="setImageId" type="boolean" dir="in">
2100 <desc>
2101 Select whether a new image UUID is set or not.
2102 </desc>
2103 </param>
2104 <param name="imageId" type="uuid" mod="string" dir="in">
2105 <desc>
2106 New UUID for the image. If an empty string is passed, then a new
2107 UUID is automatically created. Specifying a zero UUIDs is not valid.
2108 </desc>
2109 </param>
2110 <param name="setParentId" type="boolean" dir="in">
2111 <desc>
2112 Select whether a new parent UUID is set or not.
2113 </desc>
2114 </param>
2115 <param name="parentId" type="uuid" mod="string" dir="in">
2116 <desc>
2117 New parent UUID for the image. If an empty string is passed, then a
2118 new UUID is automatically created, provided @a setParentId is
2119 @c true. A zero UUID is valid.
2120 </desc>
2121 </param>
2122 <param name="medium" type="IMedium" dir="return">
2123 <desc>Opened medium object.</desc>
2124 </param>
2125 </method>
2126
2127 <method name="getHardDisk" const="yes">
2128 <desc>
2129 Returns a medium with the given UUID.
2130
2131 The medium with the given UUID must be known to this VirtualBox
2132 installation, i.e. it must be previously created by
2133 <link to="#createHardDisk"/> or opened by <link
2134 to="#openHardDisk"/>, or attached to some known virtual machine.
2135
2136 <result name="VBOX_E_OBJECT_NOT_FOUND">
2137 No medium object matching @a id found.
2138 </result>
2139
2140 </desc>
2141 <param name="id" type="uuid" mod="string" dir="in">
2142 <desc>UUID of the medium to look for.</desc>
2143 </param>
2144 <param name="medium" type="IMedium" dir="return">
2145 <desc>Found medium object.</desc>
2146 </param>
2147 </method>
2148
2149 <method name="findHardDisk">
2150 <desc>
2151 Returns a medium that uses the given location to store medium data.
2152
2153 The given medium must be known to this VirtualBox installation, i.e.
2154 it must be previously created by
2155 <link to="#createHardDisk"/> or opened by <link
2156 to="#openHardDisk"/>, or attached to some known virtual machine.
2157
2158 The search is done by comparing the value of the @a location argument to
2159 the <link to="IMedium::location"/> attribute of each known medium.
2160
2161 For locations represented by file names in the host's file system, the
2162 requested location can be a path relative to the
2163 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2164 only a file name without any path is given, the
2165 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2166 folder</link> will be prepended to the file name before searching. Note
2167 that on case sensitive file systems, a case sensitive comparison is
2168 performed, otherwise the case of symbols in the file path is ignored.
2169
2170 <result name="VBOX_E_OBJECT_NOT_FOUND">
2171 No medium object matching @a location found.
2172 </result>
2173
2174 </desc>
2175 <param name="location" type="wstring" dir="in">
2176 <desc>Location string to search for.</desc>
2177 </param>
2178 <param name="medium" type="IMedium" dir="return">
2179 <desc>Found medium object.</desc>
2180 </param>
2181 </method>
2182
2183 <method name="openDVDImage">
2184 <desc>
2185 Opens a CD/DVD image contained in the specified file of the supported
2186 format and assigns it the given UUID.
2187
2188 After the image is successfully opened by this method, it gets
2189 remembered by (known to) this VirtualBox installation and will be
2190 accessible through <link to="#getDVDImage"/> and
2191 <link to="#findDVDImage"/> methods. Remembered images are also
2192 returned as part of the <link to="#DVDImages"/> array and can be mounted
2193 to virtual machines. See IMedium for more details.
2194
2195 See <link to="IMedium::location"/> to get more details about the format
2196 of the location string.
2197
2198 <note>
2199 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2200 </note>
2201
2202 <result name="VBOX_E_FILE_ERROR">
2203 Invalid CD/DVD image file location or could not find the CD/DVD
2204 image at the specified location.
2205 </result>
2206 <result name="VBOX_E_INVALID_OBJECT_STATE">
2207 CD/DVD image already exists in the media registry.
2208 </result>
2209
2210 </desc>
2211 <param name="location" type="wstring" dir="in">
2212 <desc>
2213 Full path to the file that contains a valid CD/DVD image.
2214 </desc>
2215 </param>
2216 <param name="id" type="uuid" mod="string" dir="in">
2217 <desc>
2218 UUID to assign to the given image within this VirtualBox installation.
2219 If an empty (@c null) UUID is specified, the system will randomly
2220 generate a new UUID.
2221 </desc>
2222 </param>
2223 <param name="image" type="IMedium" dir="return">
2224 <desc>Opened CD/DVD image object.</desc>
2225 </param>
2226 </method>
2227
2228 <method name="getDVDImage">
2229 <desc>
2230 Returns a CD/DVD image with the given UUID.
2231
2232 The image with the given UUID must be known to this VirtualBox
2233 installation, i.e. it must be previously opened by <link
2234 to="#openDVDImage"/>, or mounted to some known virtual machine.
2235
2236 <result name="VBOX_E_OBJECT_NOT_FOUND">
2237 No matching DVD image found in the media registry.
2238 </result>
2239
2240 </desc>
2241 <param name="id" type="uuid" mod="string" dir="in">
2242 <desc>UUID of the image to look for.</desc>
2243 </param>
2244 <param name="image" type="IMedium" dir="return">
2245 <desc>Found CD/DVD image object.</desc>
2246 </param>
2247 </method>
2248
2249 <method name="findDVDImage">
2250 <desc>
2251 Returns a CD/DVD image with the given image location.
2252
2253 The image with the given UUID must be known to this VirtualBox
2254 installation, i.e. it must be previously opened by <link
2255 to="#openDVDImage"/>, or mounted to some known virtual machine.
2256
2257 The search is done by comparing the value of the @a location argument to
2258 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2259
2260 The requested location can be a path relative to the
2261 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2262 only a file name without any path is given, the
2263 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2264 folder</link> will be prepended to the file name before searching. Note
2265 that on case sensitive file systems, a case sensitive comparison is
2266 performed, otherwise the case in the file path is ignored.
2267
2268 <result name="VBOX_E_FILE_ERROR">
2269 Invalid image file location.
2270 </result>
2271 <result name="VBOX_E_OBJECT_NOT_FOUND">
2272 No matching DVD image found in the media registry.
2273 </result>
2274
2275 </desc>
2276 <param name="location" type="wstring" dir="in">
2277 <desc>CD/DVD image file path to look for.</desc>
2278 </param>
2279 <param name="image" type="IMedium" dir="return">
2280 <desc>Found CD/DVD image object.</desc>
2281 </param>
2282 </method>
2283
2284 <method name="openFloppyImage">
2285 <desc>
2286 Opens a floppy image contained in the specified file of the supported
2287 format and assigns it the given UUID.
2288
2289 After the image is successfully opened by this method, it gets
2290 remembered by (known to) this VirtualBox installation and will be
2291 accessible through <link to="#getFloppyImage"/> and
2292 <link to="#findFloppyImage"/> methods. Remembered images are also
2293 returned as part of the <link to="#floppyImages"/> array and can be
2294 mounted to virtual machines. See IMedium for more details.
2295
2296 See <link to="IMedium::location"/> to get more details about the format
2297 of the location string.
2298
2299 <result name="VBOX_E_FILE_ERROR">
2300 Invalid floppy image file location or could not find the floppy
2301 image at the specified location.
2302 </result>
2303 <result name="VBOX_E_INVALID_OBJECT_STATE">
2304 Floppy image already exists in the media registry.
2305 </result>
2306
2307 <note>
2308 Currently, only raw floppy images are supported by VirtualBox.
2309 </note>
2310 </desc>
2311 <param name="location" type="wstring" dir="in">
2312 <desc>
2313 Full path to the file that contains a valid floppy image.
2314 </desc>
2315 </param>
2316 <param name="id" type="uuid" mod="string" dir="in">
2317 <desc>
2318 UUID to assign to the given image file within this VirtualBox
2319 installation. If an empty (@c null) UUID is specified, the system will
2320 randomly generate a new UUID.
2321 </desc>
2322 </param>
2323 <param name="image" type="IMedium" dir="return">
2324 <desc>Opened floppy image object.</desc>
2325 </param>
2326 </method>
2327
2328 <method name="getFloppyImage">
2329 <desc>
2330 Returns a floppy image with the given UUID.
2331
2332 The image with the given UUID must be known to this VirtualBox
2333 installation, i.e. it must be previously opened by <link
2334 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2335
2336 <result name="VBOX_E_OBJECT_NOT_FOUND">
2337 No matching floppy image found in the media registry.
2338 </result>
2339
2340 </desc>
2341 <param name="id" type="uuid" mod="string" dir="in">
2342 <desc>UUID of the image to look for.</desc>
2343 </param>
2344 <param name="image" type="IMedium" dir="return">
2345 <desc>Found floppy image object.</desc>
2346 </param>
2347 </method>
2348
2349 <method name="findFloppyImage">
2350 <desc>
2351 Returns a floppy image with the given image location.
2352
2353 The image with the given UUID must be known to this VirtualBox
2354 installation, i.e. it must be previously opened by <link
2355 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2356
2357 The search is done by comparing the value of the @a location argument to
2358 the <link to="IMedium::location"/> attribute of each known floppy image.
2359
2360 The requested location can be a path relative to the
2361 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2362 only a file name without any path is given, the
2363 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2364 folder</link> will be prepended to the file name before searching. Note
2365 that on case sensitive file systems, a case sensitive comparison is
2366 performed, otherwise the case of symbols in the file path is ignored.
2367
2368 <result name="VBOX_E_FILE_ERROR">
2369 Invalid image file location.
2370 </result>
2371 <result name="VBOX_E_OBJECT_NOT_FOUND">
2372 No matching floppy image found in the media registry.
2373 </result>
2374
2375 </desc>
2376 <param name="location" type="wstring" dir="in">
2377 <desc>Floppy image file path to look for.</desc>
2378 </param>
2379 <param name="image" type="IMedium" dir="return">
2380 <desc>Found floppy image object.</desc>
2381 </param>
2382 </method>
2383
2384 <method name="getGuestOSType">
2385 <desc>
2386 Returns an object describing the specified guest OS type.
2387
2388 The requested guest OS type is specified using a string which is a
2389 mnemonic identifier of the guest operating system, such as
2390 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2391 particular virtual machine can be read or set using the
2392 <link to="IMachine::OSTypeId"/> attribute.
2393
2394 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2395 available guest OS type objects. Each object has an
2396 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2397 the guest OS this object describes.
2398
2399 <result name="E_INVALIDARG">
2400 @a id is not a valid Guest OS type.
2401 </result>
2402
2403 </desc>
2404 <param name="id" type="uuid" mod="string" dir="in">
2405 <desc>Guest OS type ID string.</desc>
2406 </param>
2407 <param name="type" type="IGuestOSType" dir="return">
2408 <desc>Guest OS type object.</desc>
2409 </param>
2410 </method>
2411
2412 <method name="createSharedFolder">
2413 <desc>
2414 Creates a new global shared folder by associating the given logical
2415 name with the given host path, adds it to the collection of shared
2416 folders and starts sharing it. Refer to the description of
2417 <link to="ISharedFolder"/> to read more about logical names.
2418 <note>
2419 In the current implementation, this operation is not
2420 implemented.
2421 </note>
2422 </desc>
2423 <param name="name" type="wstring" dir="in">
2424 <desc>Unique logical name of the shared folder.</desc>
2425 </param>
2426 <param name="hostPath" type="wstring" dir="in">
2427 <desc>Full path to the shared folder in the host file system.</desc>
2428 </param>
2429 <param name="writable" type="boolean" dir="in">
2430 <desc>Whether the share is writable or readonly</desc>
2431 </param>
2432 </method>
2433
2434 <method name="removeSharedFolder">
2435 <desc>
2436 Removes the global shared folder with the given name previously
2437 created by <link to="#createSharedFolder"/> from the collection of
2438 shared folders and stops sharing it.
2439 <note>
2440 In the current implementation, this operation is not
2441 implemented.
2442 </note>
2443 </desc>
2444 <param name="name" type="wstring" dir="in">
2445 <desc>Logical name of the shared folder to remove.</desc>
2446 </param>
2447 </method>
2448
2449 <method name="getExtraDataKeys">
2450 <desc>
2451 Returns an array representing the global extra data keys which currently
2452 have values defined.
2453 </desc>
2454 <param name="value" type="wstring" dir="return" safearray="yes">
2455 <desc>Array of extra data keys.</desc>
2456 </param>
2457 </method>
2458
2459 <method name="getExtraData">
2460 <desc>
2461 Returns associated global extra data.
2462
2463 If the requested data @a key does not exist, this function will
2464 succeed and return an empty string in the @a value argument.
2465
2466 <result name="VBOX_E_FILE_ERROR">
2467 Settings file not accessible.
2468 </result>
2469 <result name="VBOX_E_XML_ERROR">
2470 Could not parse the settings file.
2471 </result>
2472
2473 </desc>
2474 <param name="key" type="wstring" dir="in">
2475 <desc>Name of the data key to get.</desc>
2476 </param>
2477 <param name="value" type="wstring" dir="return">
2478 <desc>Value of the requested data key.</desc>
2479 </param>
2480 </method>
2481
2482 <method name="setExtraData">
2483 <desc>
2484 Sets associated global extra data.
2485
2486 If you pass @c null or empty string as a key @a value, the given @a key
2487 will be deleted.
2488
2489 <note>
2490 Before performing the actual data change, this method will ask all
2491 registered callbacks using the
2492 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2493 notification for a permission. If one of the callbacks refuses the
2494 new value, the change will not be performed.
2495 </note>
2496 <note>
2497 On success, the
2498 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2499 is called to inform all registered callbacks about a successful data
2500 change.
2501 </note>
2502
2503 <result name="VBOX_E_FILE_ERROR">
2504 Settings file not accessible.
2505 </result>
2506 <result name="VBOX_E_XML_ERROR">
2507 Could not parse the settings file.
2508 </result>
2509 <result name="E_ACCESSDENIED">
2510 Modification request refused.
2511 </result>
2512
2513 </desc>
2514 <param name="key" type="wstring" dir="in">
2515 <desc>Name of the data key to set.</desc>
2516 </param>
2517 <param name="value" type="wstring" dir="in">
2518 <desc>Value to assign to the key.</desc>
2519 </param>
2520 </method>
2521
2522 <method name="openSession">
2523 <desc>
2524 Opens a new direct session with the given virtual machine.
2525
2526 A direct session acts as a local lock on the given VM.
2527 There can be only one direct session open at a time for every
2528 virtual machine, protecting the VM from being manipulated by
2529 conflicting actions from different processes. Only after a
2530 direct session has been opened, one can change all VM settings
2531 and execute the VM in the process space of the session object.
2532
2533 Sessions therefore can be compared to mutex semaphores that
2534 lock a given VM for modification and execution.
2535 See <link to="ISession">ISession</link> for details.
2536
2537 <note>Unless you are writing a new VM frontend, you will not
2538 want to execute a VM in the current process. To spawn a new
2539 process that executes a VM, use
2540 <link to="IVirtualBox::openRemoteSession" />
2541 instead.</note>
2542
2543 Upon successful return, the session object can be used to
2544 get access to the machine and to the VM console.
2545
2546 In VirtualBox terminology, the machine becomes "mutable" after
2547 a session has been opened. Note that the "mutable" machine
2548 object, on which you may invoke IMachine methods to change its
2549 settings, will be a different object from the immutable IMachine
2550 objects returned by various IVirtualBox methods. To obtain a
2551 mutable IMachine object (upon which you can invoke settings methods),
2552 use the <link to="ISession::machine" /> attribute.
2553
2554 One must always call <link to="ISession::close" /> to release the
2555 lock on the machine, or the machine's state will eventually be
2556 set to "Aborted".
2557
2558 In other words, to change settings on a machine, the following
2559 sequence is typically performed:
2560
2561 <ol>
2562 <li>Call this method (openSession) to have a machine locked for
2563 the current session.</li>
2564
2565 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2566
2567 <li>Change the settings of the machine.</li>
2568
2569 <li>Call <link to="IMachine::saveSettings" />.</li>
2570
2571 <li>Close the session by calling <link to="ISession::close"/>.</li>
2572 </ol>
2573
2574 <result name="E_UNEXPECTED">
2575 Virtual machine not registered.
2576 </result>
2577 <result name="E_ACCESSDENIED">
2578 Process not started by OpenRemoteSession.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No matching virtual machine found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_VM_ERROR">
2587 Failed to assign machine to session.
2588 </result>
2589
2590 </desc>
2591 <param name="session" type="ISession" dir="in">
2592 <desc>
2593 Session object that will represent the opened session after
2594 successful method invocation. This object must not represent
2595 the already open session.
2596 <note>
2597 This session will be automatically closed if the
2598 VirtualBox server is terminated for some reason.
2599 </note>
2600 </desc>
2601 </param>
2602 <param name="machineId" type="uuid" mod="string" dir="in">
2603 <desc>ID of the virtual machine to open a session with.</desc>
2604 </param>
2605 </method>
2606
2607 <method name="openRemoteSession">
2608 <desc>
2609 Spawns a new process that executes a virtual machine (called a
2610 "remote session").
2611
2612 Opening a remote session causes the VirtualBox server to start a new
2613 process that opens a direct session with the given VM. As a result, the
2614 VM is locked by that direct session in the new process, preventing
2615 conflicting changes from other processes. Since sessions act as locks
2616 that prevent conflicting changes, one cannot open a remote session
2617 for a VM that already has another open session (direct or remote), or
2618 is currently in the process of opening one (see <link
2619 to="IMachine::sessionState"/>).
2620
2621 While the remote session still provides some level of control over the
2622 VM execution to the caller (using the <link to="IConsole" /> interface),
2623 not all VM settings are available for modification within the remote
2624 session context.
2625
2626 This operation can take some time (a new VM is started in a new process,
2627 for which memory and other resources need to be set up). Because of this,
2628 an <link to="IProgress" /> is returned to allow the caller to wait for this
2629 asynchronous operation to be completed. Until then, the remote session
2630 object remains in the closed state, and accessing the machine or its
2631 console through it is invalid. It is recommended to use
2632 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2633 completion.
2634
2635 As with all <link to="ISession" /> objects, it is recommended to call
2636 <link to="ISession::close" /> on the local session object once openRemoteSession()
2637 has been called. However, the session's state (see <link to="ISession::state" />)
2638 will not return to "Closed" until the remote session has also closed (i.e.
2639 until the VM is no longer running). In that case, however, the state of
2640 the session will automatically change back to "Closed".
2641
2642 Currently supported session types (values of the @a type
2643 argument) are:
2644 <ul>
2645 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2646 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2647 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2648 </ul>
2649
2650 The @a environment argument is a string containing definitions of
2651 environment variables in the following format:
2652 @code
2653 NAME[=VALUE]\n
2654 NAME[=VALUE]\n
2655 ...
2656 @endcode
2657 where <tt>\\n</tt> is the new line character. These environment
2658 variables will be appended to the environment of the VirtualBox server
2659 process. If an environment variable exists both in the server process
2660 and in this list, the value from this list takes precedence over the
2661 server's variable. If the value of the environment variable is
2662 omitted, this variable will be removed from the resulting environment.
2663 If the environment string is @c null or empty, the server environment
2664 is inherited by the started process as is.
2665
2666 <see>openExistingSession</see>
2667
2668 <result name="E_UNEXPECTED">
2669 Virtual machine not registered.
2670 </result>
2671 <result name="E_INVALIDARG">
2672 Invalid session type @a type.
2673 </result>
2674 <result name="VBOX_E_OBJECT_NOT_FOUND">
2675 No machine matching @a machineId found.
2676 </result>
2677 <result name="VBOX_E_INVALID_OBJECT_STATE">
2678 Session already open or being opened.
2679 </result>
2680 <result name="VBOX_E_IPRT_ERROR">
2681 Launching process for machine failed.
2682 </result>
2683 <result name="VBOX_E_VM_ERROR">
2684 Failed to assign machine to session.
2685 </result>
2686
2687 </desc>
2688 <param name="session" type="ISession" dir="in">
2689 <desc>
2690 Session object that will represent the opened remote session
2691 after successful method invocation (this object must not
2692 represent an already open session).
2693 </desc>
2694 </param>
2695 <param name="machineId" type="uuid" mod="string" dir="in">
2696 <desc>ID of the virtual machine to open a session with.</desc>
2697 </param>
2698 <param name="type" type="wstring" dir="in">
2699 <desc>
2700 Type of the remote session (case sensitive).
2701 </desc>
2702 </param>
2703 <param name="environment" type="wstring" dir="in">
2704 <desc>
2705 Environment to pass to the opened session.
2706 </desc>
2707 </param>
2708 <param name="progress" type="IProgress" dir="return">
2709 <desc>Progress object to track the operation completion.</desc>
2710 </param>
2711 </method>
2712
2713 <method name="openExistingSession">
2714 <desc>
2715 Opens a new remote session with the virtual machine for
2716 which a direct session is already open.
2717
2718 The remote session provides some level of control over the VM
2719 execution (using the IConsole interface) to the caller; however,
2720 within the remote session context, not all VM settings are available
2721 for modification.
2722
2723 As opposed to <link to="#openRemoteSession"/>, the number of
2724 remote sessions opened this way is not limited by the API
2725
2726 <note>
2727 It is an error to open a remote session with the machine that
2728 doesn't have an open direct session.
2729 </note>
2730
2731 <result name="E_UNEXPECTED">
2732 Virtual machine not registered.
2733 </result>
2734 <result name="VBOX_E_OBJECT_NOT_FOUND">
2735 No machine matching @a machineId found.
2736 </result>
2737 <result name="VBOX_E_INVALID_OBJECT_STATE">
2738 Session already open or being opened.
2739 </result>
2740 <result name="VBOX_E_INVALID_SESSION_STATE">
2741 Direct session state not Open.
2742 </result>
2743 <result name="VBOX_E_VM_ERROR">
2744 Failed to get console object from direct session or assign
2745 machine to session.
2746 </result>
2747
2748 <see>openRemoteSession</see>
2749 </desc>
2750 <param name="session" type="ISession" dir="in">
2751 <desc>
2752 Session object that will represent the open remote session
2753 after successful method invocation. This object must not
2754 represent an already open session.
2755 <note>
2756 This session will be automatically closed when the peer
2757 (direct) session dies or gets closed.
2758 </note>
2759 </desc>
2760 </param>
2761 <param name="machineId" type="uuid" mod="string" dir="in">
2762 <desc>ID of the virtual machine to open a session with.</desc>
2763 </param>
2764 </method>
2765
2766 <method name="registerCallback">
2767 <desc>
2768 Registers a new global VirtualBox callback. The methods of the given
2769 callback object will be called by VirtualBox when an appropriate
2770 event occurs.
2771
2772 <result name="E_INVALIDARG">
2773 A @c null callback cannot be registered.
2774 </result>
2775
2776 </desc>
2777 <param name="callback" type="IVirtualBoxCallback" dir="in">
2778 <desc>Callback object to register.</desc>
2779 </param>
2780 </method>
2781
2782 <method name="unregisterCallback">
2783 <desc>
2784 Unregisters the previously registered global VirtualBox callback.
2785
2786 <result name="E_INVALIDARG">
2787 Specified @a callback not registered.
2788 </result>
2789
2790 </desc>
2791 <param name="callback" type="IVirtualBoxCallback" dir="in">
2792 <desc>Callback object to unregister.</desc>
2793 </param>
2794 </method>
2795
2796 <method name="waitForPropertyChange">
2797 <desc>
2798 Blocks the caller until any of the properties represented by the
2799 @a what argument changes the value or until the given timeout interval
2800 expires.
2801
2802 The @a what argument is a comma separated list of property masks that
2803 describe properties the caller is interested in. The property mask is
2804 a string in the following format:
2805
2806 <pre>
2807 [[group.]subgroup.]name
2808 </pre>
2809
2810 where @c name is the property name and @c group, @c subgroup are zero
2811 or more property group specifiers. Each element (group or name) in
2812 the property mask may be either a Latin string or an asterisk symbol
2813 (@c "*") which is used to match any string for the given element. A
2814 property mask that doesn't contain asterisk symbols represents a
2815 single fully qualified property name.
2816
2817 Groups in the fully qualified property name go from more generic (the
2818 left-most part) to more specific (the right-most part). The first
2819 element is usually a name of the object the property belongs to. The
2820 second element may be either a property name, or a child object name,
2821 or an index if the preceding element names an object which is one of
2822 many objects of the same type. This way, property names form a
2823 hierarchy of properties. Here are some examples of property names:
2824
2825 <table>
2826 <tr>
2827 <td><tt>VirtualBox.version</tt></td>
2828 <td><link to="IVirtualBox::version"/> property</td>
2829 </tr>
2830 <tr>
2831 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2832 <td><link to="IMachine::name"/> property of the machine with the
2833 given UUID</td>
2834 </tr>
2835 </table>
2836
2837 Most property names directly correspond to the properties of objects
2838 (components) provided by the VirtualBox library and may be used to
2839 track changes to these properties. However, there may be
2840 pseudo-property names that don't correspond to any existing object's
2841 property directly, as well as there may be object properties that
2842 don't have a corresponding property name that is understood by this
2843 method, and therefore changes to such properties cannot be
2844 tracked. See individual object's property descriptions to get a
2845 fully qualified property name that can be used with this method (if
2846 any).
2847
2848 There is a special property mask @c "*" (i.e. a string consisting of a
2849 single asterisk symbol) that can be used to match all properties.
2850 Below are more examples of property masks:
2851
2852 <table>
2853 <tr>
2854 <td><tt>VirtualBox.*</tt></td>
2855 <td>Track all properties of the VirtualBox object</td>
2856 </tr>
2857 <tr>
2858 <td><tt>Machine.*.name</tt></td>
2859 <td>Track changes to the <link to="IMachine::name"/> property of
2860 all registered virtual machines</td>
2861 </tr>
2862 </table>
2863
2864 <note>
2865 This function is not implemented in the current version of the
2866 product.
2867 </note>
2868 </desc>
2869 <param name="what" type="wstring" dir="in">
2870 <desc>Comma separated list of property masks.</desc>
2871 </param>
2872 <param name="timeout" type="unsigned long" dir="in">
2873 <desc>
2874 Wait timeout in milliseconds.
2875 Specify -1 for an indefinite wait.
2876 </desc>
2877 </param>
2878 <param name="changed" type="wstring" dir="out">
2879 <desc>
2880 Comma separated list of properties that have been changed and caused
2881 this method to return to the caller.
2882 </desc>
2883 </param>
2884 <param name="values" type="wstring" dir="out">
2885 <desc>Reserved, not currently used.</desc>
2886 </param>
2887 </method>
2888
2889 <!--method name="createDHCPServerForInterface">
2890 <desc>
2891 Creates a dhcp server settings to be used for the given interface
2892 <result name="E_INVALIDARG">
2893 Host network interface @a name already exists.
2894 </result>
2895 </desc>
2896 <param name="interface" type="IHostNetworkInterface" dir="in">
2897 <desc>Network Interface</desc>
2898 </param>
2899 <param name="server" type="IDHCPServer" dir="out">
2900 <desc>Dhcp server settings</desc>
2901 </param>
2902 </method-->
2903
2904 <method name="createDHCPServer">
2905 <desc>
2906 Creates a dhcp server settings to be used for the given internal network name
2907 <result name="E_INVALIDARG">
2908 Host network interface @a name already exists.
2909 </result>
2910 </desc>
2911 <param name="name" type="wstring" dir="in">
2912 <desc>server name</desc>
2913 </param>
2914 <param name="server" type="IDHCPServer" dir="return">
2915 <desc>Dhcp server settings</desc>
2916 </param>
2917 </method>
2918
2919 <method name="findDHCPServerByNetworkName">
2920 <desc>
2921 Searches a dhcp server settings to be used for the given internal network name
2922 <result name="E_INVALIDARG">
2923 Host network interface @a name already exists.
2924 </result>
2925
2926 </desc>
2927 <param name="name" type="wstring" dir="in">
2928 <desc>server name</desc>
2929 </param>
2930 <param name="server" type="IDHCPServer" dir="return">
2931 <desc>Dhcp server settings</desc>
2932 </param>
2933 </method>
2934
2935 <!--method name="findDHCPServerForInterface">
2936 <desc>
2937 Searches a dhcp server settings to be used for the given interface
2938 <result name="E_INVALIDARG">
2939 Host network interface @a name already exists.
2940 </result>
2941 </desc>
2942 <param name="interface" type="IHostNetworkInterface" dir="in">
2943 <desc>Network Interface</desc>
2944 </param>
2945 <param name="server" type="IDHCPServer" dir="out">
2946 <desc>Dhcp server settings</desc>
2947 </param>
2948 </method-->
2949
2950 <method name="removeDHCPServer">
2951 <desc>
2952 Removes the dhcp server settings
2953 <result name="E_INVALIDARG">
2954 Host network interface @a name already exists.
2955 </result>
2956 </desc>
2957 <param name="server" type="IDHCPServer" dir="in">
2958 <desc>Dhcp server settings to be removed</desc>
2959 </param>
2960 </method>
2961
2962 </interface>
2963
2964 <!--
2965 // IVFSExplorer
2966 /////////////////////////////////////////////////////////////////////////
2967 -->
2968
2969 <enum
2970 name="VFSType"
2971 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2972 >
2973 <desc>
2974 Virtual file systems supported by VFSExplorer.
2975 </desc>
2976
2977 <const name="File" value="1" />
2978 <const name="Cloud" value="2" />
2979 <const name="S3" value="3" />
2980 <const name="WebDav" value="4" />
2981 </enum>
2982
2983 <enum
2984 name="VFSFileType"
2985 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2986 >
2987 <desc>
2988 File types known by VFSExplorer.
2989 </desc>
2990
2991 <const name="Unknown" value="1" />
2992 <const name="Fifo" value="2" />
2993 <const name="DevChar" value="3" />
2994 <const name="Directory" value="4" />
2995 <const name="DevBlock" value="5" />
2996 <const name="File" value="6" />
2997 <const name="SymLink" value="7" />
2998 <const name="Socket" value="8" />
2999 <const name="WhiteOut" value="9" />
3000 </enum>
3001
3002 <interface
3003 name="IVFSExplorer" extends="$unknown"
3004 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3005 wsmap="managed"
3006 >
3007 <desc>
3008 The VFSExplorer interface unifies access to different file system
3009 types. This includes local file systems as well remote file systems like
3010 S3. For a list of supported types see <link to="VFSType" />.
3011 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3012 </desc>
3013
3014 <attribute name="path" type="wstring" readonly="yes">
3015 <desc>Returns the current path in the virtual file system.</desc>
3016 </attribute>
3017
3018 <attribute name="type" type="VFSType" readonly="yes">
3019 <desc>Returns the file system type which is currently in use.</desc>
3020 </attribute>
3021
3022 <method name="update">
3023 <desc>Updates the internal list of files/directories from the
3024 current directory level. Use <link to="#entryList" /> to get the full list
3025 after a call to this method.</desc>
3026
3027 <param name="aProgress" type="IProgress" dir="return">
3028 <desc>Progress object to track the operation completion.</desc>
3029 </param>
3030 </method>
3031
3032 <method name="cd">
3033 <desc>Change the current directory level.</desc>
3034
3035 <param name="aDir" type="wstring" dir="in">
3036 <desc>The name of the directory to go in.</desc>
3037 </param>
3038
3039 <param name="aProgress" type="IProgress" dir="return">
3040 <desc>Progress object to track the operation completion.</desc>
3041 </param>
3042 </method>
3043
3044 <method name="cdUp">
3045 <desc>Go one directory upwards from the current directory level.</desc>
3046
3047 <param name="aProgress" type="IProgress" dir="return">
3048 <desc>Progress object to track the operation completion.</desc>
3049 </param>
3050 </method>
3051
3052 <method name="entryList">
3053 <desc>Returns a list of files/directories after a call to <link
3054 to="#update" />. The user is responsible for keeping this internal
3055 list up do date.</desc>
3056
3057 <param name="aNames" type="wstring" safearray="yes" dir="out">
3058 <desc>The list of names for the entries.</desc>
3059 </param>
3060
3061 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3062 <desc>The list of types for the entries.</desc>
3063 </param>
3064 </method>
3065
3066 <method name="exists">
3067 <desc>Checks if the given file list exists in the current directory
3068 level.</desc>
3069
3070 <param name="aNames" type="wstring" safearray="yes" dir="in">
3071 <desc>The names to check.</desc>
3072 </param>
3073
3074 <param name="aExists" type="wstring" safearray="yes" dir="return">
3075 <desc>The names which exist.</desc>
3076 </param>
3077 </method>
3078
3079 <method name="remove">
3080 <desc>Deletes the given files in the current directory level.</desc>
3081
3082 <param name="aNames" type="wstring" safearray="yes" dir="in">
3083 <desc>The names to remove.</desc>
3084 </param>
3085
3086 <param name="aProgress" type="IProgress" dir="return">
3087 <desc>Progress object to track the operation completion.</desc>
3088 </param>
3089 </method>
3090
3091 </interface>
3092
3093 <!--
3094 // IAppliance
3095 /////////////////////////////////////////////////////////////////////////
3096 -->
3097
3098 <interface
3099 name="IAppliance" extends="$unknown"
3100 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3101 wsmap="managed"
3102 >
3103 <desc>
3104 Represents a platform-independent appliance in OVF format. An instance of this is returned
3105 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3106 appliances with VirtualBox.
3107
3108 The OVF standard suggests two different physical file formats:
3109
3110 <ol>
3111 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3112 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3113 this descriptor file references other files, as OVF appliances distributed as a set of
3114 files most likely do, those files must be in the same directory as the descriptor file.</li>
3115
3116 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3117 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3118 files and optionally other files.
3119
3120 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3121 be added with a later version.</li>
3122 </ol>
3123
3124 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3125 <link to="IMachine" /> involves the following sequence of API calls:
3126
3127 <ol>
3128 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3129 </li>
3130
3131 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3132 would like to import. So long as this file is syntactically valid, this will succeed
3133 and return an instance of IAppliance that contains the parsed data from the OVF file.
3134 </li>
3135
3136 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3137 contents of the IAppliance attributes accordingly. These can be inspected by a
3138 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3139 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3140 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3141 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3142 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3143 The GUI can then give the user the option to confirm and/or change these suggestions.
3144 </li>
3145
3146 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3147 virtual system to override the suggestions made by the interpret() routine.
3148 </li>
3149
3150 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3151 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3152 virtual system descriptions.
3153 </li>
3154 </ol>
3155
3156 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3157
3158 <ol>
3159 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3160 an empty IAppliance object.
3161 </li>
3162
3163 <li>For each machine you would like to export, call <link to="IMachine::export" />
3164 with the IAppliance object you just created. This creates an instance of
3165 <link to="IVirtualSystemDescription" /> inside the appliance.
3166 </li>
3167
3168 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3169 virtual system to override the suggestions made by the export() routine.
3170 </li>
3171
3172 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3173 file written.</li>
3174 </ol>
3175
3176 </desc>
3177
3178 <attribute name="path" type="wstring" readonly="yes">
3179 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3180 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3181 <link to="#write" /> (for export).
3182 This attribute is empty until one of these methods has been called.
3183 </desc>
3184 </attribute>
3185
3186 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3187 <desc>
3188 Array of virtual disk definitions. One such description exists for each
3189 disk definition in the OVF; each string array item represents one such piece of
3190 disk information, with the information fields separated by tab (\\t) characters.
3191
3192 The caller should be prepared for additional fields being appended to
3193 this string in future versions of VirtualBox and therefore check for
3194 the number of tabs in the strings returned.
3195
3196 In the current version, the following eight fields are returned per string
3197 in the array:
3198
3199 <ol>
3200 <li>Disk ID (unique string identifier given to disk)</li>
3201
3202 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3203
3204 <li>Populated size (optional unsigned integer indicating the current size of the
3205 disk; can be approximate; -1 if unspecified)</li>
3206
3207 <li>Format (string identifying the disk format, typically
3208 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3209
3210 <li>Reference (where to find the disk image, typically a file name; if empty,
3211 then the disk should be created on import)</li>
3212
3213 <li>Image size (optional unsigned integer indicating the size of the image,
3214 which need not necessarily be the same as the values specified above, since
3215 the image may be compressed or sparse; -1 if not specified)</li>
3216
3217 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3218 presently unsupported and always -1)</li>
3219
3220 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3221 </ol>
3222 </desc>
3223 </attribute>
3224
3225 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3226 <desc> Array of virtual system descriptions. One such description is created
3227 for each virtual system found in the OVF.
3228 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3229 (for export) has been called.
3230 </desc>
3231 </attribute>
3232
3233 <method name="read">
3234 <desc>
3235 Reads an OVF file into the appliance object.
3236
3237 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3238 mere fact that this method returns successfully does not mean that VirtualBox supports all
3239 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3240 </desc>
3241 <param name="file" type="wstring" dir="in">
3242 <desc>
3243 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3244 on whether the appliance is distributed as a set of files or as a single file, respectively).
3245 </desc>
3246 </param>
3247 <param name="aProgress" type="IProgress" dir="return">
3248 <desc></desc>
3249 </param>
3250 </method>
3251
3252 <method name="interpret">
3253 <desc>
3254 Interprets the OVF data that was read when the appliance was constructed. After
3255 calling this method, one can inspect the
3256 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3257 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3258 the appliance.
3259
3260 Calling this method is the second step of importing an appliance into VirtualBox;
3261 see <link to="IAppliance" /> for an overview.
3262
3263 After calling this method, one should call <link to="#getWarnings" /> to find out
3264 if problems were encountered during the processing which might later lead to
3265 errors.
3266 </desc>
3267 </method>
3268
3269 <method name="importMachines">
3270 <desc>
3271 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3272 and other interfaces that match the information contained in the appliance as
3273 closely as possible, as represented by the import instructions in the
3274 <link to="#virtualSystemDescriptions" /> array.
3275
3276 Calling this method is the final step of importing an appliance into VirtualBox;
3277 see <link to="IAppliance" /> for an overview.
3278
3279 Since importing the appliance will most probably involve copying and converting
3280 disk images, which can take a long time, this method operates asynchronously and
3281 returns an IProgress object to allow the caller to monitor the progress.
3282 </desc>
3283
3284 <param name="aProgress" type="IProgress" dir="return">
3285 <desc></desc>
3286 </param>
3287 </method>
3288
3289 <method name="createVFSExplorer">
3290 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3291
3292 <param name="aUri" type="wstring" dir="in">
3293 <desc>The URI describing the file system to use.</desc>
3294 </param>
3295
3296 <param name="aExplorer" type="IVFSExplorer" dir="return">
3297 <desc></desc>
3298 </param>
3299 </method>
3300
3301 <method name="write">
3302 <desc>
3303 Writes the contents of the appliance exports into a new OVF file.
3304
3305 Calling this method is the final step of exporting an appliance from VirtualBox;
3306 see <link to="IAppliance" /> for an overview.
3307
3308 Since exporting the appliance will most probably involve copying and converting
3309 disk images, which can take a long time, this method operates asynchronously and
3310 returns an IProgress object to allow the caller to monitor the progress.
3311 </desc>
3312 <param name="format" type="wstring" dir="in">
3313 <desc>
3314 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3315 future versions of VirtualBox may support additional formats.
3316 </desc>
3317 </param>
3318 <param name="path" type="wstring" dir="in">
3319 <desc>
3320 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3321 on whether the appliance is distributed as a set of files or as a single file, respectively).
3322 </desc>
3323 </param>
3324 <param name="aProgress" type="IProgress" dir="return">
3325 <desc>Progress object to track the operation completion.</desc>
3326 </param>
3327 </method>
3328
3329 <method name="getWarnings">
3330 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3331
3332 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3333 <desc></desc>
3334 </param>
3335 </method>
3336
3337 </interface>
3338
3339 <enum
3340 name="VirtualSystemDescriptionType"
3341 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3342 >
3343 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3344 a configuration value.</desc>
3345
3346 <const name="Ignore" value="1" />
3347 <const name="OS" value="2" />
3348 <const name="Name" value="3" />
3349 <const name="Product" value="4" />
3350 <const name="Vendor" value="5" />
3351 <const name="Version" value="6" />
3352 <const name="ProductUrl" value="7" />
3353 <const name="VendorUrl" value="8" />
3354 <const name="Description" value="9" />
3355 <const name="License" value="10" />
3356 <const name="Miscellaneous" value="11" />
3357 <const name="CPU" value="12" />
3358 <const name="Memory" value="13" />
3359 <const name="HardDiskControllerIDE" value="14" />
3360 <const name="HardDiskControllerSATA" value="15" />
3361 <const name="HardDiskControllerSCSI" value="16" />
3362 <const name="HardDiskImage" value="17" />
3363 <const name="Floppy" value="18" />
3364 <const name="CDROM" value="19" />
3365 <const name="NetworkAdapter" value="20" />
3366 <const name="USBController" value="21" />
3367 <const name="SoundCard" value="22" />
3368
3369 </enum>
3370
3371 <enum
3372 name="VirtualSystemDescriptionValueType"
3373 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3374 >
3375 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3376 type to fetch.</desc>
3377
3378 <const name="Reference" value="1" />
3379 <const name="Original" value="2" />
3380 <const name="Auto" value="3" />
3381 <const name="ExtraConfig" value="4" />
3382
3383 </enum>
3384
3385 <interface
3386 name="IVirtualSystemDescription" extends="$unknown"
3387 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3388 wsmap="managed"
3389 >
3390
3391 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3392 After <link to="IAppliance::interpret" /> has been called, that array contains
3393 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3394 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3395 into VirtualBox.
3396 </desc>
3397
3398 <attribute name="count" type="unsigned long" readonly="yes">
3399 <desc>Return the number of virtual system description entries.</desc>
3400 </attribute>
3401
3402 <method name="getDescription">
3403 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3404 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3405
3406 The list below identifies the value sets that are possible depending on the
3407 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3408 the array item with the same index in aOvfValues[] will contain the original value as contained
3409 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3410 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3411 the aExtraConfigValues[] array item may also be used.
3412
3413 <ul>
3414 <li>
3415 "OS": the guest operating system type. There must be exactly one such array item on import. The
3416 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3417 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3418 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3419 </li>
3420 <li>
3421 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3422 if none is present on import, then an automatic name will be created from the operating system
3423 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3424 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3425 <link to="IMachine" /> name that does not exist yet.
3426 </li>
3427 <li>
3428 "Description": an arbitrary description.
3429 </li>
3430 <li>
3431 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3432 code to display such a license for agreement; the Main API does not enforce any such policy.
3433 </li>
3434 <li>
3435 Miscellaneous: reserved for future use.
3436 </li>
3437 <li>
3438 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3439 </li>
3440 <li>
3441 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3442 is present on import, then VirtualBox will set a meaningful default based on the operating system
3443 type.
3444 </li>
3445 <li>
3446 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3447 has no value in aOvfValues[] or aVBoxValues[].
3448 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3449 type can use to specify which hard disk controller a virtual disk should be connected to.
3450 </li>
3451 <li>
3452 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3453 has no value in aOvfValues[] or aVBoxValues[].
3454 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3455 </li>
3456 <li>
3457 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3458 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3459 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3460 </li>
3461 <li>
3462 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3463 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3464
3465 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3466 a path since the image file should be in the same location as the OVF file itself), whereas the
3467 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3468 hard disk image. This means that on import the image will be copied and converted from the
3469 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3470 On import, the target image will also be registered with VirtualBox.
3471
3472 The matching item in the aExtraConfigValues[] array must contain a string of the following
3473 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3474 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3475 the image to. That number must be the index of an array item with one of the hard disk controller
3476 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3477 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3478 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3479 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3480 </li>
3481 <li>
3482 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3483 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3484 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3485 </li>
3486 <li>
3487 "USBController": a USB controller. There can be at most one such item. If and only if such an
3488 item ispresent, USB support will be enabled for the new virtual machine.
3489 </li>
3490 <li>
3491 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3492 present, sound support will be enabled for the new virtual machine. Note that the virtual
3493 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3494 may be different from the virtual soundcard expected by the appliance.
3495 </li>
3496 </ul>
3497
3498 </desc>
3499
3500 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3501 <desc></desc>
3502 </param>
3503
3504 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3505 <desc></desc>
3506 </param>
3507
3508 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3509 <desc></desc>
3510 </param>
3511
3512 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3513 <desc></desc>
3514 </param>
3515
3516 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3517 <desc></desc>
3518 </param>
3519
3520 </method>
3521
3522 <method name="getDescriptionByType">
3523 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3524 should be returned.</desc>
3525
3526 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3531 <desc></desc>
3532 </param>
3533
3534 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3535 <desc></desc>
3536 </param>
3537
3538 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3539 <desc></desc>
3540 </param>
3541
3542 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3543 <desc></desc>
3544 </param>
3545
3546 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3547 <desc></desc>
3548 </param>
3549
3550 </method>
3551
3552 <method name="getValuesByType">
3553 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3554 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3555 values.</desc>
3556
3557 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3558 <desc></desc>
3559 </param>
3560
3561 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3562 <desc></desc>
3563 </param>
3564
3565 <param name="aValues" type="wstring" dir="return" safearray="yes">
3566 <desc></desc>
3567 </param>
3568
3569 </method>
3570
3571 <method name="setFinalValues">
3572 <desc>
3573 This method allows the appliance's user to change the configuration for the virtual
3574 system descriptions. For each array item returned from <link to="#getDescription" />,
3575 you must pass in one boolean value and one configuration value.
3576
3577 Each item in the boolean array determines whether the particular configuration item
3578 should be enabled.
3579 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3580 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3581 and SoundCard.
3582
3583 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3584 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3585 the configuration remains unchanged. Please see the documentation for getDescription()
3586 for valid configuration values for the individual array item types. If the
3587 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3588 </desc>
3589
3590 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3591 <desc></desc>
3592 </param>
3593
3594 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3595 <desc></desc>
3596 </param>
3597
3598 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3599 <desc></desc>
3600 </param>
3601 </method>
3602
3603 <method name="addDescription">
3604 <desc>
3605 This method adds an additional description entry to the stack of already
3606 available descriptions for this virtual system. This is handy for writing
3607 values which aren't directly supported by VirtualBox. One example would
3608 be the License type of <link to="VirtualSystemDescriptionType" />.
3609 </desc>
3610
3611 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3612 <desc></desc>
3613 </param>
3614
3615 <param name="aVBoxValue" type="wstring" dir="in">
3616 <desc></desc>
3617 </param>
3618
3619 <param name="aExtraConfigValue" type="wstring" dir="in">
3620 <desc></desc>
3621 </param>
3622 </method>
3623 </interface>
3624
3625
3626 <!--
3627 // IMachine
3628 /////////////////////////////////////////////////////////////////////////
3629 -->
3630
3631 <interface
3632 name="IInternalMachineControl" extends="$unknown"
3633 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3634 internal="yes"
3635 wsmap="suppress"
3636 >
3637 <method name="setRemoveSavedState">
3638 <desc>
3639 Updates the flag whether saved state is removed on a machine state
3640 change from Saved to PoweredOff.
3641 </desc>
3642 <param name="aRemove" type="boolean" dir="in"/>
3643 </method>
3644
3645 <method name="updateState">
3646 <desc>
3647 Updates the VM state.
3648 <note>
3649 This operation will also update the settings file with
3650 the correct information about the saved state file
3651 and delete this file from disk when appropriate.
3652 </note>
3653 </desc>
3654 <param name="state" type="MachineState" dir="in"/>
3655 </method>
3656
3657 <method name="getIPCId">
3658 <param name="id" type="wstring" dir="return"/>
3659 </method>
3660
3661 <method name="runUSBDeviceFilters">
3662 <desc>
3663 Asks the server to run USB devices filters of the associated
3664 machine against the given USB device and tell if there is
3665 a match.
3666 <note>
3667 Intended to be used only for remote USB devices. Local
3668 ones don't require to call this method (this is done
3669 implicitly by the Host and USBProxyService).
3670 </note>
3671 </desc>
3672 <param name="device" type="IUSBDevice" dir="in"/>
3673 <param name="matched" type="boolean" dir="out"/>
3674 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3675 </method>
3676
3677 <method name="captureUSBDevice">
3678 <desc>
3679 Requests a capture of the given host USB device.
3680 When the request is completed, the VM process will
3681 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3682 notification.
3683 </desc>
3684 <param name="id" type="uuid" mod="string" dir="in"/>
3685 </method>
3686
3687 <method name="detachUSBDevice">
3688 <desc>
3689 Notification that a VM is going to detach (@a done = @c false) or has
3690 already detached (@a done = @c true) the given USB device.
3691 When the @a done = @c true request is completed, the VM process will
3692 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3693 notification.
3694 <note>
3695 In the @a done = @c true case, the server must run its own filters
3696 and filters of all VMs but this one on the detached device
3697 as if it were just attached to the host computer.
3698 </note>
3699 </desc>
3700 <param name="id" type="uuid" mod="string" dir="in"/>
3701 <param name="done" type="boolean" dir="in"/>
3702 </method>
3703
3704 <method name="autoCaptureUSBDevices">
3705 <desc>
3706 Requests a capture all matching USB devices attached to the host.
3707 When the request is completed, the VM process will
3708 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3709 notification per every captured device.
3710 </desc>
3711 </method>
3712
3713 <method name="detachAllUSBDevices">
3714 <desc>
3715 Notification that a VM that is being powered down. The done
3716 parameter indicates whether which stage of the power down
3717 we're at. When @a done = @c false the VM is announcing its
3718 intentions, while when @a done = @c true the VM is reporting
3719 what it has done.
3720 <note>
3721 In the @a done = @c true case, the server must run its own filters
3722 and filters of all VMs but this one on all detach devices as
3723 if they were just attached to the host computer.
3724 </note>
3725 </desc>
3726 <param name="done" type="boolean" dir="in"/>
3727 </method>
3728
3729 <method name="onSessionEnd">
3730 <desc>
3731 Triggered by the given session object when the session is about
3732 to close normally.
3733 </desc>
3734 <param name="session" type="ISession" dir="in">
3735 <desc>Session that is being closed</desc>
3736 </param>
3737 <param name="progress" type="IProgress" dir="return">
3738 <desc>
3739 Used to wait until the corresponding machine is actually
3740 dissociated from the given session on the server.
3741 Returned only when this session is a direct one.
3742 </desc>
3743 </param>
3744 </method>
3745
3746 <method name="beginSavingState">
3747 <desc>
3748 Called by the VM process to inform the server it wants to
3749 save the current state and stop the VM execution.
3750 </desc>
3751 <param name="progress" type="IProgress" dir="in">
3752 <desc>
3753 Progress object created by the VM process to wait until
3754 the state is saved.
3755 </desc>
3756 </param>
3757 <param name="stateFilePath" type="wstring" dir="out">
3758 <desc>
3759 File path the VM process must save the execution state to.
3760 </desc>
3761 </param>
3762 </method>
3763
3764 <method name="endSavingState">
3765 <desc>
3766 Called by the VM process to inform the server that saving
3767 the state previously requested by #beginSavingState is either
3768 successfully finished or there was a failure.
3769
3770 <result name="VBOX_E_FILE_ERROR">
3771 Settings file not accessible.
3772 </result>
3773 <result name="VBOX_E_XML_ERROR">
3774 Could not parse the settings file.
3775 </result>
3776
3777 </desc>
3778
3779 <param name="success" type="boolean" dir="in">
3780 <desc>@c true to indicate success and @c false otherwise.
3781 </desc>
3782 </param>
3783 </method>
3784
3785 <method name="adoptSavedState">
3786 <desc>
3787 Gets called by IConsole::adoptSavedState.
3788 <result name="VBOX_E_FILE_ERROR">
3789 Invalid saved state file path.
3790 </result>
3791 </desc>
3792 <param name="savedStateFile" type="wstring" dir="in">
3793 <desc>Path to the saved state file to adopt.</desc>
3794 </param>
3795 </method>
3796
3797 <method name="beginTakingSnapshot">
3798 <desc>
3799 Called from the VM process to request from the server to perform the
3800 server-side actions of creating a snapshot (creating differencing images
3801 and the snapshot object).
3802
3803 <result name="VBOX_E_FILE_ERROR">
3804 Settings file not accessible.
3805 </result>
3806 <result name="VBOX_E_XML_ERROR">
3807 Could not parse the settings file.
3808 </result>
3809 </desc>
3810 <param name="initiator" type="IConsole" dir="in">
3811 <desc>The console object that initiated this call.</desc>
3812 </param>
3813 <param name="name" type="wstring" dir="in">
3814 <desc>Snapshot name.</desc>
3815 </param>
3816 <param name="description" type="wstring" dir="in">
3817 <desc>Snapshot description.</desc>
3818 </param>
3819 <param name="consoleProgress" type="IProgress" dir="in">
3820 <desc>
3821 Progress object created by the VM process tracking the
3822 snapshot's progress. This has the following sub-operations:
3823 <ul>
3824 <li>setting up (weight 1);</li>
3825 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3826 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3827 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3828 <li>finishing up (weight 1)</li>
3829 </ul>
3830 </desc>
3831 </param>
3832 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3833 <desc>
3834 Whether this is an online snapshot (i.e. the machine is running).
3835 </desc>
3836 </param>
3837 <param name="stateFilePath" type="wstring" dir="out">
3838 <desc>
3839 File path the VM process must save the execution state to.
3840 </desc>
3841 </param>
3842 </method>
3843
3844 <method name="endTakingSnapshot">
3845 <desc>
3846 Called by the VM process to inform the server that the snapshot
3847 previously requested by #beginTakingSnapshot is either
3848 successfully taken or there was a failure.
3849 </desc>
3850
3851 <param name="success" type="boolean" dir="in">
3852 <desc>@c true to indicate success and @c false otherwise</desc>
3853 </param>
3854 </method>
3855
3856 <method name="discardSnapshot">
3857 <desc>
3858 Gets called by IConsole::discardSnapshot.
3859 <result name="VBOX_E_INVALID_OBJECT_STATE">
3860 Snapshot has more than one child snapshot.
3861 </result>
3862 </desc>
3863 <param name="initiator" type="IConsole" dir="in">
3864 <desc>The console object that initiated this call.</desc>
3865 </param>
3866 <param name="id" type="uuid" mod="string" dir="in">
3867 <desc>UUID of the snapshot to discard.</desc>
3868 </param>
3869 <param name="machineState" type="MachineState" dir="out">
3870 <desc>New machine state after this operation is started.</desc>
3871 </param>
3872 <param name="progress" type="IProgress" dir="return">
3873 <desc>Progress object to track the operation completion.</desc>
3874 </param>
3875 </method>
3876
3877 <method name="discardCurrentState">
3878 <desc>
3879 Gets called by IConsole::discardCurrentState.
3880 <result name="VBOX_E_INVALID_OBJECT_STATE">
3881 Virtual machine does not have any snapshot.
3882 </result>
3883 </desc>
3884 <param name="initiator" type="IConsole" dir="in">
3885 <desc>The console object that initiated this call.</desc>
3886 </param>
3887 <param name="machineState" type="MachineState" dir="out">
3888 <desc>New machine state after this operation is started.</desc>
3889 </param>
3890 <param name="progress" type="IProgress" dir="return">
3891 <desc>Progress object to track the operation completion.</desc>
3892 </param>
3893 </method>
3894
3895 <method name="discardCurrentSnapshotAndState">
3896 <desc>
3897 Gets called by IConsole::discardCurrentSnapshotAndState.
3898 <result name="VBOX_E_INVALID_OBJECT_STATE">
3899 Virtual machine does not have any snapshot.
3900 </result>
3901 </desc>
3902 <param name="initiator" type="IConsole" dir="in">
3903 <desc>The console object that initiated this call.</desc>
3904 </param>
3905 <param name="machineState" type="MachineState" dir="out">
3906 <desc>New machine state after this operation is started.</desc>
3907 </param>
3908 <param name="progress" type="IProgress" dir="return">
3909 <desc>Progress object to track the operation completion.</desc>
3910 </param>
3911 </method>
3912
3913 <method name="pullGuestProperties">
3914 <desc>
3915 Get the list of the guest properties matching a set of patterns along
3916 with their values, time stamps and flags and give responsibility for
3917 managing properties to the console.
3918 </desc>
3919 <param name="name" type="wstring" dir="out" safearray="yes">
3920 <desc>
3921 The names of the properties returned.
3922 </desc>
3923 </param>
3924 <param name="value" type="wstring" dir="out" safearray="yes">
3925 <desc>
3926 The values of the properties returned. The array entries match the
3927 corresponding entries in the @a name array.
3928 </desc>
3929 </param>
3930 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3931 <desc>
3932 The time stamps of the properties returned. The array entries match
3933 the corresponding entries in the @a name array.
3934 </desc>
3935 </param>
3936 <param name="flags" type="wstring" dir="out" safearray="yes">
3937 <desc>
3938 The flags of the properties returned. The array entries match the
3939 corresponding entries in the @a name array.
3940 </desc>
3941 </param>
3942 </method>
3943
3944 <method name="pushGuestProperties">
3945 <desc>
3946 Set the list of the guest properties matching a set of patterns along
3947 with their values, time stamps and flags and return responsibility for
3948 managing properties to IMachine.
3949 </desc>
3950 <param name="name" type="wstring" dir="in" safearray="yes">
3951 <desc>
3952 The names of the properties.
3953 </desc>
3954 </param>
3955 <param name="value" type="wstring" dir="in" safearray="yes">
3956 <desc>
3957 The values of the properties. The array entries match the
3958 corresponding entries in the @a name array.
3959 </desc>
3960 </param>
3961 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3962 <desc>
3963 The time stamps of the properties. The array entries match
3964 the corresponding entries in the @a name array.
3965 </desc>
3966 </param>
3967 <param name="flags" type="wstring" dir="in" safearray="yes">
3968 <desc>
3969 The flags of the properties. The array entries match the
3970 corresponding entries in the @a name array.
3971 </desc>
3972 </param>
3973 </method>
3974 <method name="pushGuestProperty">
3975 <desc>
3976 Update a single guest property in IMachine.
3977 </desc>
3978 <param name="name" type="wstring" dir="in">
3979 <desc>
3980 The name of the property to be updated.
3981 </desc>
3982 </param>
3983 <param name="value" type="wstring" dir="in">
3984 <desc>
3985 The value of the property.
3986 </desc>
3987 </param>
3988 <param name="timestamp" type="unsigned long long" dir="in">
3989 <desc>
3990 The timestamp of the property.
3991 </desc>
3992 </param>
3993 <param name="flags" type="wstring" dir="in">
3994 <desc>
3995 The flags of the property.
3996 </desc>
3997 </param>
3998 </method>
3999
4000 <method name="lockMedia">
4001 <desc>
4002 Locks all media attached to the machine for writing and parents of
4003 attached differencing media (if any) for reading. This operation is
4004 atomic so that if it fails no media is actually locked.
4005
4006 This method is intended to be called when the machine is in Starting or
4007 Restoring state. The locked media will be automatically unlocked when
4008 the machine is powered off or crashed.
4009 </desc>
4010 </method>
4011 </interface>
4012
4013 <interface
4014 name="IBIOSSettings" extends="$unknown"
4015 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4016 wsmap="managed"
4017 >
4018 <desc>
4019 The IBIOSSettings interface represents BIOS settings of the virtual
4020 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4021 </desc>
4022 <attribute name="logoFadeIn" type="boolean">
4023 <desc>Fade in flag for BIOS logo animation.</desc>
4024 </attribute>
4025
4026 <attribute name="logoFadeOut" type="boolean">
4027 <desc>Fade out flag for BIOS logo animation.</desc>
4028 </attribute>
4029
4030 <attribute name="logoDisplayTime" type="unsigned long">
4031 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4032 </attribute>
4033
4034 <attribute name="logoImagePath" type="wstring">
4035 <desc>Local file system path for external BIOS image.</desc>
4036 </attribute>
4037
4038 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4039 <desc>Mode of the BIOS boot device menu.</desc>
4040 </attribute>
4041
4042 <attribute name="ACPIEnabled" type="boolean">
4043 <desc>ACPI support flag.</desc>
4044 </attribute>
4045
4046 <attribute name="IOAPICEnabled" type="boolean">
4047 <desc>
4048 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4049 and support IRQs above 15.
4050 </desc>
4051 </attribute>
4052
4053 <attribute name="timeOffset" type="long long">
4054 <desc>
4055 Offset in milliseconds from the host system time. This allows for
4056 guests running with a different system date/time than the host.
4057 It is equivalent to setting the system date/time in the BIOS except
4058 it is not an absolute value but a relative one. Guest Additions
4059 time synchronization honors this offset.
4060 </desc>
4061 </attribute>
4062
4063 <attribute name="PXEDebugEnabled" type="boolean">
4064 <desc>
4065 PXE debug logging flag. If set, VirtualBox will write extensive
4066 PXE trace information to the release log.
4067 </desc>
4068 </attribute>
4069
4070 </interface>
4071
4072 <interface
4073 name="IMachine" extends="$unknown"
4074 uuid="e8e1c6a9-679e-4a73-a1e5-d9a81027fbda"
4075 wsmap="managed"
4076 >
4077 <desc>
4078 The IMachine interface represents a virtual machine, or guest, created
4079 in VirtualBox.
4080
4081 This interface is used in two contexts. First of all, a collection of
4082 objects implementing this interface is stored in the
4083 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4084 machines that are currently registered with this VirtualBox
4085 installation. Also, once a session has been opened for the given virtual
4086 machine (e.g. the virtual machine is running), the machine object
4087 associated with the open session can be queried from the session object;
4088 see <link to="ISession"/> for details.
4089
4090 The main role of this interface is to expose the settings of the virtual
4091 machine and provide methods to change various aspects of the virtual
4092 machine's configuration. For machine objects stored in the
4093 <link to="IVirtualBox::machines"/> collection, all attributes are
4094 read-only unless explicitly stated otherwise in individual attribute
4095 and method descriptions. In order to change a machine setting, a session
4096 for this machine must be opened using one of
4097 <link to="IVirtualBox::openSession"/>,
4098 <link to="IVirtualBox::openRemoteSession"/> or
4099 <link to="IVirtualBox::openExistingSession"/> methods. After the
4100 session has been successfully opened, a mutable machine object needs to
4101 be queried from the session object and then the desired settings changes
4102 can be applied to the returned object using IMachine attributes and
4103 methods. See the <link to="ISession"/> interface description for more
4104 information about sessions.
4105
4106 Note that IMachine does not provide methods to control virtual machine
4107 execution (such as start the machine, or power it down) -- these methods
4108 are grouped in a separate interface called <link to="IConsole" />.
4109
4110 <see>ISession, IConsole</see>
4111 </desc>
4112
4113 <attribute name="parent" type="IVirtualBox" readonly="yes">
4114 <desc>Associated parent object.</desc>
4115 </attribute>
4116
4117 <attribute name="accessible" type="boolean" readonly="yes">
4118 <desc>
4119 Whether this virtual machine is currently accessible or not.
4120
4121 A machine is always deemed accessible unless it is registered <i>and</i>
4122 its settings file cannot be read or parsed (either because the file itself
4123 is unavailable or has invalid XML contents).
4124
4125 Every time this property is read, the accessibility state of
4126 this machine is re-evaluated. If the returned value is @c false,
4127 the <link to="#accessError"/> property may be used to get the
4128 detailed error information describing the reason of
4129 inaccessibility, including XML error messages.
4130
4131 When the machine is inaccessible, only the following properties
4132 can be used on it:
4133 <ul>
4134 <li><link to="#parent"/></li>
4135 <li><link to="#id"/></li>
4136 <li><link to="#settingsFilePath"/></li>
4137 <li><link to="#accessible"/></li>
4138 <li><link to="#accessError"/></li>
4139 </ul>
4140
4141 An attempt to access any other property or method will return
4142 an error.
4143
4144 The only possible action you can perform on an inaccessible
4145 machine is to unregister it using the
4146 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4147 for the accessibility state once more by querying this
4148 property).
4149
4150 <note>
4151 In the current implementation, once this property returns
4152 @c true, the machine will never become inaccessible
4153 later, even if its settings file cannot be successfully
4154 read/written any more (at least, until the VirtualBox
4155 server is restarted). This limitation may be removed in
4156 future releases.
4157 </note>
4158 </desc>
4159 </attribute>
4160
4161 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4162 <desc>
4163 Error information describing the reason of machine
4164 inaccessibility.
4165
4166 Reading this property is only valid after the last call to
4167 <link to="#accessible"/> returned @c false (i.e. the
4168 machine is currently unaccessible). Otherwise, a @c null
4169 IVirtualBoxErrorInfo object will be returned.
4170 </desc>
4171 </attribute>
4172
4173 <attribute name="name" type="wstring">
4174 <desc>
4175 Name of the virtual machine.
4176
4177 Besides being used for human-readable identification purposes
4178 everywhere in VirtualBox, the virtual machine name is also used
4179 as a name of the machine's settings file and as a name of the
4180 subdirectory this settings file resides in. Thus, every time you
4181 change the value of this property, the settings file will be
4182 renamed once you call <link to="#saveSettings"/> to confirm the
4183 change. The containing subdirectory will be also renamed, but
4184 only if it has exactly the same name as the settings file
4185 itself prior to changing this property (for backward compatibility
4186 with previous API releases). The above implies the following
4187 limitations:
4188 <ul>
4189 <li>The machine name cannot be empty.</li>
4190 <li>The machine name can contain only characters that are valid
4191 file name characters according to the rules of the file
4192 system used to store VirtualBox configuration.</li>
4193 <li>You cannot have two or more machines with the same name
4194 if they use the same subdirectory for storing the machine
4195 settings files.</li>
4196 <li>You cannot change the name of the machine if it is running,
4197 or if any file in the directory containing the settings file
4198 is being used by another running machine or by any other
4199 process in the host operating system at a time when
4200 <link to="#saveSettings"/> is called.
4201 </li>
4202 </ul>
4203 If any of the above limitations are hit, <link to="#saveSettings"/>
4204 will return an appropriate error message explaining the exact
4205 reason and the changes you made to this machine will not be
4206 saved.
4207 <note>
4208 For "legacy" machines created using the
4209 <link to="IVirtualBox::createLegacyMachine"/> call,
4210 the above naming limitations do not apply because the
4211 machine name does not affect the settings file name.
4212 The settings file name remains the same as it was specified
4213 during machine creation and never changes.
4214 </note>
4215 </desc>
4216 </attribute>
4217
4218 <attribute name="description" type="wstring">
4219 <desc>
4220 Description of the virtual machine.
4221
4222 The description attribute can contain any text and is
4223 typically used to describe the hardware and software
4224 configuration of the virtual machine in detail (i.e. network
4225 settings, versions of the installed software and so on).
4226 </desc>
4227 </attribute>
4228
4229 <attribute name="id" type="uuid" mod="string" readonly="yes">
4230 <desc>UUID of the virtual machine.</desc>
4231 </attribute>
4232
4233 <attribute name="OSTypeId" type="wstring">
4234 <desc>
4235 User-defined identifier of the Guest OS type.
4236 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4237 an IGuestOSType object representing details about the given
4238 Guest OS type.
4239 <note>
4240 This value may differ from the value returned by
4241 <link to="IGuest::OSTypeId"/> if Guest Additions are
4242 installed to the guest OS.
4243 </note>
4244 </desc>
4245 </attribute>
4246
4247 <attribute name="HardwareVersion" type="wstring">
4248 <desc>Hardware version identifier. Internal use only for now.</desc>
4249 </attribute>
4250
4251 <attribute name="CPUCount" type="unsigned long">
4252 <desc>Number of virtual CPUs in the VM.</desc>
4253 </attribute>
4254
4255 <attribute name="memorySize" type="unsigned long">
4256 <desc>System memory size in megabytes.</desc>
4257 </attribute>
4258
4259 <attribute name="memoryBalloonSize" type="unsigned long">
4260 <desc>Initial memory balloon size in megabytes.</desc>
4261 </attribute>
4262
4263 <attribute name="statisticsUpdateInterval" type="unsigned long">
4264 <desc>Initial interval to update guest statistics in seconds.</desc>
4265 </attribute>
4266
4267 <attribute name="VRAMSize" type="unsigned long">
4268 <desc>Video memory size in megabytes.</desc>
4269 </attribute>
4270
4271 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4272 <desc>
4273 This setting determines whether VirtualBox allows this machine to make
4274 use of the 3D graphics support available on the host.</desc>
4275 </attribute>
4276
4277 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4278 <desc>
4279 This setting determines whether VirtualBox allows this machine to make
4280 use of the 2D video acceleration support available on the host.</desc>
4281 </attribute>
4282
4283 <attribute name="monitorCount" type="unsigned long">
4284 <desc>
4285 Number of virtual monitors.
4286 <note>
4287 Only effective on Windows XP and later guests with
4288 Guest Additions installed.
4289 </note>
4290 </desc>
4291 </attribute>
4292
4293 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4294 <desc>Object containing all BIOS settings.</desc>
4295 </attribute>
4296
4297 <attribute name="firmwareType" type="FirmwareType">
4298 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4299 bootstrap in this VM.</desc>
4300 </attribute>
4301
4302 <attribute name="snapshotFolder" type="wstring">
4303 <desc>
4304 Full path to the directory used to store snapshot data
4305 (differencing media and saved state files) of this machine.
4306
4307 The initial value of this property is
4308 <tt>&lt;</tt><link to="#settingsFilePath">
4309 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4310 <link to="#id">machine_uuid</link>
4311 <tt>&gt;</tt>.
4312
4313 Currently, it is an error to try to change this property on
4314 a machine that has snapshots (because this would require to
4315 move possibly large files to a different location).
4316 A separate method will be available for this purpose later.
4317
4318 <note>
4319 Setting this property to @c null or to an empty string will restore
4320 the initial value.
4321 </note>
4322 <note>
4323 When setting this property, the specified path can be
4324 absolute (full path) or relative to the directory where the
4325 <link to="#settingsFilePath">machine settings file</link>
4326 is located. When reading this property, a full path is
4327 always returned.
4328 </note>
4329 <note>
4330 The specified path may not exist, it will be created
4331 when necessary.
4332 </note>
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4337 <desc>VRDP server object.</desc>
4338 </attribute>
4339
4340 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4341 <desc>Array of media attached to this machine.</desc>
4342 </attribute>
4343
4344 <attribute name="USBController" type="IUSBController" readonly="yes">
4345 <desc>
4346 Associated USB controller object.
4347
4348 <note>
4349 If USB functionality is not available in the given edition of
4350 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4351 </note>
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4356 <desc>Associated audio adapter, always present.</desc>
4357 </attribute>
4358
4359 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4360 <desc>Array of storage controllers attached to this machine.</desc>
4361 </attribute>
4362
4363 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4364 <desc>
4365 Full name of the file containing machine settings data.
4366 </desc>
4367 </attribute>
4368
4369 <attribute name="settingsModified" type="boolean" readonly="yes">
4370 <desc>
4371 Whether the settings of this machine have been modified
4372 (but neither yet saved nor discarded).
4373 <note>
4374 Reading this property is only valid on instances returned
4375 by <link to="ISession::machine"/> and on new machines
4376 created by <link to="IVirtualBox::createMachine"/> or opened
4377 by <link to="IVirtualBox::openMachine"/> but not
4378 yet registered, or on unregistered machines after calling
4379 <link to="IVirtualBox::unregisterMachine"/>. For all other
4380 cases, the settings can never be modified.
4381 </note>
4382 <note>
4383 For newly created unregistered machines, the value of this
4384 property is always @c true until <link to="#saveSettings"/>
4385 is called (no matter if any machine settings have been
4386 changed after the creation or not). For opened machines
4387 the value is set to @c false (and then follows to normal rules).
4388 </note>
4389 </desc>
4390 </attribute>
4391
4392 <attribute name="sessionState" type="SessionState" readonly="yes">
4393 <desc>Current session state for this machine.</desc>
4394 </attribute>
4395
4396 <attribute name="sessionType" type="wstring" readonly="yes">
4397 <desc>
4398 Type of the session. If <link to="#sessionState"/> is
4399 SessionSpawning or SessionOpen, this attribute contains the
4400 same value as passed to the
4401 <link to="IVirtualBox::openRemoteSession"/> method in the
4402 @a type parameter. If the session was opened directly using
4403 <link to="IVirtualBox::openSession"/>, or if
4404 <link to="#sessionState"/> is SessionClosed, the value of this
4405 attribute is an empty string.
4406 </desc>
4407 </attribute>
4408
4409 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4410 <desc>
4411 Identifier of the session process. This attribute contains the
4412 platform-dependent identifier of the process that has opened a
4413 direct session for this machine using the
4414 <link to="IVirtualBox::openSession"/> call. The returned value
4415 is only valid if <link to="#sessionState"/> is SessionOpen or
4416 SessionClosing (i.e. a session is currently open or being
4417 closed) by the time this property is read.
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="state" type="MachineState" readonly="yes">
4422 <desc>Current execution state of this machine.</desc>
4423 </attribute>
4424
4425 <attribute name="lastStateChange" type="long long" readonly="yes">
4426 <desc>
4427 Time stamp of the last execution state change,
4428 in milliseconds since 1970-01-01 UTC.
4429 </desc>
4430 </attribute>
4431
4432 <attribute name="stateFilePath" type="wstring" readonly="yes">
4433 <desc>
4434 Full path to the file that stores the execution state of
4435 the machine when it is in the <link to="MachineState_Saved"/> state.
4436 <note>
4437 When the machine is not in the Saved state, this attribute is
4438 an empty string.
4439 </note>
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="logFolder" type="wstring" readonly="yes">
4444 <desc>
4445 Full path to the folder that stores a set of rotated log files
4446 recorded during machine execution. The most recent log file is
4447 named <tt>VBox.log</tt>, the previous log file is
4448 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4449 in the current version).
4450 </desc>
4451 </attribute>
4452
4453 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4454 <desc>
4455 Current snapshot of this machine. This is @c null if the machine
4456 currently has no snapshots. Otherwise, this is always the last snapshot
4457 in the current implementation; 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 right
4474 after one of the following calls are made:
4475 <ul>
4476 <li><link to="IConsole::discardCurrentState"/> or
4477 <link to="IConsole::discardCurrentSnapshotAndState"/>
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="liveMigrationTarget" type="boolean">
4531 <desc>
4532 When set to @a true, the virtual machine becomes a live migration
4533 target. This can only set to @a true when the VM is in the @a
4534 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="liveMigrationPort" type="unsigned long">
4542 <desc>
4543 The TCP port used for live migration. This can only be set when the
4544 VM is in the @a PoweredOff state.
4545
4546 0 means the port is automatically selected and the source machine will
4547 have to be told where to connected after the destination has been
4548 started.
4549 </desc>
4550 </attribute>
4551
4552 <attribute name="liveMigrationPassword" type="wstring">
4553 <desc>
4554 The password the live migration target will check for.
4555 </desc>
4556 </attribute>
4557
4558 <method name="setBootOrder">
4559 <desc>
4560 Puts the given device to the specified position in
4561 the boot order.
4562
4563 To indicate that no device is associated with the given position,
4564 <link to="DeviceType_Null"/> should be used.
4565
4566 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4567
4568 <result name="E_INVALIDARG">
4569 Boot @a position out of range.
4570 </result>
4571 <result name="E_NOTIMPL">
4572 Booting from USB @a device currently not supported.
4573 </result>
4574
4575 </desc>
4576 <param name="position" type="unsigned long" dir="in">
4577 <desc>
4578 Position in the boot order (@c 1 to the total number of
4579 devices the machine can boot from, as returned by
4580 <link to="ISystemProperties::maxBootPosition"/>).
4581 </desc>
4582 </param>
4583 <param name="device" type="DeviceType" dir="in">
4584 <desc>
4585 The type of the device used to boot at the given position.
4586 </desc>
4587 </param>
4588 </method>
4589
4590 <method name="getBootOrder" const="yes">
4591 <desc>
4592 Returns the device type that occupies the specified
4593 position in the boot order.
4594
4595 @todo [remove?]
4596 If the machine can have more than one device of the returned type
4597 (such as hard disks), then a separate method should be used to
4598 retrieve the individual device that occupies the given position.
4599
4600 If here are no devices at the given position, then
4601 <link to="DeviceType_Null"/> is returned.
4602
4603 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4604
4605 <result name="E_INVALIDARG">
4606 Boot @a position out of range.
4607 </result>
4608
4609 </desc>
4610 <param name="position" type="unsigned long" dir="in">
4611 <desc>
4612 Position in the boot order (@c 1 to the total number of
4613 devices the machine can boot from, as returned by
4614 <link to="ISystemProperties::maxBootPosition"/>).
4615 </desc>
4616 </param>
4617 <param name="device" type="DeviceType" dir="return">
4618 <desc>
4619 Device at the given position.
4620 </desc>
4621 </param>
4622 </method>
4623
4624 <method name="attachDevice">
4625 <desc>
4626 Attaches a device and optionally mounts a medium to the given storage
4627 controller (<link to="IStorageController" />, identified by @a name),
4628 at the indicated port and device.
4629
4630 This method is intended for managing storage devices in general (it works
4631 for both fixed and removable media). For storage devices supporting removable
4632 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4633 for changing the media while the machine is running.
4634
4635 For the IDE bus, the @a controllerPort parameter can be either
4636 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4637 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4638 to specify the master or the slave device, respectively. (In the
4639 default configuration of virtual machines, the secondary master is
4640 used for a CD/DVD drive.)
4641
4642 For an SATA controller, @a controllerPort must be a number ranging
4643 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4644 be a number ranging from @c 0 to @c 15.
4645
4646 For both SCSI and SATA, the @a device parameter is unused and must
4647 be @c 0.
4648
4649 For fixed media such as hard disks, the given medium cannot be NULL. It may
4650 be NULL for removable media such as DVDs and floppies.
4651
4652 After calling this returns successfully, a new instance of
4653 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4654 attachments (<link to="IMachine::mediumAttachments"/>).
4655
4656 The specified device slot must not have another disk attached to it, or
4657 this method will fail.
4658
4659 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4660 information about attaching media.
4661
4662 <note>
4663 You cannot attach a hard disk to a running machine. Also, you cannot
4664 attach a hard disk to a newly created machine until this machine's
4665 settings are saved to disk using <link to="#saveSettings"/>.
4666 </note>
4667 <note>
4668 If the medium is being attached indirectly, a new differencing medium
4669 will implicitly be created for it and attached instead. If the
4670 changes made to the machine settings (including this indirect
4671 attachment) are later cancelled using <link to="#discardSettings"/>,
4672 this implicitly created differencing medium will implicitly
4673 be deleted.
4674 </note>
4675
4676 <result name="E_INVALIDARG">
4677 SATA device, SATA port, IDE port or IDE slot out of range.
4678 </result>
4679 <result name="VBOX_E_INVALID_OBJECT_STATE">
4680 Attempt to attach medium to an unregistered virtual machine.
4681 </result>
4682 <result name="VBOX_E_INVALID_VM_STATE">
4683 Invalid machine state.
4684 </result>
4685 <result name="VBOX_E_OBJECT_IN_USE">
4686 Hard disk already attached to this or another virtual machine.
4687 </result>
4688
4689 </desc>
4690 <param name="name" type="wstring" dir="in">
4691 <desc>Name of the storage controller to attach the device to.</desc>
4692 </param>
4693 <param name="controllerPort" type="long" dir="in">
4694 <desc>Port to attach the device to.</desc>
4695 </param>
4696 <param name="device" type="long" dir="in">
4697 <desc>Device slot in the given port to attach the device to.</desc>
4698 </param>
4699 <param name="type" type="DeviceType" dir="in">
4700 <desc>Device type of the attached device.</desc>
4701 </param>
4702 <param name="id" type="uuid" mod="string" dir="in">
4703 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4704 medium.</desc>
4705 </param>
4706 </method>
4707
4708 <method name="detachDevice">
4709 <desc>
4710 Detaches the device attached to a device slot of the specified bus.
4711
4712 Detaching the device from the virtual machine is deferred. This means
4713 that the medium remains associated with the machine when this method
4714 returns and gets actually de-associated only after a successful
4715 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4716 for more detailed information about attaching media.
4717
4718 <note>
4719 You cannot detach the hard disk from a running machine.
4720 </note>
4721 <note>
4722 Detaching differencing media implicitly created by <link
4723 to="#attachDevice"/> for the indirect attachment using this
4724 method will <b>not</b> implicitly delete them. The
4725 <link to="IMedium::deleteStorage"/> operation should be
4726 explicitly performed by the caller after the medium is successfully
4727 detached and the settings are saved with
4728 <link to="#saveSettings"/>, if it is the desired action.
4729 </note>
4730
4731 <result name="VBOX_E_INVALID_VM_STATE">
4732 Attempt to detach medium from a running virtual machine.
4733 </result>
4734 <result name="VBOX_E_OBJECT_NOT_FOUND">
4735 No medium attached to given slot/bus.
4736 </result>
4737 <result name="VBOX_E_NOT_SUPPORTED">
4738 Hard disk format does not support storage deletion.
4739 </result>
4740
4741 </desc>
4742 <param name="name" type="wstring" dir="in">
4743 <desc>Name of the storage controller to detach the medium from.</desc>
4744 </param>
4745 <param name="controllerPort" type="long" dir="in">
4746 <desc>Port number to detach the medium from.</desc>
4747 </param>
4748 <param name="device" type="long" dir="in">
4749 <desc>Device slot number to detach the medium from.</desc>
4750 </param>
4751 </method>
4752
4753 <method name="mountMedium">
4754 <desc>
4755 Mounts a medium (<link to="IMedium" />, identified
4756 by the given UUID @a id) to the given storage controller
4757 (<link to="IStorageController" />, identified by @a name),
4758 at the indicated port and device. The device must already exist;
4759 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4760
4761 This method is intended only for managing removable media, where the
4762 device is fixed but media is changeable at runtime (such as DVDs
4763 and floppies). It cannot be used for fixed media such as hard disks.
4764
4765 The @a controllerPort and @a device parameters specify the device slot and
4766 have have the same meaning as with <link to="IMachine::attachDevice" />.
4767
4768 The specified device slot can have a medium mounted, which will be
4769 unmounted first. Specifying a NULL medium does just an unmount.
4770
4771 See <link to="IMedium"/> for more detailed information about
4772 attaching media.
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 attach medium to an unregistered virtual machine.
4779 </result>
4780 <result name="VBOX_E_INVALID_VM_STATE">
4781 Invalid machine state.
4782 </result>
4783 <result name="VBOX_E_OBJECT_IN_USE">
4784 Medium already attached to this or another virtual machine.
4785 </result>
4786
4787 </desc>
4788 <param name="name" type="wstring" dir="in">
4789 <desc>Name of the storage controller to attach the medium to.</desc>
4790 </param>
4791 <param name="controllerPort" type="long" dir="in">
4792 <desc>Port to attach the medium to.</desc>
4793 </param>
4794 <param name="device" type="long" dir="in">
4795 <desc>Device slot in the given port to attach the medium to.</desc>
4796 </param>
4797 <param name="id" type="uuid" mod="string" dir="in">
4798 <desc>UUID of the medium to attach.</desc>
4799 </param>
4800 </method>
4801
4802 <method name="getMedium" const="yes">
4803 <desc>
4804 Returns the virtual medium attached to a device slot of the specified
4805 bus.
4806
4807 Note that if the medium was indirectly attached by
4808 <link to="#mountMedium"/> to the given device slot then this
4809 method will return not the same object as passed to the
4810 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4811 more detailed information about mounting a medium.
4812
4813 <result name="VBOX_E_OBJECT_NOT_FOUND">
4814 No medium attached to given slot/bus.
4815 </result>
4816
4817 </desc>
4818 <param name="name" type="wstring" dir="in">
4819 <desc>Name of the storage controller the medium is attached to.</desc>
4820 </param>
4821 <param name="controllerPort" type="long" dir="in">
4822 <desc>Port to query.</desc>
4823 </param>
4824 <param name="device" type="long" dir="in">
4825 <desc>Device slot in the given port to query.</desc>
4826 </param>
4827 <param name="medium" type="IMedium" dir="return">
4828 <desc>Attached medium object.</desc>
4829 </param>
4830 </method>
4831
4832 <method name="getMediumAttachmentsOfController" const="yes">
4833 <desc>
4834 Returns an array of medium attachments which are attached to the
4835 the controller with the given name.
4836
4837 <result name="VBOX_E_OBJECT_NOT_FOUND">
4838 A storage controller with given name doesn't exist.
4839 </result>
4840 </desc>
4841 <param name="name" type="wstring" dir="in"/>
4842 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4843 </method>
4844
4845 <method name="getMediumAttachment" const="yes">
4846 <desc>
4847 Returns a medium attachment which corresponds to the controller with
4848 the given name, on the given port and device slot.
4849
4850 <result name="VBOX_E_OBJECT_NOT_FOUND">
4851 No attachment exists for the given controller/port/device combination.
4852 </result>
4853 </desc>
4854 <param name="name" type="wstring" dir="in"/>
4855 <param name="controllerPort" type="long" dir="in"/>
4856 <param name="device" type="long" dir="in"/>
4857 <param name="attachment" type="IMediumAttachment" dir="return"/>
4858 </method>
4859
4860 <method name="getNetworkAdapter" const="yes">
4861 <desc>
4862 Returns the network adapter associated with the given slot.
4863 Slots are numbered sequentially, starting with zero. The total
4864 number of adapters per machine is defined by the
4865 <link to="ISystemProperties::networkAdapterCount"/> property,
4866 so the maximum slot number is one less than that property's value.
4867
4868 <result name="E_INVALIDARG">
4869 Invalid @a slot number.
4870 </result>
4871
4872 </desc>
4873 <param name="slot" type="unsigned long" dir="in"/>
4874 <param name="adapter" type="INetworkAdapter" dir="return"/>
4875 </method>
4876
4877 <method name="addStorageController">
4878 <desc>
4879 Adds a new storage controller (SCSI or SATA controller) to the
4880 machine and returns it as an instance of
4881 <link to="IStorageController" />.
4882
4883 @a name identifies the controller for subsequent calls such as
4884 <link to="#getStorageControllerByName" />,
4885 <link to="#removeStorageController" />,
4886 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4887
4888 After the controller has been added, you can set its exact
4889 type by setting the <link to="IStorageController::controllerType" />.
4890
4891 <result name="VBOX_E_OBJECT_IN_USE">
4892 A storage controller with given name exists already.
4893 </result>
4894 <result name="E_INVALIDARG">
4895 Invalid @a controllerType.
4896 </result>
4897 </desc>
4898 <param name="name" type="wstring" dir="in"/>
4899 <param name="connectionType" type="StorageBus" dir="in"/>
4900 <param name="controller" type="IStorageController" dir="return"/>
4901 </method>
4902
4903 <method name="getStorageControllerByName" const="yes">
4904 <desc>
4905 Returns a storage controller with the given name.
4906
4907 <result name="VBOX_E_OBJECT_NOT_FOUND">
4908 A storage controller with given name doesn't exist.
4909 </result>
4910 </desc>
4911 <param name="name" type="wstring" dir="in"/>
4912 <param name="storageController" type="IStorageController" dir="return"/>
4913 </method>
4914
4915 <method name="removeStorageController">
4916 <desc>
4917 Removes a storage controller from the machine.
4918
4919 <result name="VBOX_E_OBJECT_NOT_FOUND">
4920 A storage controller with given name doesn't exist.
4921 </result>
4922 </desc>
4923 <param name="name" type="wstring" dir="in"/>
4924 </method>
4925
4926 <method name="getSerialPort" const="yes">
4927 <desc>
4928 Returns the serial port associated with the given slot.
4929 Slots are numbered sequentially, starting with zero. The total
4930 number of serial ports per machine is defined by the
4931 <link to="ISystemProperties::serialPortCount"/> property,
4932 so the maximum slot number is one less than that property's value.
4933
4934 <result name="E_INVALIDARG">
4935 Invalid @a slot number.
4936 </result>
4937
4938 </desc>
4939 <param name="slot" type="unsigned long" dir="in"/>
4940 <param name="port" type="ISerialPort" dir="return"/>
4941 </method>
4942
4943 <method name="getParallelPort" const="yes">
4944 <desc>
4945 Returns the parallel port associated with the given slot.
4946 Slots are numbered sequentially, starting with zero. The total
4947 number of parallel ports per machine is defined by the
4948 <link to="ISystemProperties::parallelPortCount"/> property,
4949 so the maximum slot number is one less than that property's value.
4950
4951 <result name="E_INVALIDARG">
4952 Invalid @a slot number.
4953 </result>
4954
4955 </desc>
4956 <param name="slot" type="unsigned long" dir="in"/>
4957 <param name="port" type="IParallelPort" dir="return"/>
4958 </method>
4959
4960 <method name="getExtraDataKeys">
4961 <desc>
4962 Returns an array representing the machine-specific extra data keys
4963 which currently have values defined.
4964 </desc>
4965 <param name="value" type="wstring" dir="return" safearray="yes">
4966 <desc>Array of extra data keys.</desc>
4967 </param>
4968 </method>
4969
4970 <method name="getExtraData">
4971 <desc>
4972 Returns associated machine-specific extra data.
4973
4974 If the requested data @a key does not exist, this function will
4975 succeed and return an empty string in the @a value argument.
4976
4977 <result name="VBOX_E_FILE_ERROR">
4978 Settings file not accessible.
4979 </result>
4980 <result name="VBOX_E_XML_ERROR">
4981 Could not parse the settings file.
4982 </result>
4983
4984 </desc>
4985 <param name="key" type="wstring" dir="in">
4986 <desc>Name of the data key to get.</desc>
4987 </param>
4988 <param name="value" type="wstring" dir="return">
4989 <desc>Value of the requested data key.</desc>
4990 </param>
4991 </method>
4992
4993 <method name="setExtraData">
4994 <desc>
4995 Sets associated machine-specific extra data.
4996
4997 If you pass @c null or an empty string as a key @a value, the given
4998 @a key will be deleted.
4999
5000 <note>
5001 Before performing the actual data change, this method will ask all
5002 registered callbacks using the
5003 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5004 notification for a permission. If one of the callbacks refuses the
5005 new value, the change will not be performed.
5006 </note>
5007 <note>
5008 On success, the
5009 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5010 is called to inform all registered callbacks about a successful data
5011 change.
5012 </note>
5013 <note>
5014 This method can be called outside the machine session and therefore
5015 it's a caller's responsibility to handle possible race conditions
5016 when several clients change the same key at the same time.
5017 </note>
5018
5019 <result name="VBOX_E_FILE_ERROR">
5020 Settings file not accessible.
5021 </result>
5022 <result name="VBOX_E_XML_ERROR">
5023 Could not parse the settings file.
5024 </result>
5025
5026 </desc>
5027 <param name="key" type="wstring" dir="in">
5028 <desc>Name of the data key to set.</desc>
5029 </param>
5030 <param name="value" type="wstring" dir="in">
5031 <desc>Value to assign to the key.</desc>
5032 </param>
5033 </method>
5034
5035 <method name="getCpuProperty" const="yes">
5036 <desc>
5037 Returns the virtual CPU boolean value of the specified property.
5038
5039 <result name="E_INVALIDARG">
5040 Invalid property.
5041 </result>
5042
5043 </desc>
5044 <param name="property" type="CpuPropertyType" dir="in">
5045 <desc>
5046 Property type to query.
5047 </desc>
5048 </param>
5049 <param name="value" type="boolean" dir="return">
5050 <desc>
5051 Property value.
5052 </desc>
5053 </param>
5054 </method>
5055
5056 <method name="setCpuProperty">
5057 <desc>
5058 Sets the virtual CPU boolean value of the specified property.
5059
5060 <result name="E_INVALIDARG">
5061 Invalid property.
5062 </result>
5063
5064 </desc>
5065 <param name="property" type="CpuPropertyType" dir="in">
5066 <desc>
5067 Property type to query.
5068 </desc>
5069 </param>
5070 <param name="value" type="boolean" dir="in">
5071 <desc>
5072 Property value.
5073 </desc>
5074 </param>
5075 </method>
5076
5077 <method name="getHWVirtExProperty" const="yes">
5078 <desc>
5079 Returns the HWVirtEx boolean value of the specified property.
5080
5081 <result name="E_INVALIDARG">
5082 Invalid property.
5083 </result>
5084
5085 </desc>
5086 <param name="property" type="HWVirtExPropertyType" dir="in">
5087 <desc>
5088 Property type to query.
5089 </desc>
5090 </param>
5091 <param name="value" type="boolean" dir="return">
5092 <desc>
5093 Property value.
5094 </desc>
5095 </param>
5096 </method>
5097
5098 <method name="setHWVirtExProperty">
5099 <desc>
5100 Sets the HWVirtEx boolean value of the specified property.
5101
5102 <result name="E_INVALIDARG">
5103 Invalid property.
5104 </result>
5105
5106 </desc>
5107 <param name="property" type="HWVirtExPropertyType" dir="in">
5108 <desc>
5109 Property type to query.
5110 </desc>
5111 </param>
5112 <param name="value" type="boolean" dir="in">
5113 <desc>
5114 Property value.
5115 </desc>
5116 </param>
5117 </method>
5118
5119 <method name="saveSettings">
5120 <desc>
5121 Saves any changes to machine settings made since the session
5122 has been opened or a new machine has been created, or since the
5123 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5124 For registered machines, new settings become visible to all
5125 other VirtualBox clients after successful invocation of this
5126 method.
5127 <note>
5128 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5129 notification event after the configuration has been successfully
5130 saved (only for registered machines).
5131 </note>
5132 <note>
5133 Calling this method is only valid on instances returned
5134 by <link to="ISession::machine"/> and on new machines
5135 created by <link to="IVirtualBox::createMachine"/> but not
5136 yet registered, or on unregistered machines after calling
5137 <link to="IVirtualBox::unregisterMachine"/>.
5138 </note>
5139
5140 <result name="VBOX_E_FILE_ERROR">
5141 Settings file not accessible.
5142 </result>
5143 <result name="VBOX_E_XML_ERROR">
5144 Could not parse the settings file.
5145 </result>
5146 <result name="E_ACCESSDENIED">
5147 Modification request refused.
5148 </result>
5149
5150 </desc>
5151 </method>
5152
5153 <method name="discardSettings">
5154 <desc>
5155 Discards any changes to the machine settings made since the session
5156 has been opened or since the last call to <link to="#saveSettings"/>
5157 or <link to="#discardSettings"/>.
5158 <note>
5159 Calling this method is only valid on instances returned
5160 by <link to="ISession::machine"/> and on new machines
5161 created by <link to="IVirtualBox::createMachine"/> or
5162 opened by <link to="IVirtualBox::openMachine"/> but not
5163 yet registered, or on unregistered machines after calling
5164 <link to="IVirtualBox::unregisterMachine"/>.
5165 </note>
5166
5167 <result name="VBOX_E_INVALID_VM_STATE">
5168 Virtual machine is not mutable.
5169 </result>
5170
5171 </desc>
5172 </method>
5173
5174 <method name="deleteSettings">
5175 <desc>
5176 Deletes the settings file of this machine from disk.
5177 The machine must not be registered in order for this operation
5178 to succeed.
5179 <note>
5180 <link to="#settingsModified"/> will return @c true after this
5181 method successfully returns.
5182 </note>
5183 <note>
5184 Calling this method is only valid on instances returned
5185 by <link to="ISession::machine"/> and on new machines
5186 created by <link to="IVirtualBox::createMachine"/> or
5187 opened by <link to="IVirtualBox::openMachine"/> but not
5188 yet registered, or on unregistered machines after calling
5189 <link to="IVirtualBox::unregisterMachine"/>.
5190 </note>
5191 <note>
5192 The deleted machine settings file can be restored (saved again)
5193 by calling <link to="#saveSettings"/>.
5194 </note>
5195
5196 <result name="VBOX_E_INVALID_VM_STATE">
5197 Cannot delete settings of a registered machine or
5198 machine not mutable.
5199 </result>
5200 <result name="VBOX_E_IPRT_ERROR">
5201 Could not delete the settings file.
5202 </result>
5203
5204 </desc>
5205 </method>
5206
5207 <method name="export">
5208 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5209 steps required to export VirtualBox machines to OVF.
5210 </desc>
5211
5212 <param name="aAppliance" type="IAppliance" dir="in">
5213 <desc>Appliance to export this machine to.</desc>
5214 </param>
5215 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5216 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5217 </param>
5218 </method >
5219
5220 <method name="getSnapshot">
5221 <desc>
5222 Returns a snapshot of this machine with the given UUID.
5223 A @c null UUID can be used to obtain the first snapshot
5224 taken on this machine. This is useful if you want to traverse
5225 the whole tree of snapshots starting from the root.
5226
5227 <result name="VBOX_E_OBJECT_NOT_FOUND">
5228 Virtual machine has no snapshots or snapshot not found.
5229 </result>
5230
5231 </desc>
5232 <param name="id" type="uuid" mod="string" dir="in">
5233 <desc>UUID of the snapshot to get</desc>
5234 </param>
5235 <param name="snapshot" type="ISnapshot" dir="return">
5236 <desc>Snapshot object with the given UUID.</desc>
5237 </param>
5238 </method>
5239
5240 <method name="findSnapshot">
5241 <desc>
5242 Returns a snapshot of this machine with the given name.
5243
5244 <result name="VBOX_E_OBJECT_NOT_FOUND">
5245 Virtual machine has no snapshots or snapshot not found.
5246 </result>
5247
5248 </desc>
5249 <param name="name" type="wstring" dir="in">
5250 <desc>Name of the snapshot to find</desc>
5251 </param>
5252 <param name="snapshot" type="ISnapshot" dir="return">
5253 <desc>Snapshot object with the given name.</desc>
5254 </param>
5255 </method>
5256
5257 <method name="setCurrentSnapshot">
5258 <desc>
5259 Sets the current snapshot of this machine.
5260 <note>
5261 In the current implementation, this operation is not
5262 implemented.
5263 </note>
5264 </desc>
5265 <param name="id" type="uuid" mod="string" dir="in">
5266 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5267 </param>
5268 </method>
5269
5270 <method name="createSharedFolder">
5271 <desc>
5272 Creates a new permanent shared folder by associating the given logical
5273 name with the given host path, adds it to the collection of shared
5274 folders and starts sharing it. Refer to the description of
5275 <link to="ISharedFolder"/> to read more about logical names.
5276
5277 <result name="VBOX_E_OBJECT_IN_USE">
5278 Shared folder already exists.
5279 </result>
5280 <result name="VBOX_E_FILE_ERROR">
5281 Shared folder @a hostPath not accessible.
5282 </result>
5283
5284 </desc>
5285 <param name="name" type="wstring" dir="in">
5286 <desc>Unique logical name of the shared folder.</desc>
5287 </param>
5288 <param name="hostPath" type="wstring" dir="in">
5289 <desc>Full path to the shared folder in the host file system.</desc>
5290 </param>
5291 <param name="writable" type="boolean" dir="in">
5292 <desc>Whether the share is writable or readonly</desc>
5293 </param>
5294 </method>
5295
5296 <method name="removeSharedFolder">
5297 <desc>
5298 Removes the permanent shared folder with the given name previously
5299 created by <link to="#createSharedFolder"/> from the collection of
5300 shared folders and stops sharing it.
5301
5302 <result name="VBOX_E_INVALID_VM_STATE">
5303 Virtual machine is not mutable.
5304 </result>
5305 <result name="VBOX_E_OBJECT_NOT_FOUND">
5306 Shared folder @a name does not exist.
5307 </result>
5308
5309 </desc>
5310 <param name="name" type="wstring" dir="in">
5311 <desc>Logical name of the shared folder to remove.</desc>
5312 </param>
5313 </method>
5314
5315 <method name="canShowConsoleWindow">
5316 <desc>
5317 Returns @c true if the VM console process can activate the
5318 console window and bring it to foreground on the desktop of
5319 the host PC.
5320 <note>
5321 This method will fail if a session for this machine is not
5322 currently open.
5323 </note>
5324
5325 <result name="VBOX_E_INVALID_VM_STATE">
5326 Machine session is not open.
5327 </result>
5328
5329 </desc>
5330 <param name="canShow" type="boolean" dir="return">
5331 <desc>
5332 @c true if the console window can be shown and @c false otherwise.
5333 </desc>
5334 </param>
5335 </method>
5336
5337 <method name="showConsoleWindow">
5338 <desc>
5339 Activates the console window and brings it to foreground on
5340 the desktop of the host PC. Many modern window managers on
5341 many platforms implement some sort of focus stealing
5342 prevention logic, so that it may be impossible to activate
5343 a window without the help of the currently active
5344 application. In this case, this method will return a non-zero
5345 identifier that represents the top-level window of the VM
5346 console process. The caller, if it represents a currently
5347 active process, is responsible to use this identifier (in a
5348 platform-dependent manner) to perform actual window
5349 activation.
5350 <note>
5351 This method will fail if a session for this machine is not
5352 currently open.
5353 </note>
5354
5355 <result name="VBOX_E_INVALID_VM_STATE">
5356 Machine session is not open.
5357 </result>
5358
5359 </desc>
5360 <param name="winId" type="unsigned long long" dir="return">
5361 <desc>
5362 Platform-dependent identifier of the top-level VM console
5363 window, or zero if this method has performed all actions
5364 necessary to implement the <i>show window</i> semantics for
5365 the given platform and/or VirtualBox front-end.
5366 </desc>
5367 </param>
5368 </method>
5369
5370 <method name="getGuestProperty">
5371 <desc>
5372 Reads an entry from the machine's guest property store.
5373
5374 <result name="VBOX_E_INVALID_VM_STATE">
5375 Machine session is not open.
5376 </result>
5377
5378 </desc>
5379 <param name="name" type="wstring" dir="in">
5380 <desc>
5381 The name of the property to read.
5382 </desc>
5383 </param>
5384 <param name="value" type="wstring" dir="out">
5385 <desc>
5386 The value of the property. If the property does not exist then this
5387 will be empty.
5388 </desc>
5389 </param>
5390 <param name="timestamp" type="unsigned long long" dir="out">
5391 <desc>
5392 The time at which the property was last modified, as seen by the
5393 server process.
5394 </desc>
5395 </param>
5396 <param name="flags" type="wstring" dir="out">
5397 <desc>
5398 Additional property parameters, passed as a comma-separated list of
5399 "name=value" type entries.
5400 </desc>
5401 </param>
5402 </method>
5403
5404 <method name="getGuestPropertyValue">
5405 <desc>
5406 Reads a value from the machine's guest property store.
5407
5408 <result name="VBOX_E_INVALID_VM_STATE">
5409 Machine session is not open.
5410 </result>
5411
5412 </desc>
5413 <param name="property" type="wstring" dir="in">
5414 <desc>
5415 The name of the property to read.
5416 </desc>
5417 </param>
5418 <param name="value" type="wstring" dir="return">
5419 <desc>
5420 The value of the property. If the property does not exist then this
5421 will be empty.
5422 </desc>
5423 </param>
5424 </method>
5425
5426 <method name="getGuestPropertyTimestamp">
5427 <desc>
5428 Reads a property timestamp from the machine's guest property store.
5429
5430 <result name="VBOX_E_INVALID_VM_STATE">
5431 Machine session is not open.
5432 </result>
5433
5434 </desc>
5435 <param name="property" type="wstring" dir="in">
5436 <desc>
5437 The name of the property to read.
5438 </desc>
5439 </param>
5440 <param name="value" type="unsigned long long" dir="return">
5441 <desc>
5442 The timestamp. If the property does not exist then this will be
5443 empty.
5444 </desc>
5445 </param>
5446 </method>
5447
5448 <method name="setGuestProperty">
5449 <desc>
5450 Sets, changes or deletes an entry in the machine's guest property
5451 store.
5452
5453 <result name="E_ACCESSDENIED">
5454 Property cannot be changed.
5455 </result>
5456 <result name="E_INVALIDARG">
5457 Invalid @a flags.
5458 </result>
5459 <result name="VBOX_E_INVALID_VM_STATE">
5460 Virtual machine is not mutable or session not open.
5461 </result>
5462 <result name="VBOX_E_INVALID_OBJECT_STATE">
5463 Cannot set transient property when machine not running.
5464 </result>
5465
5466 </desc>
5467 <param name="property" type="wstring" dir="in">
5468 <desc>
5469 The name of the property to set, change or delete.
5470 </desc>
5471 </param>
5472 <param name="value" type="wstring" dir="in">
5473 <desc>
5474 The new value of the property to set, change or delete. If the
5475 property does not yet exist and value is non-empty, it will be
5476 created. If the value is @c null or empty, the property will be
5477 deleted if it exists.
5478 </desc>
5479 </param>
5480 <param name="flags" type="wstring" dir="in">
5481 <desc>
5482 Additional property parameters, passed as a comma-separated list of
5483 "name=value" type entries.
5484 </desc>
5485 </param>
5486 </method>
5487
5488 <method name="setGuestPropertyValue">
5489 <desc>
5490 Sets, changes or deletes a value in the machine's guest property
5491 store. The flags field will be left unchanged or created empty for a
5492 new property.
5493
5494 <result name="E_ACCESSDENIED">
5495 Property cannot be changed.
5496 </result>
5497 <result name="VBOX_E_INVALID_VM_STATE">
5498 Virtual machine is not mutable or session not open.
5499 </result>
5500 <result name="VBOX_E_INVALID_OBJECT_STATE">
5501 Cannot set transient property when machine not running.
5502 </result>
5503 </desc>
5504
5505 <param name="property" type="wstring" dir="in">
5506 <desc>
5507 The name of the property to set, change or delete.
5508 </desc>
5509 </param>
5510 <param name="value" type="wstring" dir="in">
5511 <desc>
5512 The new value of the property to set, change or delete. If the
5513 property does not yet exist and value is non-empty, it will be
5514 created. If the value is @c null or empty, the property will be
5515 deleted if it exists.
5516 </desc>
5517 </param>
5518 </method>
5519
5520 <method name="enumerateGuestProperties">
5521 <desc>
5522 Return a list of the guest properties matching a set of patterns along
5523 with their values, time stamps and flags.
5524 </desc>
5525 <param name="patterns" type="wstring" dir="in">
5526 <desc>
5527 The patterns to match the properties against, separated by '|'
5528 characters. If this is empty or @c null, all properties will match.
5529 </desc>
5530 </param>
5531 <param name="name" type="wstring" dir="out" safearray="yes">
5532 <desc>
5533 The names of the properties returned.
5534 </desc>
5535 </param>
5536 <param name="value" type="wstring" dir="out" safearray="yes">
5537 <desc>
5538 The values of the properties returned. The array entries match the
5539 corresponding entries in the @a name array.
5540 </desc>
5541 </param>
5542 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5543 <desc>
5544 The time stamps of the properties returned. The array entries match
5545 the corresponding entries in the @a name array.
5546 </desc>
5547 </param>
5548 <param name="flags" type="wstring" dir="out" safearray="yes">
5549 <desc>
5550 The flags of the properties returned. The array entries match the
5551 corresponding entries in the @a name array.
5552 </desc>
5553 </param>
5554 </method>
5555</interface>
5556
5557 <!--
5558 // IConsole
5559 /////////////////////////////////////////////////////////////////////////
5560 -->
5561
5562 <interface
5563 name="IConsoleCallback" extends="$unknown"
5564 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5565 wsmap="suppress"
5566 >
5567
5568 <desc>
5569 This interface is used by a client of the Main API that need to
5570 be notified of events. For example, a graphical user interface
5571 can use this to learn about machine state changes so they can
5572 update the list of virtual machines without having to rely
5573 on polling.
5574
5575 Whenever relevant events occur in VirtualBox, the callbacks in
5576 objects of this interface are called. In order for this to be
5577 useful, a client needs to create its own subclass that implements
5578 this interface in which the methods for the relevant callbacks
5579 are overridden. An instance of this subclass interface can then
5580 be passed to <link to="IConsole::registerCallback" />.
5581 </desc>
5582
5583 <method name="onMousePointerShapeChange">
5584 <desc>
5585 Notification when the guest mouse pointer shape has
5586 changed. The new shape data is given.
5587 </desc>
5588 <param name="visible" type="boolean" dir="in">
5589 <desc>
5590 Flag whether the pointer is visible.
5591 </desc>
5592 </param>
5593 <param name="alpha" type="boolean" dir="in">
5594 <desc>
5595 Flag whether the pointer has an alpha channel.
5596 </desc>
5597 </param>
5598 <param name="xHot" type="unsigned long" dir="in">
5599 <desc>
5600 The pointer hot spot x coordinate.
5601 </desc>
5602 </param>
5603 <param name="yHot" type="unsigned long" dir="in">
5604 <desc>
5605 The pointer hot spot y coordinate.
5606 </desc>
5607 </param>
5608 <param name="width" type="unsigned long" dir="in">
5609 <desc>
5610 Width of the pointer shape in pixels.
5611 </desc>
5612 </param>
5613 <param name="height" type="unsigned long" dir="in">
5614 <desc>
5615 Height of the pointer shape in pixels.
5616 </desc>
5617 </param>
5618 <param name="shape" type="octet" mod="ptr" dir="in">
5619 <desc>
5620 Address of the shape buffer.
5621
5622 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5623 followed by a 32-bpp XOR (color) mask.
5624
5625 For pointers without alpha channel the XOR mask pixels are 32
5626 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5627 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5628
5629 An AND mask is used for pointers with alpha channel, so if the
5630 callback does not support alpha, the pointer could be
5631 displayed as a normal color pointer.
5632
5633 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5634 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5635 height</tt>. The padding bits at the end of each scanline are
5636 undefined.
5637
5638 The XOR mask follows the AND mask on the next 4-byte aligned
5639 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5640 Bytes in the gap between the AND and the XOR mask are undefined.
5641 The XOR mask scanlines have no gap between them and the size of
5642 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5643
5644 <note>
5645 If @a shape is 0, only the pointer visibility is changed.
5646 </note>
5647 </desc>
5648 </param>
5649 </method>
5650
5651 <method name="onMouseCapabilityChange">
5652 <desc>
5653 Notification when the mouse capabilities reported by the
5654 guest have changed. The new capabilities are passed.
5655 </desc>
5656 <param name="supportsAbsolute" type="boolean" dir="in"/>
5657 <param name="needsHostCursor" type="boolean" dir="in"/>
5658 </method>
5659
5660 <method name="onKeyboardLedsChange">
5661 <desc>
5662 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5663 to alter the state of the keyboard LEDs.
5664 </desc>
5665 <param name="numLock" type="boolean" dir="in"/>
5666 <param name="capsLock" type="boolean" dir="in"/>
5667 <param name="scrollLock" type="boolean" dir="in"/>
5668 </method>
5669
5670 <method name="onStateChange">
5671 <desc>
5672 Notification when the execution state of the machine has changed.
5673 The new state will be given.
5674 </desc>
5675 <param name="state" type="MachineState" dir="in"/>
5676 </method>
5677
5678 <method name="onAdditionsStateChange">
5679 <desc>
5680 Notification when a Guest Additions property changes.
5681 Interested callees should query IGuest attributes to
5682 find out what has changed.
5683 </desc>
5684 </method>
5685
5686 <method name="onNetworkAdapterChange">
5687 <desc>
5688 Notification when a property of one of the
5689 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5690 changes. Interested callees should use INetworkAdapter methods and
5691 attributes to find out what has changed.
5692 </desc>
5693 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5694 <desc>Network adapter that is subject to change.</desc>
5695 </param>
5696 </method>
5697
5698 <method name="onSerialPortChange">
5699 <desc>
5700 Notification when a property of one of the
5701 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5702 Interested callees should use ISerialPort methods and attributes
5703 to find out what has changed.
5704 </desc>
5705 <param name="serialPort" type="ISerialPort" dir="in">
5706 <desc>Serial port that is subject to change.</desc>
5707 </param>
5708 </method>
5709
5710 <method name="onParallelPortChange">
5711 <desc>
5712 Notification when a property of one of the
5713 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5714 changes. Interested callees should use ISerialPort methods and
5715 attributes to find out what has changed.
5716 </desc>
5717 <param name="parallelPort" type="IParallelPort" dir="in">
5718 <desc>Parallel port that is subject to change.</desc>
5719 </param>
5720 </method>
5721
5722 <method name="onStorageControllerChange">
5723 <desc>
5724 Notification when a property of one of the
5725 virtual <link to="IMachine::storageControllers">storage controllers</link>
5726 changes. Interested callees should query the corresponding collections
5727 to find out what has changed.
5728 </desc>
5729 </method>
5730
5731 <method name="onMediumChange">
5732 <desc>
5733 Notification when a
5734 <link to="IMachine::mediumAttachments">medium attachment</link>
5735 changes.
5736 </desc>
5737 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5738 <desc>Medium attachment that is subject to change.</desc>
5739 </param>
5740 </method>
5741
5742 <method name="onVRDPServerChange">
5743 <desc>
5744 Notification when a property of the
5745 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5746 Interested callees should use IVRDPServer methods and attributes to
5747 find out what has changed.
5748 </desc>
5749 </method>
5750
5751 <method name="onRemoteDisplayInfoChange">
5752 <desc>
5753 Notification when the status of the VRDP server changes. Interested callees
5754 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5755 attributes to find out what is the current status.
5756 </desc>
5757 </method>
5758
5759 <method name="onUSBControllerChange">
5760 <desc>
5761 Notification when a property of the virtual
5762 <link to="IMachine::USBController">USB controller</link> changes.
5763 Interested callees should use IUSBController methods and attributes to
5764 find out what has changed.
5765 </desc>
5766 </method>
5767
5768 <method name="onUSBDeviceStateChange">
5769 <desc>
5770 Notification when a USB device is attached to or detached from
5771 the virtual USB controller.
5772
5773 This notification is sent as a result of the indirect
5774 request to attach the device because it matches one of the
5775 machine USB filters, or as a result of the direct request
5776 issued by <link to="IConsole::attachUSBDevice"/> or
5777 <link to="IConsole::detachUSBDevice"/>.
5778
5779 This notification is sent in case of both a succeeded and a
5780 failed request completion. When the request succeeds, the
5781 @a error parameter is @c null, and the given device has been
5782 already added to (when @a attached is @c true) or removed from
5783 (when @a attached is @c false) the collection represented by
5784 <link to="IConsole::USBDevices"/>. On failure, the collection
5785 doesn't change and the @a error parameter represents the error
5786 message describing the failure.
5787
5788 </desc>
5789 <param name="device" type="IUSBDevice" dir="in">
5790 <desc>Device that is subject to state change.</desc>
5791 </param>
5792 <param name="attached" type="boolean" dir="in">
5793 <desc>
5794 @c true if the device was attached and @c false otherwise.
5795 </desc>
5796 </param>
5797 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5798 <desc>
5799 @c null on success or an error message object on failure.
5800 </desc>
5801 </param>
5802 </method>
5803
5804 <method name="onSharedFolderChange">
5805 <desc>
5806 Notification when a shared folder is added or removed.
5807 The @a scope argument defines one of three scopes:
5808 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5809 (<link to="Scope_Global">Global</link>),
5810 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5811 the machine (<link to="Scope_Machine">Machine</link>) or <link
5812 to="IConsole::sharedFolders">transient shared folders</link> of the
5813 machine (<link to="Scope_Session">Session</link>). Interested callees
5814 should use query the corresponding collections to find out what has
5815 changed.
5816 </desc>
5817 <param name="scope" type="Scope" dir="in">
5818 <desc>Scope of the notification.</desc>
5819 </param>
5820 </method>
5821
5822 <method name="onRuntimeError">
5823 <desc>
5824 Notification when an error happens during the virtual
5825 machine execution.
5826
5827 There are three kinds of runtime errors:
5828 <ul>
5829 <li><i>fatal</i></li>
5830 <li><i>non-fatal with retry</i></li>
5831 <li><i>non-fatal warnings</i></li>
5832 </ul>
5833
5834 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5835 to @c true. In case of fatal errors, the virtual machine
5836 execution is always paused before calling this notification, and
5837 the notification handler is supposed either to immediately save
5838 the virtual machine state using <link to="IConsole::saveState"/>
5839 or power it off using <link to="IConsole::powerDown"/>.
5840 Resuming the execution can lead to unpredictable results.
5841
5842 <b>Non-fatal</b> errors and warnings are indicated by the
5843 @a fatal parameter set to @c false. If the virtual machine
5844 is in the Paused state by the time the error notification is
5845 received, it means that the user can <i>try to resume</i> the machine
5846 execution after attempting to solve the problem that caused the
5847 error. In this case, the notification handler is supposed
5848 to show an appropriate message to the user (depending on the
5849 value of the @a id parameter) that offers several actions such
5850 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5851 wants to retry, the notification handler should continue
5852 the machine execution using the <link to="IConsole::resume"/>
5853 call. If the machine execution is not Paused during this
5854 notification, then it means this notification is a <i>warning</i>
5855 (for example, about a fatal condition that can happen very soon);
5856 no immediate action is required from the user, the machine
5857 continues its normal execution.
5858
5859 Note that in either case the notification handler
5860 <b>must not</b> perform any action directly on a thread
5861 where this notification is called. Everything it is allowed to
5862 do is to post a message to another thread that will then talk
5863 to the user and take the corresponding action.
5864
5865 Currently, the following error identifiers are known:
5866 <ul>
5867 <li><tt>"HostMemoryLow"</tt></li>
5868 <li><tt>"HostAudioNotResponding"</tt></li>
5869 <li><tt>"VDIStorageFull"</tt></li>
5870 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5871 </ul>
5872
5873 <note>
5874 This notification is not designed to be implemented by
5875 more than one callback at a time. If you have multiple
5876 IConsoleCallback instances registered on the given
5877 IConsole object, make sure you simply do nothing but
5878 return @c S_OK from all but one of them that does actual
5879 user notification and performs necessary actions.
5880 </note>
5881
5882 </desc>
5883 <param name="fatal" type="boolean" dir="in">
5884 <desc>Whether the error is fatal or not</desc>
5885 </param>
5886 <param name="id" type="wstring" dir="in">
5887 <desc>Error identifier</desc>
5888 </param>
5889 <param name="message" type="wstring" dir="in">
5890 <desc>Optional error message</desc>
5891 </param>
5892 </method>
5893
5894 <method name="onCanShowWindow">
5895 <desc>
5896 Notification when a call to
5897 <link to="IMachine::canShowConsoleWindow"/> is made by a
5898 front-end to check if a subsequent call to
5899 <link to="IMachine::showConsoleWindow"/> can succeed.
5900
5901 The callee should give an answer appropriate to the current
5902 machine state in the @a canShow argument. This answer must
5903 remain valid at least until the next
5904 <link to="IConsole::state">machine state</link> change.
5905
5906 <note>
5907 This notification is not designed to be implemented by
5908 more than one callback at a time. If you have multiple
5909 IConsoleCallback instances registered on the given
5910 IConsole object, make sure you simply do nothing but
5911 return @c true and @c S_OK from all but one of them that
5912 actually manages console window activation.
5913 </note>
5914 </desc>
5915 <param name="canShow" type="boolean" dir="return">
5916 <desc>
5917 @c true if the console window can be shown and @c false otherwise.
5918 </desc>
5919 </param>
5920 </method>
5921
5922 <method name="onShowWindow">
5923 <desc>
5924 Notification when a call to
5925 <link to="IMachine::showConsoleWindow"/>
5926 requests the console window to be activated and brought to
5927 foreground on the desktop of the host PC.
5928
5929 This notification should cause the VM console process to
5930 perform the requested action as described above. If it is
5931 impossible to do it at a time of this notification, this
5932 method should return a failure.
5933
5934 Note that many modern window managers on many platforms
5935 implement some sort of focus stealing prevention logic, so
5936 that it may be impossible to activate a window without the
5937 help of the currently active application (which is supposedly
5938 an initiator of this notification). In this case, this method
5939 must return a non-zero identifier that represents the
5940 top-level window of the VM console process. The caller, if it
5941 represents a currently active process, is responsible to use
5942 this identifier (in a platform-dependent manner) to perform
5943 actual window activation.
5944
5945 This method must set @a winId to zero if it has performed all
5946 actions necessary to complete the request and the console
5947 window is now active and in foreground, to indicate that no
5948 further action is required on the caller's side.
5949
5950 <note>
5951 This notification is not designed to be implemented by
5952 more than one callback at a time. If you have multiple
5953 IConsoleCallback instances registered on the given
5954 IConsole object, make sure you simply do nothing but
5955 return @c S_OK from all but one of them that actually
5956 manages console window activation.
5957 </note>
5958 </desc>
5959 <param name="winId" type="unsigned long long" dir="return">
5960 <desc>
5961 Platform-dependent identifier of the top-level VM console
5962 window, or zero if this method has performed all actions
5963 necessary to implement the <i>show window</i> semantics for
5964 the given platform and/or this VirtualBox front-end.
5965 </desc>
5966 </param>
5967 </method>
5968
5969 </interface>
5970
5971 <interface
5972 name="IRemoteDisplayInfo" extends="$unknown"
5973 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5974 wsmap="struct"
5975 >
5976 <desc>
5977 Contains information about the remote display (VRDP) capabilities and status.
5978 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5979 </desc>
5980
5981 <attribute name="active" type="boolean" readonly="yes">
5982 <desc>
5983 Whether the remote display connection is active.
5984 </desc>
5985 </attribute>
5986
5987 <attribute name="port" type="long" readonly="yes">
5988 <desc>
5989 VRDP server port number. If this property is equal to <tt>0</tt>, then
5990 the VRDP server failed to start, usually because there are no free TCP
5991 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5992 server has not yet been started.
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5997 <desc>
5998 How many times a client connected.
5999 </desc>
6000 </attribute>
6001
6002 <attribute name="beginTime" type="long long" readonly="yes">
6003 <desc>
6004 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6005 </desc>
6006 </attribute>
6007
6008 <attribute name="endTime" type="long long" readonly="yes">
6009 <desc>
6010 When the last connection was terminated or the current time, if
6011 connection is still active, in milliseconds since 1970-01-01 UTC.
6012 </desc>
6013 </attribute>
6014
6015 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6016 <desc>
6017 How many bytes were sent in last or current, if still active, connection.
6018 </desc>
6019 </attribute>
6020
6021 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6022 <desc>
6023 How many bytes were sent in all connections.
6024 </desc>
6025 </attribute>
6026
6027 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6028 <desc>
6029 How many bytes were received in last or current, if still active, connection.
6030 </desc>
6031 </attribute>
6032
6033 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6034 <desc>
6035 How many bytes were received in all connections.
6036 </desc>
6037 </attribute>
6038
6039 <attribute name="user" type="wstring" readonly="yes">
6040 <desc>
6041 Login user name supplied by the client.
6042 </desc>
6043 </attribute>
6044
6045 <attribute name="domain" type="wstring" readonly="yes">
6046 <desc>
6047 Login domain name supplied by the client.
6048 </desc>
6049 </attribute>
6050
6051 <attribute name="clientName" type="wstring" readonly="yes">
6052 <desc>
6053 The client name supplied by the client.
6054 </desc>
6055 </attribute>
6056
6057 <attribute name="clientIP" type="wstring" readonly="yes">
6058 <desc>
6059 The IP address of the client.
6060 </desc>
6061 </attribute>
6062
6063 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6064 <desc>
6065 The client software version number.
6066 </desc>
6067 </attribute>
6068
6069 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6070 <desc>
6071 Public key exchange method used when connection was established.
6072 Values: 0 - RDP4 public key exchange scheme.
6073 1 - X509 certificates were sent to client.
6074 </desc>
6075 </attribute>
6076
6077 </interface>
6078
6079 <interface
6080 name="IConsole" extends="$unknown"
6081 uuid="c47486e1-3d99-4212-b1c5-86451978999d"
6082 wsmap="managed"
6083 >
6084 <desc>
6085 The IConsole interface represents an interface to control virtual
6086 machine execution.
6087
6088 The console object that implements the IConsole interface is obtained
6089 from a session object after the session for the given machine has been
6090 opened using one of <link to="IVirtualBox::openSession"/>,
6091 <link to="IVirtualBox::openRemoteSession"/> or
6092 <link to="IVirtualBox::openExistingSession"/> methods.
6093
6094 Methods of the IConsole interface allow the caller to query the current
6095 virtual machine execution state, pause the machine or power it down, save
6096 the machine state or take a snapshot, attach and detach removable media
6097 and so on.
6098
6099 <see>ISession</see>
6100 </desc>
6101
6102 <attribute name="machine" type="IMachine" readonly="yes">
6103 <desc>
6104 Machine object this console is sessioned with.
6105 <note>
6106 This is a convenience property, it has the same value as
6107 <link to="ISession::machine"/> of the corresponding session
6108 object.
6109 </note>
6110 </desc>
6111 </attribute>
6112
6113 <attribute name="state" type="MachineState" readonly="yes">
6114 <desc>
6115 Current execution state of the machine.
6116 <note>
6117 This property always returns the same value as the corresponding
6118 property of the IMachine object this console is sessioned with.
6119 For the process that owns (executes) the VM, this is the
6120 preferable way of querying the VM state, because no IPC
6121 calls are made.
6122 </note>
6123 </desc>
6124 </attribute>
6125
6126 <attribute name="guest" type="IGuest" readonly="yes">
6127 <desc>Guest object.</desc>
6128 </attribute>
6129
6130 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6131 <desc>
6132 Virtual keyboard object.
6133 <note>
6134 If the machine is not running, any attempt to use
6135 the returned object will result in an error.
6136 </note>
6137 </desc>
6138 </attribute>
6139
6140 <attribute name="mouse" type="IMouse" readonly="yes">
6141 <desc>
6142 Virtual mouse object.
6143 <note>
6144 If the machine is not running, any attempt to use
6145 the returned object will result in an error.
6146 </note>
6147 </desc>
6148 </attribute>
6149
6150 <attribute name="display" type="IDisplay" readonly="yes">
6151 <desc>Virtual display object.
6152 <note>
6153 If the machine is not running, any attempt to use
6154 the returned object will result in an error.
6155 </note>
6156 </desc>
6157 </attribute>
6158
6159 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6160 <desc>Debugging interface.</desc>
6161 </attribute>
6162
6163 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6164 <desc>
6165 Collection of USB devices currently attached to the virtual
6166 USB controller.
6167 <note>
6168 The collection is empty if the machine is not running.
6169 </note>
6170 </desc>
6171 </attribute>
6172
6173 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6174 <desc>
6175 List of USB devices currently attached to the remote VRDP client.
6176 Once a new device is physically attached to the remote host computer,
6177 it appears in this list and remains there until detached.
6178 </desc>
6179 </attribute>
6180
6181 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6182 <desc>
6183 Collection of shared folders for the current session. These folders
6184 are called transient shared folders because they are available to the
6185 guest OS running inside the associated virtual machine only for the
6186 duration of the session (as opposed to
6187 <link to="IMachine::sharedFolders"/> which represent permanent shared
6188 folders). When the session is closed (e.g. the machine is powered down),
6189 these folders are automatically discarded.
6190
6191 New shared folders are added to the collection using
6192 <link to="#createSharedFolder"/>. Existing shared folders can be
6193 removed using <link to="#removeSharedFolder"/>.
6194 </desc>
6195 </attribute>
6196
6197 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6198 <desc>
6199 Interface that provides information on Remote Display (VRDP) connection.
6200 </desc>
6201 </attribute>
6202
6203 <method name="powerUp">
6204 <desc>
6205 Starts the virtual machine execution using the current machine
6206 state (that is, its current execution state, current settings and
6207 current hard disks).
6208
6209 If the machine is powered off or aborted, the execution will
6210 start from the beginning (as if the real hardware were just
6211 powered on).
6212
6213 If the machine is in the <link to="MachineState_Saved"/> state,
6214 it will continue its execution the point where the state has
6215 been saved.
6216
6217 <note>
6218 Unless you are trying to write a new VirtualBox front-end that
6219 performs direct machine execution (like the VirtualBox or VBoxSDL
6220 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6221 session opened by <link to="IVirtualBox::openSession"/> and use this
6222 session only to change virtual machine settings. If you simply want to
6223 start virtual machine execution using one of the existing front-ends
6224 (for example the VirtualBox GUI or headless server), simply use
6225 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6226 power up the machine automatically for you.
6227 </note>
6228
6229 <see>#saveState</see>
6230 <result name="VBOX_E_INVALID_VM_STATE">
6231 Virtual machine already running.
6232 </result>
6233 <result name="VBOX_E_HOST_ERROR">
6234 Host interface does not exist or name not set.
6235 </result>
6236 <result name="VBOX_E_FILE_ERROR">
6237 Invalid saved state file.
6238 </result>
6239 </desc>
6240 <param name="progress" type="IProgress" dir="return">
6241 <desc>Progress object to track the operation completion.</desc>
6242 </param>
6243 </method>
6244
6245 <method name="powerUpPaused">
6246 <desc>
6247 Identical to powerUp except that the VM will enter the
6248 <link to="MachineState_Paused"/> state, instead of
6249 <link to="MachineState_Running"/>.
6250
6251 <see>#powerUp</see>
6252 <result name="VBOX_E_INVALID_VM_STATE">
6253 Virtual machine already running.
6254 </result>
6255 <result name="VBOX_E_HOST_ERROR">
6256 Host interface does not exist or name not set.
6257 </result>
6258 <result name="VBOX_E_FILE_ERROR">
6259 Invalid saved state file.
6260 </result>
6261 </desc>
6262 <param name="progress" type="IProgress" dir="return">
6263 <desc>Progress object to track the operation completion.</desc>
6264 </param>
6265 </method>
6266
6267 <method name="powerDown">
6268 <desc>
6269 Initiates the power down procedure to stop the virtual machine
6270 execution.
6271
6272 The completion of the power down procedure is tracked using the returned
6273 IProgress object. After the operation is complete, the machine will go
6274 to the PoweredOff state.
6275 <result name="VBOX_E_INVALID_VM_STATE">
6276 Virtual machine must be Running, Paused or Stuck to be powered down.
6277 </result>
6278 </desc>
6279 <param name="progress" type="IProgress" dir="return">
6280 <desc>Progress object to track the operation completion.</desc>
6281 </param>
6282 </method>
6283
6284 <method name="reset">
6285 <desc>Resets the virtual machine.
6286 <result name="VBOX_E_INVALID_VM_STATE">
6287 Virtual machine not in Running state.
6288 </result>
6289 <result name="VBOX_E_VM_ERROR">
6290 Virtual machine error in reset operation.
6291 </result>
6292 </desc>
6293 </method>
6294
6295 <method name="pause">
6296 <desc>Pauses the virtual machine execution.
6297 <result name="VBOX_E_INVALID_VM_STATE">
6298 Virtual machine not in Running state.
6299 </result>
6300 <result name="VBOX_E_VM_ERROR">
6301 Virtual machine error in suspend operation.
6302 </result>
6303 </desc>
6304 </method>
6305
6306 <method name="resume">
6307 <desc>Resumes the virtual machine execution.
6308 <result name="VBOX_E_INVALID_VM_STATE">
6309 Virtual machine not in Paused state.
6310 </result>
6311 <result name="VBOX_E_VM_ERROR">
6312 Virtual machine error in resume operation.
6313 </result>
6314 </desc>
6315 </method>
6316
6317 <method name="powerButton">
6318 <desc>Sends the ACPI power button event to the guest.
6319 <result name="VBOX_E_INVALID_VM_STATE">
6320 Virtual machine not in Running state.
6321 </result>
6322 <result name="VBOX_E_PDM_ERROR">
6323 Controlled power off failed.
6324 </result>
6325 </desc>
6326 </method>
6327
6328 <method name="sleepButton">
6329 <desc>Sends the ACPI sleep button event to the guest.
6330 <result name="VBOX_E_INVALID_VM_STATE">
6331 Virtual machine not in Running state.
6332 </result>
6333 <result name="VBOX_E_PDM_ERROR">
6334 Sending sleep button event failed.
6335 </result>
6336 </desc>
6337 </method>
6338
6339 <method name="getPowerButtonHandled">
6340 <desc>Checks if the last power button event was handled by guest.
6341 <result name="VBOX_E_PDM_ERROR">
6342 Checking if the event was handled by the guest OS failed.
6343 </result>
6344 </desc>
6345 <param name="handled" type="boolean" dir="return"/>
6346 </method>
6347
6348 <method name="getGuestEnteredACPIMode">
6349 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6350 G1 (sleeping). If this method returns @c false, the guest will
6351 most likely not respond to external ACPI events.
6352 <result name="VBOX_E_INVALID_VM_STATE">
6353 Virtual machine not in Running state.
6354 </result>
6355 </desc>
6356 <param name="entered" type="boolean" dir="return"/>
6357 </method>
6358
6359 <method name="saveState">
6360 <desc>
6361 Saves the current execution state of a running virtual machine
6362 and stops its execution.
6363
6364 After this operation completes, the machine will go to the
6365 Saved state. Next time it is powered up, this state will
6366 be restored and the machine will continue its execution from
6367 the place where it was saved.
6368
6369 This operation differs from taking a snapshot to the effect
6370 that it doesn't create new differencing media. Also, once
6371 the machine is powered up from the state saved using this method,
6372 the saved state is deleted, so it will be impossible to return
6373 to this state later.
6374
6375 <note>
6376 On success, this method implicitly calls
6377 <link to="IMachine::saveSettings"/> to save all current machine
6378 settings (including runtime changes to the DVD medium, etc.).
6379 Together with the impossibility to change any VM settings when it is
6380 in the Saved state, this guarantees adequate hardware
6381 configuration of the machine when it is restored from the saved
6382 state file.
6383 </note>
6384
6385 <note>
6386 The machine must be in the Running or Paused state, otherwise
6387 the operation will fail.
6388 </note>
6389 <result name="VBOX_E_INVALID_VM_STATE">
6390 Virtual machine state neither Running nor Paused.
6391 </result>
6392 <result name="VBOX_E_FILE_ERROR">
6393 Failed to create directory for saved state file.
6394 </result>
6395
6396 <see><link to="#takeSnapshot"/></see>
6397 </desc>
6398 <param name="progress" type="IProgress" dir="return">
6399 <desc>Progress object to track the operation completion.</desc>
6400 </param>
6401 </method>
6402
6403 <method name="adoptSavedState">
6404 <desc>
6405 Associates the given saved state file to the virtual machine.
6406
6407 On success, the machine will go to the Saved state. Next time it is
6408 powered up, it will be restored from the adopted saved state and
6409 continue execution from the place where the saved state file was
6410 created.
6411
6412 The specified saved state file path may be absolute or relative to the
6413 folder the VM normally saves the state to (usually,
6414 <link to="IMachine::snapshotFolder"/>).
6415
6416 <note>
6417 It's a caller's responsibility to make sure the given saved state
6418 file is compatible with the settings of this virtual machine that
6419 represent its virtual hardware (memory size, hard disk configuration
6420 etc.). If there is a mismatch, the behavior of the virtual machine
6421 is undefined.
6422 </note>
6423 <result name="VBOX_E_INVALID_VM_STATE">
6424 Virtual machine state neither PoweredOff nor Aborted.
6425 </result>
6426 </desc>
6427 <param name="savedStateFile" type="wstring" dir="in">
6428 <desc>Path to the saved state file to adopt.</desc>
6429 </param>
6430 </method>
6431
6432 <method name="forgetSavedState">
6433 <desc>
6434 Forgets the saved state of the virtual machine previously created
6435 by <link to="#saveState"/>. Next time the machine is powered up, a
6436 clean boot will occur. If @a remove is @c true the saved state file
6437 is deleted.
6438 <note>
6439 This operation is equivalent to resetting or powering off
6440 the machine without doing a proper shutdown in the guest OS.
6441 </note>
6442 <result name="VBOX_E_INVALID_VM_STATE">
6443 Virtual machine not in state Saved.
6444 </result>
6445 </desc>
6446 <param name="remove" type="boolean" dir="in">
6447 <desc>If @c true remove the saved state file.</desc>
6448 </param>
6449 </method>
6450
6451 <method name="getDeviceActivity">
6452 <desc>
6453 Gets the current activity type of a given device or device group.
6454 <result name="E_INVALIDARG">
6455 Invalid device type.
6456 </result>
6457 </desc>
6458 <param name="type" type="DeviceType" dir="in"/>
6459 <param name="activity" type="DeviceActivity" dir="return"/>
6460 </method>
6461
6462 <method name="attachUSBDevice">
6463 <desc>
6464 Attaches a host USB device with the given UUID to the
6465 USB controller of the virtual machine.
6466
6467 The device needs to be in one of the following states:
6468 <link to="USBDeviceState_Busy"/>,
6469 <link to="USBDeviceState_Available"/> or
6470 <link to="USBDeviceState_Held"/>,
6471 otherwise an error is immediately returned.
6472
6473 When the device state is
6474 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6475 be returned if the host computer refuses to release it for some reason.
6476
6477 <see>IUSBController::deviceFilters, USBDeviceState</see>
6478 <result name="VBOX_E_INVALID_VM_STATE">
6479 Virtual machine state neither Running nor Paused.
6480 </result>
6481 <result name="VBOX_E_PDM_ERROR">
6482 Virtual machine does not have a USB controller.
6483 </result>
6484 </desc>
6485 <param name="id" type="uuid" mod="string" dir="in">
6486 <desc>UUID of the host USB device to attach.</desc>
6487 </param>
6488 </method>
6489
6490 <method name="detachUSBDevice">
6491 <desc>
6492 Detaches an USB device with the given UUID from the USB controller
6493 of the virtual machine.
6494
6495 After this method succeeds, the VirtualBox server re-initiates
6496 all USB filters as if the device were just physically attached
6497 to the host, but filters of this machine are ignored to avoid
6498 a possible automatic re-attachment.
6499
6500 <see>IUSBController::deviceFilters, USBDeviceState</see>
6501
6502 <result name="VBOX_E_PDM_ERROR">
6503 Virtual machine does not have a USB controller.
6504 </result>
6505 <result name="E_INVALIDARG">
6506 USB device not attached to this virtual machine.
6507 </result>
6508 </desc>
6509 <param name="id" type="uuid" mod="string" dir="in">
6510 <desc>UUID of the USB device to detach.</desc>
6511 </param>
6512 <param name="device" type="IUSBDevice" dir="return">
6513 <desc>Detached USB device.</desc>
6514 </param>
6515 </method>
6516
6517 <method name="findUSBDeviceByAddress">
6518 <desc>
6519 Searches for a USB device with the given host address.
6520
6521 <result name="VBOX_E_OBJECT_NOT_FOUND">
6522 Given @c name does not correspond to any USB device.
6523 </result>
6524
6525 <see>IUSBDevice::address</see>
6526 </desc>
6527 <param name="name" type="wstring" dir="in">
6528 <desc>
6529 Address of the USB device (as assigned by the host) to
6530 search for.
6531 </desc>
6532 </param>
6533 <param name="device" type="IUSBDevice" dir="return">
6534 <desc>Found USB device object.</desc>
6535 </param>
6536 </method>
6537
6538 <method name="findUSBDeviceById">
6539 <desc>
6540 Searches for a USB device with the given UUID.
6541
6542 <result name="VBOX_E_OBJECT_NOT_FOUND">
6543 Given @c id does not correspond to any USB device.
6544 </result>
6545
6546 <see>IUSBDevice::id</see>
6547 </desc>
6548 <param name="id" type="uuid" mod="string" dir="in">
6549 <desc>UUID of the USB device to search for.</desc>
6550 </param>
6551 <param name="device" type="IUSBDevice" dir="return">
6552 <desc>Found USB device object.</desc>
6553 </param>
6554 </method>
6555
6556 <method name="createSharedFolder">
6557 <desc>
6558 Creates a transient new shared folder by associating the given logical
6559 name with the given host path, adds it to the collection of shared
6560 folders and starts sharing it. Refer to the description of
6561 <link to="ISharedFolder"/> to read more about logical names.
6562
6563 <result name="VBOX_E_INVALID_VM_STATE">
6564 Virtual machine in Saved state or currently changing state.
6565 </result>
6566 <result name="VBOX_E_FILE_ERROR">
6567 Shared folder already exists or not accessible.
6568 </result>
6569 </desc>
6570 <param name="name" type="wstring" dir="in">
6571 <desc>Unique logical name of the shared folder.</desc>
6572 </param>
6573 <param name="hostPath" type="wstring" dir="in">
6574 <desc>Full path to the shared folder in the host file system.</desc>
6575 </param>
6576 <param name="writable" type="boolean" dir="in">
6577 <desc>Whether the share is writable or readonly</desc>
6578 </param>
6579 </method>
6580
6581 <method name="removeSharedFolder">
6582 <desc>
6583 Removes a transient shared folder with the given name previously
6584 created by <link to="#createSharedFolder"/> from the collection of
6585 shared folders and stops sharing it.
6586 <result name="VBOX_E_INVALID_VM_STATE">
6587 Virtual machine in Saved state or currently changing state.
6588 </result>
6589 <result name="VBOX_E_FILE_ERROR">
6590 Shared folder does not exists.
6591 </result>
6592 </desc>
6593 <param name="name" type="wstring" dir="in">
6594 <desc>Logical name of the shared folder to remove.</desc>
6595 </param>
6596 </method>
6597
6598 <method name="takeSnapshot">
6599 <desc>
6600 Saves the current execution state
6601 and all settings of the machine and creates differencing images
6602 for all normal (non-independent) media.
6603 See <link to="ISnapshot" /> for an introduction to snapshots.
6604
6605 This method can be called for a PoweredOff, Saved (see
6606 <link to="#saveState"/>), Running or
6607 Paused virtual machine. When the machine is PoweredOff, an
6608 offline snapshot is created. When the machine is Running a live
6609 snapshot is created, and an online snapshot is is created when Paused.
6610
6611 The taken snapshot is always based on the
6612 <link to="IMachine::currentSnapshot">current snapshot</link>
6613 of the associated virtual machine and becomes a new current snapshot.
6614
6615 <note>
6616 This method implicitly calls <link to="IMachine::saveSettings"/> to
6617 save all current machine settings before taking an offline snapshot.
6618 </note>
6619
6620 <result name="VBOX_E_INVALID_VM_STATE">
6621 Virtual machine currently changing state.
6622 </result>
6623 </desc>
6624 <param name="name" type="wstring" dir="in">
6625 <desc>Short name for the snapshot.</desc>
6626 </param>
6627 <param name="description" type="wstring" dir="in">
6628 <desc>Optional description of the snapshot.</desc>
6629 </param>
6630 <param name="progress" type="IProgress" dir="return">
6631 <desc>Progress object to track the operation completion.</desc>
6632 </param>
6633 </method>
6634
6635 <method name="discardSnapshot">
6636 <desc>
6637 Starts discarding the specified snapshot asynchronously.
6638 See <link to="ISnapshot" /> for an introduction to snapshots.
6639
6640 The execution state
6641 and settings of the associated machine stored in the snapshot
6642 will be deleted. The contents of all differencing media of
6643 this snapshot will be merged with the contents of their
6644 dependent child media to keep the disks valid (in other
6645 words, all changes represented by media being discarded
6646 will be propagated to their child medium). After that, this
6647 snapshot's differencing medium will be deleted. The parent
6648 of this snapshot will become a new parent for all its child
6649 snapshots.
6650
6651 If the discarded snapshot is the current one, its parent
6652 snapshot will become a new current snapshot. The current machine
6653 state is not directly affected in this case, except that
6654 currently attached differencing media based on media
6655 of the discarded snapshot will be also merged as described
6656 above.
6657
6658 If the discarded snapshot is the first one (the root snapshot)
6659 and it has exactly one child snapshot, this child snapshot will
6660 become the first snapshot after discarding. If there are no
6661 children at all (i.e. the first snapshot is the only snapshot of
6662 the machine), both the current and the first snapshot of the
6663 machine will be set to @c null. In all other cases, the first
6664 snapshot cannot be discarded.
6665
6666 You cannot discard the snapshot if it
6667 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6668 media that have differencing media based on them. Snapshots of
6669 such kind can be discarded only when every normal medium has either
6670 no children at all or exactly one child. In the former case, the normal
6671 medium simply becomes unused (i.e. not attached to any VM). In the
6672 latter case, it receives all the changes stored in the child medium,
6673 and then it replaces the child medium in the configuration of the
6674 corresponding snapshot or machine.
6675
6676 Also, you cannot discard the snapshot if it stores media
6677 (of any type) having differencing child media that belong
6678 to other machines. Such snapshots can be only discarded after
6679 you discard all snapshots of other machines containing "foreign"
6680 child disks, or detach these "foreign" child disks from machines
6681 they are attached to.
6682
6683 One particular example of the snapshot storing normal media
6684 is the first snapshot of a virtual machine that had normal media
6685 attached when taking the snapshot. Be careful when
6686 discarding such snapshots because this implicitly commits
6687 changes (made since the snapshot being discarded has been taken)
6688 to normal media (as described above), which may be not what
6689 you want.
6690
6691 The virtual machine is put to
6692 the <link to="MachineState_Discarding">Discarding</link> state until
6693 the discard operation is completed.
6694
6695 <note>
6696 The machine must not be running, otherwise the operation
6697 will fail.
6698 </note>
6699
6700 <note>
6701 Child media of all normal media of the discarded snapshot
6702 must be accessible (see <link to="IMedium::state"/>) for this
6703 operation to succeed. In particular, this means that all virtual
6704 machines, whose media are directly or indirectly based on the
6705 media of discarded snapshot, must be powered off.
6706 </note>
6707 <note>
6708 Merging medium contents can be very time and disk space
6709 consuming, if these disks are big in size and have many
6710 children. However, if the snapshot being discarded is the last
6711 (head) snapshot on the branch, the operation will be rather
6712 quick.
6713 </note>
6714 <note>
6715 Note that discarding the current snapshot
6716 will implicitly call <link to="IMachine::saveSettings"/> to
6717 make all current machine settings permanent.
6718 </note>
6719 <result name="VBOX_E_INVALID_VM_STATE">
6720 Virtual machine is running.
6721 </result>
6722 </desc>
6723 <param name="id" type="uuid" mod="string" dir="in">
6724 <desc>UUID of the snapshot to discard.</desc>
6725 </param>
6726 <param name="progress" type="IProgress" dir="return">
6727 <desc>Progress object to track the operation completion.</desc>
6728 </param>
6729 </method>
6730
6731 <method name="discardCurrentState">
6732 <desc>
6733 Starts resetting the machine's current state to the state contained
6734 in the current snapshot, asynchronously. All current settings of the
6735 machine will be reset and changes stored in differencing media
6736 will be lost.
6737 See <link to="ISnapshot" /> for an introduction to snapshots.
6738
6739 After this operation is successfully completed, new empty differencing
6740 media are created for all normal media of the machine.
6741
6742 If the current snapshot of the machine is an online snapshot, the
6743 machine will go to the <link to="MachineState_Saved"> saved
6744 state</link>, so that the next time it is powered on, the execution
6745 state will be restored from the current snapshot.
6746
6747 <note>
6748 The machine must not be running, otherwise the operation will fail.
6749 </note>
6750
6751 <note>
6752 If the machine state is <link to="MachineState_Saved">Saved</link>
6753 prior to this operation, the saved state file will be implicitly
6754 discarded (as if <link to="IConsole::forgetSavedState"/> were
6755 called).
6756 </note>
6757
6758 <result name="VBOX_E_INVALID_VM_STATE">
6759 Virtual machine is running.
6760 </result>
6761 </desc>
6762 <param name="progress" type="IProgress" dir="return">
6763 <desc>Progress object to track the operation completion.</desc>
6764 </param>
6765 </method>
6766
6767 <method name="discardCurrentSnapshotAndState">
6768 <desc>
6769
6770 This method is equivalent to
6771 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6772 (currentSnapshot.id(), progress) followed by
6773 <link to="IConsole::discardCurrentState"/>.
6774
6775 As a result, the machine will be fully restored from the
6776 snapshot preceding the current snapshot, while both the current
6777 snapshot and the current machine state will be discarded.
6778
6779 If the current snapshot is the first snapshot of the machine (i.e. it
6780 has the only snapshot), the current machine state will be
6781 discarded <b>before</b> discarding the snapshot. In other words, the
6782 machine will be restored from its last snapshot, before discarding
6783 it. This differs from performing a single
6784 <link to="IConsole::discardSnapshot"/> call (note that no
6785 <link to="IConsole::discardCurrentState"/> will be possible after it)
6786 to the effect that the latter will preserve the current state instead of
6787 discarding it.
6788
6789 Unless explicitly mentioned otherwise, all remarks and
6790 limitations of the above two methods also apply to this method.
6791
6792 <note>
6793 The machine must not be running, otherwise the operation
6794 will fail.
6795 </note>
6796
6797 <note>
6798 If the machine state is <link to="MachineState_Saved">Saved</link>
6799 prior to this operation, the saved state file will be implicitly
6800 discarded (as if <link to="#forgetSavedState"/> were
6801 called).
6802 </note>
6803
6804 <note>
6805 This method is more efficient than calling both of the above
6806 methods separately: it requires less IPC calls and provides
6807 a single progress object.
6808 </note>
6809
6810 <result name="VBOX_E_INVALID_VM_STATE">
6811 Virtual machine is running.
6812 </result>
6813 </desc>
6814 <param name="progress" type="IProgress" dir="return">
6815 <desc>Progress object to track the operation completion.</desc>
6816 </param>
6817 </method>
6818
6819 <method name="migrate">
6820 <desc>
6821 Migrate the VM to a different host machine.
6822
6823 TODO explain the details.
6824
6825 <result name="VBOX_E_INVALID_VM_STATE">
6826 Virtual machine not running or paused.
6827 </result>
6828 </desc>
6829 <param name="hostname" type="wstring" dir="in">
6830 <desc>The name or IP of the host to migrate to.</desc>
6831 </param>
6832 <param name="tcpport" type="unsigned long" dir="in">
6833 <desc>The TCP port to connect to (1..65535).</desc>
6834 </param>
6835 <param name="password" type="wstring" dir="in">
6836 <desc>The password.</desc>
6837 </param>
6838 <param name="progress" type="IProgress" dir="return">
6839 <desc>Progress object to track the operation completion.</desc>
6840 </param>
6841 </method>
6842
6843 <method name="registerCallback">
6844 <desc>
6845 Registers a new console callback on this instance. The methods of the
6846 callback interface will be called by this instance when the appropriate
6847 event occurs.
6848 </desc>
6849 <param name="callback" type="IConsoleCallback" dir="in"/>
6850 </method>
6851
6852 <method name="unregisterCallback">
6853 <desc>
6854 Unregisters the console callback previously registered using
6855 <link to="#registerCallback"/>.
6856 <result name="E_INVALIDARG">
6857 Given @a callback handler is not registered.
6858 </result>
6859 </desc>
6860 <param name="callback" type="IConsoleCallback" dir="in"/>
6861 </method>
6862 </interface>
6863
6864 <!--
6865 // IHost
6866 /////////////////////////////////////////////////////////////////////////
6867 -->
6868
6869 <enum
6870 name="HostNetworkInterfaceMediumType"
6871 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6872 >
6873 <desc>
6874 Type of encapsulation. Ethernet encapsulation includes both wired and
6875 wireless Ethernet connections.
6876 <see>IHostNetworkInterface</see>
6877 </desc>
6878
6879 <const name="Unknown" value="0">
6880 <desc>
6881 The type of interface cannot be determined.
6882 </desc>
6883 </const>
6884 <const name="Ethernet" value="1">
6885 <desc>
6886 Ethernet frame encapsulation.
6887 </desc>
6888 </const>
6889 <const name="PPP" value="2">
6890 <desc>
6891 Point-to-point protocol encapsulation.
6892 </desc>
6893 </const>
6894 <const name="SLIP" value="3">
6895 <desc>
6896 Serial line IP encapsulation.
6897 </desc>
6898 </const>
6899 </enum>
6900
6901 <enum
6902 name="HostNetworkInterfaceStatus"
6903 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6904 >
6905 <desc>
6906 Current status of the interface.
6907 <see>IHostNetworkInterface</see>
6908 </desc>
6909
6910 <const name="Unknown" value="0">
6911 <desc>
6912 The state of interface cannot be determined.
6913 </desc>
6914 </const>
6915 <const name="Up" value="1">
6916 <desc>
6917 The interface is fully operational.
6918 </desc>
6919 </const>
6920 <const name="Down" value="2">
6921 <desc>
6922 The interface is not functioning.
6923 </desc>
6924 </const>
6925 </enum>
6926
6927 <enum
6928 name="HostNetworkInterfaceType"
6929 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6930 >
6931 <desc>
6932 Network interface type.
6933 </desc>
6934 <const name="Bridged" value="1"/>
6935 <const name="HostOnly" value="2"/>
6936 </enum>
6937
6938 <interface
6939 name="IHostNetworkInterface" extends="$unknown"
6940 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6941 wsmap="managed"
6942 >
6943 <desc>
6944 Represents one of host's network interfaces. IP V6 address and network
6945 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6946 separated by colons.
6947 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6948 </desc>
6949 <attribute name="name" type="wstring" readonly="yes">
6950 <desc>Returns the host network interface name.</desc>
6951 </attribute>
6952
6953 <attribute name="id" type="uuid" mod="string" readonly="yes">
6954 <desc>Returns the interface UUID.</desc>
6955 </attribute>
6956
6957 <attribute name="networkName" type="wstring" readonly="yes">
6958 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6959 </attribute>
6960
6961 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6962 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6963 </attribute>
6964
6965 <attribute name="IPAddress" type="wstring" readonly="yes">
6966 <desc>Returns the IP V4 address of the interface.</desc>
6967 </attribute>
6968
6969 <attribute name="networkMask" type="wstring" readonly="yes">
6970 <desc>Returns the network mask of the interface.</desc>
6971 </attribute>
6972
6973 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6974 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6975 </attribute>
6976
6977 <attribute name="IPV6Address" type="wstring" readonly="yes">
6978 <desc>Returns the IP V6 address of the interface.</desc>
6979 </attribute>
6980
6981 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6982 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6983 </attribute>
6984
6985 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6986 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6987 </attribute>
6988
6989 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6990 <desc>Type of protocol encapsulation used.</desc>
6991 </attribute>
6992
6993 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6994 <desc>Status of the interface.</desc>
6995 </attribute>
6996
6997 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6998 <desc>specifies the host interface type.</desc>
6999 </attribute>
7000
7001 <method name="enableStaticIpConfig">
7002 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7003 <param name="IPAddress" type="wstring" dir="in">
7004 <desc>
7005 IP address.
7006 </desc>
7007 </param>
7008 <param name="networkMask" type="wstring" dir="in">
7009 <desc>
7010 network mask.
7011 </desc>
7012 </param>
7013 </method>
7014
7015 <method name="enableStaticIpConfigV6">
7016 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7017 <param name="IPV6Address" type="wstring" dir="in">
7018 <desc>
7019 IP address.
7020 </desc>
7021 </param>
7022 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7023 <desc>
7024 network mask.
7025 </desc>
7026 </param>
7027 </method>
7028
7029 <method name="enableDynamicIpConfig">
7030 <desc>enables the dynamic IP configuration.</desc>
7031 </method>
7032
7033 <method name="dhcpRediscover">
7034 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7035 </method>
7036
7037 </interface>
7038
7039 <interface
7040 name="IHost" extends="$unknown"
7041 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7042 wsmap="managed"
7043 >
7044 <desc>
7045 The IHost interface represents the physical machine that this VirtualBox
7046 installation runs on.
7047
7048 An object implementing this interface is returned by the
7049 <link to="IVirtualBox::host" /> attribute. This interface contains
7050 read-only information about the host's physical hardware (such as what
7051 processors and disks are available, what the host operating system is,
7052 and so on) and also allows for manipulating some of the host's hardware,
7053 such as global USB device filters and host interface networking.
7054
7055 </desc>
7056 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7057 <desc>List of DVD drives available on the host.</desc>
7058 </attribute>
7059
7060 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7061 <desc>List of floppy drives available on the host.</desc>
7062 </attribute>
7063
7064 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7065 <desc>
7066 List of USB devices currently attached to the host.
7067 Once a new device is physically attached to the host computer,
7068 it appears in this list and remains there until detached.
7069
7070 <note>
7071 If USB functionality is not available in the given edition of
7072 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7073 </note>
7074 </desc>
7075 </attribute>
7076
7077 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7078 <desc>
7079 List of USB device filters in action.
7080 When a new device is physically attached to the host computer,
7081 filters from this list are applied to it (in order they are stored
7082 in the list). The first matched filter will determine the
7083 <link to="IHostUSBDeviceFilter::action">action</link>
7084 performed on the device.
7085
7086 Unless the device is ignored by these filters, filters of all
7087 currently running virtual machines
7088 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7089
7090 <note>
7091 If USB functionality is not available in the given edition of
7092 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7093 </note>
7094
7095 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7096 </desc>
7097 </attribute>
7098
7099 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7100 <desc>List of host network interfaces currently defined on the host.</desc>
7101 </attribute>
7102
7103 <attribute name="processorCount" type="unsigned long" readonly="yes">
7104 <desc>Number of (logical) CPUs installed in the host system.</desc>
7105 </attribute>
7106
7107 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7108 <desc>Number of (logical) CPUs online in the host system.</desc>
7109 </attribute>
7110
7111 <method name="getProcessorSpeed">
7112 <desc>Query the (approximate) maximum speed of a specified host CPU in
7113 Megahertz.
7114 </desc>
7115 <param name="cpuId" type="unsigned long" dir="in">
7116 <desc>
7117 Identifier of the CPU.
7118 </desc>
7119 </param>
7120 <param name="speed" type="unsigned long" dir="return">
7121 <desc>
7122 Speed value. 0 is returned if value is not known or @a cpuId is
7123 invalid.
7124 </desc>
7125 </param>
7126 </method>
7127
7128 <method name="getProcessorFeature">
7129 <desc>Query whether a CPU feature is supported or not.</desc>
7130 <param name="feature" type="ProcessorFeature" dir="in">
7131 <desc>
7132 CPU Feature identifier.
7133 </desc>
7134 </param>
7135 <param name="supported" type="boolean" dir="return">
7136 <desc>
7137 Feature is supported or not.
7138 </desc>
7139 </param>
7140 </method>
7141
7142 <method name="getProcessorDescription">
7143 <desc>Query the model string of a specified host CPU.
7144 </desc>
7145 <param name="cpuId" type="unsigned long" dir="in">
7146 <desc>
7147 Identifier of the CPU.
7148 </desc>
7149 </param>
7150 <param name="description" type="wstring" dir="return">
7151 <desc>
7152 Model string. An empty string is returned if value is not known or
7153 @a cpuId is invalid.
7154 </desc>
7155 </param>
7156 </method>
7157
7158 <attribute name="memorySize" type="unsigned long" readonly="yes">
7159 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7160 </attribute>
7161
7162 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7163 <desc>Available system memory in the host system.</desc>
7164 </attribute>
7165
7166 <attribute name="operatingSystem" type="wstring" readonly="yes">
7167 <desc>Name of the host system's operating system.</desc>
7168 </attribute>
7169
7170 <attribute name="OSVersion" type="wstring" readonly="yes">
7171 <desc>Host operating system's version string.</desc>
7172 </attribute>
7173
7174 <attribute name="UTCTime" type="long long" readonly="yes">
7175 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7176 </attribute>
7177
7178 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7179 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7180 </attribute>
7181
7182 <method name="createHostOnlyNetworkInterface">
7183 <desc>
7184 Creates a new adapter for Host Only Networking.
7185 <result name="E_INVALIDARG">
7186 Host network interface @a name already exists.
7187 </result>
7188 </desc>
7189 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7190 <desc>
7191 Created host interface object.
7192 </desc>
7193 </param>
7194 <param name="progress" type="IProgress" dir="return">
7195 <desc>
7196 Progress object to track the operation completion.
7197 </desc>
7198 </param>
7199 </method>
7200
7201 <method name="removeHostOnlyNetworkInterface">
7202 <desc>
7203 Removes the given Host Only Networking interface.
7204 <result name="VBOX_E_OBJECT_NOT_FOUND">
7205 No host network interface matching @a id found.
7206 </result>
7207 </desc>
7208 <param name="id" type="uuid" mod="string" dir="in">
7209 <desc>
7210 Adapter GUID.
7211 </desc>
7212 </param>
7213 <param name="progress" type="IProgress" dir="return">
7214 <desc>
7215 Progress object to track the operation completion.
7216 </desc>
7217 </param>
7218 </method>
7219
7220 <method name="createUSBDeviceFilter">
7221 <desc>
7222 Creates a new USB device filter. All attributes except
7223 the filter name are set to empty (any match),
7224 <i>active</i> is @c false (the filter is not active).
7225
7226 The created filter can be added to the list of filters using
7227 <link to="#insertUSBDeviceFilter"/>.
7228
7229 <see>#USBDeviceFilters</see>
7230 </desc>
7231 <param name="name" type="wstring" dir="in">
7232 <desc>
7233 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7234 for more info.
7235 </desc>
7236 </param>
7237 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7238 <desc>Created filter object.</desc>
7239 </param>
7240 </method>
7241
7242 <method name="insertUSBDeviceFilter">
7243 <desc>
7244 Inserts the given USB device to the specified position
7245 in the list of filters.
7246
7247 Positions are numbered starting from @c 0. If the specified
7248 position is equal to or greater than the number of elements in
7249 the list, the filter is added at the end of the collection.
7250
7251 <note>
7252 Duplicates are not allowed, so an attempt to insert a
7253 filter already in the list is an error.
7254 </note>
7255 <note>
7256 If USB functionality is not available in the given edition of
7257 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7258 </note>
7259
7260 <see>#USBDeviceFilters</see>
7261
7262 <result name="VBOX_E_INVALID_OBJECT_STATE">
7263 USB device filter is not created within this VirtualBox instance.
7264 </result>
7265 <result name="E_INVALIDARG">
7266 USB device filter already in list.
7267 </result>
7268
7269 </desc>
7270 <param name="position" type="unsigned long" dir="in">
7271 <desc>Position to insert the filter to.</desc>
7272 </param>
7273 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7274 <desc>USB device filter to insert.</desc>
7275 </param>
7276 </method>
7277
7278 <method name="removeUSBDeviceFilter">
7279 <desc>
7280 Removes a USB device filter from the specified position in the
7281 list of filters.
7282
7283 Positions are numbered starting from @c 0. Specifying a
7284 position equal to or greater than the number of elements in
7285 the list will produce an error.
7286
7287 <note>
7288 If USB functionality is not available in the given edition of
7289 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7290 </note>
7291
7292 <see>#USBDeviceFilters</see>
7293
7294 <result name="E_INVALIDARG">
7295 USB device filter list empty or invalid @a position.
7296 </result>
7297
7298 </desc>
7299 <param name="position" type="unsigned long" dir="in">
7300 <desc>Position to remove the filter from.</desc>
7301 </param>
7302 </method>
7303
7304 <method name="findHostDVDDrive">
7305 <desc>
7306 Searches for a host DVD drive with the given @c name.
7307
7308 <result name="VBOX_E_OBJECT_NOT_FOUND">
7309 Given @c name does not correspond to any host drive.
7310 </result>
7311
7312 </desc>
7313 <param name="name" type="wstring" dir="in">
7314 <desc>Name of the host drive to search for</desc>
7315 </param>
7316 <param name="drive" type="IMedium" dir="return">
7317 <desc>Found host drive object</desc>
7318 </param>
7319 </method>
7320
7321 <method name="findHostFloppyDrive">
7322 <desc>
7323 Searches for a host floppy drive with the given @c name.
7324
7325 <result name="VBOX_E_OBJECT_NOT_FOUND">
7326 Given @c name does not correspond to any host floppy drive.
7327 </result>
7328
7329 </desc>
7330 <param name="name" type="wstring" dir="in">
7331 <desc>Name of the host floppy drive to search for</desc>
7332 </param>
7333 <param name="drive" type="IMedium" dir="return">
7334 <desc>Found host floppy drive object</desc>
7335 </param>
7336 </method>
7337
7338 <method name="findHostNetworkInterfaceByName">
7339 <desc>
7340 Searches through all host network interfaces for an interface with
7341 the given @c name.
7342 <note>
7343 The method returns an error if the given @c name does not
7344 correspond to any host network interface.
7345 </note>
7346 </desc>
7347 <param name="name" type="wstring" dir="in">
7348 <desc>Name of the host network interface to search for.</desc>
7349 </param>
7350 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7351 <desc>Found host network interface object.</desc>
7352 </param>
7353 </method>
7354 <method name="findHostNetworkInterfaceById">
7355 <desc>
7356 Searches through all host network interfaces for an interface with
7357 the given GUID.
7358 <note>
7359 The method returns an error if the given GUID does not
7360 correspond to any host network interface.
7361 </note>
7362 </desc>
7363 <param name="id" type="uuid" mod="string" dir="in">
7364 <desc>GUID of the host network interface to search for.</desc>
7365 </param>
7366 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7367 <desc>Found host network interface object.</desc>
7368 </param>
7369 </method>
7370 <method name="findHostNetworkInterfacesOfType">
7371 <desc>
7372 Searches through all host network interfaces and returns a list of interfaces of the specified type
7373 </desc>
7374 <param name="type" type="HostNetworkInterfaceType" dir="in">
7375 <desc>type of the host network interfaces to search for.</desc>
7376 </param>
7377 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7378 <desc>Found host network interface objects.</desc>
7379 </param>
7380 </method>
7381
7382 <method name="findUSBDeviceById">
7383 <desc>
7384 Searches for a USB device with the given UUID.
7385
7386 <result name="VBOX_E_OBJECT_NOT_FOUND">
7387 Given @c id does not correspond to any USB device.
7388 </result>
7389
7390 <see>IHostUSBDevice::id</see>
7391 </desc>
7392 <param name="id" type="uuid" mod="string" dir="in">
7393 <desc>UUID of the USB device to search for.</desc>
7394 </param>
7395 <param name="device" type="IHostUSBDevice" dir="return">
7396 <desc>Found USB device object.</desc>
7397 </param>
7398 </method>
7399
7400 <method name="findUSBDeviceByAddress">
7401 <desc>
7402 Searches for a USB device with the given host address.
7403
7404 <result name="VBOX_E_OBJECT_NOT_FOUND">
7405 Given @c name does not correspond to any USB device.
7406 </result>
7407
7408 <see>IHostUSBDevice::address</see>
7409 </desc>
7410 <param name="name" type="wstring" dir="in">
7411 <desc>
7412 Address of the USB device (as assigned by the host) to
7413 search for.
7414 </desc>
7415 </param>
7416 <param name="device" type="IHostUSBDevice" dir="return">
7417 <desc>Found USB device object.</desc>
7418 </param>
7419 </method>
7420
7421 </interface>
7422
7423 <!--
7424 // ISystemProperties
7425 /////////////////////////////////////////////////////////////////////////
7426 -->
7427
7428 <interface
7429 name="ISystemProperties"
7430 extends="$unknown"
7431 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7432 wsmap="managed"
7433 >
7434 <desc>
7435 The ISystemProperties interface represents global properties of the given
7436 VirtualBox installation.
7437
7438 These properties define limits and default values for various attributes
7439 and parameters. Most of the properties are read-only, but some can be
7440 changed by a user.
7441 </desc>
7442
7443 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7444 <desc>Minimum guest system memory in Megabytes.</desc>
7445 </attribute>
7446
7447 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7448 <desc>Maximum guest system memory in Megabytes.</desc>
7449 </attribute>
7450
7451 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7452 <desc>Minimum guest video memory in Megabytes.</desc>
7453 </attribute>
7454
7455 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7456 <desc>Maximum guest video memory in Megabytes.</desc>
7457 </attribute>
7458
7459 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7460 <desc>Minimum CPU count.</desc>
7461 </attribute>
7462
7463 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7464 <desc>Maximum CPU count.</desc>
7465 </attribute>
7466
7467 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7468 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7469 </attribute>
7470
7471 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7472 <desc>
7473 Number of network adapters associated with every
7474 <link to="IMachine"/> instance.
7475 </desc>
7476 </attribute>
7477
7478 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7479 <desc>
7480 Number of serial ports associated with every
7481 <link to="IMachine"/> instance.
7482 </desc>
7483 </attribute>
7484
7485 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7486 <desc>
7487 Number of parallel ports associated with every
7488 <link to="IMachine"/> instance.
7489 </desc>
7490 </attribute>
7491
7492 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7493 <desc>
7494 Maximum device position in the boot order. This value corresponds
7495 to the total number of devices a machine can boot from, to make it
7496 possible to include all possible devices to the boot list.
7497 <see><link to="IMachine::setBootOrder"/></see>
7498 </desc>
7499 </attribute>
7500
7501 <attribute name="defaultMachineFolder" type="wstring">
7502 <desc>
7503 Full path to the default directory used to create new or open
7504 existing machines when a settings file name contains no
7505 path.
7506
7507 The initial value of this property is
7508 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7509 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7510
7511 <note>
7512 Setting this property to @c null or an empty string will restore the
7513 initial value.
7514 </note>
7515 <note>
7516 When settings this property, the specified path can be
7517 absolute (full path) or relative
7518 to the <link to="IVirtualBox::homeFolder">
7519 VirtualBox home directory</link>.
7520 When reading this property, a full path is
7521 always returned.
7522 </note>
7523 <note>
7524 The specified path may not exist, it will be created
7525 when necessary.
7526 </note>
7527
7528 <see>
7529 <link to="IVirtualBox::createMachine"/>,
7530 <link to="IVirtualBox::openMachine"/>
7531 </see>
7532 </desc>
7533 </attribute>
7534
7535 <attribute name="defaultHardDiskFolder" type="wstring">
7536 <desc>
7537 Full path to the default directory used to create new or open existing
7538 virtual disks.
7539
7540 This path is used when the storage unit of a hard disk is a regular file
7541 in the host's file system and only a file name that contains no path is
7542 given.
7543
7544 The initial value of this property is
7545 <tt>&lt;</tt>
7546 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7547 <tt>&gt;/HardDisks</tt>.
7548
7549 <note>
7550 Setting this property to @c null or empty string will restore the
7551 initial value.
7552 </note>
7553 <note>
7554 When settings this property, the specified path can be relative
7555 to the
7556 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7557 absolute. When reading this property, a full path is
7558 always returned.
7559 </note>
7560 <note>
7561 The specified path may not exist, it will be created
7562 when necessary.
7563 </note>
7564
7565 <see>
7566 IMedium,
7567 <link to="IVirtualBox::createHardDisk"/>,
7568 <link to="IVirtualBox::openHardDisk"/>,
7569 <link to="IMedium::location"/>
7570 </see>
7571 </desc>
7572 </attribute>
7573
7574 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7575 <desc>
7576 List of all medium storage formats supported by this VirtualBox
7577 installation.
7578
7579 Keep in mind that the medium format identifier
7580 (<link to="IMediumFormat::id"/>) used in other API calls like
7581 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7582 medium format is a case-insensitive string. This means that, for
7583 example, all of the following strings:
7584 <pre>
7585 "VDI"
7586 "vdi"
7587 "VdI"</pre>
7588 refer to the same medium format.
7589
7590 Note that the virtual medium framework is backend-based, therefore
7591 the list of supported formats depends on what backends are currently
7592 installed.
7593
7594 <see>
7595 <link to="IMediumFormat"/>,
7596 </see>
7597 </desc>
7598 </attribute>
7599
7600 <attribute name="defaultHardDiskFormat" type="wstring">
7601 <desc>
7602 Identifier of the default medium format used by VirtualBox.
7603
7604 The medium format set by this attribute is used by VirtualBox
7605 when the medium format was not specified explicitly. One example is
7606 <link to="IVirtualBox::createHardDisk"/> with the empty
7607 format argument. A more complex example is implicit creation of
7608 differencing media when taking a snapshot of a virtual machine:
7609 this operation will try to use a format of the parent medium first
7610 and if this format does not support differencing media the default
7611 format specified by this argument will be used.
7612
7613 The list of supported medium formats may be obtained by the
7614 <link to="#mediaFormats"/> call. Note that the default medium
7615 format must have a capability to create differencing media;
7616 otherwise operations that create media implicitly may fail
7617 unexpectedly.
7618
7619 The initial value of this property is <tt>"VDI"</tt> in the current
7620 version of the VirtualBox product, but may change in the future.
7621
7622 <note>
7623 Setting this property to @c null or empty string will restore the
7624 initial value.
7625 </note>
7626
7627 <see>
7628 <link to="#mediaFormats"/>,
7629 <link to="IMediumFormat::id"/>,
7630 <link to="IVirtualBox::createHardDisk"/>
7631 </see>
7632 </desc>
7633 </attribute>
7634
7635 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7636 <desc>
7637 Library that provides authentication for VRDP clients. The library
7638 is used if a virtual machine's authentication type is set to "external"
7639 in the VM RemoteDisplay configuration.
7640
7641 The system library extension (".DLL" or ".so") must be omitted.
7642 A full path can be specified; if not, then the library must reside on the
7643 system's default library path.
7644
7645 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7646 of that name in one of the default VirtualBox library directories.
7647
7648 For details about VirtualBox authentication libraries and how to implement
7649 them, please refer to the VirtualBox manual.
7650
7651 <note>
7652 Setting this property to @c null or empty string will restore the
7653 initial value.
7654 </note>
7655 </desc>
7656 </attribute>
7657
7658 <attribute name="webServiceAuthLibrary" type="wstring">
7659 <desc>
7660 Library that provides authentication for webservice clients. The library
7661 is used if a virtual machine's authentication type is set to "external"
7662 in the VM RemoteDisplay configuration and will be called from
7663 within the <link to="IWebsessionManager::logon" /> implementation.
7664
7665 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7666 there is no per-VM setting for this, as the webservice is a global
7667 resource (if it is running). Only for this setting (for the webservice),
7668 setting this value to a literal <tt>"null"</tt> string disables authentication,
7669 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7670 no matter what user name and password are supplied.
7671
7672 The initial value of this property is <tt>"VRDPAuth"</tt>,
7673 meaning that the webservice will use the same authentication
7674 library that is used by default for VBoxVRDP (again, see
7675 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7676 The format and calling convention of authentication libraries
7677 is the same for the webservice as it is for VBoxVRDP.
7678
7679 <note>
7680 Setting this property to @c null or empty string will restore the
7681 initial value.
7682 </note>
7683 </desc>
7684 </attribute>
7685
7686 <attribute name="LogHistoryCount" type="unsigned long">
7687 <desc>
7688 This value specifies how many old release log files are kept.
7689 </desc>
7690 </attribute>
7691
7692 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7693 <desc>This value hold the default audio driver for the current
7694 system.</desc>
7695 </attribute>
7696
7697 <method name="getMaxDevicesPerPortForStorageBus">
7698 <desc>Returns the maximum number of devices which can be attached to a port
7699 for the given storage bus.</desc>
7700
7701 <param name="bus" type="StorageBus" dir="in">
7702 <desc>The storage bus type to get the value for.</desc>
7703 </param>
7704
7705 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7706 <desc>The maximum number of devices which can eb attached to the port for the given
7707 storage bus.</desc>
7708 </param>
7709 </method>
7710
7711 <method name="getMinPortCountForStorageBus">
7712 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7713
7714 <param name="bus" type="StorageBus" dir="in">
7715 <desc>The storage bus type to get the value for.</desc>
7716 </param>
7717
7718 <param name="minPortCount" type="unsigned long" dir="return">
7719 <desc>The minimum number of ports for the given storage bus.</desc>
7720 </param>
7721 </method>
7722
7723 <method name="getMaxPortCountForStorageBus">
7724 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7725
7726 <param name="bus" type="StorageBus" dir="in">
7727 <desc>The storage bus type to get the value for.</desc>
7728 </param>
7729
7730 <param name="maxPortCount" type="unsigned long" dir="return">
7731 <desc>The maximum number of ports for the given storage bus.</desc>
7732 </param>
7733 </method>
7734
7735 <method name="getMaxInstancesOfStorageBus">
7736 <desc>Returns the maximum number of storage bus instances which
7737 can be configured for each VM. This corresponds to the number of
7738 storage controllers one can have.</desc>
7739
7740 <param name="bus" type="StorageBus" dir="in">
7741 <desc>The storage bus type to get the value for.</desc>
7742 </param>
7743
7744 <param name="maxInstances" type="unsigned long" dir="return">
7745 <desc>The maximum number of instances for the given storage bus.</desc>
7746 </param>
7747 </method>
7748 </interface>
7749
7750 <!--
7751 // IGuest
7752 /////////////////////////////////////////////////////////////////////////
7753 -->
7754
7755 <interface
7756 name="IGuestOSType" extends="$unknown"
7757 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7758 wsmap="struct"
7759 >
7760 <desc>
7761 </desc>
7762
7763 <attribute name="familyId" type="wstring" readonly="yes">
7764 <desc>Guest OS family identifier string.</desc>
7765 </attribute>
7766
7767 <attribute name="familyDescription" type="wstring" readonly="yes">
7768 <desc>Human readable description of the guest OS family.</desc>
7769 </attribute>
7770
7771 <attribute name="id" type="wstring" readonly="yes">
7772 <desc>Guest OS identifier string.</desc>
7773 </attribute>
7774
7775 <attribute name="description" type="wstring" readonly="yes">
7776 <desc>Human readable description of the guest OS.</desc>
7777 </attribute>
7778
7779 <attribute name="is64Bit" type="boolean" readonly="yes">
7780 <desc>Returns @c true if the given OS is 64-bit</desc>
7781 </attribute>
7782
7783 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7784 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7785 </attribute>
7786
7787 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7788 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7789 </attribute>
7790
7791 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7792 <desc>Recommended RAM size in Megabytes.</desc>
7793 </attribute>
7794
7795 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7796 <desc>Recommended video RAM size in Megabytes.</desc>
7797 </attribute>
7798
7799 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7800 <desc>Recommended hard disk size in Megabytes.</desc>
7801 </attribute>
7802
7803 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7804 <desc>Returns recommended network adapter for this OS type.</desc>
7805 </attribute>
7806 </interface>
7807
7808 <interface
7809 name="IGuest" extends="$unknown"
7810 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7811 wsmap="managed"
7812 >
7813 <desc>
7814 The IGuest interface represents information about the operating system
7815 running inside the virtual machine. Used in
7816 <link to="IConsole::guest"/>.
7817
7818 IGuest provides information about the guest operating system, whether
7819 Guest Additions are installed and other OS-specific virtual machine
7820 properties.
7821 </desc>
7822
7823 <attribute name="OSTypeId" type="wstring" readonly="yes">
7824 <desc>
7825 Identifier of the Guest OS type as reported by the Guest
7826 Additions.
7827 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7828 an IGuestOSType object representing details about the given
7829 Guest OS type.
7830 <note>
7831 If Guest Additions are not installed, this value will be
7832 the same as <link to="IMachine::OSTypeId"/>.
7833 </note>
7834 </desc>
7835 </attribute>
7836
7837 <attribute name="additionsActive" type="boolean" readonly="yes">
7838 <desc>
7839 Flag whether the Guest Additions are installed and active
7840 in which case their version will be returned by the
7841 <link to="#additionsVersion"/> property.
7842 </desc>
7843 </attribute>
7844
7845 <attribute name="additionsVersion" type="wstring" readonly="yes">
7846 <desc>
7847 Version of the Guest Additions (3 decimal numbers separated
7848 by dots) or empty when the Additions are not installed. The
7849 Additions may also report a version but yet not be active as
7850 the version might be refused by VirtualBox (incompatible) or
7851 other failures occurred.
7852 </desc>
7853 </attribute>
7854
7855 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7856 <desc>
7857 Flag whether seamless guest display rendering (seamless desktop
7858 integration) is supported.
7859 </desc>
7860 </attribute>
7861
7862 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7863 <desc>
7864 Flag whether the guest is in graphics mode. If it is not, then
7865 seamless rendering will not work, resize hints are not immediately
7866 acted on and guest display resizes are probably not initiated by
7867 the guest additions.
7868 </desc>
7869 </attribute>
7870
7871 <attribute name="memoryBalloonSize" type="unsigned long">
7872 <desc>Guest system memory balloon size in megabytes.</desc>
7873 </attribute>
7874
7875 <attribute name="statisticsUpdateInterval" type="unsigned long">
7876 <desc>Interval to update guest statistics in seconds.</desc>
7877 </attribute>
7878
7879 <method name="setCredentials">
7880 <desc>
7881 Store login credentials that can be queried by guest operating
7882 systems with Additions installed. The credentials are transient
7883 to the session and the guest may also choose to erase them. Note
7884 that the caller cannot determine whether the guest operating system
7885 has queried or made use of the credentials.
7886
7887 <result name="VBOX_E_VM_ERROR">
7888 VMM device is not available.
7889 </result>
7890
7891 </desc>
7892 <param name="userName" type="wstring" dir="in">
7893 <desc>User name string, can be empty</desc>
7894 </param>
7895 <param name="password" type="wstring" dir="in">
7896 <desc>Password string, can be empty</desc>
7897 </param>
7898 <param name="domain" type="wstring" dir="in">
7899 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7900 </param>
7901 <param name="allowInteractiveLogon" type="boolean" dir="in">
7902 <desc>
7903 Flag whether the guest should alternatively allow the user to
7904 interactively specify different credentials. This flag might
7905 not be supported by all versions of the Additions.
7906 </desc>
7907 </param>
7908 </method>
7909
7910 <method name="getStatistic">
7911 <desc>
7912 Query specified guest statistics as reported by the VirtualBox Additions.
7913 </desc>
7914 <param name="cpuId" type="unsigned long" dir="in">
7915 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7916 </param>
7917 <param name="statistic" type="GuestStatisticType" dir="in">
7918 <desc>Statistic type.</desc>
7919 </param>
7920 <param name="statVal" type="unsigned long" dir="return">
7921 <desc>Statistics value</desc>
7922 </param>
7923 </method>
7924
7925 </interface>
7926
7927
7928 <!--
7929 // IProgress
7930 /////////////////////////////////////////////////////////////////////////
7931 -->
7932
7933 <interface
7934 name="IProgress" extends="$unknown"
7935 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7936 wsmap="managed"
7937 >
7938 <desc>
7939 The IProgress interface is used to track and control
7940 asynchronous tasks within VirtualBox.
7941
7942 An instance of this is returned every time VirtualBox starts
7943 an asynchronous task (in other words, a separate thread) which
7944 continues to run after a method call returns. For example,
7945 <link to="IConsole::saveState" />, which saves the state of
7946 a running virtual machine, can take a long time to complete.
7947 To be able to display a progress bar, a user interface such as
7948 the VirtualBox graphical user interface can use the IProgress
7949 object returned by that method.
7950
7951 Note that IProgress is a "read-only" interface in the sense
7952 that only the VirtualBox internals behind the Main API can
7953 create and manipulate progress objects, whereas client code
7954 can only use the IProgress object to monitor a task's
7955 progress and, if <link to="#cancelable" /> is @c true,
7956 cancel the task by calling <link to="#cancel" />.
7957
7958 A task represented by IProgress consists of either one or
7959 several sub-operations that run sequentially, one by one (see
7960 <link to="#operation" /> and <link to="#operationCount" />).
7961 Every operation is identified by a number (starting from 0)
7962 and has a separate description.
7963
7964 You can find the individual percentage of completion of the current
7965 operation in <link to="#operationPercent" /> and the
7966 percentage of completion of the task as a whole
7967 in <link to="#percent" />.
7968
7969 Similarly, you can wait for the completion of a particular
7970 operation via <link to="#waitForOperationCompletion" /> or
7971 for the completion of the whole task via
7972 <link to="#waitForCompletion" />.
7973 </desc>
7974
7975 <attribute name="id" type="uuid" mod="string" readonly="yes">
7976 <desc>ID of the task.</desc>
7977 </attribute>
7978
7979 <attribute name="description" type="wstring" readonly="yes">
7980 <desc>Description of the task.</desc>
7981 </attribute>
7982
7983 <attribute name="initiator" type="$unknown" readonly="yes">
7984 <desc>Initiator of the task.</desc>
7985 </attribute>
7986
7987 <attribute name="cancelable" type="boolean" readonly="yes">
7988 <desc>Whether the task can be interrupted.</desc>
7989 </attribute>
7990
7991 <attribute name="percent" type="unsigned long" readonly="yes">
7992 <desc>
7993 Current progress value of the task as a whole, in percent.
7994 This value depends on how many operations are already complete.
7995 Returns 100 if <link to="#completed" /> is @c true.
7996 </desc>
7997 </attribute>
7998
7999 <attribute name="timeRemaining" type="long" readonly="yes">
8000 <desc>
8001 Estimated remaining time until the task completes, in
8002 seconds. Returns 0 once the task has completed; returns -1
8003 if the remaining time cannot be computed, in particular if
8004 the current progress is 0.
8005
8006 Even if a value is returned, the estimate will be unreliable
8007 for low progress values. It will become more reliable as the
8008 task progresses; it is not recommended to display an ETA
8009 before at least 20% of a task have completed.
8010 </desc>
8011 </attribute>
8012
8013 <attribute name="completed" type="boolean" readonly="yes">
8014 <desc>Whether the task has been completed.</desc>
8015 </attribute>
8016
8017 <attribute name="canceled" type="boolean" readonly="yes">
8018 <desc>Whether the task has been canceled.</desc>
8019 </attribute>
8020
8021 <attribute name="resultCode" type="long" readonly="yes">
8022 <desc>
8023 Result code of the progress task.
8024 Valid only if <link to="#completed"/> is @c true.
8025 </desc>
8026 </attribute>
8027
8028 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8029 <desc>
8030 Extended information about the unsuccessful result of the
8031 progress operation. May be @c null if no extended information
8032 is available.
8033 Valid only if <link to="#completed"/> is @c true and
8034 <link to="#resultCode"/> indicates a failure.
8035 </desc>
8036 </attribute>
8037
8038 <attribute name="operationCount" type="unsigned long" readonly="yes">
8039 <desc>
8040 Number of sub-operations this task is divided into.
8041 Every task consists of at least one suboperation.
8042 </desc>
8043 </attribute>
8044
8045 <attribute name="operation" type="unsigned long" readonly="yes">
8046 <desc>Number of the sub-operation being currently executed.</desc>
8047 </attribute>
8048
8049 <attribute name="operationDescription" type="wstring" readonly="yes">
8050 <desc>
8051 Description of the sub-operation being currently executed.
8052 </desc>
8053 </attribute>
8054
8055 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8056 <desc>Progress value of the current sub-operation only, in percent.</desc>
8057 </attribute>
8058
8059 <method name="setCurrentOperationProgress">
8060 <desc>Internal method, not to be called externally.</desc>
8061 <param name="percent" type="unsigned long" dir="in" />
8062 </method>
8063 <method name="setNextOperation">
8064 <desc>Internal method, not to be called externally.</desc>
8065 <param name="nextOperationDescription" type="wstring" dir="in" />
8066 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8067 </method>
8068
8069 <method name="waitForCompletion">
8070 <desc>
8071 Waits until the task is done (including all sub-operations)
8072 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8073
8074 <result name="VBOX_E_IPRT_ERROR">
8075 Failed to wait for task completion.
8076 </result>
8077 </desc>
8078
8079 <param name="timeout" type="long" dir="in">
8080 <desc>
8081 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8082 </desc>
8083 </param>
8084 </method>
8085
8086 <method name="waitForOperationCompletion">
8087 <desc>
8088 Waits until the given operation is done with a given timeout in
8089 milliseconds; specify -1 for an indefinite wait.
8090
8091 <result name="VBOX_E_IPRT_ERROR">
8092 Failed to wait for operation completion.
8093 </result>
8094
8095 </desc>
8096 <param name="operation" type="unsigned long" dir="in">
8097 <desc>
8098 Number of the operation to wait for.
8099 Must be less than <link to="#operationCount"/>.
8100 </desc>
8101 </param>
8102 <param name="timeout" type="long" dir="in">
8103 <desc>
8104 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8105 </desc>
8106 </param>
8107 </method>
8108
8109 <method name="cancel">
8110 <desc>
8111 Cancels the task.
8112 <note>
8113 If <link to="#cancelable"/> is @c false, then this method will fail.
8114 </note>
8115
8116 <result name="VBOX_E_INVALID_OBJECT_STATE">
8117 Operation cannot be canceled.
8118 </result>
8119
8120 </desc>
8121 </method>
8122
8123 </interface>
8124
8125
8126 <!--
8127 // ISnapshot
8128 /////////////////////////////////////////////////////////////////////////
8129 -->
8130
8131 <interface
8132 name="ISnapshot" extends="$unknown"
8133 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8134 wsmap="managed"
8135 >
8136 <desc>
8137 The ISnapshot interface represents a snapshot of the virtual
8138 machine.
8139
8140 Together with the differencing media that are created
8141 when a snapshot is taken, a machine can be brought back to
8142 the exact state it was in when the snapshot was taken.
8143
8144 The ISnapshot interface has no methods, only attributes; snapshots
8145 are controlled through methods of the <link to="IConsole" /> interface
8146 which also manage the media associated with the snapshot.
8147 The following operations exist:
8148
8149 <ul>
8150 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8151 by creating new, empty differencing images for the machine's
8152 media and saving the VM settings and (if the VM is running)
8153 the current VM state in the snapshot.
8154
8155 The differencing images will then receive all data written to
8156 the machine's media, while their parent (base) images
8157 remain unmodified after the snapshot has been taken (see
8158 <link to="IMedium" /> for details about differencing images).
8159 This simplifies restoring a machine to the state of a snapshot:
8160 only the differencing images need to be deleted.
8161
8162 The current machine state is not changed by taking a snapshot.
8163 If the machine is running, it will resume execution after the
8164 snapshot has been taken.
8165 </li>
8166
8167 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8168 a previous snapshot. This resets the machine's state to that of
8169 the previous snapshot by deleting the differencing image of each
8170 of the machine's media and setting the machine's settings
8171 and state to the state that was saved in the snapshot (if any).
8172
8173 This destroys the machine's current state.
8174 </li>
8175
8176 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8177 without affecting the current machine state.
8178
8179 This does not change the machine, but instead frees the resources
8180 allocated when the snapshot was taken: the settings and machine state
8181 is deleted (if any), and the snapshot's differencing image for each
8182 of the machine's media gets merged with its parent image.
8183
8184 Neither the current machine state nor other snapshots are affected
8185 by this operation, except that parent disk images will be modified
8186 to contain the disk data associated with the snapshot being deleted.
8187 </li>
8188
8189 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8190 this completely reverts the virtual machine to the state it was in
8191 before the current snapshot has been taken. Effectively, this goes
8192 back to the state before the current snapshot, which might be
8193 an earlier snapshot.
8194
8195 The current state, as well as the current snapshot, are lost.
8196 </li>
8197 </ul>
8198
8199 Each snapshot contains the settings of the virtual machine (hardware
8200 configuration etc.). In addition, if the machine was running when the
8201 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8202 the current VM state is saved in the snapshot (similarly to what happens
8203 when a VM's state is saved). The snapshot is then said to
8204 be <i>online</i> because when restoring it, the VM will be running.
8205
8206 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8207 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8208
8209 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8210 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8211 it then contains a so-called "zero execution state", representing a
8212 machine that is powered off.
8213
8214 <h3>Snapshot branches and the "current" snapshot</h3>
8215
8216 Snapshots can be chained, whereby every next snapshot is based on the
8217 previous one. This chaining is related to medium branching
8218 (see the <link to="IMedium"/> description) in that every time
8219 a new snapshot is created, a new differencing medium is implicitly
8220 created for all normal media attached to the machine.
8221
8222 Each virtual machine has a "current snapshot", identified by
8223 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8224 to the last snapshot in the chain. In a future version of VirtualBox,
8225 it will be possible to reset a machine's current state to that of an
8226 earlier snapshot without discarding the current state so that it will be
8227 possible to create alternative snapshot paths in a snapshot tree.
8228
8229 In the current implementation, multiple snapshot branches within one
8230 virtual machine are not allowed. Every machine has a single branch,
8231 and <link to="IConsole::takeSnapshot"/> operation adds a new
8232 snapshot to the top of that branch.
8233 </desc>
8234
8235 <attribute name="id" type="uuid" mod="string" readonly="yes">
8236 <desc>UUID of the snapshot.</desc>
8237 </attribute>
8238
8239 <attribute name="name" type="wstring">
8240 <desc>Short name of the snapshot.</desc>
8241 </attribute>
8242
8243 <attribute name="description" type="wstring">
8244 <desc>Optional description of the snapshot.</desc>
8245 </attribute>
8246
8247 <attribute name="timeStamp" type="long long" readonly="yes">
8248 <desc>
8249 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8250 </desc>
8251 </attribute>
8252
8253 <attribute name="online" type="boolean" readonly="yes">
8254 <desc>
8255 @c true if this snapshot is an online snapshot and @c false otherwise.
8256
8257 When this attribute is @c true, the
8258 <link to="IMachine::stateFilePath"/> attribute of the
8259 <link to="#machine"/> object associated with this snapshot
8260 will point to the saved state file. Otherwise, it will be
8261 an empty string.
8262 </desc>
8263 </attribute>
8264
8265 <attribute name="machine" type="IMachine" readonly="yes">
8266 <desc>
8267 Virtual machine this snapshot is taken on. This object
8268 stores all settings the machine had when taking this snapshot.
8269 <note>
8270 The returned machine object is immutable, i.e. no
8271 any settings can be changed.
8272 </note>
8273 </desc>
8274 </attribute>
8275
8276 <attribute name="parent" type="ISnapshot" readonly="yes">
8277 <desc>
8278 Parent snapshot (a snapshot this one is based on), or
8279 @c null if the snapshot has no parent.
8280 </desc>
8281 </attribute>
8282
8283 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8284 <desc>
8285 Child snapshots (all snapshots having this one as a parent).
8286 <note>
8287 In the current implementation, there can be only one
8288 child snapshot, or no children at all, meaning this is the
8289 last (head) snapshot.
8290 </note>
8291 </desc>
8292 </attribute>
8293
8294 </interface>
8295
8296
8297 <!--
8298 // IMedium
8299 /////////////////////////////////////////////////////////////////////////
8300 -->
8301
8302 <enum
8303 name="MediumState"
8304 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8305 >
8306 <desc>
8307 Virtual medium state.
8308 <see>IMedium</see>
8309 </desc>
8310
8311 <const name="NotCreated" value="0">
8312 <desc>
8313 Associated medium storage does not exist (either was not created yet or
8314 was deleted).
8315 </desc>
8316 </const>
8317 <const name="Created" value="1">
8318 <desc>
8319 Associated storage exists and accessible.
8320 </desc>
8321 </const>
8322 <const name="LockedRead" value="2">
8323 <desc>
8324 Medium is locked for reading, no data modification is possible.
8325 </desc>
8326 </const>
8327 <const name="LockedWrite" value="3">
8328 <desc>
8329 Medium is locked for writing, no concurrent data reading or modification
8330 is possible.
8331 </desc>
8332 </const>
8333 <const name="Inaccessible" value="4">
8334 <desc>
8335 Associated medium storage is not accessible.
8336 </desc>
8337 </const>
8338 <const name="Creating" value="5">
8339 <desc>
8340 Associated medium storage is being created.
8341 </desc>
8342 </const>
8343 <const name="Deleting" value="6">
8344 <desc>
8345 Associated medium storage is being deleted.
8346 </desc>
8347 </const>
8348 </enum>
8349
8350 <enum
8351 name="MediumType"
8352 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8353 >
8354 <desc>
8355 Virtual medium type.
8356 <see>IMedium</see>
8357 </desc>
8358
8359 <const name="Normal" value="0">
8360 <desc>
8361 Normal medium (attached directly or indirectly, preserved
8362 when taking snapshots).
8363 </desc>
8364 </const>
8365 <const name="Immutable" value="1">
8366 <desc>
8367 Immutable medium (attached indirectly, changes are wiped out
8368 after powering off the virtual machine).
8369 </desc>
8370 </const>
8371 <const name="Writethrough" value="2">
8372 <desc>
8373 Write through medium (attached directly, ignored when
8374 taking snapshots).
8375 </desc>
8376 </const>
8377 </enum>
8378
8379 <enum
8380 name="MediumVariant"
8381 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8382 >
8383 <desc>
8384 Virtual medium image variant. More than one flag may be set.
8385 <see>IMedium</see>
8386 </desc>
8387
8388 <const name="Standard" value="0">
8389 <desc>
8390 No particular variant requested, results in using the backend default.
8391 </desc>
8392 </const>
8393 <const name="VmdkSplit2G" value="0x01">
8394 <desc>
8395 VMDK image split in chunks of less than 2GByte.
8396 </desc>
8397 </const>
8398 <const name="VmdkStreamOptimized" value="0x04">
8399 <desc>
8400 VMDK streamOptimized image. Special import/export format which is
8401 read-only/append-only.
8402 </desc>
8403 </const>
8404 <const name="VmdkESX" value="0x08">
8405 <desc>
8406 VMDK format variant used on ESX products.
8407 </desc>
8408 </const>
8409 <const name="Fixed" value="0x10000">
8410 <desc>
8411 Fixed image. Only allowed for base images.
8412 </desc>
8413 </const>
8414 <const name="Diff" value="0x20000">
8415 <desc>
8416 Fixed image. Only allowed for base images.
8417 </desc>
8418 </const>
8419 </enum>
8420
8421 <interface
8422 name="IMediumAttachment" extends="$unknown"
8423 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8424 wsmap="struct"
8425 >
8426 <desc>
8427 The IMediumAttachment interface represents the attachment
8428 of a storage medium to a virtual machine. Each machine contains
8429 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8430
8431 Each medium attachment specifies a storage controller as well as a port
8432 and device number. Fixed media (hard disks) will always also specify
8433 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8434 image or images that represent the virtual hard disk. For removeable media,
8435 the IMedia instance is optional; it can be NULL if no media is mounted (see
8436 <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 NULL for removable devices.</desc>
8442 </attribute>
8443
8444 <attribute name="controller" type="wstring" readonly="yes">
8445 <desc>Name of the storage controller of this attachment; this
8446 refers to one of the controllers in <link to="IMachine::storageControllers" />
8447 by name.</desc>
8448 </attribute>
8449
8450 <attribute name="port" type="long" readonly="yes">
8451 <desc>Port number of this attachment.</desc>
8452 </attribute>
8453
8454 <attribute name="device" type="long" readonly="yes">
8455 <desc>Device slot number of this attachment.</desc>
8456 </attribute>
8457
8458 <attribute name="type" type="DeviceType" readonly="yes">
8459 <desc>Device type of this attachment.</desc>
8460 </attribute>
8461
8462 <attribute name="passthrough" type="boolean" readonly="no">
8463 <desc>Pass I/O requests through to a device on the host.</desc>
8464 </attribute>
8465
8466 </interface>
8467
8468 <interface
8469 name="IMedium" extends="$unknown"
8470 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8471 wsmap="managed"
8472 >
8473 <desc>
8474 The IMedium interface represents virtual storage for a machine's
8475 hard disks, CD/DVD or floppy drives. It will typically represent
8476 a disk image on the host, for example a VDI or VMDK file representing
8477 a virtual hard disk, or an ISO or RAW file representing virtual
8478 removable media, but can also point to a network location (e.g.
8479 for iSCSI targets).
8480
8481 Instances of IMedium are connected to virtual machines by way of
8482 medium attachments (see <link to="IMediumAttachment" />), which link
8483 the storage medium to a particular device slot of a storage controller
8484 of the virtual machine.
8485 In the VirtualBox API, virtual storage is therefore always represented
8486 by the following chain of object links:
8487
8488 <ul>
8489 <li><link to="IMachine::storageControllers"/> contains an array of
8490 storage controllers (IDE, SATA, SCSI or a floppy controller;
8491 these are instances of <link to="IStorageController"/>).</li>
8492 <li><link to="IMachine::mediumAttachments"/> contains an array of
8493 medium attachments (instances of <link to="IMediumAttachment"/>),
8494 each containing the name of a storage controller from the above
8495 array, a port/device specification, and an instance of
8496 IMedium representing the medium storage (image file). For removable
8497 media, the storage medium is optional; a medium attachment with no
8498 medium represents a CD/DVD or floppy drive with no medium inserted.
8499 By contrast, hard disk attachments will always have an IMedium
8500 object attached.</li>
8501 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8502 computer or a network resource) that holds actual data. The location of
8503 the storage unit is represented by the <link to="#location"/> attribute.
8504 The value of this attribute is medium type dependent.</li>
8505 </ul>
8506
8507 Existing media are opened using the following methods, depending on the
8508 media type:
8509 <ul>
8510 <li><link to="IVirtualBox::openHardDisk"/></li>
8511 <li><link to="IVirtualBox::openDVDImage"/></li>
8512 <li><link to="IVirtualBox::openFloppyImage"/></li>
8513 </ul>
8514
8515 New hard disk media can be created with the VirtualBox API using the
8516 <link to="IVirtualBox::createHardDisk"/> method.
8517
8518 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8519 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8520 type in a regular file.
8521
8522 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8523 drive; in that case the <link to="#id" /> attribute contains the UUID of
8524 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8525
8526 <h3>Known media</h3>
8527
8528 When an existing medium is opened for the first time, it is automatically
8529 remembered by the given VirtualBox installation or, in other words, becomes
8530 a <i>known medium</i>. Known media are stored in the media
8531 registry transparently maintained by VirtualBox and stored in settings
8532 files so that this registry is preserved when VirtualBox is not running.
8533
8534 Newly created virtual media are remembered only when the associated
8535 storage unit is actually created.
8536
8537 All known media can be enumerated using
8538 <link to="IVirtualBox::hardDisks"/>,
8539 <link to="IVirtualBox::DVDImages"/> and
8540 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8541 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8542 and similar methods or by location using
8543 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8544
8545 Only known media can be attached to virtual machines.
8546
8547 Removing known media from the media registry is performed when the given
8548 medium is closed using the <link to="#close"/> method or when its
8549 associated storage unit is deleted.
8550
8551 <h3>Accessibility checks</h3>
8552
8553 The given medium (with the created storage unit) is considered to be
8554 <i>accessible</i> when its storage unit can be read. In that case, the
8555 <link to="#state"/> attribute has a value of "Created".
8556 When the storage unit cannot be read (for example, because it is located on
8557 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8558 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8559 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8560 obtained by reading the <link to="#lastAccessError"/> attribute.
8561
8562 A new accessibility check is performed each time the <link to="#state"/>
8563 attribute is read. This check may take long time (several seconds or even
8564 minutes, depending on the storage unit location and format), and will
8565 block the calling thread until finished. For this reason, it is recommended
8566 to never read this attribute on the main UI thread to avoid making the UI
8567 unresponsive.
8568
8569 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8570 created for the first time), all known media are in the
8571 <link to="MediumState_Inaccessible"/> state but the value of the <link
8572 to="#lastAccessError"/> attribute is an empty string because no actual
8573 accessibility check is made on startup. This is done to make the
8574 VirtualBox object ready for serving requests as
8575 fast as possible and let the end-user application decide if it needs to
8576 check media accessibility right away or not.
8577
8578 <h3>Hard disk types</h3>
8579
8580 There are three types of hard disk images (see <link to="MediumType" />):
8581 "normal", "immutable" and "writethrough", represented by the
8582 <link to="#type"/> attribute. The type of the hard disk defines how the
8583 hard disk is attached to a virtual machine and what happens when a
8584 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8585 attached hard disk is taken.
8586
8587 All hard disks can be also divided in two groups: <i>base</i> hard
8588 disks and <i>differencing</i> hard disks. A base hard disk contains all
8589 sectors of the hard disk data in its own storage and therefore can be
8590 used independently. On the contrary, a differencing hard disk is a
8591 "delta" to some other disk and contains only those sectors which differ
8592 from that other disk, which is then called a <i>parent</i>. The differencing
8593 hard disk is said to be <i>linked to</i> that parent.
8594 The parent may be itself a differencing image, thus forming a chain of
8595 linked hard disks. The last element in that chain
8596 must always be a base medium. Note that several differencing
8597 hard disks may be linked to the same parent hard disk.
8598
8599 Differencing hard disks can be distinguished from base hard disks by
8600 querying the <link to="#parent"/> attribute: base hard disks do not have
8601 parents they would depend on, so the value of this attribute is always
8602 @c null for them. Using this attribute, it is possible to walk up
8603 the hard disk tree (from the child hard disk to its parent). It is also
8604 possible to walk down the tree using the <link to="#children"/>
8605 attribute.
8606
8607 Note that the type of all differencing hard disks is
8608 <link to="MediumType_Normal" />; all other values are
8609 meaningless for them. Base hard disks may be of any type.
8610
8611 <h3>Creating hard disks</h3>
8612
8613 New base hard disks are created using
8614 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8615 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8616 disks are usually implicitly created by VirtualBox when needed but may
8617 also be created explicitly using <link to="#createDiffStorage"/>.
8618
8619 After the hard disk is successfully created (including the storage unit)
8620 or opened, it becomes a known hard disk (remembered in the internal media
8621 registry). Known hard disks can be attached to a virtual machine, accessed
8622 through <link to="IVirtualBox::getHardDisk"/> and
8623 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8624 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8625
8626 The following methods, besides <link to="IMedium::close"/>,
8627 automatically remove the hard disk from the media registry:
8628 <ul>
8629 <li><link to="#deleteStorage"/></li>
8630 <li><link to="#mergeTo"/></li>
8631 </ul>
8632
8633 If the storage unit of the hard disk is a regular file in the host's
8634 file system then the rules stated in the description of the
8635 <link to="IMedium::location"/> attribute apply when setting its value. In
8636 addition, a plain file name without any path may be given, in which case
8637 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8638 folder</link> will be prepended to it.
8639
8640 <h4>Automatic composition of the file name part</h4>
8641
8642 Another extension to the <link to="IMedium::location"/> attribute is that
8643 there is a possibility to cause VirtualBox to compose a unique value for
8644 the file name part of the location using the UUID of the hard disk. This
8645 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8646 e.g. before the storage unit is created, and works as follows. You set the
8647 value of the <link to="IMedium::location"/> attribute to a location
8648 specification which only contains the path specification but not the file
8649 name part and ends with either a forward slash or a backslash character.
8650 In response, VirtualBox will generate a new UUID for the hard disk and
8651 compose the file name using the following pattern:
8652 <pre>
8653 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8654 </pre>
8655 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8656 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8657 is the default extension for the storage format of this hard disk. After
8658 that, you may call any of the methods that create a new hard disk storage
8659 unit and they will use the generated UUID and file name.
8660
8661 <h3>Attaching Hard Disks</h3>
8662
8663 Hard disks are attached to virtual machines using the
8664 <link to="IMachine::attachDevice"/> method and detached using the
8665 <link to="IMachine::detachDevice"/> method. Depending on their
8666 <link to="#type"/>, hard disks are attached either
8667 <i>directly</i> or <i>indirectly</i>.
8668
8669 When a hard disk is being attached directly, it is associated with the
8670 virtual machine and used for hard disk operations when the machine is
8671 running. When a hard disk is being attached indirectly, a new differencing
8672 hard disk linked to it is implicitly created and this differencing hard
8673 disk is associated with the machine and used for hard disk operations.
8674 This also means that if <link to="IMachine::attachDevice"/> performs
8675 a direct attachment then the same hard disk will be returned in response
8676 to the subsequent <link to="IMachine::getMedium"/> call; however if
8677 an indirect attachment is performed then
8678 <link to="IMachine::getMedium"/> will return the implicitly created
8679 differencing hard disk, not the original one passed to <link
8680 to="IMachine::attachDevice"/>. In detail:
8681
8682 <ul>
8683 <li><b>Normal base</b> hard disks that do not have children (i.e.
8684 differencing hard disks linked to them) and that are not already
8685 attached to virtual machines in snapshots are attached <b>directly</b>.
8686 Otherwise, they are attached <b>indirectly</b> because having
8687 dependent children or being part of the snapshot makes it impossible
8688 to modify hard disk contents without breaking the integrity of the
8689 dependent party. The <link to="#readOnly"/> attribute allows to
8690 quickly determine the kind of the attachment for the given hard
8691 disk. Note that if a normal base hard disk is to be indirectly
8692 attached to a virtual machine with snapshots then a special
8693 procedure called <i>smart attachment</i> is performed (see below).</li>
8694 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8695 they are attached <b>directly</b> if they do not have children and are
8696 not attached to virtual machines in snapshots, and <b>indirectly</b>
8697 otherwise. Note that the smart attachment procedure is never performed
8698 for differencing hard disks.</li>
8699 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8700 they are designed to be non-writable. If an immutable hard disk is
8701 attached to a virtual machine with snapshots then a special
8702 procedure called smart attachment is performed (see below).</li>
8703 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8704 also as designed. This also means that writethrough hard disks cannot
8705 have other hard disks linked to them at all.</li>
8706 </ul>
8707
8708 Note that the same hard disk, regardless of its type, may be attached to
8709 more than one virtual machine at a time. In this case, the machine that is
8710 started first gains exclusive access to the hard disk and attempts to
8711 start other machines having this hard disk attached will fail until the
8712 first machine is powered down.
8713
8714 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8715 that the given hard disk remains associated with the given machine after a
8716 successful <link to="IMachine::detachDevice"/> call until
8717 <link to="IMachine::saveSettings"/> is called to save all changes to
8718 machine settings to disk. This deferring is necessary to guarantee that
8719 the hard disk configuration may be restored at any time by a call to
8720 <link to="IMachine::discardSettings"/> before the settings
8721 are saved (committed).
8722
8723 Note that if <link to="IMachine::discardSettings"/> is called after
8724 indirectly attaching some hard disks to the machine but before a call to
8725 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8726 all differencing hard disks implicitly created by
8727 <link to="IMachine::attachDevice"/> for these indirect attachments.
8728 Such implicitly created hard disks will also be immediately deleted when
8729 detached explicitly using the <link to="IMachine::detachDevice"/>
8730 call if it is made before <link to="IMachine::saveSettings"/>. This
8731 implicit deletion is safe because newly created differencing hard
8732 disks do not contain any user data.
8733
8734 However, keep in mind that detaching differencing hard disks that were
8735 implicitly created by <link to="IMachine::attachDevice"/>
8736 before the last <link to="IMachine::saveSettings"/> call will
8737 <b>not</b> implicitly delete them as they may already contain some data
8738 (for example, as a result of virtual machine execution). If these hard
8739 disks are no more necessary, the caller can always delete them explicitly
8740 using <link to="#deleteStorage"/> after they are actually de-associated
8741 from this machine by the <link to="IMachine::saveSettings"/> call.
8742
8743 <h3>Smart Attachment</h3>
8744
8745 When normal base or immutable hard disks are indirectly attached to a
8746 virtual machine then some additional steps are performed to make sure the
8747 virtual machine will have the most recent "view" of the hard disk being
8748 attached. These steps include walking through the machine's snapshots
8749 starting from the current one and going through ancestors up to the first
8750 snapshot. Hard disks attached to the virtual machine in all
8751 of the encountered snapshots are checked whether they are descendants of
8752 the given normal base or immutable hard disk. The first found child (which
8753 is the differencing hard disk) will be used instead of the normal base or
8754 immutable hard disk as a parent for creating a new differencing hard disk
8755 that will be actually attached to the machine. And only if no descendants
8756 are found or if the virtual machine does not have any snapshots then the
8757 normal base or immutable hard disk will be used itself as a parent for
8758 this differencing hard disk.
8759
8760 It is easier to explain what smart attachment does using the
8761 following example:
8762 <pre>
8763BEFORE attaching B.vdi: AFTER attaching B.vdi:
8764
8765Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8766 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8767 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8768 Snapshot 4 (none) Snapshot 4 (none)
8769 CurState (none) CurState (D3->D2.vdi)
8770
8771 NOT
8772 ...
8773 CurState (D3->B.vdi)
8774 </pre>
8775 The first column is the virtual machine configuration before the base hard
8776 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8777 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8778 mean that the hard disk that is actually attached to the machine is a
8779 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8780 another hard disk, <tt>B.vdi</tt>.
8781
8782 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8783 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8784 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8785 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8786 it cannot be attached directly and needs an indirect attachment (i.e.
8787 implicit creation of a new differencing hard disk). Due to the smart
8788 attachment procedure, the new differencing hard disk
8789 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8790 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8791 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8792 machine.
8793
8794 Note that if there is more than one descendant hard disk of the given base
8795 hard disk found in a snapshot, and there is an exact device, channel and
8796 bus match, then this exact match will be used. Otherwise, the youngest
8797 descendant will be picked up.
8798
8799 There is one more important aspect of the smart attachment procedure which
8800 is not related to snapshots at all. Before walking through the snapshots
8801 as described above, the backup copy of the current list of hard disk
8802 attachment is searched for descendants. This backup copy is created when
8803 the hard disk configuration is changed for the first time after the last
8804 <link to="IMachine::saveSettings"/> call and used by
8805 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8806 changes. When such a descendant is found in this backup copy, it will be
8807 simply re-attached back, without creating a new differencing hard disk for
8808 it. This optimization is necessary to make it possible to re-attach the
8809 base or immutable hard disk to a different bus, channel or device slot
8810 without losing the contents of the differencing hard disk actually
8811 attached to the machine in place of it.
8812 </desc>
8813
8814 <attribute name="id" type="uuid" mod="string" readonly="yes">
8815 <desc>
8816 UUID of the medium. For a newly created medium, this value is a randomly
8817 generated UUID.
8818
8819 <note>
8820 For media in one of MediumState_NotCreated, MediumState_Creating or
8821 MediumState_Deleting states, the value of this property is undefined
8822 and will most likely be an empty UUID.
8823 </note>
8824 </desc>
8825 </attribute>
8826
8827 <attribute name="description" type="wstring">
8828 <desc>
8829 Optional description of the medium. For a newly created medium the value
8830 of this attribute is an empty string.
8831
8832 Medium types that don't support this attribute will return E_NOTIMPL in
8833 attempt to get or set this attribute's value.
8834
8835 <note>
8836 For some storage types, reading this attribute may return an outdated
8837 (last known) value when <link to="#state"/> is <link
8838 to="MediumState_Inaccessible"/> or <link
8839 to="MediumState_LockedWrite"/> because the value of this attribute is
8840 stored within the storage unit itself. Also note that changing the
8841 attribute value is not possible in such case, as well as when the
8842 medium is the <link to="MediumState_LockedRead"/> state.
8843 </note>
8844 </desc>
8845 </attribute>
8846
8847 <attribute name="state" type="MediumState" readonly="yes">
8848 <desc>
8849 Current medium state. Inspect <link to="MediumState"/> values for details.
8850
8851 Reading this attribute may take a long time because an accessibility
8852 check of the storage unit is performed each time the attribute is read.
8853 This check may cause a significant delay if the storage unit of the
8854 given medium is, for example, a file located on a network share which is
8855 not currently accessible due to connectivity problems -- the call will
8856 not return until a timeout interval defined by the host OS for this
8857 operation expires.
8858
8859 If the last known state of the medium is <link to="MediumState_Created"/>
8860 and the accessibility check fails then the state would be set to
8861 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8862 may be used to get more details about the failure. If the state of the
8863 medium is <link to="MediumState_LockedRead"/> or
8864 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8865 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8866 accessibility check in this case.
8867
8868 Note that not all medium states are applicable to all medium types.
8869 </desc>
8870 </attribute>
8871
8872 <attribute name="location" type="wstring">
8873 <desc>
8874 Location of the storage unit holding medium data.
8875
8876 The format of the location string is medium type specific. For medium
8877 types using regular files in a host's file system, the location
8878 string is the full file name.
8879
8880 Some medium types may support changing the storage unit location by
8881 simply changing the value of this property. If this operation is not
8882 supported, the implementation will return E_NOTIMPL in attempt to set
8883 this attribute's value.
8884
8885 When setting a value of the location attribute which is a regular file
8886 in the host's file system, the given file name may be either relative to
8887 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8888 absolute. Note that if the given location specification does not contain
8889 the file extension part then a proper default extension will be
8890 automatically appended by the implementation depending on the medium type.
8891 </desc>
8892 </attribute>
8893
8894 <attribute name="name" type="wstring" readonly="yes">
8895 <desc>
8896 Name of the storage unit holding medium data.
8897
8898 The returned string is a short version of the <link to="#location"/>
8899 attribute that is suitable for representing the medium in situations
8900 where the full location specification is too long (such as lists
8901 and comboboxes in GUI frontends). This string is also used by frontends
8902 to sort the media list alphabetically when needed.
8903
8904 For example, for locations that are regular files in the host's file
8905 system, the value of this attribute is just the file name (+ extension),
8906 without the path specification.
8907
8908 Note that as opposed to the <link to="#location"/> attribute, the name
8909 attribute will not necessary be unique for a list of media of the
8910 given type and format.
8911 </desc>
8912 </attribute>
8913
8914 <attribute name="hostDrive" type="boolean" readonly="yes">
8915 <desc>True if this corresponds to a drive on the host.</desc>
8916 </attribute>
8917
8918 <attribute name="size" type="unsigned long long" readonly="yes">
8919 <desc>
8920 Physical size of the storage unit used to hold medium data (in bytes).
8921
8922 <note>
8923 For media whose <link to="#state"/> is <link
8924 to="MediumState_Inaccessible"/>, the value of this property is the
8925 last known size. For <link to="MediumState_NotCreated"/> media,
8926 the returned value is zero.
8927 </note>
8928 </desc>
8929 </attribute>
8930
8931 <attribute name="format" type="wstring" readonly="yes">
8932 <desc>
8933 Storage format of this medium.
8934
8935 The value of this attribute is a string that specifies a backend used to
8936 store hard disk data. The storage format is defined when you create a
8937 new hard disk or automatically detected when you open an existing hard
8938 disk medium, and cannot be changed later.
8939
8940 The list of all storage formats supported by this VirtualBox
8941 installation can be obtained using
8942 <link to="ISystemProperties::mediumFormats"/>.
8943 </desc>
8944 </attribute>
8945
8946 <attribute name="type" type="MediumType">
8947 <desc>
8948 Type (role) of this hard disk.
8949
8950 The following constraints apply when changing the value of this
8951 attribute:
8952 <ul>
8953 <li>If a hard disk is attached to a virtual machine (either in the
8954 current state or in one of the snapshots), its type cannot be
8955 changed.
8956 </li>
8957 <li>As long as the hard disk has children, its type cannot be set
8958 to <link to="MediumType_Writethrough"/>.
8959 </li>
8960 <li>The type of all differencing hard disks is
8961 <link to="MediumType_Normal"/> and cannot be changed.
8962 </li>
8963 </ul>
8964
8965 The type of a newly created or opened hard disk is set to
8966 <link to="MediumType_Normal"/>.
8967 </desc>
8968 </attribute>
8969
8970 <attribute name="parent" type="IMedium" readonly="yes">
8971 <desc>
8972 Parent of this hard disk (a hard disk this hard disk is directly based
8973 on).
8974
8975 Only differencing hard disks have parents. For base (non-differencing)
8976 hard disks, @c null is returned.
8977 </desc>
8978 </attribute>
8979
8980 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8981 <desc>
8982 Children of this hard disk (all differencing hard disks directly based
8983 on this hard disk). A @c null array is returned if this hard disk
8984 does not have any children.
8985 </desc>
8986 </attribute>
8987
8988 <attribute name="base" type="IMedium" readonly="yes">
8989 <desc>
8990 Base medium of this medium.
8991
8992 If this is a differencing medium, its base hard disk is the medium
8993 the given hard disk branch starts from. For all other types of hard
8994 disks, this property returns the hard disk object itself (i.e. the same
8995 object this property is read on).
8996 </desc>
8997 </attribute>
8998
8999 <attribute name="readOnly" type="boolean" readonly="yes">
9000 <desc>
9001 Returns @c true if this hard disk is read-only and @c false otherwise.
9002
9003 A hard disk is considered to be read-only when its contents cannot be
9004 modified without breaking the integrity of other parties that depend on
9005 this hard disk such as its child hard disks or snapshots of virtual
9006 machines where this hard disk is attached to these machines. If there
9007 are no children and no such snapshots then there is no dependency and
9008 the hard disk is not read-only.
9009
9010 The value of this attribute can be used to determine the kind of the
9011 attachment that will take place when attaching this hard disk to a
9012 virtual machine. If the value is @c false then the hard disk will
9013 be attached directly. If the value is @c true then the hard disk
9014 will be attached indirectly by creating a new differencing child hard
9015 disk for that. See the interface description for more information.
9016
9017 Note that all <link to="MediumType_Immutable">Immutable</link> hard
9018 disks are always read-only while all
9019 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
9020 always not.
9021
9022 <note>
9023 The read-only condition represented by this attribute is related to
9024 the hard disk type and usage, not to the current
9025 <link to="IMedium::state">medium state</link> and not to the read-only
9026 state of the storage unit.
9027 </note>
9028 </desc>
9029 </attribute>
9030
9031 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9032 <desc>
9033 Logical size of this hard disk (in megabytes), as reported to the
9034 guest OS running inside the virtual machine this disk is
9035 attached to. The logical size is defined when the hard disk is created
9036 and cannot be changed later.
9037
9038 <note>
9039 Reading this property on a differencing hard disk will return the size
9040 of its <link to="#base"/> medium.
9041 </note>
9042 <note>
9043 For hard disks whose state is <link to="#state"/> is <link
9044 to="MediumState_Inaccessible"/>, the value of this property is the
9045 last known logical size. For <link to="MediumaState_NotCreated"/> hard
9046 disks, the returned value is zero.
9047 </note>
9048 </desc>
9049 </attribute>
9050
9051 <attribute name="autoReset" type="boolean">
9052 <desc>
9053 Whether this differencing hard disk will be automatically reset each
9054 time a virtual machine it is attached to is powered up.
9055
9056 See <link to="#reset()"/> for more information about resetting
9057 differencing hard disks.
9058
9059 <note>
9060 Reading this property on a base (non-differencing) hard disk will
9061 always @c false. Changing the value of this property in this
9062 case is not supported.
9063 </note>
9064
9065 <result name="VBOX_E_NOT_SUPPORTED">
9066 This is not a differencing hard disk (when changing the attribute
9067 value).
9068 </result>
9069 </desc>
9070 </attribute>
9071
9072 <attribute name="lastAccessError" type="wstring" readonly="yes">
9073 <desc>
9074 Text message that represents the result of the last accessibility
9075 check.
9076
9077 Accessibility checks are performed each time the <link to="#state"/>
9078 attribute is read. An empty string is returned if the last
9079 accessibility check was successful. A non-empty string indicates a
9080 failure and should normally describe a reason of the failure (for
9081 example, a file read error).
9082 </desc>
9083 </attribute>
9084
9085 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9086 <desc>
9087 Array of UUIDs of all machines this medium is attached to.
9088
9089 A @c null array is returned if this medium is not attached to any
9090 machine or to any machine's snapshot.
9091
9092 <note>
9093 The returned array will include a machine even if this medium is not
9094 attached to that machine in the current state but attached to it in
9095 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9096 details.
9097 </note>
9098 </desc>
9099 </attribute>
9100
9101 <method name="getSnapshotIds">
9102 <desc>
9103 Returns an array of UUIDs of all snapshots of the given machine where
9104 this medium is attached to.
9105
9106 If the medium is attached to the machine in the current state, then the
9107 first element in the array will always be the ID of the queried machine
9108 (i.e. the value equal to the @c machineId argument), followed by
9109 snapshot IDs (if any).
9110
9111 If the medium is not attached to the machine in the current state, then
9112 the array will contain only snapshot IDs.
9113
9114 The returned array may be @c null if this medium is not attached
9115 to the given machine at all, neither in the current state nor in one of
9116 the snapshots.
9117 </desc>
9118 <param name="machineId" type="uuid" mod="string" dir="in">
9119 <desc>
9120 UUID of the machine to query.
9121 </desc>
9122 </param>
9123 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9124 <desc>
9125 Array of snapshot UUIDs of the given machine using this medium.
9126 </desc>
9127 </param>
9128 </method>
9129
9130 <method name="lockRead">
9131 <desc>
9132 Locks this medium for reading.
9133
9134 The read lock is shared: many clients can simultaneously lock the
9135 same medium for reading unless it is already locked for writing (see
9136 <link to="#lockWrite"/>) in which case an error is returned.
9137
9138 When the medium is locked for reading, it cannot be modified
9139 from within VirtualBox. This means that any method that changes
9140 the properties of this medium or contents of the storage unit
9141 will return an error (unless explicitly stated otherwise) and
9142 that an attempt to start a virtual machine that wants to modify
9143 the medium will also fail.
9144
9145 When the virtual machine is started up, it locks for reading all
9146 media it uses in read-only mode. If some medium cannot be locked
9147 for reading, the startup procedure will fail.
9148
9149 The medium locked for reading must be unlocked using the <link
9150 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9151 can be nested and must be followed by the same number of paired
9152 <link to="#unlockRead"/> calls.
9153
9154 This method sets the medium state to <link
9155 to="MediumState_LockedRead" /> on success. The state prior to
9156 this call must be <link to="MediumState_Created" />,
9157 <link to="MediumState_Inaccessible" /> or
9158 <link to="MediumState_LockedRead" />.
9159 As you can see, an inaccessible medium can be locked too. This is
9160 not an error; this method performs a logical lock that prevents
9161 modifications of this medium through the VirtualBox API, not a
9162 physical lock of the underlying storage unit.
9163
9164 This method returns the current state of the medium
9165 <b>before</b> the operation.
9166
9167 <result name="VBOX_E_INVALID_OBJECT_STATE">
9168 Invalid medium state (e.g. not created, locked, inaccessible,
9169 creating, deleting).
9170 </result>
9171
9172 </desc>
9173 <param name="state" type="MediumState" dir="return">
9174 <desc>
9175 State of the medium after the operation.
9176 </desc>
9177 </param>
9178 </method>
9179
9180 <method name="unlockRead">
9181 <desc>
9182 Cancels the read lock previously set by <link to="#lockRead"/>.
9183
9184 For both, success and failure, this method returns the current state
9185 of the medium <b>after</b> the operation.
9186
9187 See <link to="#lockRead"/> for more details.
9188
9189 <result name="VBOX_E_INVALID_OBJECT_STATE">
9190 Medium not locked for reading.
9191 </result>
9192
9193 </desc>
9194 <param name="state" type="MediumState" dir="return">
9195 <desc>
9196 State of the medium after the operation.
9197 </desc>
9198 </param>
9199 </method>
9200
9201 <method name="lockWrite">
9202 <desc>
9203 Locks this medium for writing.
9204
9205 The write lock, as opposed to <link to="#lockRead"/>, is
9206 exclusive: there may be only one client holding a write lock
9207 and there may be no read locks while the write lock is held.
9208
9209 When the medium is locked for writing, it cannot be modified
9210 from within VirtualBox and it is not guaranteed that the values
9211 of its properties are up-to-date. Any method that changes the
9212 properties of this medium or contents of the storage unit will
9213 return an error (unless explicitly stated otherwise) and an
9214 attempt to start a virtual machine wanting to modify or to
9215 read the medium will fail.
9216
9217 When the virtual machine is started up, it locks for writing all
9218 media it uses to write data to. If any medium could not be locked
9219 for writing, the startup procedure will fail.
9220
9221 The medium locked for writing must be unlocked using the <link
9222 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9223 can <b>not</b> be nested and must be followed by a<link
9224 to="#unlockWrite"/> call before the next lockWrite call.
9225
9226 This method sets the medium state to <link to="MediumState_LockedWrite" />
9227 on success. The state prior to this call must be <link to="MediumState_Created"/>
9228 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9229 medium can be locked too. This is not an error; this method
9230 performs a logical lock preventing modifications of this
9231 medium through the VirtualBox API, not a physical lock of the
9232 underlying storage unit.
9233
9234 For both, success and failure, this method returns the current
9235 state of the medium <b>before</b> the operation.
9236
9237 <result name="VBOX_E_INVALID_OBJECT_STATE">
9238 Invalid medium state (e.g. not created, locked, inaccessible,
9239 creating, deleting).
9240 </result>
9241
9242 </desc>
9243 <param name="state" type="MediumState" dir="return">
9244 <desc>
9245 State of the medium after the operation.
9246 </desc>
9247 </param>
9248 </method>
9249
9250 <method name="unlockWrite">
9251 <desc>
9252 Cancels the write lock previously set by <link to="#lockWrite"/>.
9253
9254 For both, success and failure, this method returns the current
9255 state of the medium <b>after</b> the operation.
9256
9257 See <link to="#lockWrite"/> for more details.
9258
9259 <result name="VBOX_E_INVALID_OBJECT_STATE">
9260 Medium not locked for writing.
9261 </result>
9262
9263 </desc>
9264 <param name="state" type="MediumState" dir="return">
9265 <desc>
9266 State of the medium after the operation.
9267 </desc>
9268 </param>
9269 </method>
9270
9271 <method name="close">
9272 <desc>
9273 Closes this medium.
9274
9275 The medium must not be attached to any known virtual machine
9276 and must not have any known child media, otherwise the
9277 operation will fail.
9278
9279 When the medium is successfully closed, it gets removed from
9280 the list of remembered media, but its storage unit is not
9281 deleted. In particular, this means that this medium can be
9282 later opened again using the <link
9283 to="IVirtualBox::openHardDisk"/> call.
9284
9285 Note that after this method successfully returns, the given medium
9286 object becomes uninitialized. This means that any attempt
9287 to call any of its methods or attributes will fail with the
9288 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9289
9290 <result name="VBOX_E_INVALID_OBJECT_STATE">
9291 Invalid medium state (other than not created, created or
9292 inaccessible).
9293 </result>
9294 <result name="VBOX_E_OBJECT_IN_USE">
9295 Medium attached to virtual machine.
9296 </result>
9297 <result name="VBOX_E_FILE_ERROR">
9298 Settings file not accessible.
9299 </result>
9300 <result name="VBOX_E_XML_ERROR">
9301 Could not parse the settings file.
9302 </result>
9303
9304 </desc>
9305 </method>
9306
9307 <!-- storage methods -->
9308
9309 <method name="getProperty">
9310 <desc>
9311 Returns the value of the custom hard disk property with the given name.
9312
9313 The list of all properties supported by the given hard disk format can
9314 be obtained with <link to="IMediumFormat::describeProperties"/>.
9315
9316 Note that if this method returns an empty string in @a value, the
9317 requested property is supported but currently not assigned any value.
9318
9319 <result name="VBOX_E_OBJECT_NOT_FOUND">
9320 Requested property does not exist (not supported by the format).
9321 </result>
9322 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9323 </desc>
9324 <param name="name" type="wstring" dir="in">
9325 <desc>Name of the property to get.</desc>
9326 </param>
9327 <param name="value" type="wstring" dir="return">
9328 <desc>Current property value.</desc>
9329 </param>
9330 </method>
9331
9332 <method name="setProperty">
9333 <desc>
9334 Sets the value of the custom hard disk property with the given name.
9335
9336 The list of all properties supported by the given hard disk format can
9337 be obtained with <link to="IMediumFormat::describeProperties"/>.
9338
9339 Note that setting the property value to @c null or an empty string is
9340 equivalent to deleting the existing value. A default value (if it is
9341 defined for this property) will be used by the format backend in this
9342 case.
9343
9344 <result name="VBOX_E_OBJECT_NOT_FOUND">
9345 Requested property does not exist (not supported by the format).
9346 </result>
9347 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9348 </desc>
9349 <param name="name" type="wstring" dir="in">
9350 <desc>Name of the property to set.</desc>
9351 </param>
9352 <param name="value" type="wstring" dir="in">
9353 <desc>Property value to set.</desc>
9354 </param>
9355 </method>
9356
9357 <method name="getProperties">
9358 <desc>
9359 Returns values for a group of properties in one call.
9360
9361 The names of the properties to get are specified using the @a names
9362 argument which is a list of comma-separated property names or
9363 an empty string if all properties are to be returned. Note that currently
9364 the value of this argument is ignored and the method always returns all
9365 existing properties.
9366
9367 The list of all properties supported by the given hard disk format can
9368 be obtained with <link to="IMediumFormat::describeProperties"/>.
9369
9370 The method returns two arrays, the array of property names corresponding
9371 to the @a names argument and the current values of these properties.
9372 Both arrays have the same number of elements with each elemend at the
9373 given index in the first array corresponds to an element at the same
9374 index in the second array.
9375
9376 Note that for properties that do not have assigned values,
9377 an empty string is returned at the appropriate index in the
9378 @a returnValues array.
9379
9380 </desc>
9381 <param name="names" type="wstring" dir="in">
9382 <desc>
9383 Names of properties to get.
9384 </desc>
9385 </param>
9386 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9387 <desc>Names of returned properties.</desc>
9388 </param>
9389 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9390 <desc>Values of returned properties.</desc>
9391 </param>
9392 </method>
9393
9394 <method name="setProperties">
9395 <desc>
9396 Sets values for a group of properties in one call.
9397
9398 The names of the properties to set are passed in the @a names
9399 array along with the new values for them in the @a values array. Both
9400 arrays have the same number of elements with each elemend at the given
9401 index in the first array corresponding to an element at the same index
9402 in the second array.
9403
9404 If there is at least one property name in @a names that is not valid,
9405 the method will fail before changing the values of any other properties
9406 from the @a names array.
9407
9408 Using this method over <link to="#setProperty"/> is preferred if you
9409 need to set several properties at once since it will result into less
9410 IPC calls.
9411
9412 The list of all properties supported by the given hard disk format can
9413 be obtained with <link to="IMediumFormat::describeProperties"/>.
9414
9415 Note that setting the property value to @c null or an empty string is
9416 equivalent to deleting the existing value. A default value (if it is
9417 defined for this property) will be used by the format backend in this
9418 case.
9419 </desc>
9420 <param name="names" type="wstring" safearray="yes" dir="in">
9421 <desc>Names of properties to set.</desc>
9422 </param>
9423 <param name="values" type="wstring" safearray="yes" dir="in">
9424 <desc>Values of properties to set.</desc>
9425 </param>
9426 </method>
9427
9428 <!-- storage methods -->
9429
9430 <method name="createBaseStorage">
9431 <desc>
9432 Starts creating a hard disk storage unit (fixed/dynamic, according
9433 to the variant flags) in in the background. The previous storage unit
9434 created for this object, if any, must first be deleted using
9435 <link to="#deleteStorage"/>, otherwise the operation will fail.
9436
9437 Before the operation starts, the hard disk is placed in
9438 <link to="MediumState_Creating"/> state. If the create operation
9439 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9440 state.
9441
9442 After the returned progress object reports that the operation has
9443 successfully completed, the medium state will be set to <link
9444 to="MediumState_Created"/>, the hard disk will be remembered by this
9445 VirtualBox installation and may be attached to virtual machines.
9446
9447 <result name="VBOX_E_NOT_SUPPORTED">
9448 The variant of storage creation operation is not supported. See <link
9449 to="IMediumFormat::capabilities"/>.
9450 </result>
9451 </desc>
9452 <param name="logicalSize" type="unsigned long long" dir="in">
9453 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9454 </param>
9455 <param name="variant" type="MediumVariant" dir="in">
9456 <desc>Exact image variant which should be created.</desc>
9457 </param>
9458 <param name="progress" type="IProgress" dir="return">
9459 <desc>Progress object to track the operation completion.</desc>
9460 </param>
9461 </method>
9462
9463 <method name="deleteStorage">
9464 <desc>
9465 Starts deleting the storage unit of this hard disk.
9466
9467 The hard disk must not be attached to any known virtual machine and must
9468 not have any known child hard disks, otherwise the operation will fail.
9469 It will also fail if there is no storage unit to delete or if deletion
9470 is already in progress, or if the hard disk is being in use (locked for
9471 read or for write) or inaccessible. Therefore, the only valid state for
9472 this operation to succeed is <link to="MediumState_Created"/>.
9473
9474 Before the operation starts, the hard disk is placed to
9475 <link to="MediumState_Deleting"/> state and gets removed from the list
9476 of remembered hard disks (media registry). If the delete operation
9477 fails, the medium will be remembered again and placed back to
9478 <link to="MediumState_Created"/> state.
9479
9480 After the returned progress object reports that the operation is
9481 complete, the medium state will be set to
9482 <link to="MediumState_NotCreated"/> and you will be able to use one of
9483 the storage creation methods to create it again.
9484
9485 <see>#close()</see>
9486
9487 <result name="VBOX_E_OBJECT_IN_USE">
9488 Hard disk is attached to a virtual machine.
9489 </result>
9490 <result name="VBOX_E_NOT_SUPPORTED">
9491 Storage deletion is not allowed because neither of storage creation
9492 operations are supported. See
9493 <link to="IMediumFormat::capabilities"/>.
9494 </result>
9495
9496 <note>
9497 If the deletion operation fails, it is not guaranteed that the storage
9498 unit still exists. You may check the <link to="IMedium::state"/> value
9499 to answer this question.
9500 </note>
9501 </desc>
9502 <param name="progress" type="IProgress" dir="return">
9503 <desc>Progress object to track the operation completion.</desc>
9504 </param>
9505 </method>
9506
9507 <!-- diff methods -->
9508
9509 <method name="createDiffStorage">
9510 <desc>
9511 Starts creating an empty differencing storage unit based on this hard
9512 disk in the format and at the location defined by the @a target
9513 argument.
9514
9515 The target hard disk must be in <link to="MediumState_NotCreated"/>
9516 state (i.e. must not have an existing storage unit). Upon successful
9517 completion, this operation will set the type of the target hard disk to
9518 <link to="MediumType_Normal"/> and create a storage unit necessary to
9519 represent the differencing hard disk data in the given format (according
9520 to the storage format of the target object).
9521
9522 After the returned progress object reports that the operation is
9523 successfully complete, the target hard disk gets remembered by this
9524 VirtualBox installation and may be attached to virtual machines.
9525
9526 <note>
9527 The hard disk will be set to <link to="MediumState_LockedRead"/>
9528 state for the duration of this operation.
9529 </note>
9530 <result name="VBOX_E_OBJECT_IN_USE">
9531 Hard disk not in @c NotCreated state.
9532 </result>
9533 </desc>
9534 <param name="target" type="IMedium" dir="in">
9535 <desc>Target hard disk.</desc>
9536 </param>
9537 <param name="variant" type="MediumVariant" dir="in">
9538 <desc>Exact image variant which should be created.</desc>
9539 </param>
9540 <param name="progress" type="IProgress" dir="return">
9541 <desc>Progress object to track the operation completion.</desc>
9542 </param>
9543 </method>
9544
9545 <method name="mergeTo">
9546 <desc>
9547 Starts merging the contents of this hard disk and all intermediate
9548 differencing hard disks in the chain to the given target hard disk.
9549
9550 The target hard disk must be either a descendant of this hard disk or
9551 its ancestor (otherwise this method will immediately return a failure).
9552 It follows that there are two logical directions of the merge operation:
9553 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9554 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9555 chain:
9556
9557 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9558
9559 Here, calling this method on the <tt>Base</tt> hard disk object with
9560 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9561 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9562 merge. Note that in both cases the contents of the resulting hard disk
9563 will be the same, the only difference is the hard disk object that takes
9564 the result of the merge operation. In case of the forward merge in the
9565 above example, the result will be written to <tt>Diff_2</tt>; in case of
9566 the backward merge, the result will be written to <tt>Base</tt>. In
9567 other words, the result of the operation is always stored in the target
9568 hard disk.
9569
9570 Upon successful operation completion, the storage units of all hard
9571 disks in the chain between this (source) hard disk and the target hard
9572 disk, including the source hard disk itself, will be automatically
9573 deleted and the relevant hard disk objects (including this hard disk)
9574 will become uninitialized. This means that any attempt to call any of
9575 their methods or attributes will fail with the
9576 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9577 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9578 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9579 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9580 disk itself since it will no longer be based on any other hard disk.
9581
9582 Considering the above, all of the following conditions must be met in
9583 order for the merge operation to succeed:
9584 <ul>
9585 <li>
9586 Neither this (source) hard disk nor any intermediate
9587 differencing hard disk in the chain between it and the target
9588 hard disk is attached to any virtual machine.
9589 </li>
9590 <li>
9591 Neither the source hard disk nor the target hard disk is an
9592 <link to="MediumType_Immutable"/> hard disk.
9593 </li>
9594 <li>
9595 The part of the hard disk tree from the source hard disk to the
9596 target hard disk is a linear chain, i.e. all hard disks in this
9597 chain have exactly one child which is the next hard disk in this
9598 chain. The only exception from this rule is the target hard disk in
9599 the forward merge operation; it is allowed to have any number of
9600 child hard disks because the merge operation will hot change its
9601 logical contents (as it is seen by the guest OS or by children).
9602 </li>
9603 <li>
9604 None of the involved hard disks are in
9605 <link to="MediumState_LockedRead"/> or
9606 <link to="MediumState_LockedWrite"/> state.
9607 </li>
9608 </ul>
9609
9610 <note>
9611 This (source) hard disk and all intermediates will be placed to <link
9612 to="MediumState_Deleting"/> state and the target hard disk will be
9613 placed to <link to="MediumState_LockedWrite"/> state and for the
9614 duration of this operation.
9615 </note>
9616 </desc>
9617 <param name="targetId" type="uuid" mod="string" dir="in">
9618 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9619 </param>
9620 <param name="progress" type="IProgress" dir="return">
9621 <desc>Progress object to track the operation completion.</desc>
9622 </param>
9623 </method>
9624
9625 <!-- clone method -->
9626
9627 <method name="cloneTo">
9628 <desc>
9629 Starts creating a clone of this hard disk in the format and at the
9630 location defined by the @a target argument.
9631
9632 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9633 state (i.e. must not have an existing storage unit) or in
9634 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9635 big enough to hold the data or else the copy will be partial). Upon
9636 successful completion, the cloned hard disk will contain exactly the
9637 same sector data as the hard disk being cloned, except that in the
9638 first case a new UUID for the clone will be randomly generated, and in
9639 the second case the UUID will remain unchanged.
9640
9641 The @a parent argument defines which hard disk will be the parent
9642 of the clone. Passing a @c null reference indicates that the clone will
9643 be a base image, i.e. completely independent. It is possible to specify
9644 an arbitrary hard disk for this parameter, including the parent of the
9645 hard disk which is being cloned. Even cloning to a child of the source
9646 hard disk is possible. Note that when cloning to an existing image, the
9647 @a parent irgument is ignored.
9648
9649 After the returned progress object reports that the operation is
9650 successfully complete, the target hard disk gets remembered by this
9651 VirtualBox installation and may be attached to virtual machines.
9652
9653 <note>
9654 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9655 state for the duration of this operation.
9656 </note>
9657 <result name="E_NOTIMPL">
9658 The specified cloning variant is not supported at the moment.
9659 </result>
9660 </desc>
9661 <param name="target" type="IMedium" dir="in">
9662 <desc>Target hard disk.</desc>
9663 </param>
9664 <param name="variant" type="MediumVariant" dir="in">
9665 <desc>Exact image variant which should be created.</desc>
9666 </param>
9667 <param name="parent" type="IMedium" dir="in">
9668 <desc>Parent of the cloned hard disk.</desc>
9669 </param>
9670 <param name="progress" type="IProgress" dir="return">
9671 <desc>Progress object to track the operation completion.</desc>
9672 </param>
9673 </method>
9674
9675 <!-- other methods -->
9676
9677 <method name="compact">
9678 <desc>
9679 Starts compacting of this hard disk. This means that the disk is
9680 transformed into a possibly more compact storage representation.
9681 This potentially creates temporary images, which can require a
9682 substantial amount of additional disk space.
9683
9684 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9685 state and all its parent hard disks (if any) will be placed to
9686 <link to="MediumState_LockedRead"/> state for the duration of this
9687 operation.
9688
9689 Please note that the results can be either returned straight away,
9690 or later as the result of the background operation via the object
9691 returned via the @a progress parameter.
9692
9693 <result name="VBOX_E_NOT_SUPPORTED">
9694 Hard disk format does not support compacting (but potentially
9695 needs it).
9696 </result>
9697 </desc>
9698 <param name="progress" type="IProgress" dir="return">
9699 <desc>Progress object to track the operation completion.</desc>
9700 </param>
9701 </method>
9702
9703 <method name="reset">
9704 <desc>
9705 Starts erasing the contents of this differencing hard disk.
9706
9707 This operation will reset the differencing hard disk to its initial
9708 state when it does not contain any sector data and any read operation is
9709 redirected to its parent hard disk.
9710
9711 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9712 for the duration of this operation.
9713
9714 <result name="VBOX_E_NOT_SUPPORTED">
9715 This is not a differencing hard disk.
9716 </result>
9717 <result name="VBOX_E_INVALID_OBJECT_STATE">
9718 Hard disk is not in <link to="MediumState_Created"/> or
9719 <link to="MediumState_Inaccessible"/> state.
9720 </result>
9721 </desc>
9722 <param name="progress" type="IProgress" dir="return">
9723 <desc>Progress object to track the operation completion.</desc>
9724 </param>
9725 </method>
9726
9727 </interface>
9728
9729
9730 <!--
9731 // IMediumFormat
9732 /////////////////////////////////////////////////////////////////////////
9733 -->
9734
9735 <enum
9736 name="DataType"
9737 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9738 >
9739 <const name="Int32" value="0"/>
9740 <const name="Int8" value="1"/>
9741 <const name="String" value="2"/>
9742 </enum>
9743
9744 <enum
9745 name="DataFlags"
9746 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9747 >
9748 <const name="None" value="0x00"/>
9749 <const name="Mandatory" value="0x01"/>
9750 <const name="Expert" value="0x02"/>
9751 <const name="Array" value="0x04"/>
9752 <const name="FlagMask" value="0x07"/>
9753 </enum>
9754
9755 <enum
9756 name="MediumFormatCapabilities"
9757 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9758 >
9759 <desc>
9760 Hard disk format capability flags.
9761 </desc>
9762
9763 <const name="Uuid" value="0x01">
9764 <desc>
9765 Supports UUIDs as expected by VirtualBox code.
9766 </desc>
9767 </const>
9768
9769 <const name="CreateFixed" value="0x02">
9770 <desc>
9771 Supports creating fixed size images, allocating all space instantly.
9772 </desc>
9773 </const>
9774
9775 <const name="CreateDynamic" value="0x04">
9776 <desc>
9777 Supports creating dynamically growing images, allocating space on
9778 demand.
9779 </desc>
9780 </const>
9781
9782 <const name="CreateSplit2G" value="0x08">
9783 <desc>
9784 Supports creating images split in chunks of a bit less than 2 GBytes.
9785 </desc>
9786 </const>
9787
9788 <const name="Differencing" value="0x10">
9789 <desc>
9790 Supports being used as a format for differencing media (see <link
9791 to="IMedium::createDiffStorage"/>).
9792 </desc>
9793 </const>
9794
9795 <const name="Asynchronous" value="0x20">
9796 <desc>
9797 Supports asynchronous I/O operations for at least some configurations.
9798 </desc>
9799 </const>
9800
9801 <const name="File" value="0x40">
9802 <desc>
9803 The format backend operates on files (the <link to="IMedium::location"/>
9804 attribute of the medium specifies a file used to store medium
9805 data; for a list of supported file extensions see
9806 <link to="IMediumFormat::fileExtensions"/>).
9807 </desc>
9808 </const>
9809
9810 <const name="Properties" value="0x80">
9811 <desc>
9812 The format backend uses the property interface to configure the storage
9813 location and properties (the <link to="IMediumFormat::describeProperties"/>
9814 method is used to get access to properties supported by the given medium format).
9815 </desc>
9816 </const>
9817
9818 <const name="CapabilityMask" value="0xFF"/>
9819 </enum>
9820
9821 <interface
9822 name="IMediumFormat" extends="$unknown"
9823 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9824 wsmap="managed"
9825 >
9826 <desc>
9827 The IMediumFormat interface represents a medium format.
9828
9829 Each medium format has an associated backend which is used to handle
9830 media stored in this format. This interface provides information
9831 about the properties of the associated backend.
9832
9833 Each medium format is identified by a string represented by the
9834 <link to="#id"/> attribute. This string is used in calls like
9835 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9836 format.
9837
9838 The list of all supported medium formats can be obtained using
9839 <link to="ISystemProperties::mediaFormats"/>.
9840
9841 <see>IMedium</see>
9842 </desc>
9843
9844 <attribute name="id" type="wstring" readonly="yes">
9845 <desc>
9846 Identifier of this format.
9847
9848 The format identifier is a non-@c null non-empty ASCII string. Note that
9849 this string is case-insensitive. This means that, for example, all of
9850 the following strings:
9851 <pre>
9852 "VDI"
9853 "vdi"
9854 "VdI"</pre>
9855 refer to the same medium format.
9856
9857 This string is used in methods of other interfaces where it is necessary
9858 to specify a medium format, such as
9859 <link to="IVirtualBox::createHardDisk"/>.
9860 </desc>
9861 </attribute>
9862
9863 <attribute name="name" type="wstring" readonly="yes">
9864 <desc>
9865 Human readable description of this format.
9866
9867 Mainly for use in file open dialogs.
9868 </desc>
9869 </attribute>
9870
9871 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9872 <desc>
9873 Array of strings containing the supported file extensions.
9874
9875 The first extension in the array is the extension preferred by the
9876 backend. It is recommended to use this extension when specifying a
9877 location of the storage unit for a new medium.
9878
9879 Note that some backends do not work on files, so this array may be
9880 empty.
9881
9882 <see>IMediumFormat::capabilities</see>
9883 </desc>
9884 </attribute>
9885
9886 <attribute name="capabilities" type="unsigned long" readonly="yes">
9887 <desc>
9888 Capabilities of the format as a set of bit flags.
9889
9890 For the meaning of individual capability flags see
9891 <link to="MediumFormatCapabilities"/>.
9892 </desc>
9893 </attribute>
9894
9895 <method name="describeProperties">
9896 <desc>
9897 Returns several arrays describing the properties supported by this
9898 format.
9899
9900 An element with the given index in each array describes one
9901 property. Thus, the number of elements in each returned array is the
9902 same and corresponds to the number of supported properties.
9903
9904 The returned arrays are filled in only if the
9905 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9906 All arguments must be non-@c null.
9907
9908 <see>DataType</see>
9909 <see>DataFlags</see>
9910 </desc>
9911
9912 <param name="names" type="wstring" safearray="yes" dir="out">
9913 <desc>Array of property names.</desc>
9914 </param>
9915 <param name="description" type="wstring" safearray="yes" dir="out">
9916 <desc>Array of property descriptions.</desc>
9917 </param>
9918 <param name="types" type="DataType" safearray="yes" dir="out">
9919 <desc>Array of property types.</desc>
9920 </param>
9921 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9922 <desc>Array of property flags.</desc>
9923 </param>
9924 <param name="defaults" type="wstring" safearray="yes" dir="out">
9925 <desc>Array of default property values.</desc>
9926 </param>
9927 </method>
9928
9929 </interface>
9930
9931
9932 <!--
9933 // IKeyboard
9934 /////////////////////////////////////////////////////////////////////////
9935 -->
9936
9937 <interface
9938 name="IKeyboard" extends="$unknown"
9939 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9940 wsmap="managed"
9941 >
9942 <desc>
9943 The IKeyboard interface represents the virtual machine's keyboard. Used
9944 in <link to="IConsole::keyboard"/>.
9945
9946 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9947 to the virtual machine.
9948
9949 </desc>
9950 <method name="putScancode">
9951 <desc>Sends a scancode to the keyboard.
9952
9953 <result name="VBOX_E_IPRT_ERROR">
9954 Could not send scan code to virtual keyboard.
9955 </result>
9956
9957 </desc>
9958 <param name="scancode" type="long" dir="in"/>
9959 </method>
9960
9961 <method name="putScancodes">
9962 <desc>Sends an array of scancodes to the keyboard.
9963
9964 <result name="VBOX_E_IPRT_ERROR">
9965 Could not send all scan codes to virtual keyboard.
9966 </result>
9967
9968 </desc>
9969 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9970 <param name="codesStored" type="unsigned long" dir="return"/>
9971 </method>
9972
9973 <method name="putCAD">
9974 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9975 function is nothing special, it is just a convenience function
9976 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9977
9978 <result name="VBOX_E_IPRT_ERROR">
9979 Could not send all scan codes to virtual keyboard.
9980 </result>
9981
9982 </desc>
9983 </method>
9984
9985 </interface>
9986
9987
9988 <!--
9989 // IMouse
9990 /////////////////////////////////////////////////////////////////////////
9991 -->
9992
9993 <enum
9994 name="MouseButtonState"
9995 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9996 >
9997 <desc>
9998 Mouse button state.
9999 </desc>
10000
10001 <const name="LeftButton" value="0x01"/>
10002 <const name="RightButton" value="0x02"/>
10003 <const name="MiddleButton" value="0x04"/>
10004 <const name="WheelUp" value="0x08"/>
10005 <const name="WheelDown" value="0x10"/>
10006 <const name="XButton1" value="0x20"/>
10007 <const name="XButton2" value="0x40"/>
10008 <const name="MouseStateMask" value="0x7F"/>
10009 </enum>
10010
10011 <interface
10012 name="IMouse" extends="$unknown"
10013 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10014 wsmap="managed"
10015 >
10016 <desc>
10017 The IMouse interface represents the virtual machine's mouse. Used in
10018 <link to="IConsole::mouse"/>.
10019
10020 Through this interface, the virtual machine's virtual mouse can be
10021 controlled.
10022 </desc>
10023
10024 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10025 <desc>
10026 Whether the guest OS supports absolute mouse pointer positioning
10027 or not.
10028 <note>
10029 VirtualBox Guest Tools need to be installed to the guest OS
10030 in order to enable absolute mouse positioning support.
10031 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10032 callback to be instantly informed about changes of this attribute
10033 during virtual machine execution.
10034 </note>
10035 <see><link to="#putMouseEventAbsolute"/></see>
10036 </desc>
10037 </attribute>
10038
10039 <method name="putMouseEvent">
10040 <desc>
10041 Initiates a mouse event using relative pointer movements
10042 along x and y axis.
10043
10044 <result name="E_ACCESSDENIED">
10045 Console not powered up.
10046 </result>
10047 <result name="VBOX_E_IPRT_ERROR">
10048 Could not send mouse event to virtual mouse.
10049 </result>
10050
10051 </desc>
10052
10053 <param name="dx" type="long" dir="in">
10054 <desc>
10055 Amount of pixels the mouse should move to the right.
10056 Negative values move the mouse to the left.
10057 </desc>
10058 </param>
10059 <param name="dy" type="long" dir="in">
10060 <desc>
10061 Amount of pixels the mouse should move downwards.
10062 Negative values move the mouse upwards.
10063 </desc>
10064 </param>
10065 <param name="dz" type="long" dir="in">
10066 <desc>
10067 Amount of mouse wheel moves.
10068 Positive values describe clockwise wheel rotations,
10069 negative values describe counterclockwise rotations.
10070 </desc>
10071 </param>
10072 <param name="dw" type="long" dir="in">
10073 <desc>
10074 Amount of horizontal mouse wheel moves.
10075 Positive values describe a movement to the left,
10076 negative values describe a movement to the right.
10077 </desc>
10078 </param>
10079 <param name="buttonState" type="long" dir="in">
10080 <desc>
10081 The current state of mouse buttons. Every bit represents
10082 a mouse button as follows:
10083 <table>
10084 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10085 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10086 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10087 </table>
10088 A value of <tt>1</tt> means the corresponding button is pressed.
10089 otherwise it is released.
10090 </desc>
10091 </param>
10092 </method>
10093
10094 <method name="putMouseEventAbsolute">
10095 <desc>
10096 Positions the mouse pointer using absolute x and y coordinates.
10097 These coordinates are expressed in pixels and
10098 start from <tt>[1,1]</tt> which corresponds to the top left
10099 corner of the virtual display.
10100
10101 <result name="E_ACCESSDENIED">
10102 Console not powered up.
10103 </result>
10104 <result name="VBOX_E_IPRT_ERROR">
10105 Could not send mouse event to virtual mouse.
10106 </result>
10107
10108 <note>
10109 This method will have effect only if absolute mouse
10110 positioning is supported by the guest OS.
10111 </note>
10112
10113 <see><link to="#absoluteSupported"/></see>
10114 </desc>
10115
10116 <param name="x" type="long" dir="in">
10117 <desc>
10118 X coordinate of the pointer in pixels, starting from @c 1.
10119 </desc>
10120 </param>
10121 <param name="y" type="long" dir="in">
10122 <desc>
10123 Y coordinate of the pointer in pixels, starting from @c 1.
10124 </desc>
10125 </param>
10126 <param name="dz" type="long" dir="in">
10127 <desc>
10128 Amount of mouse wheel moves.
10129 Positive values describe clockwise wheel rotations,
10130 negative values describe counterclockwise rotations.
10131 </desc>
10132 </param>
10133 <param name="dw" type="long" dir="in">
10134 <desc>
10135 Amount of horizontal mouse wheel moves.
10136 Positive values describe a movement to the left,
10137 negative values describe a movement to the right.
10138 </desc>
10139 </param>
10140 <param name="buttonState" type="long" dir="in">
10141 <desc>
10142 The current state of mouse buttons. Every bit represents
10143 a mouse button as follows:
10144 <table>
10145 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10146 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10147 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10148 </table>
10149 A value of @c 1 means the corresponding button is pressed.
10150 otherwise it is released.
10151 </desc>
10152 </param>
10153 </method>
10154
10155 </interface>
10156
10157 <!--
10158 // IDisplay
10159 /////////////////////////////////////////////////////////////////////////
10160 -->
10161
10162 <enum
10163 name="FramebufferPixelFormat"
10164 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10165 >
10166 <desc>
10167 Format of the video memory buffer. Constants represented by this enum can
10168 be used to test for particular values of <link
10169 to="IFramebuffer::pixelFormat"/>. See also <link
10170 to="IFramebuffer::requestResize"/>.
10171
10172 See also www.fourcc.org for more information about FOURCC pixel formats.
10173 </desc>
10174
10175 <const name="Opaque" value="0">
10176 <desc>
10177 Unknown buffer format (the user may not assume any particular format of
10178 the buffer).
10179 </desc>
10180 </const>
10181 <const name="FOURCC_RGB" value="0x32424752">
10182 <desc>
10183 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10184 bit layout).
10185 </desc>
10186 </const>
10187 </enum>
10188
10189 <interface
10190 name="IFramebuffer" extends="$unknown"
10191 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10192 wsmap="suppress"
10193 >
10194 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10195 <desc>Address of the start byte of the frame buffer.</desc>
10196 </attribute>
10197
10198 <attribute name="width" type="unsigned long" readonly="yes">
10199 <desc>Frame buffer width, in pixels.</desc>
10200 </attribute>
10201
10202 <attribute name="height" type="unsigned long" readonly="yes">
10203 <desc>Frame buffer height, in pixels.</desc>
10204 </attribute>
10205
10206 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10207 <desc>
10208 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10209 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10210 are: 8, 15, 16, 24 and 32.
10211 </desc>
10212 </attribute>
10213
10214 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10215 <desc>
10216 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10217 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10218 size of the scan line must be aligned to 32 bits.
10219 </desc>
10220 </attribute>
10221
10222 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10223 <desc>
10224 Frame buffer pixel format. It's either one of the values defined by <link
10225 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10226 <note>
10227 This attribute must never return <link
10228 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10229 <link to="#address"/> points to must be always known.
10230 </note>
10231 </desc>
10232 </attribute>
10233
10234 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10235 <desc>
10236 Defines whether this frame buffer uses the virtual video card's memory
10237 buffer (guest VRAM) directly or not. See <link
10238 to="IFramebuffer::requestResize"/> for more information.
10239 </desc>
10240 </attribute>
10241
10242 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10243 <desc>
10244 Hint from the frame buffer about how much of the standard
10245 screen height it wants to use for itself. This information is
10246 exposed to the guest through the VESA BIOS and VMMDev interface
10247 so that it can use it for determining its video mode table. It
10248 is not guaranteed that the guest respects the value.
10249 </desc>
10250 </attribute>
10251
10252 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10253 <desc>
10254 An alpha-blended overlay which is superposed over the frame buffer.
10255 The initial purpose is to allow the display of icons providing
10256 information about the VM state, including disk activity, in front
10257 ends which do not have other means of doing that. The overlay is
10258 designed to controlled exclusively by IDisplay. It has no locking
10259 of its own, and any changes made to it are not guaranteed to be
10260 visible until the affected portion of IFramebuffer is updated. The
10261 overlay can be created lazily the first time it is requested. This
10262 attribute can also return @c null to signal that the overlay is not
10263 implemented.
10264 </desc>
10265 </attribute>
10266
10267 <attribute name="winId" type="unsigned long long" readonly="yes">
10268 <desc>
10269 Platform-dependent identifier of the window where context of this
10270 frame buffer is drawn, or zero if there's no such window.
10271 </desc>
10272 </attribute>
10273
10274 <method name="lock">
10275 <desc>
10276 Locks the frame buffer.
10277 Gets called by the IDisplay object where this frame buffer is
10278 bound to.
10279 </desc>
10280 </method>
10281
10282 <method name="unlock">
10283 <desc>
10284 Unlocks the frame buffer.
10285 Gets called by the IDisplay object where this frame buffer is
10286 bound to.
10287 </desc>
10288 </method>
10289
10290 <method name="notifyUpdate">
10291 <desc>
10292 Informs about an update.
10293 Gets called by the display object where this buffer is
10294 registered.
10295 </desc>
10296 <param name="x" type="unsigned long" dir="in"/>
10297 <param name="y" type="unsigned long" dir="in"/>
10298 <param name="width" type="unsigned long" dir="in"/>
10299 <param name="height" type="unsigned long" dir="in"/>
10300 </method>
10301
10302 <method name="requestResize">
10303 <desc>
10304 Requests a size and pixel format change.
10305
10306 There are two modes of working with the video buffer of the virtual
10307 machine. The <i>indirect</i> mode implies that the IFramebuffer
10308 implementation allocates a memory buffer for the requested display mode
10309 and provides it to the virtual machine. In <i>direct</i> mode, the
10310 IFramebuffer implementation uses the memory buffer allocated and owned
10311 by the virtual machine. This buffer represents the video memory of the
10312 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10313 usually faster because the implementation gets a raw pointer to the
10314 guest VRAM buffer which it can directly use for visualizing the contents
10315 of the virtual display, as opposed to the indirect mode where the
10316 contents of guest VRAM are copied to the memory buffer provided by
10317 the implementation every time a display update occurs.
10318
10319 It is important to note that the direct mode is really fast only when
10320 the implementation uses the given guest VRAM buffer directly, for
10321 example, by blitting it to the window representing the virtual machine's
10322 display, which saves at least one copy operation comparing to the
10323 indirect mode. However, using the guest VRAM buffer directly is not
10324 always possible: the format and the color depth of this buffer may be
10325 not supported by the target window, or it may be unknown (opaque) as in
10326 case of text or non-linear multi-plane VGA video modes. In this case,
10327 the indirect mode (that is always available) should be used as a
10328 fallback: when the guest VRAM contents are copied to the
10329 implementation-provided memory buffer, color and format conversion is
10330 done automatically by the underlying code.
10331
10332 The @a pixelFormat parameter defines whether the direct mode is
10333 available or not. If @a pixelFormat is <link
10334 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10335 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10336 @a bytesPerLine parameters must be ignored and the implementation must use
10337 the indirect mode (where it provides its own buffer in one of the
10338 supported formats). In all other cases, @a pixelFormat together with
10339 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10340 buffer pointed to by the @a VRAM parameter and the implementation is
10341 free to choose which mode to use. To indicate that this frame buffer uses
10342 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10343 attribute must return @c true and <link to="#address"/> must
10344 return exactly the same address that is passed in the @a VRAM parameter
10345 of this method; otherwise it is assumed that the indirect strategy is
10346 chosen.
10347
10348 The @a width and @a height parameters represent the size of the
10349 requested display mode in both modes. In case of indirect mode, the
10350 provided memory buffer should be big enough to store data of the given
10351 display mode. In case of direct mode, it is guaranteed that the given
10352 @a VRAM buffer contains enough space to represent the display mode of the
10353 given size. Note that this frame buffer's <link to="#width"/> and <link
10354 to="#height"/> attributes must return exactly the same values as
10355 passed to this method after the resize is completed (see below).
10356
10357 The @a finished output parameter determines if the implementation has
10358 finished resizing the frame buffer or not. If, for some reason, the
10359 resize cannot be finished immediately during this call, @a finished
10360 must be set to @c false, and the implementation must call
10361 <link to="IDisplay::resizeCompleted"/> after it has returned from
10362 this method as soon as possible. If @a finished is @c false, the
10363 machine will not call any frame buffer methods until
10364 <link to="IDisplay::resizeCompleted"/> is called.
10365
10366 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10367 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10368 this frame buffer must return exactly the same values as specified in the
10369 parameters of this method, after the resize is completed. If the
10370 indirect mode is chosen, these attributes must return values describing
10371 the format of the implementation's own memory buffer <link
10372 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10373 value must always correlate with <link to="#pixelFormat"/>. Note that
10374 the <link to="#pixelFormat"/> attribute must never return <link
10375 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10376
10377 <note>
10378 This method is called by the IDisplay object under the
10379 <link to="#lock"/> provided by this IFramebuffer
10380 implementation. If this method returns @c false in @a finished, then
10381 this lock is not released until
10382 <link to="IDisplay::resizeCompleted"/> is called.
10383 </note>
10384 </desc>
10385 <param name="screenId" type="unsigned long" dir="in">
10386 <desc>
10387 Logical screen number. Must be used in the corresponding call to
10388 <link to="IDisplay::resizeCompleted"/> if this call is made.
10389 </desc>
10390 </param>
10391 <param name="pixelFormat" type="unsigned long" dir="in">
10392 <desc>
10393 Pixel format of the memory buffer pointed to by @a VRAM.
10394 See also <link to="FramebufferPixelFormat"/>.
10395 </desc>
10396 </param>
10397 <param name="VRAM" type="octet" mod="ptr" dir="in">
10398 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10399 </param>
10400 <param name="bitsPerPixel" type="unsigned long" dir="in">
10401 <desc>Color depth, bits per pixel.</desc>
10402 </param>
10403 <param name="bytesPerLine" type="unsigned long" dir="in">
10404 <desc>Size of one scan line, in bytes.</desc>
10405 </param>
10406 <param name="width" type="unsigned long" dir="in">
10407 <desc>Width of the guest display, in pixels.</desc>
10408 </param>
10409 <param name="height" type="unsigned long" dir="in">
10410 <desc>Height of the guest display, in pixels.</desc>
10411 </param>
10412 <param name="finished" type="boolean" dir="return">
10413 <desc>
10414 Can the VM start using the new frame buffer immediately
10415 after this method returns or it should wait for
10416 <link to="IDisplay::resizeCompleted"/>.
10417 </desc>
10418 </param>
10419 </method>
10420
10421 <method name="videoModeSupported">
10422 <desc>
10423 Returns whether the frame buffer implementation is willing to
10424 support a given video mode. In case it is not able to render
10425 the video mode (or for some reason not willing), it should
10426 return @c false. Usually this method is called when the guest
10427 asks the VMM device whether a given video mode is supported
10428 so the information returned is directly exposed to the guest.
10429 It is important that this method returns very quickly.
10430 </desc>
10431 <param name="width" type="unsigned long" dir="in"/>
10432 <param name="height" type="unsigned long" dir="in"/>
10433 <param name="bpp" type="unsigned long" dir="in"/>
10434 <param name="supported" type="boolean" dir="return"/>
10435 </method>
10436
10437 <method name="getVisibleRegion">
10438 <desc>
10439 Returns the visible region of this frame buffer.
10440
10441 If the @a rectangles parameter is @c null then the value of the
10442 @a count parameter is ignored and the number of elements necessary to
10443 describe the current visible region is returned in @a countCopied.
10444
10445 If @a rectangles is not @c null but @a count is less
10446 than the required number of elements to store region data, the method
10447 will report a failure. If @a count is equal or greater than the
10448 required number of elements, then the actual number of elements copied
10449 to the provided array will be returned in @a countCopied.
10450
10451 <note>
10452 The address of the provided array must be in the process space of
10453 this IFramebuffer object.
10454 </note>
10455 <note>
10456 Method not yet implemented.
10457 </note>
10458 </desc>
10459 <param name="rectangles" type="octet" mod="ptr" dir="in">
10460 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10461 </param>
10462 <param name="count" type="unsigned long" dir="in">
10463 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10464 </param>
10465 <param name="countCopied" type="unsigned long" dir="return">
10466 <desc>Number of elements copied to the @a rectangles array.</desc>
10467 </param>
10468 </method>
10469
10470 <method name="setVisibleRegion">
10471 <desc>
10472 Suggests a new visible region to this frame buffer. This region
10473 represents the area of the VM display which is a union of regions of
10474 all top-level windows of the guest operating system running inside the
10475 VM (if the Guest Additions for this system support this
10476 functionality). This information may be used by the frontends to
10477 implement the seamless desktop integration feature.
10478
10479 <note>
10480 The address of the provided array must be in the process space of
10481 this IFramebuffer object.
10482 </note>
10483 <note>
10484 The IFramebuffer implementation must make a copy of the provided
10485 array of rectangles.
10486 </note>
10487 <note>
10488 Method not yet implemented.
10489 </note>
10490 </desc>
10491 <param name="rectangles" type="octet" mod="ptr" dir="in">
10492 <desc>Pointer to the @c RTRECT array.</desc>
10493 </param>
10494 <param name="count" type="unsigned long" dir="in">
10495 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10496 </param>
10497 </method>
10498
10499 <method name="processVHWACommand">
10500 <desc>
10501 Posts a Video HW Acceleration Command to the frame buffer for processing.
10502 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10503 are posted from quest to the host to be processed by the host hardware.
10504
10505 <note>
10506 The address of the provided command must be in the process space of
10507 this IFramebuffer object.
10508 </note>
10509 </desc>
10510
10511 <param name="command" type="octet" mod="ptr" dir="in">
10512 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10513 </param>
10514 </method>
10515
10516 </interface>
10517
10518 <interface
10519 name="IFramebufferOverlay" extends="IFramebuffer"
10520 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10521 wsmap="suppress"
10522 >
10523 <desc>
10524 The IFramebufferOverlay interface represents an alpha blended overlay
10525 for displaying status icons above an IFramebuffer. It is always created
10526 not visible, so that it must be explicitly shown. It only covers a
10527 portion of the IFramebuffer, determined by its width, height and
10528 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10529 that order) format, and may be written to directly. Do re-read the
10530 width though, after setting it, as it may be adjusted (increased) to
10531 make it more suitable for the front end.
10532 </desc>
10533 <attribute name="x" type="unsigned long" readonly="yes">
10534 <desc>X position of the overlay, relative to the frame buffer.</desc>
10535 </attribute>
10536
10537 <attribute name="y" type="unsigned long" readonly="yes">
10538 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10539 </attribute>
10540
10541 <attribute name="visible" type="boolean" readonly="no">
10542 <desc>
10543 Whether the overlay is currently visible.
10544 </desc>
10545 </attribute>
10546
10547 <attribute name="alpha" type="unsigned long" readonly="no">
10548 <desc>
10549 The global alpha value for the overlay. This may or may not be
10550 supported by a given front end.
10551 </desc>
10552 </attribute>
10553
10554 <method name="move">
10555 <desc>
10556 Changes the overlay's position relative to the IFramebuffer.
10557 </desc>
10558 <param name="x" type="unsigned long" dir="in"/>
10559 <param name="y" type="unsigned long" dir="in"/>
10560 </method>
10561
10562 </interface>
10563
10564 <interface
10565 name="IDisplay" extends="$unknown"
10566 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10567 wsmap="managed"
10568 >
10569 <desc>
10570 The IDisplay interface represents the virtual machine's display.
10571
10572 The object implementing this interface is contained in each
10573 <link to="IConsole::display"/> attribute and represents the visual
10574 output of the virtual machine.
10575
10576 The virtual display supports pluggable output targets represented by the
10577 IFramebuffer interface. Examples of the output target are a window on
10578 the host computer or an RDP session's display on a remote computer.
10579 </desc>
10580 <attribute name="width" type="unsigned long" readonly="yes">
10581 <desc>Current display width.</desc>
10582 </attribute>
10583
10584 <attribute name="height" type="unsigned long" readonly="yes">
10585 <desc>Current display height.</desc>
10586 </attribute>
10587
10588 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10589 <desc>
10590 Current guest display color depth. Note that this may differ
10591 from <link to="IFramebuffer::bitsPerPixel"/>.
10592 </desc>
10593 </attribute>
10594
10595 <method name="setFramebuffer">
10596 <desc>
10597 Sets the framebuffer for given screen.
10598 </desc>
10599 <param name="screenId" type="unsigned long" dir="in"/>
10600 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10601 </method>
10602
10603 <method name="getFramebuffer">
10604 <desc>
10605 Queries the framebuffer for given screen.
10606 </desc>
10607 <param name="screenId" type="unsigned long" dir="in"/>
10608 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10609 <param name="xOrigin" type="long" dir="out"/>
10610 <param name="yOrigin" type="long" dir="out"/>
10611 </method>
10612
10613 <method name="setVideoModeHint">
10614 <desc>
10615 Asks VirtualBox to request the given video mode from
10616 the guest. This is just a hint and it cannot be guaranteed
10617 that the requested resolution will be used. Guest Additions
10618 are required for the request to be seen by guests. The caller
10619 should issue the request and wait for a resolution change and
10620 after a timeout retry.
10621
10622 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10623 parameters means that the corresponding values should be taken from the
10624 current video mode (i.e. left unchanged).
10625
10626 If the guest OS supports multi-monitor configuration then the @a display
10627 parameter specifies the number of the guest display to send the hint to:
10628 @c 0 is the primary display, @c 1 is the first secondary and
10629 so on. If the multi-monitor configuration is not supported, @a display
10630 must be @c 0.
10631
10632 <result name="E_INVALIDARG">
10633 The @a display is not associated with any monitor.
10634 </result>
10635
10636 </desc>
10637 <param name="width" type="unsigned long" dir="in"/>
10638 <param name="height" type="unsigned long" dir="in"/>
10639 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10640 <param name="display" type="unsigned long" dir="in"/>
10641 </method>
10642
10643 <method name="setSeamlessMode">
10644 <desc>
10645 Enables or disables seamless guest display rendering (seamless desktop
10646 integration) mode.
10647 <note>
10648 Calling this method has no effect if <link
10649 to="IGuest::supportsSeamless"/> returns @c false.
10650 </note>
10651 </desc>
10652 <param name="enabled" type="boolean" dir="in"/>
10653 </method>
10654
10655 <method name="takeScreenShot">
10656 <desc>
10657 Takes a screen shot of the requested size and copies it to the
10658 32-bpp buffer allocated by the caller and pointed to by @a address.
10659
10660 <note>This API can be used only by the COM/XPCOM C++ API as it
10661 requires pointer support. Use <link to="#takeScreenShotSlow" />
10662 with other language bindings.
10663 </note>
10664
10665 <result name="E_NOTIMPL">
10666 Feature not implemented.
10667 </result>
10668 <result name="VBOX_E_IPRT_ERROR">
10669 Could not take a screenshot.
10670 </result>
10671
10672 </desc>
10673 <param name="address" type="octet" mod="ptr" dir="in"/>
10674 <param name="width" type="unsigned long" dir="in"/>
10675 <param name="height" type="unsigned long" dir="in"/>
10676 </method>
10677
10678 <method name="takeScreenShotSlow">
10679 <desc>
10680 Takes a guest screen shot of the requested size and returns it as
10681 an array of bytes in uncompressed 32-bit ARGB format.
10682 This API is slow, but could be the only option to get guest screenshot
10683 for scriptable languages not allowed to manipulate with addresses
10684 directly.
10685
10686 <result name="E_NOTIMPL">
10687 Feature not implemented.
10688 </result>
10689 <result name="VBOX_E_IPRT_ERROR">
10690 Could not take a screenshot.
10691 </result>
10692 </desc>
10693 <param name="width" type="unsigned long" dir="in">
10694 <desc>
10695 Desired image width.
10696 </desc>
10697 </param>
10698 <param name="height" type="unsigned long" dir="in">
10699 <desc>
10700 Desired image height.
10701 </desc>
10702 </param>
10703 <param name="screenData" type="octet" dir="return" safearray="yes">
10704 <desc>
10705 Array with resulting screen data.
10706 </desc>
10707 </param>
10708 </method>
10709
10710 <method name="drawToScreen">
10711 <desc>
10712 Draws a 32-bpp image of the specified size from the given buffer
10713 to the given point on the VM display.
10714
10715 <result name="E_NOTIMPL">
10716 Feature not implemented.
10717 </result>
10718 <result name="VBOX_E_IPRT_ERROR">
10719 Could not draw to screen.
10720 </result>
10721
10722 </desc>
10723 <param name="address" type="octet" mod="ptr" dir="in"/>
10724 <param name="x" type="unsigned long" dir="in"/>
10725 <param name="y" type="unsigned long" dir="in"/>
10726 <param name="width" type="unsigned long" dir="in"/>
10727 <param name="height" type="unsigned long" dir="in"/>
10728 </method>
10729
10730 <method name="invalidateAndUpdate">
10731 <desc>
10732 Does a full invalidation of the VM display and instructs the VM
10733 to update it.
10734
10735 <result name="VBOX_E_IPRT_ERROR">
10736 Could not invalidate and update screen.
10737 </result>
10738
10739 </desc>
10740 </method>
10741
10742 <method name="resizeCompleted">
10743 <desc>
10744 Signals that a framebuffer has completed the resize operation.
10745
10746 <result name="VBOX_E_NOT_SUPPORTED">
10747 Operation only valid for external frame buffers.
10748 </result>
10749
10750 </desc>
10751 <param name="screenId" type="unsigned long" dir="in"/>
10752 </method>
10753
10754 <method name="updateCompleted">
10755 <desc>
10756 Signals that a framebuffer has completed the update operation.
10757
10758 <result name="VBOX_E_NOT_SUPPORTED">
10759 Operation only valid for external frame buffers.
10760 </result>
10761
10762 </desc>
10763 </method>
10764
10765 <method name="completeVHWACommand">
10766 <desc>
10767 Signals that the Video HW Acceleration command has completed.
10768 </desc>
10769
10770 <param name="command" type="octet" mod="ptr" dir="in">
10771 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10772 </param>
10773 </method>
10774
10775 </interface>
10776
10777 <!--
10778 // INetworkAdapter
10779 /////////////////////////////////////////////////////////////////////////
10780 -->
10781
10782 <enum
10783 name="NetworkAttachmentType"
10784 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10785 >
10786 <desc>
10787 Network attachment type.
10788 </desc>
10789
10790 <const name="Null" value="0">
10791 <desc>Null value, also means "not attached".</desc>
10792 </const>
10793 <const name="NAT" value="1"/>
10794 <const name="Bridged" value="2"/>
10795 <const name="Internal" value="3"/>
10796 <const name="HostOnly" value="4"/>
10797 </enum>
10798
10799 <enum
10800 name="NetworkAdapterType"
10801 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10802 >
10803 <desc>
10804 Network adapter type.
10805 </desc>
10806
10807 <const name="Null" value="0">
10808 <desc>Null value (never used by the API).</desc>
10809 </const>
10810 <const name="Am79C970A" value="1">
10811 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10812 </const>
10813 <const name="Am79C973" value="2">
10814 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10815 </const>
10816 <const name="I82540EM" value="3">
10817 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10818 </const>
10819 <const name="I82543GC" value="4">
10820 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10821 </const>
10822 <const name="I82545EM" value="5">
10823 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10824 </const>
10825 <const name="Virtio" value="6">
10826 <desc>Virtio network device.</desc>
10827 </const>
10828 </enum>
10829
10830 <interface
10831 name="INetworkAdapter" extends="$unknown"
10832 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10833 wsmap="managed"
10834 >
10835 <desc>
10836 Represents a virtual network adapter that is attached to a virtual machine.
10837 Each virtual machine has a fixed number of network adapter slots with one
10838 instance of this attached to each of them. Call
10839 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10840 is attached to a given slot in a given machine.
10841
10842 Each network adapter can be in one of five attachment modes, which are
10843 represented by the <link to="NetworkAttachmentType" /> enumeration;
10844 see the <link to="#attachmentType" /> attribute.
10845 </desc>
10846
10847 <attribute name="adapterType" type="NetworkAdapterType">
10848 <desc>
10849 Type of the virtual network adapter. Depending on this value,
10850 VirtualBox will provide a different virtual network hardware
10851 to the guest.
10852 </desc>
10853 </attribute>
10854
10855 <attribute name="slot" type="unsigned long" readonly="yes">
10856 <desc>
10857 Slot number this adapter is plugged into. Corresponds to
10858 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10859 to obtain this instance.
10860 </desc>
10861 </attribute>
10862
10863 <attribute name="enabled" type="boolean">
10864 <desc>
10865 Flag whether the network adapter is present in the
10866 guest system. If disabled, the virtual guest hardware will
10867 not contain this network adapter. Can only be changed when
10868 the VM is not running.
10869 </desc>
10870 </attribute>
10871
10872 <attribute name="MACAddress" type="wstring">
10873 <desc>
10874 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10875 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10876 </desc>
10877 </attribute>
10878
10879 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10880
10881 <attribute name="hostInterface" type="wstring">
10882 <desc>
10883 Name of the host network interface the VM is attached to.
10884 </desc>
10885 </attribute>
10886
10887 <attribute name="internalNetwork" type="wstring">
10888 <desc>
10889 Name of the internal network the VM is attached to.
10890 </desc>
10891 </attribute>
10892
10893 <attribute name="NATNetwork" type="wstring">
10894 <desc>
10895 Name of the NAT network the VM is attached to.
10896 </desc>
10897 </attribute>
10898
10899 <attribute name="cableConnected" type="boolean">
10900 <desc>
10901 Flag whether the adapter reports the cable as connected or not.
10902 It can be used to report offline situations to a VM.
10903 </desc>
10904 </attribute>
10905
10906 <attribute name="lineSpeed" type="unsigned long">
10907 <desc>
10908 Line speed reported by custom drivers, in units of 1 kbps.
10909 </desc>
10910 </attribute>
10911
10912 <attribute name="traceEnabled" type="boolean">
10913 <desc>
10914 Flag whether network traffic from/to the network card should be traced.
10915 Can only be toggled when the VM is turned off.
10916 </desc>
10917 </attribute>
10918
10919 <attribute name="traceFile" type="wstring">
10920 <desc>
10921 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10922 will be used.
10923 </desc>
10924 </attribute>
10925
10926 <method name="attachToNAT">
10927 <desc>
10928 Attach the network adapter to the Network Address Translation (NAT) interface.
10929 </desc>
10930 </method>
10931
10932 <method name="attachToBridgedInterface">
10933 <desc>
10934 Attach the network adapter to a bridged host interface.
10935 </desc>
10936 </method>
10937
10938 <method name="attachToInternalNetwork">
10939 <desc>
10940 Attach the network adapter to an internal network.
10941 </desc>
10942 </method>
10943
10944 <method name="attachToHostOnlyInterface">
10945 <desc>
10946 Attach the network adapter to the host-only network.
10947 </desc>
10948 </method>
10949
10950 <method name="detach">
10951 <desc>
10952 Detach the network adapter
10953 </desc>
10954 </method>
10955 </interface>
10956
10957
10958 <!--
10959 // ISerialPort
10960 /////////////////////////////////////////////////////////////////////////
10961 -->
10962
10963 <enum
10964 name="PortMode"
10965 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10966 >
10967 <desc>
10968 The PortMode enumeration represents possible communication modes for
10969 the virtual serial port device.
10970 </desc>
10971
10972 <const name="Disconnected" value="0">
10973 <desc>Virtual device is not attached to any real host device.</desc>
10974 </const>
10975 <const name="HostPipe" value="1">
10976 <desc>Virtual device is attached to a host pipe.</desc>
10977 </const>
10978 <const name="HostDevice" value="2">
10979 <desc>Virtual device is attached to a host device.</desc>
10980 </const>
10981 <const name="RawFile" value="3">
10982 <desc>Virtual device is attached to a raw file.</desc>
10983 </const>
10984 </enum>
10985
10986 <interface
10987 name="ISerialPort" extends="$unknown"
10988 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10989 wsmap="managed"
10990 >
10991
10992 <desc>
10993 The ISerialPort interface represents the virtual serial port device.
10994
10995 The virtual serial port device acts like an ordinary serial port
10996 inside the virtual machine. This device communicates to the real
10997 serial port hardware in one of two modes: host pipe or host device.
10998
10999 In host pipe mode, the #path attribute specifies the path to the pipe on
11000 the host computer that represents a serial port. The #server attribute
11001 determines if this pipe is created by the virtual machine process at
11002 machine startup or it must already exist before starting machine
11003 execution.
11004
11005 In host device mode, the #path attribute specifies the name of the
11006 serial port device on the host computer.
11007
11008 There is also a third communication mode: the disconnected mode. In this
11009 mode, the guest OS running inside the virtual machine will be able to
11010 detect the serial port, but all port write operations will be discarded
11011 and all port read operations will return no data.
11012
11013 <see>IMachine::getSerialPort</see>
11014 </desc>
11015
11016 <attribute name="slot" type="unsigned long" readonly="yes">
11017 <desc>
11018 Slot number this serial port is plugged into. Corresponds to
11019 the value you pass to <link to="IMachine::getSerialPort"/>
11020 to obtain this instance.
11021 </desc>
11022 </attribute>
11023
11024 <attribute name="enabled" type="boolean">
11025 <desc>
11026 Flag whether the serial port is enabled. If disabled,
11027 the serial port will not be reported to the guest OS.
11028 </desc>
11029 </attribute>
11030
11031 <attribute name="IOBase" type="unsigned long">
11032 <desc>Base I/O address of the serial port.</desc>
11033 </attribute>
11034
11035 <attribute name="IRQ" type="unsigned long">
11036 <desc>IRQ number of the serial port.</desc>
11037 </attribute>
11038
11039 <attribute name="hostMode" type="PortMode">
11040 <desc>
11041 How is this port connected to the host.
11042 <note>
11043 Changing this attribute may fail if the conditions for
11044 <link to="#path"/> are not met.
11045 </note>
11046 </desc>
11047 </attribute>
11048
11049 <attribute name="server" type="boolean">
11050 <desc>
11051 Flag whether this serial port acts as a server (creates a new pipe on
11052 the host) or as a client (uses the existing pipe). This attribute is
11053 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11054 </desc>
11055 </attribute>
11056
11057 <attribute name="path" type="wstring">
11058 <desc>
11059 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11060 PortMode_HostPipe, or the host serial device name when
11061 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11062 cases, setting a @c null or empty string as the attribute's value
11063 is an error. Otherwise, the value of this property is ignored.
11064 </desc>
11065 </attribute>
11066
11067 </interface>
11068
11069 <!--
11070 // IParallelPort
11071 /////////////////////////////////////////////////////////////////////////
11072 -->
11073
11074 <interface
11075 name="IParallelPort" extends="$unknown"
11076 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11077 wsmap="managed"
11078 >
11079
11080 <desc>
11081 The IParallelPort interface represents the virtual parallel port device.
11082
11083 The virtual parallel port device acts like an ordinary parallel port
11084 inside the virtual machine. This device communicates to the real
11085 parallel port hardware using the name of the parallel device on the host
11086 computer specified in the #path attribute.
11087
11088 Each virtual parallel port device is assigned a base I/O address and an
11089 IRQ number that will be reported to the guest operating system and used
11090 to operate the given parallel port from within the virtual machine.
11091
11092 <see>IMachine::getParallelPort</see>
11093 </desc>
11094
11095 <attribute name="slot" type="unsigned long" readonly="yes">
11096 <desc>
11097 Slot number this parallel port is plugged into. Corresponds to
11098 the value you pass to <link to="IMachine::getParallelPort"/>
11099 to obtain this instance.
11100 </desc>
11101 </attribute>
11102
11103 <attribute name="enabled" type="boolean">
11104 <desc>
11105 Flag whether the parallel port is enabled. If disabled,
11106 the parallel port will not be reported to the guest OS.
11107 </desc>
11108 </attribute>
11109
11110 <attribute name="IOBase" type="unsigned long">
11111 <desc>Base I/O address of the parallel port.</desc>
11112 </attribute>
11113
11114 <attribute name="IRQ" type="unsigned long">
11115 <desc>IRQ number of the parallel port.</desc>
11116 </attribute>
11117
11118 <attribute name="path" type="wstring">
11119 <desc>
11120 Host parallel device name. If this parallel port is enabled, setting a
11121 @c null or an empty string as this attribute's value will result into
11122 an error.
11123 </desc>
11124 </attribute>
11125
11126 </interface>
11127
11128
11129 <!--
11130 // IMachineDebugger
11131 /////////////////////////////////////////////////////////////////////////
11132 -->
11133
11134 <interface
11135 name="IMachineDebugger" extends="$unknown"
11136 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11137 wsmap="suppress"
11138 >
11139 <method name="resetStats">
11140 <desc>
11141 Reset VM statistics.
11142 </desc>
11143 <param name="pattern" type="wstring" dir="in">
11144 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11145 </param>
11146 </method>
11147
11148 <method name="dumpStats">
11149 <desc>
11150 Dumps VM statistics.
11151 </desc>
11152 <param name="pattern" type="wstring" dir="in">
11153 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11154 </param>
11155 </method>
11156
11157 <method name="getStats">
11158 <desc>
11159 Get the VM statistics in a XMLish format.
11160 </desc>
11161 <param name="pattern" type="wstring" dir="in">
11162 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11163 </param>
11164 <param name="withDescriptions" type="boolean" dir="in">
11165 <desc>Whether to include the descriptions.</desc>
11166 </param>
11167 <param name="stats" type="wstring" dir="out">
11168 <desc>The XML document containing the statistics.</desc>
11169 </param>
11170 </method>
11171
11172 <method name="injectNMI">
11173 <desc>
11174 Inject an NMI into a running VT-x/AMD-V VM.
11175 </desc>
11176 </method>
11177
11178 <attribute name="singlestep" type="boolean">
11179 <desc>Switch for enabling singlestepping.</desc>
11180 </attribute>
11181
11182 <attribute name="recompileUser" type="boolean">
11183 <desc>Switch for forcing code recompilation for user mode code.</desc>
11184 </attribute>
11185
11186 <attribute name="recompileSupervisor" type="boolean">
11187 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11188 </attribute>
11189
11190 <attribute name="PATMEnabled" type="boolean">
11191 <desc>Switch for enabling and disabling the PATM component.</desc>
11192 </attribute>
11193
11194 <attribute name="CSAMEnabled" type="boolean">
11195 <desc>Switch for enabling and disabling the CSAM component.</desc>
11196 </attribute>
11197
11198 <attribute name="logEnabled" type="boolean">
11199 <desc>Switch for enabling and disabling logging.</desc>
11200 </attribute>
11201
11202 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11203 <desc>
11204 Flag indicating whether the VM is currently making use of CPU hardware
11205 virtualization extensions.
11206 </desc>
11207 </attribute>
11208
11209 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11210 <desc>
11211 Flag indicating whether the VM is currently making use of the nested paging
11212 CPU hardware virtualization extension.
11213 </desc>
11214 </attribute>
11215
11216 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11217 <desc>
11218 Flag indicating whether the VM is currently making use of the VPID
11219 VT-x extension.
11220 </desc>
11221 </attribute>
11222
11223 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11224 <desc>
11225 Flag indicating whether the VM is currently making use of the Physical
11226 Address Extension CPU feature.
11227 </desc>
11228 </attribute>
11229
11230 <attribute name="virtualTimeRate" type="unsigned long">
11231 <desc>
11232 The rate at which the virtual time runs expressed as a percentage.
11233 The accepted range is 2% to 20000%.
11234 </desc>
11235 </attribute>
11236
11237 <!-- @todo method for setting log flags, groups and destination! -->
11238
11239 <attribute name="VM" type="unsigned long long" readonly="yes">
11240 <desc>
11241 Gets the VM handle. This is only for internal use while
11242 we carve the details of this interface.
11243 </desc>
11244 </attribute>
11245
11246 </interface>
11247
11248 <!--
11249 // IUSBController
11250 /////////////////////////////////////////////////////////////////////////
11251 -->
11252
11253 <interface
11254 name="IUSBController" extends="$unknown"
11255 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11256 wsmap="managed"
11257 >
11258 <attribute name="enabled" type="boolean">
11259 <desc>
11260 Flag whether the USB controller is present in the
11261 guest system. If disabled, the virtual guest hardware will
11262 not contain any USB controller. Can only be changed when
11263 the VM is powered off.
11264 </desc>
11265 </attribute>
11266
11267 <attribute name="enabledEhci" type="boolean">
11268 <desc>
11269 Flag whether the USB EHCI controller is present in the
11270 guest system. If disabled, the virtual guest hardware will
11271 not contain a USB EHCI controller. Can only be changed when
11272 the VM is powered off.
11273 </desc>
11274 </attribute>
11275
11276 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11277 <desc>
11278 USB standard version which the controller implements.
11279 This is a BCD which means that the major version is in the
11280 high byte and minor version is in the low byte.
11281 </desc>
11282 </attribute>
11283
11284 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11285 <desc>
11286 List of USB device filters associated with the machine.
11287
11288 If the machine is currently running, these filters are activated
11289 every time a new (supported) USB device is attached to the host
11290 computer that was not ignored by global filters
11291 (<link to="IHost::USBDeviceFilters"/>).
11292
11293 These filters are also activated when the machine is powered up.
11294 They are run against a list of all currently available USB
11295 devices (in states
11296 <link to="USBDeviceState_Available"/>,
11297 <link to="USBDeviceState_Busy"/>,
11298 <link to="USBDeviceState_Held"/>) that were not previously
11299 ignored by global filters.
11300
11301 If at least one filter matches the USB device in question, this
11302 device is automatically captured (attached to) the virtual USB
11303 controller of this machine.
11304
11305 <see>IUSBDeviceFilter, ::IUSBController</see>
11306 </desc>
11307 </attribute>
11308
11309 <method name="createDeviceFilter">
11310 <desc>
11311 Creates a new USB device filter. All attributes except
11312 the filter name are set to empty (any match),
11313 <i>active</i> is @c false (the filter is not active).
11314
11315 The created filter can then be added to the list of filters using
11316 <link to="#insertDeviceFilter"/>.
11317
11318 <result name="VBOX_E_INVALID_VM_STATE">
11319 The virtual machine is not mutable.
11320 </result>
11321
11322 <see>#deviceFilters</see>
11323 </desc>
11324 <param name="name" type="wstring" dir="in">
11325 <desc>
11326 Filter name. See <link to="IUSBDeviceFilter::name"/>
11327 for more info.
11328 </desc>
11329 </param>
11330 <param name="filter" type="IUSBDeviceFilter" dir="return">
11331 <desc>Created filter object.</desc>
11332 </param>
11333 </method>
11334
11335 <method name="insertDeviceFilter">
11336 <desc>
11337 Inserts the given USB device to the specified position
11338 in the list of filters.
11339
11340 Positions are numbered starting from <tt>0</tt>. If the specified
11341 position is equal to or greater than the number of elements in
11342 the list, the filter is added to the end of the collection.
11343
11344 <note>
11345 Duplicates are not allowed, so an attempt to insert a
11346 filter that is already in the collection, will return an
11347 error.
11348 </note>
11349
11350 <result name="VBOX_E_INVALID_VM_STATE">
11351 Virtual machine is not mutable.
11352 </result>
11353 <result name="E_INVALIDARG">
11354 USB device filter not created within this VirtualBox instance.
11355 </result>
11356 <result name="VBOX_E_INVALID_OBJECT_STATE">
11357 USB device filter already in list.
11358 </result>
11359
11360 <see>#deviceFilters</see>
11361 </desc>
11362 <param name="position" type="unsigned long" dir="in">
11363 <desc>Position to insert the filter to.</desc>
11364 </param>
11365 <param name="filter" type="IUSBDeviceFilter" dir="in">
11366 <desc>USB device filter to insert.</desc>
11367 </param>
11368 </method>
11369
11370 <method name="removeDeviceFilter">
11371 <desc>
11372 Removes a USB device filter from the specified position in the
11373 list of filters.
11374
11375 Positions are numbered starting from <tt>0</tt>. Specifying a
11376 position equal to or greater than the number of elements in
11377 the list will produce an error.
11378
11379 <see>#deviceFilters</see>
11380
11381 <result name="VBOX_E_INVALID_VM_STATE">
11382 Virtual machine is not mutable.
11383 </result>
11384 <result name="E_INVALIDARG">
11385 USB device filter list empty or invalid @a position.
11386 </result>
11387
11388 </desc>
11389 <param name="position" type="unsigned long" dir="in">
11390 <desc>Position to remove the filter from.</desc>
11391 </param>
11392 <param name="filter" type="IUSBDeviceFilter" dir="return">
11393 <desc>Removed USB device filter.</desc>
11394 </param>
11395 </method>
11396
11397 </interface>
11398
11399
11400 <!--
11401 // IUSBDevice
11402 /////////////////////////////////////////////////////////////////////////
11403 -->
11404
11405 <interface
11406 name="IUSBDevice" extends="$unknown"
11407 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11408 wsmap="managed"
11409 >
11410 <desc>
11411 The IUSBDevice interface represents a virtual USB device attached to the
11412 virtual machine.
11413
11414 A collection of objects implementing this interface is stored in the
11415 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11416 attached to a running virtual machine's USB controller.
11417 </desc>
11418
11419 <attribute name="id" type="uuid" mod="string" readonly="yes">
11420 <desc>
11421 Unique USB device ID. This ID is built from #vendorId,
11422 #productId, #revision and #serialNumber.
11423 </desc>
11424 </attribute>
11425
11426 <attribute name="vendorId" type="unsigned short" readonly="yes">
11427 <desc>Vendor ID.</desc>
11428 </attribute>
11429
11430 <attribute name="productId" type="unsigned short" readonly="yes">
11431 <desc>Product ID.</desc>
11432 </attribute>
11433
11434 <attribute name="revision" type="unsigned short" readonly="yes">
11435 <desc>
11436 Product revision number. This is a packed BCD represented as
11437 unsigned short. The high byte is the integer part and the low
11438 byte is the decimal.
11439 </desc>
11440 </attribute>
11441
11442 <attribute name="manufacturer" type="wstring" readonly="yes">
11443 <desc>Manufacturer string.</desc>
11444 </attribute>
11445
11446 <attribute name="product" type="wstring" readonly="yes">
11447 <desc>Product string.</desc>
11448 </attribute>
11449
11450 <attribute name="serialNumber" type="wstring" readonly="yes">
11451 <desc>Serial number string.</desc>
11452 </attribute>
11453
11454 <attribute name="address" type="wstring" readonly="yes">
11455 <desc>Host specific address of the device.</desc>
11456 </attribute>
11457
11458 <attribute name="port" type="unsigned short" readonly="yes">
11459 <desc>
11460 Host USB port number the device is physically
11461 connected to.
11462 </desc>
11463 </attribute>
11464
11465 <attribute name="version" type="unsigned short" readonly="yes">
11466 <desc>
11467 The major USB version of the device - 1 or 2.
11468 </desc>
11469 </attribute>
11470
11471 <attribute name="portVersion" type="unsigned short" readonly="yes">
11472 <desc>
11473 The major USB version of the host USB port the device is
11474 physically connected to - 1 or 2. For devices not connected to
11475 anything this will have the same value as the version attribute.
11476 </desc>
11477 </attribute>
11478
11479 <attribute name="remote" type="boolean" readonly="yes">
11480 <desc>
11481 Whether the device is physically connected to a remote VRDP
11482 client or to a local host machine.
11483 </desc>
11484 </attribute>
11485
11486 </interface>
11487
11488
11489 <!--
11490 // IUSBDeviceFilter
11491 /////////////////////////////////////////////////////////////////////////
11492 -->
11493
11494 <interface
11495 name="IUSBDeviceFilter" extends="$unknown"
11496 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11497 wsmap="managed"
11498 >
11499 <desc>
11500 The IUSBDeviceFilter interface represents an USB device filter used
11501 to perform actions on a group of USB devices.
11502
11503 This type of filters is used by running virtual machines to
11504 automatically capture selected USB devices once they are physically
11505 attached to the host computer.
11506
11507 A USB device is matched to the given device filter if and only if all
11508 attributes of the device match the corresponding attributes of the
11509 filter (that is, attributes are joined together using the logical AND
11510 operation). On the other hand, all together, filters in the list of
11511 filters carry the semantics of the logical OR operation. So if it is
11512 desirable to create a match like "this vendor id OR this product id",
11513 one needs to create two filters and specify "any match" (see below)
11514 for unused attributes.
11515
11516 All filter attributes used for matching are strings. Each string
11517 is an expression representing a set of values of the corresponding
11518 device attribute, that will match the given filter. Currently, the
11519 following filtering expressions are supported:
11520
11521 <ul>
11522 <li><i>Interval filters</i>. Used to specify valid intervals for
11523 integer device attributes (Vendor ID, Product ID and Revision).
11524 The format of the string is:
11525
11526 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11527
11528 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11529 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11530 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11531 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11532 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11533 possible integer is assumed.
11534 </li>
11535 <li><i>Boolean filters</i>. Used to specify acceptable values for
11536 boolean device attributes. The format of the string is:
11537
11538 <tt>true|false|yes|no|0|1</tt>
11539
11540 </li>
11541 <li><i>Exact match</i>. Used to specify a single value for the given
11542 device attribute. Any string that doesn't start with <tt>int:</tt>
11543 represents the exact match. String device attributes are compared to
11544 this string including case of symbols. Integer attributes are first
11545 converted to a string (see individual filter attributes) and then
11546 compared ignoring case.
11547
11548 </li>
11549 <li><i>Any match</i>. Any value of the corresponding device attribute
11550 will match the given filter. An empty or @c null string is
11551 used to construct this type of filtering expressions.
11552
11553 </li>
11554 </ul>
11555
11556 <note>
11557 On the Windows host platform, interval filters are not currently
11558 available. Also all string filter attributes
11559 (<link to="#manufacturer"/>, <link to="#product"/>,
11560 <link to="#serialNumber"/>) are ignored, so they behave as
11561 <i>any match</i> no matter what string expression is specified.
11562 </note>
11563
11564 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11565 </desc>
11566
11567 <attribute name="name" type="wstring">
11568 <desc>
11569 Visible name for this filter.
11570 This name is used to visually distinguish one filter from another,
11571 so it can neither be @c null nor an empty string.
11572 </desc>
11573 </attribute>
11574
11575 <attribute name="active" type="boolean">
11576 <desc>Whether this filter active or has been temporarily disabled.</desc>
11577 </attribute>
11578
11579 <attribute name="vendorId" type="wstring">
11580 <desc>
11581 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11582 The string representation for the <i>exact matching</i>
11583 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11584 (including leading zeroes).
11585 </desc>
11586 </attribute>
11587
11588 <attribute name="productId" type="wstring">
11589 <desc>
11590 <link to="IUSBDevice::productId">Product ID</link> filter.
11591 The string representation for the <i>exact matching</i>
11592 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11593 (including leading zeroes).
11594 </desc>
11595 </attribute>
11596
11597 <attribute name="revision" type="wstring">
11598 <desc>
11599 <link to="IUSBDevice::productId">Product revision number</link>
11600 filter. The string representation for the <i>exact matching</i>
11601 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11602 of the integer part of the revision, and <tt>F</tt> is the
11603 decimal digit of its fractional part (including leading and
11604 trailing zeros).
11605 Note that for interval filters, it's best to use the hexadecimal
11606 form, because the revision is stored as a 16 bit packed BCD value;
11607 so the expression <tt>int:0x0100-0x0199</tt> will match any
11608 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11609 </desc>
11610 </attribute>
11611
11612 <attribute name="manufacturer" type="wstring">
11613 <desc>
11614 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11615 </desc>
11616 </attribute>
11617
11618 <attribute name="product" type="wstring">
11619 <desc>
11620 <link to="IUSBDevice::product">Product</link> filter.
11621 </desc>
11622 </attribute>
11623
11624 <attribute name="serialNumber" type="wstring">
11625 <desc>
11626 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11627 </desc>
11628 </attribute>
11629
11630 <attribute name="port" type="wstring">
11631 <desc>
11632 <link to="IUSBDevice::port">Host USB port</link> filter.
11633 </desc>
11634 </attribute>
11635
11636 <attribute name="remote" type="wstring">
11637 <desc>
11638 <link to="IUSBDevice::remote">Remote state</link> filter.
11639 <note>
11640 This filter makes sense only for machine USB filters,
11641 i.e. it is ignored by IHostUSBDeviceFilter objects.
11642 </note>
11643 </desc>
11644 </attribute>
11645
11646 <attribute name="maskedInterfaces" type="unsigned long">
11647 <desc>
11648 This is an advanced option for hiding one or more USB interfaces
11649 from the guest. The value is a bit mask where the bits that are set
11650 means the corresponding USB interface should be hidden, masked off
11651 if you like.
11652 This feature only works on Linux hosts.
11653 </desc>
11654 </attribute>
11655
11656 </interface>
11657
11658
11659 <!--
11660 // IHostUSBDevice
11661 /////////////////////////////////////////////////////////////////////////
11662 -->
11663
11664 <enum
11665 name="USBDeviceState"
11666 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11667 >
11668 <desc>
11669 USB device state. This enumeration represents all possible states
11670 of the USB device physically attached to the host computer regarding
11671 its state on the host computer and availability to guest computers
11672 (all currently running virtual machines).
11673
11674 Once a supported USB device is attached to the host, global USB
11675 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11676 either ignore the device, or put it to USBDeviceState_Held state, or do
11677 nothing. Unless the device is ignored by global filters, filters of all
11678 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11679 activated that can put it to USBDeviceState_Captured state.
11680
11681 If the device was ignored by global filters, or didn't match
11682 any filters at all (including guest ones), it is handled by the host
11683 in a normal way. In this case, the device state is determined by
11684 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11685 or USBDeviceState_Available, depending on the current device usage.
11686
11687 Besides auto-capturing based on filters, the device can be manually
11688 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11689 state is USBDeviceState_Busy, USBDeviceState_Available or
11690 USBDeviceState_Held.
11691
11692 <note>
11693 Due to differences in USB stack implementations in Linux and Win32,
11694 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11695 only to the Linux version of the product. This also means that (<link
11696 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11697 device state is USBDeviceState_Held.
11698 </note>
11699
11700 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11701 </desc>
11702
11703 <const name="NotSupported" value="0">
11704 <desc>
11705 Not supported by the VirtualBox server, not available to guests.
11706 </desc>
11707 </const>
11708 <const name="Unavailable" value="1">
11709 <desc>
11710 Being used by the host computer exclusively,
11711 not available to guests.
11712 </desc>
11713 </const>
11714 <const name="Busy" value="2">
11715 <desc>
11716 Being used by the host computer, potentially available to guests.
11717 </desc>
11718 </const>
11719 <const name="Available" value="3">
11720 <desc>
11721 Not used by the host computer, available to guests (the host computer
11722 can also start using the device at any time).
11723 </desc>
11724 </const>
11725 <const name="Held" value="4">
11726 <desc>
11727 Held by the VirtualBox server (ignored by the host computer),
11728 available to guests.
11729 </desc>
11730 </const>
11731 <const name="Captured" value="5">
11732 <desc>
11733 Captured by one of the guest computers, not available
11734 to anybody else.
11735 </desc>
11736 </const>
11737 </enum>
11738
11739 <interface
11740 name="IHostUSBDevice" extends="IUSBDevice"
11741 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11742 wsmap="managed"
11743 >
11744 <desc>
11745 The IHostUSBDevice interface represents a physical USB device attached
11746 to the host computer.
11747
11748 Besides properties inherited from IUSBDevice, this interface adds the
11749 <link to="#state"/> property that holds the current state of the USB
11750 device.
11751
11752 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11753 </desc>
11754
11755 <attribute name="state" type="USBDeviceState" readonly="yes">
11756 <desc>
11757 Current state of the device.
11758 </desc>
11759 </attribute>
11760
11761 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11762
11763 </interface>
11764
11765
11766 <!--
11767 // IHostUSBDeviceFilter
11768 /////////////////////////////////////////////////////////////////////////
11769 -->
11770
11771 <enum
11772 name="USBDeviceFilterAction"
11773 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11774 >
11775 <desc>
11776 Actions for host USB device filters.
11777 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11778 </desc>
11779
11780 <const name="Null" value="0">
11781 <desc>Null value (never used by the API).</desc>
11782 </const>
11783 <const name="Ignore" value="1">
11784 <desc>Ignore the matched USB device.</desc>
11785 </const>
11786 <const name="Hold" value="2">
11787 <desc>Hold the matched USB device.</desc>
11788 </const>
11789 </enum>
11790
11791 <interface
11792 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11793 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11794 wsmap="managed"
11795 >
11796 <desc>
11797 The IHostUSBDeviceFilter interface represents a global filter for a
11798 physical USB device used by the host computer. Used indirectly in
11799 <link to="IHost::USBDeviceFilters"/>.
11800
11801 Using filters of this type, the host computer determines the initial
11802 state of the USB device after it is physically attached to the
11803 host's USB controller.
11804
11805 <note>
11806 The <link to="#remote"/> attribute is ignored by this type of
11807 filters, because it makes sense only for
11808 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11809 </note>
11810
11811 <see>IHost::USBDeviceFilters</see>
11812 </desc>
11813
11814 <attribute name="action" type="USBDeviceFilterAction">
11815 <desc>
11816 Action performed by the host when an attached USB device
11817 matches this filter.
11818 </desc>
11819 </attribute>
11820
11821 </interface>
11822
11823 <!--
11824 // IAudioAdapter
11825 /////////////////////////////////////////////////////////////////////////
11826 -->
11827
11828 <enum
11829 name="AudioDriverType"
11830 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11831 >
11832 <desc>
11833 Host audio driver type.
11834 </desc>
11835
11836 <const name="Null" value="0">
11837 <desc>Null value, also means "dummy audio driver".</desc>
11838 </const>
11839 <const name="WinMM" value="1">
11840 <desc>Windows multimedia (Windows hosts only).</desc>
11841 </const>
11842 <const name="OSS" value="2">
11843 <desc>Open Sound System (Linux hosts only).</desc>
11844 </const>
11845 <const name="ALSA" value="3">
11846 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11847 </const>
11848 <const name="DirectSound" value="4">
11849 <desc>DirectSound (Windows hosts only).</desc>
11850 </const>
11851 <const name="CoreAudio" value="5">
11852 <desc>CoreAudio (Mac hosts only).</desc>
11853 </const>
11854 <const name="MMPM" value="6">
11855 <desc>Reserved for historical reasons.</desc>
11856 </const>
11857 <const name="Pulse" value="7">
11858 <desc>PulseAudio (Linux hosts only).</desc>
11859 </const>
11860 <const name="SolAudio" value="8">
11861 <desc>Solaris audio (Solaris hosts only).</desc>
11862 </const>
11863 </enum>
11864
11865 <enum
11866 name="AudioControllerType"
11867 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11868 >
11869 <desc>
11870 Virtual audio controller type.
11871 </desc>
11872
11873 <const name="AC97" value="0"/>
11874 <const name="SB16" value="1"/>
11875 </enum>
11876
11877 <interface
11878 name="IAudioAdapter" extends="$unknown"
11879 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11880 wsmap="managed"
11881 >
11882 <desc>
11883 The IAudioAdapter interface represents the virtual audio adapter of
11884 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11885 </desc>
11886 <attribute name="enabled" type="boolean">
11887 <desc>
11888 Flag whether the audio adapter is present in the
11889 guest system. If disabled, the virtual guest hardware will
11890 not contain any audio adapter. Can only be changed when
11891 the VM is not running.
11892 </desc>
11893 </attribute>
11894 <attribute name="audioController" type="AudioControllerType">
11895 <desc>
11896 The audio hardware we emulate.
11897 </desc>
11898 </attribute>
11899 <attribute name="audioDriver" type="AudioDriverType">
11900 <desc>
11901 Audio driver the adapter is connected to. This setting
11902 can only be changed when the VM is not running.
11903 </desc>
11904 </attribute>
11905 </interface>
11906
11907 <!--
11908 // IVRDPServer
11909 /////////////////////////////////////////////////////////////////////////
11910 -->
11911
11912 <enum
11913 name="VRDPAuthType"
11914 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11915 >
11916 <desc>
11917 VRDP authentication type.
11918 </desc>
11919
11920 <const name="Null" value="0">
11921 <desc>Null value, also means "no authentication".</desc>
11922 </const>
11923 <const name="External" value="1"/>
11924 <const name="Guest" value="2"/>
11925 </enum>
11926
11927 <interface
11928 name="IVRDPServer" extends="$unknown"
11929 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11930 wsmap="managed"
11931 >
11932 <attribute name="enabled" type="boolean">
11933 <desc>VRDP server status.</desc>
11934 </attribute>
11935
11936 <attribute name="ports" type="wstring">
11937 <desc>
11938 VRDP server port numbers.
11939 <note>
11940 This is a string of comma separated TCP port numbers or port number ranges.
11941 The server will try to bind to one of ports from the list. Example
11942 <tt>3000,3010-3012,3015</tt>
11943 </note>
11944 </desc>
11945 </attribute>
11946
11947 <attribute name="netAddress" type="wstring">
11948 <desc>VRDP server address.</desc>
11949 </attribute>
11950
11951 <attribute name="authType" type="VRDPAuthType">
11952 <desc>VRDP authentication method.</desc>
11953 </attribute>
11954
11955 <attribute name="authTimeout" type="unsigned long">
11956 <desc>Timeout for guest authentication. Milliseconds.</desc>
11957 </attribute>
11958
11959 <attribute name="allowMultiConnection" type="boolean">
11960 <desc>
11961 Flag whether multiple simultaneous connections to the VM are permitted.
11962 Note that this will be replaced by a more powerful mechanism in the future.
11963 </desc>
11964 </attribute>
11965
11966 <attribute name="reuseSingleConnection" type="boolean">
11967 <desc>
11968 Flag whether the existing connection must be dropped and a new connection
11969 must be established by the VRDP server, when a new client connects in single
11970 connection mode.
11971 </desc>
11972 </attribute>
11973
11974 </interface>
11975
11976
11977 <!--
11978 // ISharedFolder
11979 /////////////////////////////////////////////////////////////////////////
11980 -->
11981
11982 <interface
11983 name="ISharedFolder" extends="$unknown"
11984 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11985 wsmap="struct"
11986 >
11987 <desc>
11988 The ISharedFolder interface represents a folder in the host computer's
11989 file system accessible from the guest OS running inside a virtual
11990 machine using an associated logical name.
11991
11992 There are three types of shared folders:
11993 <ul>
11994 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11995 folders available to all virtual machines.</li>
11996 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11997 VM-specific shared folders available to the given virtual machine at
11998 startup.</li>
11999 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12000 VM-specific shared folders created in the session context (for
12001 example, when the virtual machine is running) and automatically
12002 discarded when the session is closed (the VM is powered off).</li>
12003 </ul>
12004
12005 Logical names of shared folders must be unique within the given scope
12006 (global, permanent or transient). However, they do not need to be unique
12007 across scopes. In this case, the definition of the shared folder in a
12008 more specific scope takes precedence over definitions in all other
12009 scopes. The order of precedence is (more specific to more general):
12010 <ol>
12011 <li>Transient definitions</li>
12012 <li>Permanent definitions</li>
12013 <li>Global definitions</li>
12014 </ol>
12015
12016 For example, if MyMachine has a shared folder named
12017 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12018 transient shared folder named <tt>C_DRIVE</tt> (that points
12019 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12020 of <tt>C_DRIVE</tt> in the guest OS so
12021 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12022 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12023 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12024 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12025 to <tt>C:\\</tt> if it still exists.
12026
12027 Note that permanent and transient shared folders of different machines
12028 are in different name spaces, so they don't overlap and don't need to
12029 have unique logical names.
12030
12031 <note>
12032 Global shared folders are not implemented in the current version of the
12033 product.
12034 </note>
12035 </desc>
12036
12037 <attribute name="name" type="wstring" readonly="yes">
12038 <desc>Logical name of the shared folder.</desc>
12039 </attribute>
12040
12041 <attribute name="hostPath" type="wstring" readonly="yes">
12042 <desc>Full path to the shared folder in the host file system.</desc>
12043 </attribute>
12044
12045 <attribute name="accessible" type="boolean" readonly="yes">
12046 <desc>
12047 Whether the folder defined by the host path is currently
12048 accessible or not.
12049 For example, the folder can be unaccessible if it is placed
12050 on the network share that is not available by the time
12051 this property is read.
12052 </desc>
12053 </attribute>
12054
12055 <attribute name="writable" type="boolean" readonly="yes">
12056 <desc>
12057 Whether the folder defined by the host path is writable or
12058 not.
12059 </desc>
12060 </attribute>
12061
12062 <attribute name="lastAccessError" type="wstring" readonly="yes">
12063 <desc>
12064 Text message that represents the result of the last accessibility
12065 check.
12066
12067 Accessibility checks are performed each time the <link to="#accessible"/>
12068 attribute is read. An empty string is returned if the last
12069 accessibility check was successful. A non-empty string indicates a
12070 failure and should normally describe a reason of the failure (for
12071 example, a file read error).
12072 </desc>
12073 </attribute>
12074
12075 </interface>
12076
12077 <!--
12078 // ISession
12079 /////////////////////////////////////////////////////////////////////////
12080 -->
12081
12082 <interface
12083 name="IInternalSessionControl" extends="$unknown"
12084 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12085 internal="yes"
12086 wsmap="suppress"
12087 >
12088 <method name="getPID">
12089 <desc>PID of the process that has created this Session object.
12090 </desc>
12091 <param name="pid" type="unsigned long" dir="return"/>
12092 </method>
12093
12094 <method name="getRemoteConsole">
12095 <desc>
12096 Returns the console object suitable for remote control.
12097
12098 <result name="VBOX_E_INVALID_VM_STATE">
12099 Session state prevents operation.
12100 </result>
12101 <result name="VBOX_E_INVALID_OBJECT_STATE">
12102 Session type prevents operation.
12103 </result>
12104
12105 </desc>
12106 <param name="console" type="IConsole" dir="return"/>
12107 </method>
12108
12109 <method name="assignMachine">
12110 <desc>
12111 Assigns the machine object associated with this direct-type
12112 session or informs the session that it will be a remote one
12113 (if @a machine == @c null).
12114
12115 <result name="VBOX_E_INVALID_VM_STATE">
12116 Session state prevents operation.
12117 </result>
12118 <result name="VBOX_E_INVALID_OBJECT_STATE">
12119 Session type prevents operation.
12120 </result>
12121
12122 </desc>
12123 <param name="machine" type="IMachine" dir="in"/>
12124 </method>
12125
12126 <method name="assignRemoteMachine">
12127 <desc>
12128 Assigns the machine and the (remote) console object associated with
12129 this remote-type session.
12130
12131 <result name="VBOX_E_INVALID_VM_STATE">
12132 Session state prevents operation.
12133 </result>
12134
12135 </desc>
12136 <param name="machine" type="IMachine" dir="in"/>
12137 <param name="console" type="IConsole" dir="in"/>
12138 </method>
12139
12140 <method name="updateMachineState">
12141 <desc>
12142 Updates the machine state in the VM process.
12143 Must be called only in certain cases
12144 (see the method implementation).
12145
12146 <result name="VBOX_E_INVALID_VM_STATE">
12147 Session state prevents operation.
12148 </result>
12149 <result name="VBOX_E_INVALID_OBJECT_STATE">
12150 Session type prevents operation.
12151 </result>
12152
12153 </desc>
12154 <param name="aMachineState" type="MachineState" dir="in"/>
12155 </method>
12156
12157 <method name="uninitialize">
12158 <desc>
12159 Uninitializes (closes) this session. Used by VirtualBox to close
12160 the corresponding remote session when the direct session dies
12161 or gets closed.
12162
12163 <result name="VBOX_E_INVALID_VM_STATE">
12164 Session state prevents operation.
12165 </result>
12166
12167 </desc>
12168 </method>
12169
12170 <method name="onNetworkAdapterChange">
12171 <desc>
12172 Triggered when settings of a network adapter of the
12173 associated virtual machine have changed.
12174
12175 <result name="VBOX_E_INVALID_VM_STATE">
12176 Session state prevents operation.
12177 </result>
12178 <result name="VBOX_E_INVALID_OBJECT_STATE">
12179 Session type prevents operation.
12180 </result>
12181
12182 </desc>
12183 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12184 <param name="changeAdapter" type="boolean" dir="in"/>
12185 </method>
12186
12187 <method name="onSerialPortChange">
12188 <desc>
12189 Triggered when settings of a serial port of the
12190 associated virtual machine have changed.
12191
12192 <result name="VBOX_E_INVALID_VM_STATE">
12193 Session state prevents operation.
12194 </result>
12195 <result name="VBOX_E_INVALID_OBJECT_STATE">
12196 Session type prevents operation.
12197 </result>
12198
12199 </desc>
12200 <param name="serialPort" type="ISerialPort" dir="in"/>
12201 </method>
12202
12203 <method name="onParallelPortChange">
12204 <desc>
12205 Triggered when settings of a parallel port 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="parallelPort" type="IParallelPort" dir="in"/>
12217 </method>
12218
12219 <method name="onStorageControllerChange">
12220 <desc>
12221 Triggered when settings of a storage controller of the
12222 associated virtual machine have changed.
12223
12224 <result name="VBOX_E_INVALID_VM_STATE">
12225 Session state prevents operation.
12226 </result>
12227 <result name="VBOX_E_INVALID_OBJECT_STATE">
12228 Session type prevents operation.
12229 </result>
12230
12231 </desc>
12232 </method>
12233
12234 <method name="onMediumChange">
12235 <desc>
12236 Triggered when attached media of the
12237 associated virtual machine have changed.
12238
12239 <result name="VBOX_E_INVALID_VM_STATE">
12240 Session state prevents operation.
12241 </result>
12242 <result name="VBOX_E_INVALID_OBJECT_STATE">
12243 Session type prevents operation.
12244 </result>
12245
12246 </desc>
12247
12248 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12249 </method>
12250
12251 <method name="onVRDPServerChange">
12252 <desc>
12253 Triggered when settings of the VRDP server object of the
12254 associated virtual machine have changed.
12255
12256 <result name="VBOX_E_INVALID_VM_STATE">
12257 Session state prevents operation.
12258 </result>
12259 <result name="VBOX_E_INVALID_OBJECT_STATE">
12260 Session type prevents operation.
12261 </result>
12262
12263 </desc>
12264 </method>
12265
12266 <method name="onUSBControllerChange">
12267 <desc>
12268 Triggered when settings of the USB controller object of the
12269 associated virtual machine have changed.
12270
12271 <result name="VBOX_E_INVALID_VM_STATE">
12272 Session state prevents operation.
12273 </result>
12274 <result name="VBOX_E_INVALID_OBJECT_STATE">
12275 Session type prevents operation.
12276 </result>
12277
12278 </desc>
12279 </method>
12280
12281 <method name="onSharedFolderChange">
12282 <desc>
12283 Triggered when a permanent (global or machine) shared folder has been
12284 created or removed.
12285 <note>
12286 We don't pass shared folder parameters in this notification because
12287 the order in which parallel notifications are delivered is not defined,
12288 therefore it could happen that these parameters were outdated by the
12289 time of processing this notification.
12290 </note>
12291
12292 <result name="VBOX_E_INVALID_VM_STATE">
12293 Session state prevents operation.
12294 </result>
12295 <result name="VBOX_E_INVALID_OBJECT_STATE">
12296 Session type prevents operation.
12297 </result>
12298
12299 </desc>
12300 <param name="global" type="boolean" dir="in"/>
12301 </method>
12302
12303 <method name="onUSBDeviceAttach">
12304 <desc>
12305 Triggered when a request to capture a USB device (as a result
12306 of matched USB filters or direct call to
12307 <link to="IConsole::attachUSBDevice"/>) has completed.
12308 A @c null @a error object means success, otherwise it
12309 describes a failure.
12310
12311 <result name="VBOX_E_INVALID_VM_STATE">
12312 Session state prevents operation.
12313 </result>
12314 <result name="VBOX_E_INVALID_OBJECT_STATE">
12315 Session type prevents operation.
12316 </result>
12317
12318 </desc>
12319 <param name="device" type="IUSBDevice" dir="in"/>
12320 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12321 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12322 </method>
12323
12324 <method name="onUSBDeviceDetach">
12325 <desc>
12326 Triggered when a request to release the USB device (as a result
12327 of machine termination or direct call to
12328 <link to="IConsole::detachUSBDevice"/>) has completed.
12329 A @c null @a error object means success, otherwise it
12330 describes a failure.
12331
12332 <result name="VBOX_E_INVALID_VM_STATE">
12333 Session state prevents operation.
12334 </result>
12335 <result name="VBOX_E_INVALID_OBJECT_STATE">
12336 Session type prevents operation.
12337 </result>
12338
12339 </desc>
12340 <param name="id" type="uuid" mod="string" dir="in"/>
12341 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12342 </method>
12343
12344 <method name="onShowWindow">
12345 <desc>
12346 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12347 <link to="IMachine::showConsoleWindow"/> in order to notify
12348 console callbacks
12349 <link to="IConsoleCallback::onCanShowWindow"/>
12350 and <link to="IConsoleCallback::onShowWindow"/>.
12351
12352 <result name="VBOX_E_INVALID_OBJECT_STATE">
12353 Session type prevents operation.
12354 </result>
12355
12356 </desc>
12357 <param name="check" type="boolean" dir="in"/>
12358 <param name="canShow" type="boolean" dir="out"/>
12359 <param name="winId" type="unsigned long long" dir="out"/>
12360 </method>
12361
12362 <method name="accessGuestProperty">
12363 <desc>
12364 Called by <link to="IMachine::getGuestProperty"/> and by
12365 <link to="IMachine::setGuestProperty"/> in order to read and
12366 modify guest properties.
12367
12368 <result name="VBOX_E_INVALID_VM_STATE">
12369 Machine session is not open.
12370 </result>
12371 <result name="VBOX_E_INVALID_OBJECT_STATE">
12372 Session type is not direct.
12373 </result>
12374
12375 </desc>
12376 <param name="name" type="wstring" dir="in"/>
12377 <param name="value" type="wstring" dir="in"/>
12378 <param name="flags" type="wstring" dir="in"/>
12379 <param name="isSetter" type="boolean" dir="in"/>
12380 <param name="retValue" type="wstring" dir="out"/>
12381 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12382 <param name="retFlags" type="wstring" dir="out"/>
12383 </method>
12384
12385 <method name="enumerateGuestProperties">
12386 <desc>
12387 Return a list of the guest properties matching a set of patterns along
12388 with their values, time stamps and flags.
12389
12390 <result name="VBOX_E_INVALID_VM_STATE">
12391 Machine session is not open.
12392 </result>
12393 <result name="VBOX_E_INVALID_OBJECT_STATE">
12394 Session type is not direct.
12395 </result>
12396
12397 </desc>
12398 <param name="patterns" type="wstring" dir="in">
12399 <desc>
12400 The patterns to match the properties against as a comma-separated
12401 string. If this is empty, all properties currently set will be
12402 returned.
12403 </desc>
12404 </param>
12405 <param name="key" type="wstring" dir="out" safearray="yes">
12406 <desc>
12407 The key names of the properties returned.
12408 </desc>
12409 </param>
12410 <param name="value" type="wstring" dir="out" safearray="yes">
12411 <desc>
12412 The values of the properties returned. The array entries match the
12413 corresponding entries in the @a key array.
12414 </desc>
12415 </param>
12416 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12417 <desc>
12418 The time stamps of the properties returned. The array entries match
12419 the corresponding entries in the @a key array.
12420 </desc>
12421 </param>
12422 <param name="flags" type="wstring" dir="out" safearray="yes">
12423 <desc>
12424 The flags of the properties returned. The array entries match the
12425 corresponding entries in the @a key array.
12426 </desc>
12427 </param>
12428 </method>
12429
12430 </interface>
12431
12432 <interface
12433 name="ISession" extends="$dispatched"
12434 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12435 wsmap="managed"
12436 >
12437 <desc>
12438 The ISession interface represents a serialization primitive for virtual
12439 machines.
12440
12441 With VirtualBox, every time one wishes to manipulate a virtual machine
12442 (e.g. change its settings or start execution), a session object is
12443 required. Such an object must be passed to one of the session methods
12444 that open the given session, which then initiates the machine manipulation.
12445
12446 A session serves several purposes: it identifies to the inter-process VirtualBox
12447 code which process is currently working with the virtual machine, and it ensures
12448 that there are no incompatible requests from several processes for the
12449 same virtual machine. Session objects can therefore be thought of as mutex
12450 semaphores that lock virtual machines to prevent conflicting accesses from
12451 several processes.
12452
12453 How sessions objects are used depends on whether you use the Main API
12454 via COM or via the webservice:
12455
12456 <ul>
12457 <li>When using the COM API directly, an object of the Session class from the
12458 VirtualBox type library needs to be created. In regular COM C++ client code,
12459 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12460 This object will then act as a local session object in further calls to open
12461 a session.
12462 </li>
12463
12464 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12465 one session object automatically when <link to="IWebsessionManager::logon" />
12466 is called. A managed object reference to that session object can be retrieved by
12467 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12468 reference can then be used to open sessions.
12469 </li>
12470 </ul>
12471
12472 Sessions are mainly used in two variations:
12473
12474 <ul>
12475 <li>
12476 To start a virtual machine in a separate process, one would call
12477 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12478 object as its first parameter. This session then identifies the caller
12479 and lets him control the started machine (for example, pause machine
12480 execution or power it down) as well as be notified about machine
12481 execution state changes.
12482 </li>
12483
12484 <li>To alter machine settings, or to start machine execution within the
12485 current process, one needs to open a direct session for the machine first by
12486 calling <link to="IVirtualBox::openSession"/>. While a direct session
12487 is open within one process, no any other process may open another direct
12488 session for the same machine. This prevents the machine from being changed
12489 by other processes while it is running or while the machine is being configured.
12490 </li>
12491 </ul>
12492
12493 One also can attach to an existing direct session already opened by
12494 another process (for example, in order to send a control request to the
12495 virtual machine such as the pause or the reset request). This is done by
12496 calling <link to="IVirtualBox::openExistingSession"/>.
12497
12498 <note>
12499 Unless you are trying to write a new VirtualBox front-end that
12500 performs direct machine execution (like the VirtualBox or VBoxSDL
12501 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12502 session opened by <link to="IVirtualBox::openSession"/> and use this
12503 session only to change virtual machine settings. If you simply want to
12504 start virtual machine execution using one of the existing front-ends
12505 (for example the VirtualBox GUI or headless server), simply use
12506 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12507 will power up the machine automatically for you.
12508 </note>
12509 </desc>
12510
12511 <attribute name="state" type="SessionState" readonly="yes">
12512 <desc>Current state of this session.</desc>
12513 </attribute>
12514
12515 <attribute name="type" type="SessionType" readonly="yes">
12516 <desc>
12517 Type of this session. The value of this attribute is valid only
12518 if the session is currently open (i.e. its #state is
12519 SessionType_SessionOpen), otherwise an error will be returned.
12520 </desc>
12521 </attribute>
12522
12523 <attribute name="machine" type="IMachine" readonly="yes">
12524 <desc>Machine object associated with this session.</desc>
12525 </attribute>
12526
12527 <attribute name="console" type="IConsole" readonly="yes">
12528 <desc>Console object associated with this session.</desc>
12529 </attribute>
12530
12531 <method name="close">
12532 <desc>
12533 Closes a session that was previously opened.
12534
12535 It is recommended that every time an "open session" method (such as
12536 <link to="IVirtualBox::openRemoteSession" /> or
12537 <link to="IVirtualBox::openSession" />) has been called to
12538 manipulate a virtual machine, the caller invoke
12539 ISession::close() when it's done doing so. Since sessions are
12540 serialization primitives much like ordinary mutexes, they are
12541 best used the same way: for each "open" call, there should be
12542 a matching "close" call, even when errors occur.
12543
12544 Otherwise, if a direct session for a machine opened with
12545 <link to="IVirtualBox::openSession"/> is not explicitly closed
12546 when the application terminates, the state of the machine will
12547 be set to <link to="MachineState_Aborted" /> on the server.
12548
12549 Generally, it is recommended to close all open sessions explicitly
12550 before terminating the application (regardless of the reason for
12551 the termination).
12552
12553 <note>
12554 Do not expect the session state (<link to="ISession::state" />
12555 to return to "Closed" immediately after you invoke
12556 ISession::close(), particularly if you have started a remote
12557 session to execute the VM in a new process. The session state will
12558 automatically return to "Closed" once the VM is no longer executing,
12559 which can of course take a very long time.
12560 </note>
12561
12562 <result name="E_UNEXPECTED">
12563 Session is not open.
12564 </result>
12565
12566 </desc>
12567 </method>
12568
12569 </interface>
12570
12571 <!--
12572 // IStorageController
12573 /////////////////////////////////////////////////////////////////////////
12574 -->
12575
12576 <enum
12577 name="StorageBus"
12578 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12579 >
12580 <desc>
12581 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12582 see <link to="IStorageController::bus" />.
12583 </desc>
12584 <const name="Null" value="0">
12585 <desc>@c null value. Never used by the API.</desc>
12586 </const>
12587 <const name="IDE" value="1"/>
12588 <const name="SATA" value="2"/>
12589 <const name="SCSI" value="3"/>
12590 <const name="Floppy" value="4"/>
12591 </enum>
12592
12593 <enum
12594 name="StorageControllerType"
12595 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12596 >
12597 <desc>
12598 The exact variant of storage controller hardware presented
12599 to the guest; see <link to="IStorageController::controllerType" />.
12600 </desc>
12601
12602 <const name="Null" value="0">
12603 <desc>@c null value. Never used by the API.</desc>
12604 </const>
12605 <const name="LsiLogic" value="1">
12606 <desc>A SCSI controller of the LsiLogic variant.</desc>
12607 </const>
12608 <const name="BusLogic" value="2">
12609 <desc>A SCSI controller of the BusLogic variant.</desc>
12610 </const>
12611 <const name="IntelAhci" value="3">
12612 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12613 </const>
12614 <const name="PIIX3" value="4">
12615 <desc>An IDE controller of the PIIX3 variant.</desc>
12616 </const>
12617 <const name="PIIX4" value="5">
12618 <desc>An IDE controller of the PIIX4 variant.</desc>
12619 </const>
12620 <const name="ICH6" value="6">
12621 <desc>An IDE controller of the ICH6 variant.</desc>
12622 </const>
12623 <const name="I82078" value="7">
12624 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12625 </const>
12626 </enum>
12627
12628 <interface
12629 name="IStorageController" extends="$unknown"
12630 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12631 wsmap="managed"
12632 >
12633 <desc>
12634 Represents a storage controller that is attached to a virtual machine
12635 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12636 attached to storage controllers in a real computer, virtual media
12637 (represented by <link to="IMedium" />) are attached to virtual
12638 storage controllers, represented by this interface.
12639
12640 As opposed to physical hardware, VirtualBox has a very generic concept
12641 of a storage controller, and for purposes of the Main API, all virtual
12642 storage is attached to virtual machines via instances of this interface.
12643 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12644 and Floppy (see <link to="#bus" />). Depending on which of these four is
12645 used, certain sub-types may be available and can be selected in
12646 <link to="#controllerType" />.
12647
12648 Depending on these settings, the guest operating system might see
12649 significantly different virtual hardware.
12650 </desc>
12651
12652 <attribute name="name" type="wstring" readonly="yes">
12653 <desc>
12654 Name of the storage controller, as originally specified with
12655 <link to="IMachine::addStorageController" />. This then uniquely
12656 identifies this controller with other method calls such as
12657 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12658 </desc>
12659 </attribute>
12660
12661 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12662 <desc>
12663 Maximum number of devices which can be attached to one port.
12664 </desc>
12665 </attribute>
12666
12667 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12668 <desc>
12669 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12670 </desc>
12671 </attribute>
12672
12673 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12674 <desc>
12675 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12676 </desc>
12677 </attribute>
12678
12679 <attribute name="instance" type="unsigned long">
12680 <desc>
12681 The instance number of the device in the running VM.
12682 </desc>
12683 </attribute>
12684
12685 <attribute name="portCount" type="unsigned long">
12686 <desc>
12687 The number of currently usable ports on the controller.
12688 The minimum and maximum number of ports for one controller are
12689 stored in <link to="IStorageController::minPortCount"/>
12690 and <link to="IStorageController::maxPortCount"/>.
12691 </desc>
12692 </attribute>
12693
12694 <attribute name="bus" type="StorageBus" readonly="yes">
12695 <desc>
12696 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12697 </desc>
12698 </attribute>
12699
12700 <attribute name="controllerType" type="StorageControllerType">
12701 <desc>
12702 The exact variant of storage controller hardware presented
12703 to the guest.
12704 Depending on this value, VirtualBox will provide a different
12705 virtual storage controller hardware to the guest.
12706 For SATA and floppy controllers, only one variant is available,
12707 but for IDE and SCSI, there are several.
12708
12709 For SCSI controllers, the default type is LsiLogic.
12710 </desc>
12711 </attribute>
12712
12713 <method name="GetIDEEmulationPort">
12714 <desc>
12715 Gets the corresponding port number which is emulated as an IDE device.
12716 Works only with SATA controllers.
12717
12718 <result name="E_INVALIDARG">
12719 The @a devicePosition is not in the range 0 to 3.
12720 </result>
12721 <result name="E_NOTIMPL">
12722 The storage controller type is not SATAIntelAhci.
12723 </result>
12724
12725 </desc>
12726 <param name="devicePosition" type="long" dir="in"/>
12727 <param name="portNumber" type="long" dir="return"/>
12728 </method>
12729
12730 <method name="SetIDEEmulationPort">
12731 <desc>
12732 Sets the port number which is emulated as an IDE device.
12733 Works only with SATA controllers.
12734
12735 <result name="E_INVALIDARG">
12736 The @a devicePosition is not in the range 0 to 3 or the
12737 @a portNumber is not in the range 0 to 29.
12738 </result>
12739 <result name="E_NOTIMPL">
12740 The storage controller type is not SATAIntelAhci.
12741 </result>
12742
12743 </desc>
12744 <param name="devicePosition" type="long" dir="in"/>
12745 <param name="portNumber" type="long" dir="in"/>
12746 </method>
12747
12748 </interface>
12749
12750<if target="wsdl">
12751
12752 <!--
12753 // IManagedObjectRef
12754 /////////////////////////////////////////////////////////////////////////
12755 -->
12756
12757 <interface
12758 name="IManagedObjectRef" extends="$unknown"
12759 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12760 internal="yes"
12761 wsmap="managed"
12762 wscpp="hardcoded"
12763 >
12764 <desc>
12765 Managed object reference.
12766
12767 Only within the webservice, a managed object reference (which is really
12768 an opaque number) allows a webservice client to address an object
12769 that lives in the address space of the webservice server.
12770
12771 Behind each managed object reference, there is a COM object that lives
12772 in the webservice server's address space. The COM object is not freed
12773 until the managed object reference is released, either by an explicit
12774 call to <link to="IManagedObjectRef::release" /> or by logging off from
12775 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12776 all objects created during the webservice session.
12777
12778 Whenever a method call of the VirtualBox API returns a COM object, the
12779 webservice representation of that method will instead return a
12780 managed object reference, which can then be used to invoke methods
12781 on that object.
12782 </desc>
12783
12784 <method name="getInterfaceName">
12785 <desc>
12786 Returns the name of the interface that this managed object represents,
12787 for example, "IMachine", as a string.
12788 </desc>
12789 <param name="return" type="wstring" dir="return"/>
12790 </method>
12791
12792 <method name="release">
12793 <desc>
12794 Releases this managed object reference and frees the resources that
12795 were allocated for it in the webservice server process. After calling
12796 this method, the identifier of the reference can no longer be used.
12797 </desc>
12798 </method>
12799
12800 </interface>
12801
12802 <!--
12803 // IWebsessionManager
12804 /////////////////////////////////////////////////////////////////////////
12805 -->
12806
12807 <interface
12808 name="IWebsessionManager" extends="$unknown"
12809 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12810 internal="yes"
12811 wsmap="global"
12812 wscpp="hardcoded"
12813 >
12814 <desc>
12815 Websession manager. This provides essential services
12816 to webservice clients.
12817 </desc>
12818 <method name="logon">
12819 <desc>
12820 Logs a new client onto the webservice and returns a managed object reference to
12821 the IVirtualBox instance, which the client can then use as a basis to further
12822 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12823 interface, in one way or the other.
12824 </desc>
12825 <param name="username" type="wstring" dir="in"/>
12826 <param name="password" type="wstring" dir="in"/>
12827 <param name="return" type="IVirtualBox" dir="return"/>
12828 </method>
12829
12830 <method name="getSessionObject">
12831 <desc>
12832 Returns a managed object reference to the internal ISession object that was created
12833 for this web service session when the client logged on.
12834
12835 <see>ISession</see>
12836 </desc>
12837 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12838 <param name="return" type="ISession" dir="return"/>
12839 </method>
12840
12841 <method name="logoff">
12842 <desc>
12843 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12844 and destroys all resources associated with the session (most importantly, all
12845 managed objects created in the server while the session was active).
12846 </desc>
12847 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12848 </method>
12849
12850 </interface>
12851
12852</if>
12853
12854 <!--
12855 // IPerformanceCollector & friends
12856 /////////////////////////////////////////////////////////////////////////
12857 -->
12858
12859 <interface
12860 name="IPerformanceMetric" extends="$unknown"
12861 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12862 >
12863 <desc>
12864 The IPerformanceMetric interface represents parameters of the given
12865 performance metric.
12866 </desc>
12867
12868 <attribute name="metricName" type="wstring" readonly="yes">
12869 <desc>
12870 Name of the metric.
12871 </desc>
12872 </attribute>
12873
12874 <attribute name="object" type="$unknown" readonly="yes">
12875 <desc>
12876 Object this metric belongs to.
12877 </desc>
12878 </attribute>
12879
12880 <attribute name="description" type="wstring" readonly="yes">
12881 <desc>
12882 Textual description of the metric.
12883 </desc>
12884 </attribute>
12885
12886 <attribute name="period" type="unsigned long" readonly="yes">
12887 <desc>
12888 Time interval between samples, measured in seconds.
12889 </desc>
12890 </attribute>
12891
12892 <attribute name="count" type="unsigned long" readonly="yes">
12893 <desc>
12894 Number of recent samples retained by the performance collector for this
12895 metric.
12896
12897 When the collected sample count exceeds this number, older samples
12898 are discarded.
12899 </desc>
12900 </attribute>
12901
12902 <attribute name="unit" type="wstring" readonly="yes">
12903 <desc>
12904 Unit of measurement.
12905 </desc>
12906 </attribute>
12907
12908 <attribute name="minimumValue" type="long" readonly="yes">
12909 <desc>
12910 Minimum possible value of this metric.
12911 </desc>
12912 </attribute>
12913
12914 <attribute name="maximumValue" type="long" readonly="yes">
12915 <desc>
12916 Maximum possible value of this metric.
12917 </desc>
12918 </attribute>
12919 </interface>
12920
12921 <interface
12922 name="IPerformanceCollector" extends="$unknown"
12923 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12924 wsmap="managed"
12925 >
12926 <desc>
12927 The IPerformanceCollector interface represents a service that collects and
12928 stores performance metrics data.
12929
12930 Performance metrics are associated with objects of interfaces like IHost and
12931 IMachine. Each object has a distinct set of performance metrics.
12932 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12933
12934 Metric data is collected at the specified intervals and is retained
12935 internally. The interval and the number of retained samples can be set
12936 with <link to="IPerformanceCollector::setupMetrics" />.
12937
12938 Metrics are organized hierarchically, with each level separated by a
12939 slash (/) character. Generally, the scheme for metric names is like this:
12940
12941 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12942
12943 "Category/Metric" together form the base metric name. A base metric is the
12944 smallest unit for which a sampling interval and the number of retained
12945 samples can be set. Only base metrics can be enabled and disabled. All
12946 sub-metrics are collected when their base metric is collected.
12947 Collected values for any set of sub-metrics can be queried with
12948 <link to="IPerformanceCollector::queryMetricsData" />.
12949
12950 For example "CPU/Load/User:avg"
12951 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12952 "average" aggregate. An aggregate function is computed over all retained
12953 data. Valid aggregate functions are:
12954
12955 <ul>
12956 <li>avg -- average</li>
12957 <li>min -- minimum</li>
12958 <li>max -- maximum</li>
12959 </ul>
12960
12961 When setting up
12962 metric parameters, querying metric data, enabling or disabling metrics
12963 wildcards can be used in metric names to specify a subset of metrics. For
12964 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12965 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12966 values without aggregates <tt>*:</tt> can be used.
12967
12968 The valid names for base metrics are:
12969
12970 <ul>
12971 <li>CPU/Load</li>
12972 <li>CPU/MHz</li>
12973 <li>RAM/Usage</li>
12974 </ul>
12975
12976 The general sequence for collecting and retrieving the metrics is:
12977 <ul>
12978 <li>
12979 Obtain an instance of IPerformanceCollector with
12980 <link to="IVirtualBox::performanceCollector" />
12981 </li>
12982 <li>
12983 Allocate and populate an array with references to objects the metrics
12984 will be collected for. Use references to IHost and IMachine objects.
12985 </li>
12986 <li>
12987 Allocate and populate an array with base metric names the data will be
12988 collected for.
12989 </li>
12990 <li>
12991 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12992 metric data will be collected and stored.
12993 </li>
12994 <li>
12995 Wait for the data to get collected.
12996 </li>
12997 <li>
12998 Allocate and populate an array with references to objects the metric
12999 values will be queried for. You can re-use the object array used for
13000 setting base metrics.
13001 </li>
13002 <li>
13003 Allocate and populate an array with metric names the data will be
13004 collected for. Note that metric names differ from base metric names.
13005 </li>
13006 <li>
13007 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13008 have been collected so far are returned. Note that the values are still
13009 retained internally and data collection continues.
13010 </li>
13011 </ul>
13012
13013 For an example of usage refer to the following files in VirtualBox SDK:
13014 <ul>
13015 <li>
13016 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13017 </li>
13018 <li>
13019 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13020 </li>
13021 </ul>
13022 </desc>
13023
13024 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13025 <desc>
13026 Array of unique names of metrics.
13027
13028 This array represents all metrics supported by the performance
13029 collector. Individual objects do not necessarily support all of them.
13030 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13031 list of supported metrics for a particular object.
13032 </desc>
13033 </attribute>
13034
13035 <method name="getMetrics">
13036 <desc>
13037 Returns parameters of specified metrics for a set of objects.
13038 <note>
13039 @c Null metrics array means all metrics. @c Null object array means
13040 all existing objects.
13041 </note>
13042 </desc>
13043 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13044 <desc>
13045 Metric name filter. Currently, only a comma-separated list of metrics
13046 is supported.
13047 </desc>
13048 </param>
13049 <param name="objects" type="$unknown" dir="in" safearray="yes">
13050 <desc>
13051 Set of objects to return metric parameters for.
13052 </desc>
13053 </param>
13054 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13055 <desc>
13056 Array of returned metric parameters.
13057 </desc>
13058 </param>
13059 </method>
13060
13061 <method name="setupMetrics">
13062 <desc>
13063 Sets parameters of specified base metrics for a set of objects. Returns
13064 an array of <link to="IPerformanceMetric" /> describing the metrics have
13065 been affected.
13066 <note>
13067 @c Null or empty metric name array means all metrics. @c Null or empty
13068 object array means all existing objects. If metric name array contains
13069 a single element and object array contains many, the single metric
13070 name array element is applied to each object array element to form
13071 metric/object pairs.
13072 </note>
13073 </desc>
13074 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13075 <desc>
13076 Metric name filter. Comma-separated list of metrics with wildcard
13077 support.
13078 </desc>
13079 </param>
13080 <param name="objects" type="$unknown" dir="in" safearray="yes">
13081 <desc>
13082 Set of objects to setup metric parameters for.
13083 </desc>
13084 </param>
13085 <param name="period" type="unsigned long" dir="in">
13086 <desc>
13087 Time interval in seconds between two consecutive samples of performance
13088 data.
13089 </desc>
13090 </param>
13091 <param name="count" type="unsigned long" dir="in">
13092 <desc>
13093 Number of samples to retain in performance data history. Older samples
13094 get discarded.
13095 </desc>
13096 </param>
13097 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13098 <desc>
13099 Array of metrics that have been modified by the call to this method.
13100 </desc>
13101 </param>
13102 </method>
13103
13104 <method name="enableMetrics">
13105 <desc>
13106 Turns on collecting specified base metrics. Returns an array of
13107 <link to="IPerformanceMetric" /> describing the metrics have been
13108 affected.
13109 <note>
13110 @c Null or empty metric name array means all metrics. @c Null or empty
13111 object array means all existing objects. If metric name array contains
13112 a single element and object array contains many, the single metric
13113 name array element is applied to each object array element to form
13114 metric/object pairs.
13115 </note>
13116 </desc>
13117 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13118 <desc>
13119 Metric name filter. Comma-separated list of metrics with wildcard
13120 support.
13121 </desc>
13122 </param>
13123 <param name="objects" type="$unknown" dir="in" safearray="yes">
13124 <desc>
13125 Set of objects to enable metrics for.
13126 </desc>
13127 </param>
13128 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13129 <desc>
13130 Array of metrics that have been modified by the call to this method.
13131 </desc>
13132 </param>
13133 </method>
13134
13135 <method name="disableMetrics">
13136 <desc>
13137 Turns off collecting specified base metrics. Returns an array of
13138 <link to="IPerformanceMetric" /> describing the metrics have been
13139 affected.
13140 <note>
13141 @c Null or empty metric name array means all metrics. @c Null or empty
13142 object array means all existing objects. If metric name array contains
13143 a single element and object array contains many, the single metric
13144 name array element is applied to each object array element to form
13145 metric/object pairs.
13146 </note>
13147 </desc>
13148 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13149 <desc>
13150 Metric name filter. Comma-separated list of metrics with wildcard
13151 support.
13152 </desc>
13153 </param>
13154 <param name="objects" type="$unknown" dir="in" safearray="yes">
13155 <desc>
13156 Set of objects to disable metrics for.
13157 </desc>
13158 </param>
13159 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13160 <desc>
13161 Array of metrics that have been modified by the call to this method.
13162 </desc>
13163 </param>
13164 </method>
13165
13166 <method name="queryMetricsData">
13167 <desc>
13168 Queries collected metrics data for a set of objects.
13169
13170 The data itself and related metric information are returned in seven
13171 parallel and one flattened array of arrays. Elements of
13172 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13173 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13174 the same index describe one set of values corresponding to a single
13175 metric.
13176
13177 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13178 start and length of a sub-array is indicated by
13179 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13180 value for metric <tt>metricNames[i]</tt> is at
13181 <tt>returnData[returnIndices[i]]</tt>.
13182
13183 <note>
13184 @c Null or empty metric name array means all metrics. @c Null or empty
13185 object array means all existing objects. If metric name array contains
13186 a single element and object array contains many, the single metric
13187 name array element is applied to each object array element to form
13188 metric/object pairs.
13189 </note>
13190 <note>
13191 Data collection continues behind the scenes after call to
13192 @c queryMetricsData. The return data can be seen as the snapshot of
13193 the current state at the time of @c queryMetricsData call. The
13194 internally kept metric values are not cleared by the call. This makes
13195 possible querying different subsets of metrics or aggregates with
13196 subsequent calls. If periodic querying is needed it is highly
13197 suggested to query the values with @c interval*count period to avoid
13198 confusion. This way a completely new set of data values will be
13199 provided by each query.
13200 </note>
13201 </desc>
13202 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13203 <desc>
13204 Metric name filter. Comma-separated list of metrics with wildcard
13205 support.
13206 </desc>
13207 </param>
13208 <param name="objects" type="$unknown" dir="in" safearray="yes">
13209 <desc>
13210 Set of objects to query metrics for.
13211 </desc>
13212 </param>
13213 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13214 <desc>
13215 Names of metrics returned in @c returnData.
13216 </desc>
13217 </param>
13218 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13219 <desc>
13220 Objects associated with metrics returned in @c returnData.
13221 </desc>
13222 </param>
13223 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13224 <desc>
13225 Units of measurement for each returned metric.
13226 </desc>
13227 </param>
13228 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13229 <desc>
13230 Divisor that should be applied to return values in order to get
13231 floating point values. For example:
13232 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13233 will retrieve the floating point value of i-th sample of the first
13234 metric.
13235 </desc>
13236 </param>
13237 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13238 <desc>
13239 Sequence numbers of the first elements of value sequences of particular metrics
13240 returned in @c returnData. For aggregate metrics it is the sequence number of
13241 the sample the aggregate started calculation from.
13242 </desc>
13243 </param>
13244 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13245 <desc>
13246 Indices of the first elements of value sequences of particular metrics
13247 returned in @c returnData.
13248 </desc>
13249 </param>
13250 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13251 <desc>
13252 Lengths of value sequences of particular metrics.
13253 </desc>
13254 </param>
13255 <param name="returnData" type="long" dir="return" safearray="yes">
13256 <desc>
13257 Flattened array of all metric data containing sequences of values for
13258 each metric.
13259 </desc>
13260 </param>
13261 </method>
13262
13263 </interface>
13264
13265 <module name="VBoxSVC" context="LocalServer">
13266 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13267 namespace="virtualbox.org">
13268 <interface name="IVirtualBox" default="yes"/>
13269 </class>
13270 </module>
13271
13272 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13273 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13274 namespace="virtualbox.org">
13275 <interface name="ISession" default="yes"/>
13276 </class>
13277 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13278 namespace="virtualbox.org">
13279 <interface name="ILocalOwner" default="yes"/>
13280 <interface name="IVirtualBoxCallback"/>
13281 <interface name="IConsoleCallback"/>
13282 </class>
13283 </module>
13284
13285</library>
13286
13287</idl>
13288
13289<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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