VirtualBox

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

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

Main,VMM,Frontends,++: Teminology. Added a bind address for the (target) teleporter.

  • Property svn:eol-style set to native
File size: 490.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="0f4cc50c-e1cc-4cde-ae7a-e6164bac5ba2"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[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="TeleportingFrom" value="11">
676 <desc>
677 Teleporting 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 teleporting 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="d867a463-0f78-4ec7-a876-8da001464537"
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="teleporterEnabled" type="boolean">
4531 <desc>
4532 When set to @a true, the virtual machine becomes a target teleporter
4533 the next time it is powered on. This can only set to @a true when the
4534 VM is in the @a PoweredOff or @a Aborted state.
4535
4536 This property is automatically set to @a false when the VM is powered
4537 on.
4538 </desc>
4539 </attribute>
4540
4541 <attribute name="teleporterPort" type="unsigned long">
4542 <desc>
4543 The TCP port the target teleporter will listen for incoming
4544 teleportations on.
4545
4546 0 means the port is automatically selected upon power on. The actual
4547 value can be read from this property while the machine is waiting for
4548 incoming teleportations.
4549 </desc>
4550 </attribute>
4551
4552 <attribute name="teleporterAddress" type="wstring">
4553 <desc>
4554 The address the target teleporter will listen on. If set to an empty
4555 string, it will listen on all addresses.
4556 </desc>
4557 </attribute>
4558
4559 <attribute name="teleporterPassword" type="wstring">
4560 <desc>
4561 The password the to check for on the target teleporter. This is just a
4562 very basic measure to prevent simple hacks and operators accidentally
4563 beaming a virtual machine to the wrong place.
4564 </desc>
4565 </attribute>
4566
4567 <method name="setBootOrder">
4568 <desc>
4569 Puts the given device to the specified position in
4570 the boot order.
4571
4572 To indicate that no device is associated with the given position,
4573 <link to="DeviceType_Null"/> should be used.
4574
4575 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4576
4577 <result name="E_INVALIDARG">
4578 Boot @a position out of range.
4579 </result>
4580 <result name="E_NOTIMPL">
4581 Booting from USB @a device currently not supported.
4582 </result>
4583
4584 </desc>
4585 <param name="position" type="unsigned long" dir="in">
4586 <desc>
4587 Position in the boot order (@c 1 to the total number of
4588 devices the machine can boot from, as returned by
4589 <link to="ISystemProperties::maxBootPosition"/>).
4590 </desc>
4591 </param>
4592 <param name="device" type="DeviceType" dir="in">
4593 <desc>
4594 The type of the device used to boot at the given position.
4595 </desc>
4596 </param>
4597 </method>
4598
4599 <method name="getBootOrder" const="yes">
4600 <desc>
4601 Returns the device type that occupies the specified
4602 position in the boot order.
4603
4604 @todo [remove?]
4605 If the machine can have more than one device of the returned type
4606 (such as hard disks), then a separate method should be used to
4607 retrieve the individual device that occupies the given position.
4608
4609 If here are no devices at the given position, then
4610 <link to="DeviceType_Null"/> is returned.
4611
4612 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4613
4614 <result name="E_INVALIDARG">
4615 Boot @a position out of range.
4616 </result>
4617
4618 </desc>
4619 <param name="position" type="unsigned long" dir="in">
4620 <desc>
4621 Position in the boot order (@c 1 to the total number of
4622 devices the machine can boot from, as returned by
4623 <link to="ISystemProperties::maxBootPosition"/>).
4624 </desc>
4625 </param>
4626 <param name="device" type="DeviceType" dir="return">
4627 <desc>
4628 Device at the given position.
4629 </desc>
4630 </param>
4631 </method>
4632
4633 <method name="attachDevice">
4634 <desc>
4635 Attaches a device and optionally mounts a medium to the given storage
4636 controller (<link to="IStorageController" />, identified by @a name),
4637 at the indicated port and device.
4638
4639 This method is intended for managing storage devices in general (it works
4640 for both fixed and removable media). For storage devices supporting removable
4641 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4642 for changing the media while the machine is running.
4643
4644 For the IDE bus, the @a controllerPort parameter can be either
4645 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4646 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4647 to specify the master or the slave device, respectively. (In the
4648 default configuration of virtual machines, the secondary master is
4649 used for a CD/DVD drive.)
4650
4651 For an SATA controller, @a controllerPort must be a number ranging
4652 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4653 be a number ranging from @c 0 to @c 15.
4654
4655 For both SCSI and SATA, the @a device parameter is unused and must
4656 be @c 0.
4657
4658 For fixed media such as hard disks, the given medium cannot be NULL. It may
4659 be NULL for removable media such as DVDs and floppies.
4660
4661 After calling this returns successfully, a new instance of
4662 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4663 attachments (<link to="IMachine::mediumAttachments"/>).
4664
4665 The specified device slot must not have another disk attached to it, or
4666 this method will fail.
4667
4668 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4669 information about attaching media.
4670
4671 <note>
4672 You cannot attach a hard disk to a running machine. Also, you cannot
4673 attach a hard disk to a newly created machine until this machine's
4674 settings are saved to disk using <link to="#saveSettings"/>.
4675 </note>
4676 <note>
4677 If the medium is being attached indirectly, a new differencing medium
4678 will implicitly be created for it and attached instead. If the
4679 changes made to the machine settings (including this indirect
4680 attachment) are later cancelled using <link to="#discardSettings"/>,
4681 this implicitly created differencing medium will implicitly
4682 be deleted.
4683 </note>
4684
4685 <result name="E_INVALIDARG">
4686 SATA device, SATA port, IDE port or IDE slot out of range.
4687 </result>
4688 <result name="VBOX_E_INVALID_OBJECT_STATE">
4689 Attempt to attach medium to an unregistered virtual machine.
4690 </result>
4691 <result name="VBOX_E_INVALID_VM_STATE">
4692 Invalid machine state.
4693 </result>
4694 <result name="VBOX_E_OBJECT_IN_USE">
4695 Hard disk already attached to this or another virtual machine.
4696 </result>
4697
4698 </desc>
4699 <param name="name" type="wstring" dir="in">
4700 <desc>Name of the storage controller to attach the device to.</desc>
4701 </param>
4702 <param name="controllerPort" type="long" dir="in">
4703 <desc>Port to attach the device to.</desc>
4704 </param>
4705 <param name="device" type="long" dir="in">
4706 <desc>Device slot in the given port to attach the device to.</desc>
4707 </param>
4708 <param name="type" type="DeviceType" dir="in">
4709 <desc>Device type of the attached device.</desc>
4710 </param>
4711 <param name="id" type="uuid" mod="string" dir="in">
4712 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4713 medium.</desc>
4714 </param>
4715 </method>
4716
4717 <method name="detachDevice">
4718 <desc>
4719 Detaches the device attached to a device slot of the specified bus.
4720
4721 Detaching the device from the virtual machine is deferred. This means
4722 that the medium remains associated with the machine when this method
4723 returns and gets actually de-associated only after a successful
4724 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4725 for more detailed information about attaching media.
4726
4727 <note>
4728 You cannot detach the hard disk from a running machine.
4729 </note>
4730 <note>
4731 Detaching differencing media implicitly created by <link
4732 to="#attachDevice"/> for the indirect attachment using this
4733 method will <b>not</b> implicitly delete them. The
4734 <link to="IMedium::deleteStorage"/> operation should be
4735 explicitly performed by the caller after the medium is successfully
4736 detached and the settings are saved with
4737 <link to="#saveSettings"/>, if it is the desired action.
4738 </note>
4739
4740 <result name="VBOX_E_INVALID_VM_STATE">
4741 Attempt to detach medium from a running virtual machine.
4742 </result>
4743 <result name="VBOX_E_OBJECT_NOT_FOUND">
4744 No medium attached to given slot/bus.
4745 </result>
4746 <result name="VBOX_E_NOT_SUPPORTED">
4747 Hard disk format does not support storage deletion.
4748 </result>
4749
4750 </desc>
4751 <param name="name" type="wstring" dir="in">
4752 <desc>Name of the storage controller to detach the medium from.</desc>
4753 </param>
4754 <param name="controllerPort" type="long" dir="in">
4755 <desc>Port number to detach the medium from.</desc>
4756 </param>
4757 <param name="device" type="long" dir="in">
4758 <desc>Device slot number to detach the medium from.</desc>
4759 </param>
4760 </method>
4761
4762 <method name="mountMedium">
4763 <desc>
4764 Mounts a medium (<link to="IMedium" />, identified
4765 by the given UUID @a id) to the given storage controller
4766 (<link to="IStorageController" />, identified by @a name),
4767 at the indicated port and device. The device must already exist;
4768 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4769
4770 This method is intended only for managing removable media, where the
4771 device is fixed but media is changeable at runtime (such as DVDs
4772 and floppies). It cannot be used for fixed media such as hard disks.
4773
4774 The @a controllerPort and @a device parameters specify the device slot and
4775 have have the same meaning as with <link to="IMachine::attachDevice" />.
4776
4777 The specified device slot can have a medium mounted, which will be
4778 unmounted first. Specifying a NULL medium does just an unmount.
4779
4780 See <link to="IMedium"/> for more detailed information about
4781 attaching media.
4782
4783 <result name="E_INVALIDARG">
4784 SATA device, SATA port, IDE port or IDE slot out of range.
4785 </result>
4786 <result name="VBOX_E_INVALID_OBJECT_STATE">
4787 Attempt to attach medium to an unregistered virtual machine.
4788 </result>
4789 <result name="VBOX_E_INVALID_VM_STATE">
4790 Invalid machine state.
4791 </result>
4792 <result name="VBOX_E_OBJECT_IN_USE">
4793 Medium already attached to this or another virtual machine.
4794 </result>
4795
4796 </desc>
4797 <param name="name" type="wstring" dir="in">
4798 <desc>Name of the storage controller to attach the medium to.</desc>
4799 </param>
4800 <param name="controllerPort" type="long" dir="in">
4801 <desc>Port to attach the medium to.</desc>
4802 </param>
4803 <param name="device" type="long" dir="in">
4804 <desc>Device slot in the given port to attach the medium to.</desc>
4805 </param>
4806 <param name="id" type="uuid" mod="string" dir="in">
4807 <desc>UUID of the medium to attach.</desc>
4808 </param>
4809 </method>
4810
4811 <method name="getMedium" const="yes">
4812 <desc>
4813 Returns the virtual medium attached to a device slot of the specified
4814 bus.
4815
4816 Note that if the medium was indirectly attached by
4817 <link to="#mountMedium"/> to the given device slot then this
4818 method will return not the same object as passed to the
4819 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4820 more detailed information about mounting a medium.
4821
4822 <result name="VBOX_E_OBJECT_NOT_FOUND">
4823 No medium attached to given slot/bus.
4824 </result>
4825
4826 </desc>
4827 <param name="name" type="wstring" dir="in">
4828 <desc>Name of the storage controller the medium is attached to.</desc>
4829 </param>
4830 <param name="controllerPort" type="long" dir="in">
4831 <desc>Port to query.</desc>
4832 </param>
4833 <param name="device" type="long" dir="in">
4834 <desc>Device slot in the given port to query.</desc>
4835 </param>
4836 <param name="medium" type="IMedium" dir="return">
4837 <desc>Attached medium object.</desc>
4838 </param>
4839 </method>
4840
4841 <method name="getMediumAttachmentsOfController" const="yes">
4842 <desc>
4843 Returns an array of medium attachments which are attached to the
4844 the controller with the given name.
4845
4846 <result name="VBOX_E_OBJECT_NOT_FOUND">
4847 A storage controller with given name doesn't exist.
4848 </result>
4849 </desc>
4850 <param name="name" type="wstring" dir="in"/>
4851 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4852 </method>
4853
4854 <method name="getMediumAttachment" const="yes">
4855 <desc>
4856 Returns a medium attachment which corresponds to the controller with
4857 the given name, on the given port and device slot.
4858
4859 <result name="VBOX_E_OBJECT_NOT_FOUND">
4860 No attachment exists for the given controller/port/device combination.
4861 </result>
4862 </desc>
4863 <param name="name" type="wstring" dir="in"/>
4864 <param name="controllerPort" type="long" dir="in"/>
4865 <param name="device" type="long" dir="in"/>
4866 <param name="attachment" type="IMediumAttachment" dir="return"/>
4867 </method>
4868
4869 <method name="getNetworkAdapter" const="yes">
4870 <desc>
4871 Returns the network adapter associated with the given slot.
4872 Slots are numbered sequentially, starting with zero. The total
4873 number of adapters per machine is defined by the
4874 <link to="ISystemProperties::networkAdapterCount"/> property,
4875 so the maximum slot number is one less than that property's value.
4876
4877 <result name="E_INVALIDARG">
4878 Invalid @a slot number.
4879 </result>
4880
4881 </desc>
4882 <param name="slot" type="unsigned long" dir="in"/>
4883 <param name="adapter" type="INetworkAdapter" dir="return"/>
4884 </method>
4885
4886 <method name="addStorageController">
4887 <desc>
4888 Adds a new storage controller (SCSI or SATA controller) to the
4889 machine and returns it as an instance of
4890 <link to="IStorageController" />.
4891
4892 @a name identifies the controller for subsequent calls such as
4893 <link to="#getStorageControllerByName" />,
4894 <link to="#removeStorageController" />,
4895 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4896
4897 After the controller has been added, you can set its exact
4898 type by setting the <link to="IStorageController::controllerType" />.
4899
4900 <result name="VBOX_E_OBJECT_IN_USE">
4901 A storage controller with given name exists already.
4902 </result>
4903 <result name="E_INVALIDARG">
4904 Invalid @a controllerType.
4905 </result>
4906 </desc>
4907 <param name="name" type="wstring" dir="in"/>
4908 <param name="connectionType" type="StorageBus" dir="in"/>
4909 <param name="controller" type="IStorageController" dir="return"/>
4910 </method>
4911
4912 <method name="getStorageControllerByName" const="yes">
4913 <desc>
4914 Returns a storage controller with the given name.
4915
4916 <result name="VBOX_E_OBJECT_NOT_FOUND">
4917 A storage controller with given name doesn't exist.
4918 </result>
4919 </desc>
4920 <param name="name" type="wstring" dir="in"/>
4921 <param name="storageController" type="IStorageController" dir="return"/>
4922 </method>
4923
4924 <method name="removeStorageController">
4925 <desc>
4926 Removes a storage controller from the machine.
4927
4928 <result name="VBOX_E_OBJECT_NOT_FOUND">
4929 A storage controller with given name doesn't exist.
4930 </result>
4931 </desc>
4932 <param name="name" type="wstring" dir="in"/>
4933 </method>
4934
4935 <method name="getSerialPort" const="yes">
4936 <desc>
4937 Returns the serial port associated with the given slot.
4938 Slots are numbered sequentially, starting with zero. The total
4939 number of serial ports per machine is defined by the
4940 <link to="ISystemProperties::serialPortCount"/> property,
4941 so the maximum slot number is one less than that property's value.
4942
4943 <result name="E_INVALIDARG">
4944 Invalid @a slot number.
4945 </result>
4946
4947 </desc>
4948 <param name="slot" type="unsigned long" dir="in"/>
4949 <param name="port" type="ISerialPort" dir="return"/>
4950 </method>
4951
4952 <method name="getParallelPort" const="yes">
4953 <desc>
4954 Returns the parallel port associated with the given slot.
4955 Slots are numbered sequentially, starting with zero. The total
4956 number of parallel ports per machine is defined by the
4957 <link to="ISystemProperties::parallelPortCount"/> property,
4958 so the maximum slot number is one less than that property's value.
4959
4960 <result name="E_INVALIDARG">
4961 Invalid @a slot number.
4962 </result>
4963
4964 </desc>
4965 <param name="slot" type="unsigned long" dir="in"/>
4966 <param name="port" type="IParallelPort" dir="return"/>
4967 </method>
4968
4969 <method name="getExtraDataKeys">
4970 <desc>
4971 Returns an array representing the machine-specific extra data keys
4972 which currently have values defined.
4973 </desc>
4974 <param name="value" type="wstring" dir="return" safearray="yes">
4975 <desc>Array of extra data keys.</desc>
4976 </param>
4977 </method>
4978
4979 <method name="getExtraData">
4980 <desc>
4981 Returns associated machine-specific extra data.
4982
4983 If the requested data @a key does not exist, this function will
4984 succeed and return an empty string in the @a value argument.
4985
4986 <result name="VBOX_E_FILE_ERROR">
4987 Settings file not accessible.
4988 </result>
4989 <result name="VBOX_E_XML_ERROR">
4990 Could not parse the settings file.
4991 </result>
4992
4993 </desc>
4994 <param name="key" type="wstring" dir="in">
4995 <desc>Name of the data key to get.</desc>
4996 </param>
4997 <param name="value" type="wstring" dir="return">
4998 <desc>Value of the requested data key.</desc>
4999 </param>
5000 </method>
5001
5002 <method name="setExtraData">
5003 <desc>
5004 Sets associated machine-specific extra data.
5005
5006 If you pass @c null or an empty string as a key @a value, the given
5007 @a key will be deleted.
5008
5009 <note>
5010 Before performing the actual data change, this method will ask all
5011 registered callbacks using the
5012 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5013 notification for a permission. If one of the callbacks refuses the
5014 new value, the change will not be performed.
5015 </note>
5016 <note>
5017 On success, the
5018 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5019 is called to inform all registered callbacks about a successful data
5020 change.
5021 </note>
5022 <note>
5023 This method can be called outside the machine session and therefore
5024 it's a caller's responsibility to handle possible race conditions
5025 when several clients change the same key at the same time.
5026 </note>
5027
5028 <result name="VBOX_E_FILE_ERROR">
5029 Settings file not accessible.
5030 </result>
5031 <result name="VBOX_E_XML_ERROR">
5032 Could not parse the settings file.
5033 </result>
5034
5035 </desc>
5036 <param name="key" type="wstring" dir="in">
5037 <desc>Name of the data key to set.</desc>
5038 </param>
5039 <param name="value" type="wstring" dir="in">
5040 <desc>Value to assign to the key.</desc>
5041 </param>
5042 </method>
5043
5044 <method name="getCpuProperty" const="yes">
5045 <desc>
5046 Returns the virtual CPU boolean value of the specified property.
5047
5048 <result name="E_INVALIDARG">
5049 Invalid property.
5050 </result>
5051
5052 </desc>
5053 <param name="property" type="CpuPropertyType" dir="in">
5054 <desc>
5055 Property type to query.
5056 </desc>
5057 </param>
5058 <param name="value" type="boolean" dir="return">
5059 <desc>
5060 Property value.
5061 </desc>
5062 </param>
5063 </method>
5064
5065 <method name="setCpuProperty">
5066 <desc>
5067 Sets the virtual CPU boolean value of the specified property.
5068
5069 <result name="E_INVALIDARG">
5070 Invalid property.
5071 </result>
5072
5073 </desc>
5074 <param name="property" type="CpuPropertyType" dir="in">
5075 <desc>
5076 Property type to query.
5077 </desc>
5078 </param>
5079 <param name="value" type="boolean" dir="in">
5080 <desc>
5081 Property value.
5082 </desc>
5083 </param>
5084 </method>
5085
5086 <method name="getHWVirtExProperty" const="yes">
5087 <desc>
5088 Returns the HWVirtEx boolean value of the specified property.
5089
5090 <result name="E_INVALIDARG">
5091 Invalid property.
5092 </result>
5093
5094 </desc>
5095 <param name="property" type="HWVirtExPropertyType" dir="in">
5096 <desc>
5097 Property type to query.
5098 </desc>
5099 </param>
5100 <param name="value" type="boolean" dir="return">
5101 <desc>
5102 Property value.
5103 </desc>
5104 </param>
5105 </method>
5106
5107 <method name="setHWVirtExProperty">
5108 <desc>
5109 Sets the HWVirtEx boolean value of the specified property.
5110
5111 <result name="E_INVALIDARG">
5112 Invalid property.
5113 </result>
5114
5115 </desc>
5116 <param name="property" type="HWVirtExPropertyType" dir="in">
5117 <desc>
5118 Property type to query.
5119 </desc>
5120 </param>
5121 <param name="value" type="boolean" dir="in">
5122 <desc>
5123 Property value.
5124 </desc>
5125 </param>
5126 </method>
5127
5128 <method name="saveSettings">
5129 <desc>
5130 Saves any changes to machine settings made since the session
5131 has been opened or a new machine has been created, or since the
5132 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5133 For registered machines, new settings become visible to all
5134 other VirtualBox clients after successful invocation of this
5135 method.
5136 <note>
5137 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5138 notification event after the configuration has been successfully
5139 saved (only for registered machines).
5140 </note>
5141 <note>
5142 Calling this method is only valid on instances returned
5143 by <link to="ISession::machine"/> and on new machines
5144 created by <link to="IVirtualBox::createMachine"/> but not
5145 yet registered, or on unregistered machines after calling
5146 <link to="IVirtualBox::unregisterMachine"/>.
5147 </note>
5148
5149 <result name="VBOX_E_FILE_ERROR">
5150 Settings file not accessible.
5151 </result>
5152 <result name="VBOX_E_XML_ERROR">
5153 Could not parse the settings file.
5154 </result>
5155 <result name="E_ACCESSDENIED">
5156 Modification request refused.
5157 </result>
5158
5159 </desc>
5160 </method>
5161
5162 <method name="discardSettings">
5163 <desc>
5164 Discards any changes to the machine settings made since the session
5165 has been opened or since the last call to <link to="#saveSettings"/>
5166 or <link to="#discardSettings"/>.
5167 <note>
5168 Calling this method is only valid on instances returned
5169 by <link to="ISession::machine"/> and on new machines
5170 created by <link to="IVirtualBox::createMachine"/> or
5171 opened by <link to="IVirtualBox::openMachine"/> but not
5172 yet registered, or on unregistered machines after calling
5173 <link to="IVirtualBox::unregisterMachine"/>.
5174 </note>
5175
5176 <result name="VBOX_E_INVALID_VM_STATE">
5177 Virtual machine is not mutable.
5178 </result>
5179
5180 </desc>
5181 </method>
5182
5183 <method name="deleteSettings">
5184 <desc>
5185 Deletes the settings file of this machine from disk.
5186 The machine must not be registered in order for this operation
5187 to succeed.
5188 <note>
5189 <link to="#settingsModified"/> will return @c true after this
5190 method successfully returns.
5191 </note>
5192 <note>
5193 Calling this method is only valid on instances returned
5194 by <link to="ISession::machine"/> and on new machines
5195 created by <link to="IVirtualBox::createMachine"/> or
5196 opened by <link to="IVirtualBox::openMachine"/> but not
5197 yet registered, or on unregistered machines after calling
5198 <link to="IVirtualBox::unregisterMachine"/>.
5199 </note>
5200 <note>
5201 The deleted machine settings file can be restored (saved again)
5202 by calling <link to="#saveSettings"/>.
5203 </note>
5204
5205 <result name="VBOX_E_INVALID_VM_STATE">
5206 Cannot delete settings of a registered machine or
5207 machine not mutable.
5208 </result>
5209 <result name="VBOX_E_IPRT_ERROR">
5210 Could not delete the settings file.
5211 </result>
5212
5213 </desc>
5214 </method>
5215
5216 <method name="export">
5217 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5218 steps required to export VirtualBox machines to OVF.
5219 </desc>
5220
5221 <param name="aAppliance" type="IAppliance" dir="in">
5222 <desc>Appliance to export this machine to.</desc>
5223 </param>
5224 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5225 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5226 </param>
5227 </method >
5228
5229 <method name="getSnapshot">
5230 <desc>
5231 Returns a snapshot of this machine with the given UUID.
5232 A @c null UUID can be used to obtain the first snapshot
5233 taken on this machine. This is useful if you want to traverse
5234 the whole tree of snapshots starting from the root.
5235
5236 <result name="VBOX_E_OBJECT_NOT_FOUND">
5237 Virtual machine has no snapshots or snapshot not found.
5238 </result>
5239
5240 </desc>
5241 <param name="id" type="uuid" mod="string" dir="in">
5242 <desc>UUID of the snapshot to get</desc>
5243 </param>
5244 <param name="snapshot" type="ISnapshot" dir="return">
5245 <desc>Snapshot object with the given UUID.</desc>
5246 </param>
5247 </method>
5248
5249 <method name="findSnapshot">
5250 <desc>
5251 Returns a snapshot of this machine with the given name.
5252
5253 <result name="VBOX_E_OBJECT_NOT_FOUND">
5254 Virtual machine has no snapshots or snapshot not found.
5255 </result>
5256
5257 </desc>
5258 <param name="name" type="wstring" dir="in">
5259 <desc>Name of the snapshot to find</desc>
5260 </param>
5261 <param name="snapshot" type="ISnapshot" dir="return">
5262 <desc>Snapshot object with the given name.</desc>
5263 </param>
5264 </method>
5265
5266 <method name="setCurrentSnapshot">
5267 <desc>
5268 Sets the current snapshot of this machine.
5269 <note>
5270 In the current implementation, this operation is not
5271 implemented.
5272 </note>
5273 </desc>
5274 <param name="id" type="uuid" mod="string" dir="in">
5275 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5276 </param>
5277 </method>
5278
5279 <method name="createSharedFolder">
5280 <desc>
5281 Creates a new permanent shared folder by associating the given logical
5282 name with the given host path, adds it to the collection of shared
5283 folders and starts sharing it. Refer to the description of
5284 <link to="ISharedFolder"/> to read more about logical names.
5285
5286 <result name="VBOX_E_OBJECT_IN_USE">
5287 Shared folder already exists.
5288 </result>
5289 <result name="VBOX_E_FILE_ERROR">
5290 Shared folder @a hostPath not accessible.
5291 </result>
5292
5293 </desc>
5294 <param name="name" type="wstring" dir="in">
5295 <desc>Unique logical name of the shared folder.</desc>
5296 </param>
5297 <param name="hostPath" type="wstring" dir="in">
5298 <desc>Full path to the shared folder in the host file system.</desc>
5299 </param>
5300 <param name="writable" type="boolean" dir="in">
5301 <desc>Whether the share is writable or readonly</desc>
5302 </param>
5303 </method>
5304
5305 <method name="removeSharedFolder">
5306 <desc>
5307 Removes the permanent shared folder with the given name previously
5308 created by <link to="#createSharedFolder"/> from the collection of
5309 shared folders and stops sharing it.
5310
5311 <result name="VBOX_E_INVALID_VM_STATE">
5312 Virtual machine is not mutable.
5313 </result>
5314 <result name="VBOX_E_OBJECT_NOT_FOUND">
5315 Shared folder @a name does not exist.
5316 </result>
5317
5318 </desc>
5319 <param name="name" type="wstring" dir="in">
5320 <desc>Logical name of the shared folder to remove.</desc>
5321 </param>
5322 </method>
5323
5324 <method name="canShowConsoleWindow">
5325 <desc>
5326 Returns @c true if the VM console process can activate the
5327 console window and bring it to foreground on the desktop of
5328 the host PC.
5329 <note>
5330 This method will fail if a session for this machine is not
5331 currently open.
5332 </note>
5333
5334 <result name="VBOX_E_INVALID_VM_STATE">
5335 Machine session is not open.
5336 </result>
5337
5338 </desc>
5339 <param name="canShow" type="boolean" dir="return">
5340 <desc>
5341 @c true if the console window can be shown and @c false otherwise.
5342 </desc>
5343 </param>
5344 </method>
5345
5346 <method name="showConsoleWindow">
5347 <desc>
5348 Activates the console window and brings it to foreground on
5349 the desktop of the host PC. Many modern window managers on
5350 many platforms implement some sort of focus stealing
5351 prevention logic, so that it may be impossible to activate
5352 a window without the help of the currently active
5353 application. In this case, this method will return a non-zero
5354 identifier that represents the top-level window of the VM
5355 console process. The caller, if it represents a currently
5356 active process, is responsible to use this identifier (in a
5357 platform-dependent manner) to perform actual window
5358 activation.
5359 <note>
5360 This method will fail if a session for this machine is not
5361 currently open.
5362 </note>
5363
5364 <result name="VBOX_E_INVALID_VM_STATE">
5365 Machine session is not open.
5366 </result>
5367
5368 </desc>
5369 <param name="winId" type="unsigned long long" dir="return">
5370 <desc>
5371 Platform-dependent identifier of the top-level VM console
5372 window, or zero if this method has performed all actions
5373 necessary to implement the <i>show window</i> semantics for
5374 the given platform and/or VirtualBox front-end.
5375 </desc>
5376 </param>
5377 </method>
5378
5379 <method name="getGuestProperty">
5380 <desc>
5381 Reads an entry from the machine's guest property store.
5382
5383 <result name="VBOX_E_INVALID_VM_STATE">
5384 Machine session is not open.
5385 </result>
5386
5387 </desc>
5388 <param name="name" type="wstring" dir="in">
5389 <desc>
5390 The name of the property to read.
5391 </desc>
5392 </param>
5393 <param name="value" type="wstring" dir="out">
5394 <desc>
5395 The value of the property. If the property does not exist then this
5396 will be empty.
5397 </desc>
5398 </param>
5399 <param name="timestamp" type="unsigned long long" dir="out">
5400 <desc>
5401 The time at which the property was last modified, as seen by the
5402 server process.
5403 </desc>
5404 </param>
5405 <param name="flags" type="wstring" dir="out">
5406 <desc>
5407 Additional property parameters, passed as a comma-separated list of
5408 "name=value" type entries.
5409 </desc>
5410 </param>
5411 </method>
5412
5413 <method name="getGuestPropertyValue">
5414 <desc>
5415 Reads a value from the machine's guest property store.
5416
5417 <result name="VBOX_E_INVALID_VM_STATE">
5418 Machine session is not open.
5419 </result>
5420
5421 </desc>
5422 <param name="property" type="wstring" dir="in">
5423 <desc>
5424 The name of the property to read.
5425 </desc>
5426 </param>
5427 <param name="value" type="wstring" dir="return">
5428 <desc>
5429 The value of the property. If the property does not exist then this
5430 will be empty.
5431 </desc>
5432 </param>
5433 </method>
5434
5435 <method name="getGuestPropertyTimestamp">
5436 <desc>
5437 Reads a property timestamp from the machine's guest property store.
5438
5439 <result name="VBOX_E_INVALID_VM_STATE">
5440 Machine session is not open.
5441 </result>
5442
5443 </desc>
5444 <param name="property" type="wstring" dir="in">
5445 <desc>
5446 The name of the property to read.
5447 </desc>
5448 </param>
5449 <param name="value" type="unsigned long long" dir="return">
5450 <desc>
5451 The timestamp. If the property does not exist then this will be
5452 empty.
5453 </desc>
5454 </param>
5455 </method>
5456
5457 <method name="setGuestProperty">
5458 <desc>
5459 Sets, changes or deletes an entry in the machine's guest property
5460 store.
5461
5462 <result name="E_ACCESSDENIED">
5463 Property cannot be changed.
5464 </result>
5465 <result name="E_INVALIDARG">
5466 Invalid @a flags.
5467 </result>
5468 <result name="VBOX_E_INVALID_VM_STATE">
5469 Virtual machine is not mutable or session not open.
5470 </result>
5471 <result name="VBOX_E_INVALID_OBJECT_STATE">
5472 Cannot set transient property when machine not running.
5473 </result>
5474
5475 </desc>
5476 <param name="property" type="wstring" dir="in">
5477 <desc>
5478 The name of the property to set, change or delete.
5479 </desc>
5480 </param>
5481 <param name="value" type="wstring" dir="in">
5482 <desc>
5483 The new value of the property to set, change or delete. If the
5484 property does not yet exist and value is non-empty, it will be
5485 created. If the value is @c null or empty, the property will be
5486 deleted if it exists.
5487 </desc>
5488 </param>
5489 <param name="flags" type="wstring" dir="in">
5490 <desc>
5491 Additional property parameters, passed as a comma-separated list of
5492 "name=value" type entries.
5493 </desc>
5494 </param>
5495 </method>
5496
5497 <method name="setGuestPropertyValue">
5498 <desc>
5499 Sets, changes or deletes a value in the machine's guest property
5500 store. The flags field will be left unchanged or created empty for a
5501 new property.
5502
5503 <result name="E_ACCESSDENIED">
5504 Property cannot be changed.
5505 </result>
5506 <result name="VBOX_E_INVALID_VM_STATE">
5507 Virtual machine is not mutable or session not open.
5508 </result>
5509 <result name="VBOX_E_INVALID_OBJECT_STATE">
5510 Cannot set transient property when machine not running.
5511 </result>
5512 </desc>
5513
5514 <param name="property" type="wstring" dir="in">
5515 <desc>
5516 The name of the property to set, change or delete.
5517 </desc>
5518 </param>
5519 <param name="value" type="wstring" dir="in">
5520 <desc>
5521 The new value of the property to set, change or delete. If the
5522 property does not yet exist and value is non-empty, it will be
5523 created. If the value is @c null or empty, the property will be
5524 deleted if it exists.
5525 </desc>
5526 </param>
5527 </method>
5528
5529 <method name="enumerateGuestProperties">
5530 <desc>
5531 Return a list of the guest properties matching a set of patterns along
5532 with their values, time stamps and flags.
5533 </desc>
5534 <param name="patterns" type="wstring" dir="in">
5535 <desc>
5536 The patterns to match the properties against, separated by '|'
5537 characters. If this is empty or @c null, all properties will match.
5538 </desc>
5539 </param>
5540 <param name="name" type="wstring" dir="out" safearray="yes">
5541 <desc>
5542 The names of the properties returned.
5543 </desc>
5544 </param>
5545 <param name="value" type="wstring" dir="out" safearray="yes">
5546 <desc>
5547 The values of the properties returned. The array entries match the
5548 corresponding entries in the @a name array.
5549 </desc>
5550 </param>
5551 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5552 <desc>
5553 The time stamps of the properties returned. The array entries match
5554 the corresponding entries in the @a name array.
5555 </desc>
5556 </param>
5557 <param name="flags" type="wstring" dir="out" safearray="yes">
5558 <desc>
5559 The flags of the properties returned. The array entries match the
5560 corresponding entries in the @a name array.
5561 </desc>
5562 </param>
5563 </method>
5564</interface>
5565
5566 <!--
5567 // IConsole
5568 /////////////////////////////////////////////////////////////////////////
5569 -->
5570
5571 <interface
5572 name="IConsoleCallback" extends="$unknown"
5573 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5574 wsmap="suppress"
5575 >
5576
5577 <desc>
5578 This interface is used by a client of the Main API that need to
5579 be notified of events. For example, a graphical user interface
5580 can use this to learn about machine state changes so they can
5581 update the list of virtual machines without having to rely
5582 on polling.
5583
5584 Whenever relevant events occur in VirtualBox, the callbacks in
5585 objects of this interface are called. In order for this to be
5586 useful, a client needs to create its own subclass that implements
5587 this interface in which the methods for the relevant callbacks
5588 are overridden. An instance of this subclass interface can then
5589 be passed to <link to="IConsole::registerCallback" />.
5590 </desc>
5591
5592 <method name="onMousePointerShapeChange">
5593 <desc>
5594 Notification when the guest mouse pointer shape has
5595 changed. The new shape data is given.
5596 </desc>
5597 <param name="visible" type="boolean" dir="in">
5598 <desc>
5599 Flag whether the pointer is visible.
5600 </desc>
5601 </param>
5602 <param name="alpha" type="boolean" dir="in">
5603 <desc>
5604 Flag whether the pointer has an alpha channel.
5605 </desc>
5606 </param>
5607 <param name="xHot" type="unsigned long" dir="in">
5608 <desc>
5609 The pointer hot spot x coordinate.
5610 </desc>
5611 </param>
5612 <param name="yHot" type="unsigned long" dir="in">
5613 <desc>
5614 The pointer hot spot y coordinate.
5615 </desc>
5616 </param>
5617 <param name="width" type="unsigned long" dir="in">
5618 <desc>
5619 Width of the pointer shape in pixels.
5620 </desc>
5621 </param>
5622 <param name="height" type="unsigned long" dir="in">
5623 <desc>
5624 Height of the pointer shape in pixels.
5625 </desc>
5626 </param>
5627 <param name="shape" type="octet" mod="ptr" dir="in">
5628 <desc>
5629 Address of the shape buffer.
5630
5631 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5632 followed by a 32-bpp XOR (color) mask.
5633
5634 For pointers without alpha channel the XOR mask pixels are 32
5635 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5636 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5637
5638 An AND mask is used for pointers with alpha channel, so if the
5639 callback does not support alpha, the pointer could be
5640 displayed as a normal color pointer.
5641
5642 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5643 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5644 height</tt>. The padding bits at the end of each scanline are
5645 undefined.
5646
5647 The XOR mask follows the AND mask on the next 4-byte aligned
5648 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5649 Bytes in the gap between the AND and the XOR mask are undefined.
5650 The XOR mask scanlines have no gap between them and the size of
5651 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5652
5653 <note>
5654 If @a shape is 0, only the pointer visibility is changed.
5655 </note>
5656 </desc>
5657 </param>
5658 </method>
5659
5660 <method name="onMouseCapabilityChange">
5661 <desc>
5662 Notification when the mouse capabilities reported by the
5663 guest have changed. The new capabilities are passed.
5664 </desc>
5665 <param name="supportsAbsolute" type="boolean" dir="in"/>
5666 <param name="needsHostCursor" type="boolean" dir="in"/>
5667 </method>
5668
5669 <method name="onKeyboardLedsChange">
5670 <desc>
5671 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5672 to alter the state of the keyboard LEDs.
5673 </desc>
5674 <param name="numLock" type="boolean" dir="in"/>
5675 <param name="capsLock" type="boolean" dir="in"/>
5676 <param name="scrollLock" type="boolean" dir="in"/>
5677 </method>
5678
5679 <method name="onStateChange">
5680 <desc>
5681 Notification when the execution state of the machine has changed.
5682 The new state will be given.
5683 </desc>
5684 <param name="state" type="MachineState" dir="in"/>
5685 </method>
5686
5687 <method name="onAdditionsStateChange">
5688 <desc>
5689 Notification when a Guest Additions property changes.
5690 Interested callees should query IGuest attributes to
5691 find out what has changed.
5692 </desc>
5693 </method>
5694
5695 <method name="onNetworkAdapterChange">
5696 <desc>
5697 Notification when a property of one of the
5698 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5699 changes. Interested callees should use INetworkAdapter methods and
5700 attributes to find out what has changed.
5701 </desc>
5702 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5703 <desc>Network adapter that is subject to change.</desc>
5704 </param>
5705 </method>
5706
5707 <method name="onSerialPortChange">
5708 <desc>
5709 Notification when a property of one of the
5710 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5711 Interested callees should use ISerialPort methods and attributes
5712 to find out what has changed.
5713 </desc>
5714 <param name="serialPort" type="ISerialPort" dir="in">
5715 <desc>Serial port that is subject to change.</desc>
5716 </param>
5717 </method>
5718
5719 <method name="onParallelPortChange">
5720 <desc>
5721 Notification when a property of one of the
5722 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5723 changes. Interested callees should use ISerialPort methods and
5724 attributes to find out what has changed.
5725 </desc>
5726 <param name="parallelPort" type="IParallelPort" dir="in">
5727 <desc>Parallel port that is subject to change.</desc>
5728 </param>
5729 </method>
5730
5731 <method name="onStorageControllerChange">
5732 <desc>
5733 Notification when a property of one of the
5734 virtual <link to="IMachine::storageControllers">storage controllers</link>
5735 changes. Interested callees should query the corresponding collections
5736 to find out what has changed.
5737 </desc>
5738 </method>
5739
5740 <method name="onMediumChange">
5741 <desc>
5742 Notification when a
5743 <link to="IMachine::mediumAttachments">medium attachment</link>
5744 changes.
5745 </desc>
5746 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5747 <desc>Medium attachment that is subject to change.</desc>
5748 </param>
5749 </method>
5750
5751 <method name="onVRDPServerChange">
5752 <desc>
5753 Notification when a property of the
5754 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5755 Interested callees should use IVRDPServer methods and attributes to
5756 find out what has changed.
5757 </desc>
5758 </method>
5759
5760 <method name="onRemoteDisplayInfoChange">
5761 <desc>
5762 Notification when the status of the VRDP server changes. Interested callees
5763 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5764 attributes to find out what is the current status.
5765 </desc>
5766 </method>
5767
5768 <method name="onUSBControllerChange">
5769 <desc>
5770 Notification when a property of the virtual
5771 <link to="IMachine::USBController">USB controller</link> changes.
5772 Interested callees should use IUSBController methods and attributes to
5773 find out what has changed.
5774 </desc>
5775 </method>
5776
5777 <method name="onUSBDeviceStateChange">
5778 <desc>
5779 Notification when a USB device is attached to or detached from
5780 the virtual USB controller.
5781
5782 This notification is sent as a result of the indirect
5783 request to attach the device because it matches one of the
5784 machine USB filters, or as a result of the direct request
5785 issued by <link to="IConsole::attachUSBDevice"/> or
5786 <link to="IConsole::detachUSBDevice"/>.
5787
5788 This notification is sent in case of both a succeeded and a
5789 failed request completion. When the request succeeds, the
5790 @a error parameter is @c null, and the given device has been
5791 already added to (when @a attached is @c true) or removed from
5792 (when @a attached is @c false) the collection represented by
5793 <link to="IConsole::USBDevices"/>. On failure, the collection
5794 doesn't change and the @a error parameter represents the error
5795 message describing the failure.
5796
5797 </desc>
5798 <param name="device" type="IUSBDevice" dir="in">
5799 <desc>Device that is subject to state change.</desc>
5800 </param>
5801 <param name="attached" type="boolean" dir="in">
5802 <desc>
5803 @c true if the device was attached and @c false otherwise.
5804 </desc>
5805 </param>
5806 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5807 <desc>
5808 @c null on success or an error message object on failure.
5809 </desc>
5810 </param>
5811 </method>
5812
5813 <method name="onSharedFolderChange">
5814 <desc>
5815 Notification when a shared folder is added or removed.
5816 The @a scope argument defines one of three scopes:
5817 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5818 (<link to="Scope_Global">Global</link>),
5819 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5820 the machine (<link to="Scope_Machine">Machine</link>) or <link
5821 to="IConsole::sharedFolders">transient shared folders</link> of the
5822 machine (<link to="Scope_Session">Session</link>). Interested callees
5823 should use query the corresponding collections to find out what has
5824 changed.
5825 </desc>
5826 <param name="scope" type="Scope" dir="in">
5827 <desc>Scope of the notification.</desc>
5828 </param>
5829 </method>
5830
5831 <method name="onRuntimeError">
5832 <desc>
5833 Notification when an error happens during the virtual
5834 machine execution.
5835
5836 There are three kinds of runtime errors:
5837 <ul>
5838 <li><i>fatal</i></li>
5839 <li><i>non-fatal with retry</i></li>
5840 <li><i>non-fatal warnings</i></li>
5841 </ul>
5842
5843 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5844 to @c true. In case of fatal errors, the virtual machine
5845 execution is always paused before calling this notification, and
5846 the notification handler is supposed either to immediately save
5847 the virtual machine state using <link to="IConsole::saveState"/>
5848 or power it off using <link to="IConsole::powerDown"/>.
5849 Resuming the execution can lead to unpredictable results.
5850
5851 <b>Non-fatal</b> errors and warnings are indicated by the
5852 @a fatal parameter set to @c false. If the virtual machine
5853 is in the Paused state by the time the error notification is
5854 received, it means that the user can <i>try to resume</i> the machine
5855 execution after attempting to solve the problem that caused the
5856 error. In this case, the notification handler is supposed
5857 to show an appropriate message to the user (depending on the
5858 value of the @a id parameter) that offers several actions such
5859 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5860 wants to retry, the notification handler should continue
5861 the machine execution using the <link to="IConsole::resume"/>
5862 call. If the machine execution is not Paused during this
5863 notification, then it means this notification is a <i>warning</i>
5864 (for example, about a fatal condition that can happen very soon);
5865 no immediate action is required from the user, the machine
5866 continues its normal execution.
5867
5868 Note that in either case the notification handler
5869 <b>must not</b> perform any action directly on a thread
5870 where this notification is called. Everything it is allowed to
5871 do is to post a message to another thread that will then talk
5872 to the user and take the corresponding action.
5873
5874 Currently, the following error identifiers are known:
5875 <ul>
5876 <li><tt>"HostMemoryLow"</tt></li>
5877 <li><tt>"HostAudioNotResponding"</tt></li>
5878 <li><tt>"VDIStorageFull"</tt></li>
5879 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5880 </ul>
5881
5882 <note>
5883 This notification is not designed to be implemented by
5884 more than one callback at a time. If you have multiple
5885 IConsoleCallback instances registered on the given
5886 IConsole object, make sure you simply do nothing but
5887 return @c S_OK from all but one of them that does actual
5888 user notification and performs necessary actions.
5889 </note>
5890
5891 </desc>
5892 <param name="fatal" type="boolean" dir="in">
5893 <desc>Whether the error is fatal or not</desc>
5894 </param>
5895 <param name="id" type="wstring" dir="in">
5896 <desc>Error identifier</desc>
5897 </param>
5898 <param name="message" type="wstring" dir="in">
5899 <desc>Optional error message</desc>
5900 </param>
5901 </method>
5902
5903 <method name="onCanShowWindow">
5904 <desc>
5905 Notification when a call to
5906 <link to="IMachine::canShowConsoleWindow"/> is made by a
5907 front-end to check if a subsequent call to
5908 <link to="IMachine::showConsoleWindow"/> can succeed.
5909
5910 The callee should give an answer appropriate to the current
5911 machine state in the @a canShow argument. This answer must
5912 remain valid at least until the next
5913 <link to="IConsole::state">machine state</link> change.
5914
5915 <note>
5916 This notification is not designed to be implemented by
5917 more than one callback at a time. If you have multiple
5918 IConsoleCallback instances registered on the given
5919 IConsole object, make sure you simply do nothing but
5920 return @c true and @c S_OK from all but one of them that
5921 actually manages console window activation.
5922 </note>
5923 </desc>
5924 <param name="canShow" type="boolean" dir="return">
5925 <desc>
5926 @c true if the console window can be shown and @c false otherwise.
5927 </desc>
5928 </param>
5929 </method>
5930
5931 <method name="onShowWindow">
5932 <desc>
5933 Notification when a call to
5934 <link to="IMachine::showConsoleWindow"/>
5935 requests the console window to be activated and brought to
5936 foreground on the desktop of the host PC.
5937
5938 This notification should cause the VM console process to
5939 perform the requested action as described above. If it is
5940 impossible to do it at a time of this notification, this
5941 method should return a failure.
5942
5943 Note that many modern window managers on many platforms
5944 implement some sort of focus stealing prevention logic, so
5945 that it may be impossible to activate a window without the
5946 help of the currently active application (which is supposedly
5947 an initiator of this notification). In this case, this method
5948 must return a non-zero identifier that represents the
5949 top-level window of the VM console process. The caller, if it
5950 represents a currently active process, is responsible to use
5951 this identifier (in a platform-dependent manner) to perform
5952 actual window activation.
5953
5954 This method must set @a winId to zero if it has performed all
5955 actions necessary to complete the request and the console
5956 window is now active and in foreground, to indicate that no
5957 further action is required on the caller's side.
5958
5959 <note>
5960 This notification is not designed to be implemented by
5961 more than one callback at a time. If you have multiple
5962 IConsoleCallback instances registered on the given
5963 IConsole object, make sure you simply do nothing but
5964 return @c S_OK from all but one of them that actually
5965 manages console window activation.
5966 </note>
5967 </desc>
5968 <param name="winId" type="unsigned long long" dir="return">
5969 <desc>
5970 Platform-dependent identifier of the top-level VM console
5971 window, or zero if this method has performed all actions
5972 necessary to implement the <i>show window</i> semantics for
5973 the given platform and/or this VirtualBox front-end.
5974 </desc>
5975 </param>
5976 </method>
5977
5978 </interface>
5979
5980 <interface
5981 name="IRemoteDisplayInfo" extends="$unknown"
5982 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5983 wsmap="struct"
5984 >
5985 <desc>
5986 Contains information about the remote display (VRDP) capabilities and status.
5987 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5988 </desc>
5989
5990 <attribute name="active" type="boolean" readonly="yes">
5991 <desc>
5992 Whether the remote display connection is active.
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="port" type="long" readonly="yes">
5997 <desc>
5998 VRDP server port number. If this property is equal to <tt>0</tt>, then
5999 the VRDP server failed to start, usually because there are no free TCP
6000 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6001 server has not yet been started.
6002 </desc>
6003 </attribute>
6004
6005 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6006 <desc>
6007 How many times a client connected.
6008 </desc>
6009 </attribute>
6010
6011 <attribute name="beginTime" type="long long" readonly="yes">
6012 <desc>
6013 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6014 </desc>
6015 </attribute>
6016
6017 <attribute name="endTime" type="long long" readonly="yes">
6018 <desc>
6019 When the last connection was terminated or the current time, if
6020 connection is still active, in milliseconds since 1970-01-01 UTC.
6021 </desc>
6022 </attribute>
6023
6024 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6025 <desc>
6026 How many bytes were sent in last or current, if still active, connection.
6027 </desc>
6028 </attribute>
6029
6030 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6031 <desc>
6032 How many bytes were sent in all connections.
6033 </desc>
6034 </attribute>
6035
6036 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6037 <desc>
6038 How many bytes were received in last or current, if still active, connection.
6039 </desc>
6040 </attribute>
6041
6042 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6043 <desc>
6044 How many bytes were received in all connections.
6045 </desc>
6046 </attribute>
6047
6048 <attribute name="user" type="wstring" readonly="yes">
6049 <desc>
6050 Login user name supplied by the client.
6051 </desc>
6052 </attribute>
6053
6054 <attribute name="domain" type="wstring" readonly="yes">
6055 <desc>
6056 Login domain name supplied by the client.
6057 </desc>
6058 </attribute>
6059
6060 <attribute name="clientName" type="wstring" readonly="yes">
6061 <desc>
6062 The client name supplied by the client.
6063 </desc>
6064 </attribute>
6065
6066 <attribute name="clientIP" type="wstring" readonly="yes">
6067 <desc>
6068 The IP address of the client.
6069 </desc>
6070 </attribute>
6071
6072 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6073 <desc>
6074 The client software version number.
6075 </desc>
6076 </attribute>
6077
6078 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6079 <desc>
6080 Public key exchange method used when connection was established.
6081 Values: 0 - RDP4 public key exchange scheme.
6082 1 - X509 certificates were sent to client.
6083 </desc>
6084 </attribute>
6085
6086 </interface>
6087
6088 <interface
6089 name="IConsole" extends="$unknown"
6090 uuid="03312360-0364-4b7a-ad71-1a8450133774"
6091 wsmap="managed"
6092 >
6093 <desc>
6094 The IConsole interface represents an interface to control virtual
6095 machine execution.
6096
6097 The console object that implements the IConsole interface is obtained
6098 from a session object after the session for the given machine has been
6099 opened using one of <link to="IVirtualBox::openSession"/>,
6100 <link to="IVirtualBox::openRemoteSession"/> or
6101 <link to="IVirtualBox::openExistingSession"/> methods.
6102
6103 Methods of the IConsole interface allow the caller to query the current
6104 virtual machine execution state, pause the machine or power it down, save
6105 the machine state or take a snapshot, attach and detach removable media
6106 and so on.
6107
6108 <see>ISession</see>
6109 </desc>
6110
6111 <attribute name="machine" type="IMachine" readonly="yes">
6112 <desc>
6113 Machine object this console is sessioned with.
6114 <note>
6115 This is a convenience property, it has the same value as
6116 <link to="ISession::machine"/> of the corresponding session
6117 object.
6118 </note>
6119 </desc>
6120 </attribute>
6121
6122 <attribute name="state" type="MachineState" readonly="yes">
6123 <desc>
6124 Current execution state of the machine.
6125 <note>
6126 This property always returns the same value as the corresponding
6127 property of the IMachine object this console is sessioned with.
6128 For the process that owns (executes) the VM, this is the
6129 preferable way of querying the VM state, because no IPC
6130 calls are made.
6131 </note>
6132 </desc>
6133 </attribute>
6134
6135 <attribute name="guest" type="IGuest" readonly="yes">
6136 <desc>Guest object.</desc>
6137 </attribute>
6138
6139 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6140 <desc>
6141 Virtual keyboard object.
6142 <note>
6143 If the machine is not running, any attempt to use
6144 the returned object will result in an error.
6145 </note>
6146 </desc>
6147 </attribute>
6148
6149 <attribute name="mouse" type="IMouse" readonly="yes">
6150 <desc>
6151 Virtual mouse 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="display" type="IDisplay" readonly="yes">
6160 <desc>Virtual display object.
6161 <note>
6162 If the machine is not running, any attempt to use
6163 the returned object will result in an error.
6164 </note>
6165 </desc>
6166 </attribute>
6167
6168 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6169 <desc>Debugging interface.</desc>
6170 </attribute>
6171
6172 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6173 <desc>
6174 Collection of USB devices currently attached to the virtual
6175 USB controller.
6176 <note>
6177 The collection is empty if the machine is not running.
6178 </note>
6179 </desc>
6180 </attribute>
6181
6182 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6183 <desc>
6184 List of USB devices currently attached to the remote VRDP client.
6185 Once a new device is physically attached to the remote host computer,
6186 it appears in this list and remains there until detached.
6187 </desc>
6188 </attribute>
6189
6190 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6191 <desc>
6192 Collection of shared folders for the current session. These folders
6193 are called transient shared folders because they are available to the
6194 guest OS running inside the associated virtual machine only for the
6195 duration of the session (as opposed to
6196 <link to="IMachine::sharedFolders"/> which represent permanent shared
6197 folders). When the session is closed (e.g. the machine is powered down),
6198 these folders are automatically discarded.
6199
6200 New shared folders are added to the collection using
6201 <link to="#createSharedFolder"/>. Existing shared folders can be
6202 removed using <link to="#removeSharedFolder"/>.
6203 </desc>
6204 </attribute>
6205
6206 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6207 <desc>
6208 Interface that provides information on Remote Display (VRDP) connection.
6209 </desc>
6210 </attribute>
6211
6212 <method name="powerUp">
6213 <desc>
6214 Starts the virtual machine execution using the current machine
6215 state (that is, its current execution state, current settings and
6216 current hard disks).
6217
6218 If the machine is powered off or aborted, the execution will
6219 start from the beginning (as if the real hardware were just
6220 powered on).
6221
6222 If the machine is in the <link to="MachineState_Saved"/> state,
6223 it will continue its execution the point where the state has
6224 been saved.
6225
6226 <note>
6227 Unless you are trying to write a new VirtualBox front-end that
6228 performs direct machine execution (like the VirtualBox or VBoxSDL
6229 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6230 session opened by <link to="IVirtualBox::openSession"/> and use this
6231 session only to change virtual machine settings. If you simply want to
6232 start virtual machine execution using one of the existing front-ends
6233 (for example the VirtualBox GUI or headless server), simply use
6234 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6235 power up the machine automatically for you.
6236 </note>
6237
6238 <see>#saveState</see>
6239 <result name="VBOX_E_INVALID_VM_STATE">
6240 Virtual machine already running.
6241 </result>
6242 <result name="VBOX_E_HOST_ERROR">
6243 Host interface does not exist or name not set.
6244 </result>
6245 <result name="VBOX_E_FILE_ERROR">
6246 Invalid saved state file.
6247 </result>
6248 </desc>
6249 <param name="progress" type="IProgress" dir="return">
6250 <desc>Progress object to track the operation completion.</desc>
6251 </param>
6252 </method>
6253
6254 <method name="powerUpPaused">
6255 <desc>
6256 Identical to powerUp except that the VM will enter the
6257 <link to="MachineState_Paused"/> state, instead of
6258 <link to="MachineState_Running"/>.
6259
6260 <see>#powerUp</see>
6261 <result name="VBOX_E_INVALID_VM_STATE">
6262 Virtual machine already running.
6263 </result>
6264 <result name="VBOX_E_HOST_ERROR">
6265 Host interface does not exist or name not set.
6266 </result>
6267 <result name="VBOX_E_FILE_ERROR">
6268 Invalid saved state file.
6269 </result>
6270 </desc>
6271 <param name="progress" type="IProgress" dir="return">
6272 <desc>Progress object to track the operation completion.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="powerDown">
6277 <desc>
6278 Initiates the power down procedure to stop the virtual machine
6279 execution.
6280
6281 The completion of the power down procedure is tracked using the returned
6282 IProgress object. After the operation is complete, the machine will go
6283 to the PoweredOff state.
6284 <result name="VBOX_E_INVALID_VM_STATE">
6285 Virtual machine must be Running, Paused or Stuck to be powered down.
6286 </result>
6287 </desc>
6288 <param name="progress" type="IProgress" dir="return">
6289 <desc>Progress object to track the operation completion.</desc>
6290 </param>
6291 </method>
6292
6293 <method name="reset">
6294 <desc>Resets the virtual machine.
6295 <result name="VBOX_E_INVALID_VM_STATE">
6296 Virtual machine not in Running state.
6297 </result>
6298 <result name="VBOX_E_VM_ERROR">
6299 Virtual machine error in reset operation.
6300 </result>
6301 </desc>
6302 </method>
6303
6304 <method name="pause">
6305 <desc>Pauses the virtual machine execution.
6306 <result name="VBOX_E_INVALID_VM_STATE">
6307 Virtual machine not in Running state.
6308 </result>
6309 <result name="VBOX_E_VM_ERROR">
6310 Virtual machine error in suspend operation.
6311 </result>
6312 </desc>
6313 </method>
6314
6315 <method name="resume">
6316 <desc>Resumes the virtual machine execution.
6317 <result name="VBOX_E_INVALID_VM_STATE">
6318 Virtual machine not in Paused state.
6319 </result>
6320 <result name="VBOX_E_VM_ERROR">
6321 Virtual machine error in resume operation.
6322 </result>
6323 </desc>
6324 </method>
6325
6326 <method name="powerButton">
6327 <desc>Sends the ACPI power button event to the guest.
6328 <result name="VBOX_E_INVALID_VM_STATE">
6329 Virtual machine not in Running state.
6330 </result>
6331 <result name="VBOX_E_PDM_ERROR">
6332 Controlled power off failed.
6333 </result>
6334 </desc>
6335 </method>
6336
6337 <method name="sleepButton">
6338 <desc>Sends the ACPI sleep button event to the guest.
6339 <result name="VBOX_E_INVALID_VM_STATE">
6340 Virtual machine not in Running state.
6341 </result>
6342 <result name="VBOX_E_PDM_ERROR">
6343 Sending sleep button event failed.
6344 </result>
6345 </desc>
6346 </method>
6347
6348 <method name="getPowerButtonHandled">
6349 <desc>Checks if the last power button event was handled by guest.
6350 <result name="VBOX_E_PDM_ERROR">
6351 Checking if the event was handled by the guest OS failed.
6352 </result>
6353 </desc>
6354 <param name="handled" type="boolean" dir="return"/>
6355 </method>
6356
6357 <method name="getGuestEnteredACPIMode">
6358 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6359 G1 (sleeping). If this method returns @c false, the guest will
6360 most likely not respond to external ACPI events.
6361 <result name="VBOX_E_INVALID_VM_STATE">
6362 Virtual machine not in Running state.
6363 </result>
6364 </desc>
6365 <param name="entered" type="boolean" dir="return"/>
6366 </method>
6367
6368 <method name="saveState">
6369 <desc>
6370 Saves the current execution state of a running virtual machine
6371 and stops its execution.
6372
6373 After this operation completes, the machine will go to the
6374 Saved state. Next time it is powered up, this state will
6375 be restored and the machine will continue its execution from
6376 the place where it was saved.
6377
6378 This operation differs from taking a snapshot to the effect
6379 that it doesn't create new differencing media. Also, once
6380 the machine is powered up from the state saved using this method,
6381 the saved state is deleted, so it will be impossible to return
6382 to this state later.
6383
6384 <note>
6385 On success, this method implicitly calls
6386 <link to="IMachine::saveSettings"/> to save all current machine
6387 settings (including runtime changes to the DVD medium, etc.).
6388 Together with the impossibility to change any VM settings when it is
6389 in the Saved state, this guarantees adequate hardware
6390 configuration of the machine when it is restored from the saved
6391 state file.
6392 </note>
6393
6394 <note>
6395 The machine must be in the Running or Paused state, otherwise
6396 the operation will fail.
6397 </note>
6398 <result name="VBOX_E_INVALID_VM_STATE">
6399 Virtual machine state neither Running nor Paused.
6400 </result>
6401 <result name="VBOX_E_FILE_ERROR">
6402 Failed to create directory for saved state file.
6403 </result>
6404
6405 <see><link to="#takeSnapshot"/></see>
6406 </desc>
6407 <param name="progress" type="IProgress" dir="return">
6408 <desc>Progress object to track the operation completion.</desc>
6409 </param>
6410 </method>
6411
6412 <method name="adoptSavedState">
6413 <desc>
6414 Associates the given saved state file to the virtual machine.
6415
6416 On success, the machine will go to the Saved state. Next time it is
6417 powered up, it will be restored from the adopted saved state and
6418 continue execution from the place where the saved state file was
6419 created.
6420
6421 The specified saved state file path may be absolute or relative to the
6422 folder the VM normally saves the state to (usually,
6423 <link to="IMachine::snapshotFolder"/>).
6424
6425 <note>
6426 It's a caller's responsibility to make sure the given saved state
6427 file is compatible with the settings of this virtual machine that
6428 represent its virtual hardware (memory size, hard disk configuration
6429 etc.). If there is a mismatch, the behavior of the virtual machine
6430 is undefined.
6431 </note>
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine state neither PoweredOff nor Aborted.
6434 </result>
6435 </desc>
6436 <param name="savedStateFile" type="wstring" dir="in">
6437 <desc>Path to the saved state file to adopt.</desc>
6438 </param>
6439 </method>
6440
6441 <method name="forgetSavedState">
6442 <desc>
6443 Forgets the saved state of the virtual machine previously created
6444 by <link to="#saveState"/>. Next time the machine is powered up, a
6445 clean boot will occur. If @a remove is @c true the saved state file
6446 is deleted.
6447 <note>
6448 This operation is equivalent to resetting or powering off
6449 the machine without doing a proper shutdown in the guest OS.
6450 </note>
6451 <result name="VBOX_E_INVALID_VM_STATE">
6452 Virtual machine not in state Saved.
6453 </result>
6454 </desc>
6455 <param name="remove" type="boolean" dir="in">
6456 <desc>If @c true remove the saved state file.</desc>
6457 </param>
6458 </method>
6459
6460 <method name="getDeviceActivity">
6461 <desc>
6462 Gets the current activity type of a given device or device group.
6463 <result name="E_INVALIDARG">
6464 Invalid device type.
6465 </result>
6466 </desc>
6467 <param name="type" type="DeviceType" dir="in"/>
6468 <param name="activity" type="DeviceActivity" dir="return"/>
6469 </method>
6470
6471 <method name="attachUSBDevice">
6472 <desc>
6473 Attaches a host USB device with the given UUID to the
6474 USB controller of the virtual machine.
6475
6476 The device needs to be in one of the following states:
6477 <link to="USBDeviceState_Busy"/>,
6478 <link to="USBDeviceState_Available"/> or
6479 <link to="USBDeviceState_Held"/>,
6480 otherwise an error is immediately returned.
6481
6482 When the device state is
6483 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6484 be returned if the host computer refuses to release it for some reason.
6485
6486 <see>IUSBController::deviceFilters, USBDeviceState</see>
6487 <result name="VBOX_E_INVALID_VM_STATE">
6488 Virtual machine state neither Running nor Paused.
6489 </result>
6490 <result name="VBOX_E_PDM_ERROR">
6491 Virtual machine does not have a USB controller.
6492 </result>
6493 </desc>
6494 <param name="id" type="uuid" mod="string" dir="in">
6495 <desc>UUID of the host USB device to attach.</desc>
6496 </param>
6497 </method>
6498
6499 <method name="detachUSBDevice">
6500 <desc>
6501 Detaches an USB device with the given UUID from the USB controller
6502 of the virtual machine.
6503
6504 After this method succeeds, the VirtualBox server re-initiates
6505 all USB filters as if the device were just physically attached
6506 to the host, but filters of this machine are ignored to avoid
6507 a possible automatic re-attachment.
6508
6509 <see>IUSBController::deviceFilters, USBDeviceState</see>
6510
6511 <result name="VBOX_E_PDM_ERROR">
6512 Virtual machine does not have a USB controller.
6513 </result>
6514 <result name="E_INVALIDARG">
6515 USB device not attached to this virtual machine.
6516 </result>
6517 </desc>
6518 <param name="id" type="uuid" mod="string" dir="in">
6519 <desc>UUID of the USB device to detach.</desc>
6520 </param>
6521 <param name="device" type="IUSBDevice" dir="return">
6522 <desc>Detached USB device.</desc>
6523 </param>
6524 </method>
6525
6526 <method name="findUSBDeviceByAddress">
6527 <desc>
6528 Searches for a USB device with the given host address.
6529
6530 <result name="VBOX_E_OBJECT_NOT_FOUND">
6531 Given @c name does not correspond to any USB device.
6532 </result>
6533
6534 <see>IUSBDevice::address</see>
6535 </desc>
6536 <param name="name" type="wstring" dir="in">
6537 <desc>
6538 Address of the USB device (as assigned by the host) to
6539 search for.
6540 </desc>
6541 </param>
6542 <param name="device" type="IUSBDevice" dir="return">
6543 <desc>Found USB device object.</desc>
6544 </param>
6545 </method>
6546
6547 <method name="findUSBDeviceById">
6548 <desc>
6549 Searches for a USB device with the given UUID.
6550
6551 <result name="VBOX_E_OBJECT_NOT_FOUND">
6552 Given @c id does not correspond to any USB device.
6553 </result>
6554
6555 <see>IUSBDevice::id</see>
6556 </desc>
6557 <param name="id" type="uuid" mod="string" dir="in">
6558 <desc>UUID of the USB device to search for.</desc>
6559 </param>
6560 <param name="device" type="IUSBDevice" dir="return">
6561 <desc>Found USB device object.</desc>
6562 </param>
6563 </method>
6564
6565 <method name="createSharedFolder">
6566 <desc>
6567 Creates a transient new shared folder by associating the given logical
6568 name with the given host path, adds it to the collection of shared
6569 folders and starts sharing it. Refer to the description of
6570 <link to="ISharedFolder"/> to read more about logical names.
6571
6572 <result name="VBOX_E_INVALID_VM_STATE">
6573 Virtual machine in Saved state or currently changing state.
6574 </result>
6575 <result name="VBOX_E_FILE_ERROR">
6576 Shared folder already exists or not accessible.
6577 </result>
6578 </desc>
6579 <param name="name" type="wstring" dir="in">
6580 <desc>Unique logical name of the shared folder.</desc>
6581 </param>
6582 <param name="hostPath" type="wstring" dir="in">
6583 <desc>Full path to the shared folder in the host file system.</desc>
6584 </param>
6585 <param name="writable" type="boolean" dir="in">
6586 <desc>Whether the share is writable or readonly</desc>
6587 </param>
6588 </method>
6589
6590 <method name="removeSharedFolder">
6591 <desc>
6592 Removes a transient shared folder with the given name previously
6593 created by <link to="#createSharedFolder"/> from the collection of
6594 shared folders and stops sharing it.
6595 <result name="VBOX_E_INVALID_VM_STATE">
6596 Virtual machine in Saved state or currently changing state.
6597 </result>
6598 <result name="VBOX_E_FILE_ERROR">
6599 Shared folder does not exists.
6600 </result>
6601 </desc>
6602 <param name="name" type="wstring" dir="in">
6603 <desc>Logical name of the shared folder to remove.</desc>
6604 </param>
6605 </method>
6606
6607 <method name="takeSnapshot">
6608 <desc>
6609 Saves the current execution state
6610 and all settings of the machine and creates differencing images
6611 for all normal (non-independent) media.
6612 See <link to="ISnapshot" /> for an introduction to snapshots.
6613
6614 This method can be called for a PoweredOff, Saved (see
6615 <link to="#saveState"/>), Running or
6616 Paused virtual machine. When the machine is PoweredOff, an
6617 offline snapshot is created. When the machine is Running a live
6618 snapshot is created, and an online snapshot is is created when Paused.
6619
6620 The taken snapshot is always based on the
6621 <link to="IMachine::currentSnapshot">current snapshot</link>
6622 of the associated virtual machine and becomes a new current snapshot.
6623
6624 <note>
6625 This method implicitly calls <link to="IMachine::saveSettings"/> to
6626 save all current machine settings before taking an offline snapshot.
6627 </note>
6628
6629 <result name="VBOX_E_INVALID_VM_STATE">
6630 Virtual machine currently changing state.
6631 </result>
6632 </desc>
6633 <param name="name" type="wstring" dir="in">
6634 <desc>Short name for the snapshot.</desc>
6635 </param>
6636 <param name="description" type="wstring" dir="in">
6637 <desc>Optional description of the snapshot.</desc>
6638 </param>
6639 <param name="progress" type="IProgress" dir="return">
6640 <desc>Progress object to track the operation completion.</desc>
6641 </param>
6642 </method>
6643
6644 <method name="discardSnapshot">
6645 <desc>
6646 Starts discarding the specified snapshot asynchronously.
6647 See <link to="ISnapshot" /> for an introduction to snapshots.
6648
6649 The execution state
6650 and settings of the associated machine stored in the snapshot
6651 will be deleted. The contents of all differencing media of
6652 this snapshot will be merged with the contents of their
6653 dependent child media to keep the disks valid (in other
6654 words, all changes represented by media being discarded
6655 will be propagated to their child medium). After that, this
6656 snapshot's differencing medium will be deleted. The parent
6657 of this snapshot will become a new parent for all its child
6658 snapshots.
6659
6660 If the discarded snapshot is the current one, its parent
6661 snapshot will become a new current snapshot. The current machine
6662 state is not directly affected in this case, except that
6663 currently attached differencing media based on media
6664 of the discarded snapshot will be also merged as described
6665 above.
6666
6667 If the discarded snapshot is the first one (the root snapshot)
6668 and it has exactly one child snapshot, this child snapshot will
6669 become the first snapshot after discarding. If there are no
6670 children at all (i.e. the first snapshot is the only snapshot of
6671 the machine), both the current and the first snapshot of the
6672 machine will be set to @c null. In all other cases, the first
6673 snapshot cannot be discarded.
6674
6675 You cannot discard the snapshot if it
6676 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6677 media that have differencing media based on them. Snapshots of
6678 such kind can be discarded only when every normal medium has either
6679 no children at all or exactly one child. In the former case, the normal
6680 medium simply becomes unused (i.e. not attached to any VM). In the
6681 latter case, it receives all the changes stored in the child medium,
6682 and then it replaces the child medium in the configuration of the
6683 corresponding snapshot or machine.
6684
6685 Also, you cannot discard the snapshot if it stores media
6686 (of any type) having differencing child media that belong
6687 to other machines. Such snapshots can be only discarded after
6688 you discard all snapshots of other machines containing "foreign"
6689 child disks, or detach these "foreign" child disks from machines
6690 they are attached to.
6691
6692 One particular example of the snapshot storing normal media
6693 is the first snapshot of a virtual machine that had normal media
6694 attached when taking the snapshot. Be careful when
6695 discarding such snapshots because this implicitly commits
6696 changes (made since the snapshot being discarded has been taken)
6697 to normal media (as described above), which may be not what
6698 you want.
6699
6700 The virtual machine is put to
6701 the <link to="MachineState_Discarding">Discarding</link> state until
6702 the discard operation is completed.
6703
6704 <note>
6705 The machine must not be running, otherwise the operation
6706 will fail.
6707 </note>
6708
6709 <note>
6710 Child media of all normal media of the discarded snapshot
6711 must be accessible (see <link to="IMedium::state"/>) for this
6712 operation to succeed. In particular, this means that all virtual
6713 machines, whose media are directly or indirectly based on the
6714 media of discarded snapshot, must be powered off.
6715 </note>
6716 <note>
6717 Merging medium contents can be very time and disk space
6718 consuming, if these disks are big in size and have many
6719 children. However, if the snapshot being discarded is the last
6720 (head) snapshot on the branch, the operation will be rather
6721 quick.
6722 </note>
6723 <note>
6724 Note that discarding the current snapshot
6725 will implicitly call <link to="IMachine::saveSettings"/> to
6726 make all current machine settings permanent.
6727 </note>
6728 <result name="VBOX_E_INVALID_VM_STATE">
6729 Virtual machine is running.
6730 </result>
6731 </desc>
6732 <param name="id" type="uuid" mod="string" dir="in">
6733 <desc>UUID of the snapshot to discard.</desc>
6734 </param>
6735 <param name="progress" type="IProgress" dir="return">
6736 <desc>Progress object to track the operation completion.</desc>
6737 </param>
6738 </method>
6739
6740 <method name="discardCurrentState">
6741 <desc>
6742 Starts resetting the machine's current state to the state contained
6743 in the current snapshot, asynchronously. All current settings of the
6744 machine will be reset and changes stored in differencing media
6745 will be lost.
6746 See <link to="ISnapshot" /> for an introduction to snapshots.
6747
6748 After this operation is successfully completed, new empty differencing
6749 media are created for all normal media of the machine.
6750
6751 If the current snapshot of the machine is an online snapshot, the
6752 machine will go to the <link to="MachineState_Saved"> saved
6753 state</link>, so that the next time it is powered on, the execution
6754 state will be restored from the current snapshot.
6755
6756 <note>
6757 The machine must not be running, otherwise the operation will fail.
6758 </note>
6759
6760 <note>
6761 If the machine state is <link to="MachineState_Saved">Saved</link>
6762 prior to this operation, the saved state file will be implicitly
6763 discarded (as if <link to="IConsole::forgetSavedState"/> were
6764 called).
6765 </note>
6766
6767 <result name="VBOX_E_INVALID_VM_STATE">
6768 Virtual machine is running.
6769 </result>
6770 </desc>
6771 <param name="progress" type="IProgress" dir="return">
6772 <desc>Progress object to track the operation completion.</desc>
6773 </param>
6774 </method>
6775
6776 <method name="discardCurrentSnapshotAndState">
6777 <desc>
6778
6779 This method is equivalent to
6780 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6781 (currentSnapshot.id(), progress) followed by
6782 <link to="IConsole::discardCurrentState"/>.
6783
6784 As a result, the machine will be fully restored from the
6785 snapshot preceding the current snapshot, while both the current
6786 snapshot and the current machine state will be discarded.
6787
6788 If the current snapshot is the first snapshot of the machine (i.e. it
6789 has the only snapshot), the current machine state will be
6790 discarded <b>before</b> discarding the snapshot. In other words, the
6791 machine will be restored from its last snapshot, before discarding
6792 it. This differs from performing a single
6793 <link to="IConsole::discardSnapshot"/> call (note that no
6794 <link to="IConsole::discardCurrentState"/> will be possible after it)
6795 to the effect that the latter will preserve the current state instead of
6796 discarding it.
6797
6798 Unless explicitly mentioned otherwise, all remarks and
6799 limitations of the above two methods also apply to this method.
6800
6801 <note>
6802 The machine must not be running, otherwise the operation
6803 will fail.
6804 </note>
6805
6806 <note>
6807 If the machine state is <link to="MachineState_Saved">Saved</link>
6808 prior to this operation, the saved state file will be implicitly
6809 discarded (as if <link to="#forgetSavedState"/> were
6810 called).
6811 </note>
6812
6813 <note>
6814 This method is more efficient than calling both of the above
6815 methods separately: it requires less IPC calls and provides
6816 a single progress object.
6817 </note>
6818
6819 <result name="VBOX_E_INVALID_VM_STATE">
6820 Virtual machine is running.
6821 </result>
6822 </desc>
6823 <param name="progress" type="IProgress" dir="return">
6824 <desc>Progress object to track the operation completion.</desc>
6825 </param>
6826 </method>
6827
6828 <method name="teleport">
6829 <desc>
6830 Teleport the VM to a different host machine or process.
6831
6832 TODO explain the details.
6833
6834 <result name="VBOX_E_INVALID_VM_STATE">
6835 Virtual machine not running or paused.
6836 </result>
6837 </desc>
6838 <param name="hostname" type="wstring" dir="in">
6839 <desc>The name or IP of the host to teleport to.</desc>
6840 </param>
6841 <param name="tcpport" type="unsigned long" dir="in">
6842 <desc>The TCP port to connect to (1..65535).</desc>
6843 </param>
6844 <param name="password" type="wstring" dir="in">
6845 <desc>The password.</desc>
6846 </param>
6847 <param name="progress" type="IProgress" dir="return">
6848 <desc>Progress object to track the operation completion.</desc>
6849 </param>
6850 </method>
6851
6852 <method name="registerCallback">
6853 <desc>
6854 Registers a new console callback on this instance. The methods of the
6855 callback interface will be called by this instance when the appropriate
6856 event occurs.
6857 </desc>
6858 <param name="callback" type="IConsoleCallback" dir="in"/>
6859 </method>
6860
6861 <method name="unregisterCallback">
6862 <desc>
6863 Unregisters the console callback previously registered using
6864 <link to="#registerCallback"/>.
6865 <result name="E_INVALIDARG">
6866 Given @a callback handler is not registered.
6867 </result>
6868 </desc>
6869 <param name="callback" type="IConsoleCallback" dir="in"/>
6870 </method>
6871 </interface>
6872
6873 <!--
6874 // IHost
6875 /////////////////////////////////////////////////////////////////////////
6876 -->
6877
6878 <enum
6879 name="HostNetworkInterfaceMediumType"
6880 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6881 >
6882 <desc>
6883 Type of encapsulation. Ethernet encapsulation includes both wired and
6884 wireless Ethernet connections.
6885 <see>IHostNetworkInterface</see>
6886 </desc>
6887
6888 <const name="Unknown" value="0">
6889 <desc>
6890 The type of interface cannot be determined.
6891 </desc>
6892 </const>
6893 <const name="Ethernet" value="1">
6894 <desc>
6895 Ethernet frame encapsulation.
6896 </desc>
6897 </const>
6898 <const name="PPP" value="2">
6899 <desc>
6900 Point-to-point protocol encapsulation.
6901 </desc>
6902 </const>
6903 <const name="SLIP" value="3">
6904 <desc>
6905 Serial line IP encapsulation.
6906 </desc>
6907 </const>
6908 </enum>
6909
6910 <enum
6911 name="HostNetworkInterfaceStatus"
6912 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6913 >
6914 <desc>
6915 Current status of the interface.
6916 <see>IHostNetworkInterface</see>
6917 </desc>
6918
6919 <const name="Unknown" value="0">
6920 <desc>
6921 The state of interface cannot be determined.
6922 </desc>
6923 </const>
6924 <const name="Up" value="1">
6925 <desc>
6926 The interface is fully operational.
6927 </desc>
6928 </const>
6929 <const name="Down" value="2">
6930 <desc>
6931 The interface is not functioning.
6932 </desc>
6933 </const>
6934 </enum>
6935
6936 <enum
6937 name="HostNetworkInterfaceType"
6938 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6939 >
6940 <desc>
6941 Network interface type.
6942 </desc>
6943 <const name="Bridged" value="1"/>
6944 <const name="HostOnly" value="2"/>
6945 </enum>
6946
6947 <interface
6948 name="IHostNetworkInterface" extends="$unknown"
6949 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6950 wsmap="managed"
6951 >
6952 <desc>
6953 Represents one of host's network interfaces. IP V6 address and network
6954 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6955 separated by colons.
6956 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6957 </desc>
6958 <attribute name="name" type="wstring" readonly="yes">
6959 <desc>Returns the host network interface name.</desc>
6960 </attribute>
6961
6962 <attribute name="id" type="uuid" mod="string" readonly="yes">
6963 <desc>Returns the interface UUID.</desc>
6964 </attribute>
6965
6966 <attribute name="networkName" type="wstring" readonly="yes">
6967 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6968 </attribute>
6969
6970 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6971 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6972 </attribute>
6973
6974 <attribute name="IPAddress" type="wstring" readonly="yes">
6975 <desc>Returns the IP V4 address of the interface.</desc>
6976 </attribute>
6977
6978 <attribute name="networkMask" type="wstring" readonly="yes">
6979 <desc>Returns the network mask of the interface.</desc>
6980 </attribute>
6981
6982 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6983 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6984 </attribute>
6985
6986 <attribute name="IPV6Address" type="wstring" readonly="yes">
6987 <desc>Returns the IP V6 address of the interface.</desc>
6988 </attribute>
6989
6990 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6991 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6992 </attribute>
6993
6994 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6995 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6996 </attribute>
6997
6998 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6999 <desc>Type of protocol encapsulation used.</desc>
7000 </attribute>
7001
7002 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7003 <desc>Status of the interface.</desc>
7004 </attribute>
7005
7006 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7007 <desc>specifies the host interface type.</desc>
7008 </attribute>
7009
7010 <method name="enableStaticIpConfig">
7011 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7012 <param name="IPAddress" type="wstring" dir="in">
7013 <desc>
7014 IP address.
7015 </desc>
7016 </param>
7017 <param name="networkMask" type="wstring" dir="in">
7018 <desc>
7019 network mask.
7020 </desc>
7021 </param>
7022 </method>
7023
7024 <method name="enableStaticIpConfigV6">
7025 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7026 <param name="IPV6Address" type="wstring" dir="in">
7027 <desc>
7028 IP address.
7029 </desc>
7030 </param>
7031 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7032 <desc>
7033 network mask.
7034 </desc>
7035 </param>
7036 </method>
7037
7038 <method name="enableDynamicIpConfig">
7039 <desc>enables the dynamic IP configuration.</desc>
7040 </method>
7041
7042 <method name="dhcpRediscover">
7043 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7044 </method>
7045
7046 </interface>
7047
7048 <interface
7049 name="IHost" extends="$unknown"
7050 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7051 wsmap="managed"
7052 >
7053 <desc>
7054 The IHost interface represents the physical machine that this VirtualBox
7055 installation runs on.
7056
7057 An object implementing this interface is returned by the
7058 <link to="IVirtualBox::host" /> attribute. This interface contains
7059 read-only information about the host's physical hardware (such as what
7060 processors and disks are available, what the host operating system is,
7061 and so on) and also allows for manipulating some of the host's hardware,
7062 such as global USB device filters and host interface networking.
7063
7064 </desc>
7065 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7066 <desc>List of DVD drives available on the host.</desc>
7067 </attribute>
7068
7069 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7070 <desc>List of floppy drives available on the host.</desc>
7071 </attribute>
7072
7073 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7074 <desc>
7075 List of USB devices currently attached to the host.
7076 Once a new device is physically attached to the host computer,
7077 it appears in this list and remains there until detached.
7078
7079 <note>
7080 If USB functionality is not available in the given edition of
7081 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7082 </note>
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7087 <desc>
7088 List of USB device filters in action.
7089 When a new device is physically attached to the host computer,
7090 filters from this list are applied to it (in order they are stored
7091 in the list). The first matched filter will determine the
7092 <link to="IHostUSBDeviceFilter::action">action</link>
7093 performed on the device.
7094
7095 Unless the device is ignored by these filters, filters of all
7096 currently running virtual machines
7097 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7098
7099 <note>
7100 If USB functionality is not available in the given edition of
7101 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7102 </note>
7103
7104 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7105 </desc>
7106 </attribute>
7107
7108 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7109 <desc>List of host network interfaces currently defined on the host.</desc>
7110 </attribute>
7111
7112 <attribute name="processorCount" type="unsigned long" readonly="yes">
7113 <desc>Number of (logical) CPUs installed in the host system.</desc>
7114 </attribute>
7115
7116 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7117 <desc>Number of (logical) CPUs online in the host system.</desc>
7118 </attribute>
7119
7120 <method name="getProcessorSpeed">
7121 <desc>Query the (approximate) maximum speed of a specified host CPU in
7122 Megahertz.
7123 </desc>
7124 <param name="cpuId" type="unsigned long" dir="in">
7125 <desc>
7126 Identifier of the CPU.
7127 </desc>
7128 </param>
7129 <param name="speed" type="unsigned long" dir="return">
7130 <desc>
7131 Speed value. 0 is returned if value is not known or @a cpuId is
7132 invalid.
7133 </desc>
7134 </param>
7135 </method>
7136
7137 <method name="getProcessorFeature">
7138 <desc>Query whether a CPU feature is supported or not.</desc>
7139 <param name="feature" type="ProcessorFeature" dir="in">
7140 <desc>
7141 CPU Feature identifier.
7142 </desc>
7143 </param>
7144 <param name="supported" type="boolean" dir="return">
7145 <desc>
7146 Feature is supported or not.
7147 </desc>
7148 </param>
7149 </method>
7150
7151 <method name="getProcessorDescription">
7152 <desc>Query the model string of a specified host CPU.
7153 </desc>
7154 <param name="cpuId" type="unsigned long" dir="in">
7155 <desc>
7156 Identifier of the CPU.
7157 </desc>
7158 </param>
7159 <param name="description" type="wstring" dir="return">
7160 <desc>
7161 Model string. An empty string is returned if value is not known or
7162 @a cpuId is invalid.
7163 </desc>
7164 </param>
7165 </method>
7166
7167 <attribute name="memorySize" type="unsigned long" readonly="yes">
7168 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7169 </attribute>
7170
7171 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7172 <desc>Available system memory in the host system.</desc>
7173 </attribute>
7174
7175 <attribute name="operatingSystem" type="wstring" readonly="yes">
7176 <desc>Name of the host system's operating system.</desc>
7177 </attribute>
7178
7179 <attribute name="OSVersion" type="wstring" readonly="yes">
7180 <desc>Host operating system's version string.</desc>
7181 </attribute>
7182
7183 <attribute name="UTCTime" type="long long" readonly="yes">
7184 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7185 </attribute>
7186
7187 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7188 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7189 </attribute>
7190
7191 <method name="createHostOnlyNetworkInterface">
7192 <desc>
7193 Creates a new adapter for Host Only Networking.
7194 <result name="E_INVALIDARG">
7195 Host network interface @a name already exists.
7196 </result>
7197 </desc>
7198 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7199 <desc>
7200 Created host interface object.
7201 </desc>
7202 </param>
7203 <param name="progress" type="IProgress" dir="return">
7204 <desc>
7205 Progress object to track the operation completion.
7206 </desc>
7207 </param>
7208 </method>
7209
7210 <method name="removeHostOnlyNetworkInterface">
7211 <desc>
7212 Removes the given Host Only Networking interface.
7213 <result name="VBOX_E_OBJECT_NOT_FOUND">
7214 No host network interface matching @a id found.
7215 </result>
7216 </desc>
7217 <param name="id" type="uuid" mod="string" dir="in">
7218 <desc>
7219 Adapter GUID.
7220 </desc>
7221 </param>
7222 <param name="progress" type="IProgress" dir="return">
7223 <desc>
7224 Progress object to track the operation completion.
7225 </desc>
7226 </param>
7227 </method>
7228
7229 <method name="createUSBDeviceFilter">
7230 <desc>
7231 Creates a new USB device filter. All attributes except
7232 the filter name are set to empty (any match),
7233 <i>active</i> is @c false (the filter is not active).
7234
7235 The created filter can be added to the list of filters using
7236 <link to="#insertUSBDeviceFilter"/>.
7237
7238 <see>#USBDeviceFilters</see>
7239 </desc>
7240 <param name="name" type="wstring" dir="in">
7241 <desc>
7242 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7243 for more info.
7244 </desc>
7245 </param>
7246 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7247 <desc>Created filter object.</desc>
7248 </param>
7249 </method>
7250
7251 <method name="insertUSBDeviceFilter">
7252 <desc>
7253 Inserts the given USB device to the specified position
7254 in the list of filters.
7255
7256 Positions are numbered starting from @c 0. If the specified
7257 position is equal to or greater than the number of elements in
7258 the list, the filter is added at the end of the collection.
7259
7260 <note>
7261 Duplicates are not allowed, so an attempt to insert a
7262 filter already in the list is an error.
7263 </note>
7264 <note>
7265 If USB functionality is not available in the given edition of
7266 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7267 </note>
7268
7269 <see>#USBDeviceFilters</see>
7270
7271 <result name="VBOX_E_INVALID_OBJECT_STATE">
7272 USB device filter is not created within this VirtualBox instance.
7273 </result>
7274 <result name="E_INVALIDARG">
7275 USB device filter already in list.
7276 </result>
7277
7278 </desc>
7279 <param name="position" type="unsigned long" dir="in">
7280 <desc>Position to insert the filter to.</desc>
7281 </param>
7282 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7283 <desc>USB device filter to insert.</desc>
7284 </param>
7285 </method>
7286
7287 <method name="removeUSBDeviceFilter">
7288 <desc>
7289 Removes a USB device filter from the specified position in the
7290 list of filters.
7291
7292 Positions are numbered starting from @c 0. Specifying a
7293 position equal to or greater than the number of elements in
7294 the list will produce an error.
7295
7296 <note>
7297 If USB functionality is not available in the given edition of
7298 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7299 </note>
7300
7301 <see>#USBDeviceFilters</see>
7302
7303 <result name="E_INVALIDARG">
7304 USB device filter list empty or invalid @a position.
7305 </result>
7306
7307 </desc>
7308 <param name="position" type="unsigned long" dir="in">
7309 <desc>Position to remove the filter from.</desc>
7310 </param>
7311 </method>
7312
7313 <method name="findHostDVDDrive">
7314 <desc>
7315 Searches for a host DVD drive with the given @c name.
7316
7317 <result name="VBOX_E_OBJECT_NOT_FOUND">
7318 Given @c name does not correspond to any host drive.
7319 </result>
7320
7321 </desc>
7322 <param name="name" type="wstring" dir="in">
7323 <desc>Name of the host drive to search for</desc>
7324 </param>
7325 <param name="drive" type="IMedium" dir="return">
7326 <desc>Found host drive object</desc>
7327 </param>
7328 </method>
7329
7330 <method name="findHostFloppyDrive">
7331 <desc>
7332 Searches for a host floppy drive with the given @c name.
7333
7334 <result name="VBOX_E_OBJECT_NOT_FOUND">
7335 Given @c name does not correspond to any host floppy drive.
7336 </result>
7337
7338 </desc>
7339 <param name="name" type="wstring" dir="in">
7340 <desc>Name of the host floppy drive to search for</desc>
7341 </param>
7342 <param name="drive" type="IMedium" dir="return">
7343 <desc>Found host floppy drive object</desc>
7344 </param>
7345 </method>
7346
7347 <method name="findHostNetworkInterfaceByName">
7348 <desc>
7349 Searches through all host network interfaces for an interface with
7350 the given @c name.
7351 <note>
7352 The method returns an error if the given @c name does not
7353 correspond to any host network interface.
7354 </note>
7355 </desc>
7356 <param name="name" type="wstring" dir="in">
7357 <desc>Name of the host network interface to search for.</desc>
7358 </param>
7359 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7360 <desc>Found host network interface object.</desc>
7361 </param>
7362 </method>
7363 <method name="findHostNetworkInterfaceById">
7364 <desc>
7365 Searches through all host network interfaces for an interface with
7366 the given GUID.
7367 <note>
7368 The method returns an error if the given GUID does not
7369 correspond to any host network interface.
7370 </note>
7371 </desc>
7372 <param name="id" type="uuid" mod="string" dir="in">
7373 <desc>GUID of the host network interface to search for.</desc>
7374 </param>
7375 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7376 <desc>Found host network interface object.</desc>
7377 </param>
7378 </method>
7379 <method name="findHostNetworkInterfacesOfType">
7380 <desc>
7381 Searches through all host network interfaces and returns a list of interfaces of the specified type
7382 </desc>
7383 <param name="type" type="HostNetworkInterfaceType" dir="in">
7384 <desc>type of the host network interfaces to search for.</desc>
7385 </param>
7386 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7387 <desc>Found host network interface objects.</desc>
7388 </param>
7389 </method>
7390
7391 <method name="findUSBDeviceById">
7392 <desc>
7393 Searches for a USB device with the given UUID.
7394
7395 <result name="VBOX_E_OBJECT_NOT_FOUND">
7396 Given @c id does not correspond to any USB device.
7397 </result>
7398
7399 <see>IHostUSBDevice::id</see>
7400 </desc>
7401 <param name="id" type="uuid" mod="string" dir="in">
7402 <desc>UUID of the USB device to search for.</desc>
7403 </param>
7404 <param name="device" type="IHostUSBDevice" dir="return">
7405 <desc>Found USB device object.</desc>
7406 </param>
7407 </method>
7408
7409 <method name="findUSBDeviceByAddress">
7410 <desc>
7411 Searches for a USB device with the given host address.
7412
7413 <result name="VBOX_E_OBJECT_NOT_FOUND">
7414 Given @c name does not correspond to any USB device.
7415 </result>
7416
7417 <see>IHostUSBDevice::address</see>
7418 </desc>
7419 <param name="name" type="wstring" dir="in">
7420 <desc>
7421 Address of the USB device (as assigned by the host) to
7422 search for.
7423 </desc>
7424 </param>
7425 <param name="device" type="IHostUSBDevice" dir="return">
7426 <desc>Found USB device object.</desc>
7427 </param>
7428 </method>
7429
7430 </interface>
7431
7432 <!--
7433 // ISystemProperties
7434 /////////////////////////////////////////////////////////////////////////
7435 -->
7436
7437 <interface
7438 name="ISystemProperties"
7439 extends="$unknown"
7440 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7441 wsmap="managed"
7442 >
7443 <desc>
7444 The ISystemProperties interface represents global properties of the given
7445 VirtualBox installation.
7446
7447 These properties define limits and default values for various attributes
7448 and parameters. Most of the properties are read-only, but some can be
7449 changed by a user.
7450 </desc>
7451
7452 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7453 <desc>Minimum guest system memory in Megabytes.</desc>
7454 </attribute>
7455
7456 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7457 <desc>Maximum guest system memory in Megabytes.</desc>
7458 </attribute>
7459
7460 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7461 <desc>Minimum guest video memory in Megabytes.</desc>
7462 </attribute>
7463
7464 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7465 <desc>Maximum guest video memory in Megabytes.</desc>
7466 </attribute>
7467
7468 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7469 <desc>Minimum CPU count.</desc>
7470 </attribute>
7471
7472 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7473 <desc>Maximum CPU count.</desc>
7474 </attribute>
7475
7476 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7477 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7478 </attribute>
7479
7480 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7481 <desc>
7482 Number of network adapters associated with every
7483 <link to="IMachine"/> instance.
7484 </desc>
7485 </attribute>
7486
7487 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7488 <desc>
7489 Number of serial ports associated with every
7490 <link to="IMachine"/> instance.
7491 </desc>
7492 </attribute>
7493
7494 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7495 <desc>
7496 Number of parallel ports associated with every
7497 <link to="IMachine"/> instance.
7498 </desc>
7499 </attribute>
7500
7501 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7502 <desc>
7503 Maximum device position in the boot order. This value corresponds
7504 to the total number of devices a machine can boot from, to make it
7505 possible to include all possible devices to the boot list.
7506 <see><link to="IMachine::setBootOrder"/></see>
7507 </desc>
7508 </attribute>
7509
7510 <attribute name="defaultMachineFolder" type="wstring">
7511 <desc>
7512 Full path to the default directory used to create new or open
7513 existing machines when a settings file name contains no
7514 path.
7515
7516 The initial value of this property is
7517 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7518 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7519
7520 <note>
7521 Setting this property to @c null or an empty string will restore the
7522 initial value.
7523 </note>
7524 <note>
7525 When settings this property, the specified path can be
7526 absolute (full path) or relative
7527 to the <link to="IVirtualBox::homeFolder">
7528 VirtualBox home directory</link>.
7529 When reading this property, a full path is
7530 always returned.
7531 </note>
7532 <note>
7533 The specified path may not exist, it will be created
7534 when necessary.
7535 </note>
7536
7537 <see>
7538 <link to="IVirtualBox::createMachine"/>,
7539 <link to="IVirtualBox::openMachine"/>
7540 </see>
7541 </desc>
7542 </attribute>
7543
7544 <attribute name="defaultHardDiskFolder" type="wstring">
7545 <desc>
7546 Full path to the default directory used to create new or open existing
7547 virtual disks.
7548
7549 This path is used when the storage unit of a hard disk is a regular file
7550 in the host's file system and only a file name that contains no path is
7551 given.
7552
7553 The initial value of this property is
7554 <tt>&lt;</tt>
7555 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7556 <tt>&gt;/HardDisks</tt>.
7557
7558 <note>
7559 Setting this property to @c null or empty string will restore the
7560 initial value.
7561 </note>
7562 <note>
7563 When settings this property, the specified path can be relative
7564 to the
7565 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7566 absolute. When reading this property, a full path is
7567 always returned.
7568 </note>
7569 <note>
7570 The specified path may not exist, it will be created
7571 when necessary.
7572 </note>
7573
7574 <see>
7575 IMedium,
7576 <link to="IVirtualBox::createHardDisk"/>,
7577 <link to="IVirtualBox::openHardDisk"/>,
7578 <link to="IMedium::location"/>
7579 </see>
7580 </desc>
7581 </attribute>
7582
7583 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7584 <desc>
7585 List of all medium storage formats supported by this VirtualBox
7586 installation.
7587
7588 Keep in mind that the medium format identifier
7589 (<link to="IMediumFormat::id"/>) used in other API calls like
7590 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7591 medium format is a case-insensitive string. This means that, for
7592 example, all of the following strings:
7593 <pre>
7594 "VDI"
7595 "vdi"
7596 "VdI"</pre>
7597 refer to the same medium format.
7598
7599 Note that the virtual medium framework is backend-based, therefore
7600 the list of supported formats depends on what backends are currently
7601 installed.
7602
7603 <see>
7604 <link to="IMediumFormat"/>,
7605 </see>
7606 </desc>
7607 </attribute>
7608
7609 <attribute name="defaultHardDiskFormat" type="wstring">
7610 <desc>
7611 Identifier of the default medium format used by VirtualBox.
7612
7613 The medium format set by this attribute is used by VirtualBox
7614 when the medium format was not specified explicitly. One example is
7615 <link to="IVirtualBox::createHardDisk"/> with the empty
7616 format argument. A more complex example is implicit creation of
7617 differencing media when taking a snapshot of a virtual machine:
7618 this operation will try to use a format of the parent medium first
7619 and if this format does not support differencing media the default
7620 format specified by this argument will be used.
7621
7622 The list of supported medium formats may be obtained by the
7623 <link to="#mediaFormats"/> call. Note that the default medium
7624 format must have a capability to create differencing media;
7625 otherwise operations that create media implicitly may fail
7626 unexpectedly.
7627
7628 The initial value of this property is <tt>"VDI"</tt> in the current
7629 version of the VirtualBox product, but may change in the future.
7630
7631 <note>
7632 Setting this property to @c null or empty string will restore the
7633 initial value.
7634 </note>
7635
7636 <see>
7637 <link to="#mediaFormats"/>,
7638 <link to="IMediumFormat::id"/>,
7639 <link to="IVirtualBox::createHardDisk"/>
7640 </see>
7641 </desc>
7642 </attribute>
7643
7644 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7645 <desc>
7646 Library that provides authentication for VRDP clients. The library
7647 is used if a virtual machine's authentication type is set to "external"
7648 in the VM RemoteDisplay configuration.
7649
7650 The system library extension (".DLL" or ".so") must be omitted.
7651 A full path can be specified; if not, then the library must reside on the
7652 system's default library path.
7653
7654 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7655 of that name in one of the default VirtualBox library directories.
7656
7657 For details about VirtualBox authentication libraries and how to implement
7658 them, please refer to the VirtualBox manual.
7659
7660 <note>
7661 Setting this property to @c null or empty string will restore the
7662 initial value.
7663 </note>
7664 </desc>
7665 </attribute>
7666
7667 <attribute name="webServiceAuthLibrary" type="wstring">
7668 <desc>
7669 Library that provides authentication for webservice clients. The library
7670 is used if a virtual machine's authentication type is set to "external"
7671 in the VM RemoteDisplay configuration and will be called from
7672 within the <link to="IWebsessionManager::logon" /> implementation.
7673
7674 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7675 there is no per-VM setting for this, as the webservice is a global
7676 resource (if it is running). Only for this setting (for the webservice),
7677 setting this value to a literal <tt>"null"</tt> string disables authentication,
7678 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7679 no matter what user name and password are supplied.
7680
7681 The initial value of this property is <tt>"VRDPAuth"</tt>,
7682 meaning that the webservice will use the same authentication
7683 library that is used by default for VBoxVRDP (again, see
7684 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7685 The format and calling convention of authentication libraries
7686 is the same for the webservice as it is for VBoxVRDP.
7687
7688 <note>
7689 Setting this property to @c null or empty string will restore the
7690 initial value.
7691 </note>
7692 </desc>
7693 </attribute>
7694
7695 <attribute name="LogHistoryCount" type="unsigned long">
7696 <desc>
7697 This value specifies how many old release log files are kept.
7698 </desc>
7699 </attribute>
7700
7701 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7702 <desc>This value hold the default audio driver for the current
7703 system.</desc>
7704 </attribute>
7705
7706 <method name="getMaxDevicesPerPortForStorageBus">
7707 <desc>Returns the maximum number of devices which can be attached to a port
7708 for the given storage bus.</desc>
7709
7710 <param name="bus" type="StorageBus" dir="in">
7711 <desc>The storage bus type to get the value for.</desc>
7712 </param>
7713
7714 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7715 <desc>The maximum number of devices which can eb attached to the port for the given
7716 storage bus.</desc>
7717 </param>
7718 </method>
7719
7720 <method name="getMinPortCountForStorageBus">
7721 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7722
7723 <param name="bus" type="StorageBus" dir="in">
7724 <desc>The storage bus type to get the value for.</desc>
7725 </param>
7726
7727 <param name="minPortCount" type="unsigned long" dir="return">
7728 <desc>The minimum number of ports for the given storage bus.</desc>
7729 </param>
7730 </method>
7731
7732 <method name="getMaxPortCountForStorageBus">
7733 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7734
7735 <param name="bus" type="StorageBus" dir="in">
7736 <desc>The storage bus type to get the value for.</desc>
7737 </param>
7738
7739 <param name="maxPortCount" type="unsigned long" dir="return">
7740 <desc>The maximum number of ports for the given storage bus.</desc>
7741 </param>
7742 </method>
7743
7744 <method name="getMaxInstancesOfStorageBus">
7745 <desc>Returns the maximum number of storage bus instances which
7746 can be configured for each VM. This corresponds to the number of
7747 storage controllers one can have.</desc>
7748
7749 <param name="bus" type="StorageBus" dir="in">
7750 <desc>The storage bus type to get the value for.</desc>
7751 </param>
7752
7753 <param name="maxInstances" type="unsigned long" dir="return">
7754 <desc>The maximum number of instances for the given storage bus.</desc>
7755 </param>
7756 </method>
7757 </interface>
7758
7759 <!--
7760 // IGuest
7761 /////////////////////////////////////////////////////////////////////////
7762 -->
7763
7764 <interface
7765 name="IGuestOSType" extends="$unknown"
7766 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7767 wsmap="struct"
7768 >
7769 <desc>
7770 </desc>
7771
7772 <attribute name="familyId" type="wstring" readonly="yes">
7773 <desc>Guest OS family identifier string.</desc>
7774 </attribute>
7775
7776 <attribute name="familyDescription" type="wstring" readonly="yes">
7777 <desc>Human readable description of the guest OS family.</desc>
7778 </attribute>
7779
7780 <attribute name="id" type="wstring" readonly="yes">
7781 <desc>Guest OS identifier string.</desc>
7782 </attribute>
7783
7784 <attribute name="description" type="wstring" readonly="yes">
7785 <desc>Human readable description of the guest OS.</desc>
7786 </attribute>
7787
7788 <attribute name="is64Bit" type="boolean" readonly="yes">
7789 <desc>Returns @c true if the given OS is 64-bit</desc>
7790 </attribute>
7791
7792 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7793 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7794 </attribute>
7795
7796 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7797 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7798 </attribute>
7799
7800 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7801 <desc>Recommended RAM size in Megabytes.</desc>
7802 </attribute>
7803
7804 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7805 <desc>Recommended video RAM size in Megabytes.</desc>
7806 </attribute>
7807
7808 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7809 <desc>Recommended hard disk size in Megabytes.</desc>
7810 </attribute>
7811
7812 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7813 <desc>Returns recommended network adapter for this OS type.</desc>
7814 </attribute>
7815 </interface>
7816
7817 <interface
7818 name="IGuest" extends="$unknown"
7819 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7820 wsmap="managed"
7821 >
7822 <desc>
7823 The IGuest interface represents information about the operating system
7824 running inside the virtual machine. Used in
7825 <link to="IConsole::guest"/>.
7826
7827 IGuest provides information about the guest operating system, whether
7828 Guest Additions are installed and other OS-specific virtual machine
7829 properties.
7830 </desc>
7831
7832 <attribute name="OSTypeId" type="wstring" readonly="yes">
7833 <desc>
7834 Identifier of the Guest OS type as reported by the Guest
7835 Additions.
7836 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7837 an IGuestOSType object representing details about the given
7838 Guest OS type.
7839 <note>
7840 If Guest Additions are not installed, this value will be
7841 the same as <link to="IMachine::OSTypeId"/>.
7842 </note>
7843 </desc>
7844 </attribute>
7845
7846 <attribute name="additionsActive" type="boolean" readonly="yes">
7847 <desc>
7848 Flag whether the Guest Additions are installed and active
7849 in which case their version will be returned by the
7850 <link to="#additionsVersion"/> property.
7851 </desc>
7852 </attribute>
7853
7854 <attribute name="additionsVersion" type="wstring" readonly="yes">
7855 <desc>
7856 Version of the Guest Additions (3 decimal numbers separated
7857 by dots) or empty when the Additions are not installed. The
7858 Additions may also report a version but yet not be active as
7859 the version might be refused by VirtualBox (incompatible) or
7860 other failures occurred.
7861 </desc>
7862 </attribute>
7863
7864 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7865 <desc>
7866 Flag whether seamless guest display rendering (seamless desktop
7867 integration) is supported.
7868 </desc>
7869 </attribute>
7870
7871 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7872 <desc>
7873 Flag whether the guest is in graphics mode. If it is not, then
7874 seamless rendering will not work, resize hints are not immediately
7875 acted on and guest display resizes are probably not initiated by
7876 the guest additions.
7877 </desc>
7878 </attribute>
7879
7880 <attribute name="memoryBalloonSize" type="unsigned long">
7881 <desc>Guest system memory balloon size in megabytes.</desc>
7882 </attribute>
7883
7884 <attribute name="statisticsUpdateInterval" type="unsigned long">
7885 <desc>Interval to update guest statistics in seconds.</desc>
7886 </attribute>
7887
7888 <method name="setCredentials">
7889 <desc>
7890 Store login credentials that can be queried by guest operating
7891 systems with Additions installed. The credentials are transient
7892 to the session and the guest may also choose to erase them. Note
7893 that the caller cannot determine whether the guest operating system
7894 has queried or made use of the credentials.
7895
7896 <result name="VBOX_E_VM_ERROR">
7897 VMM device is not available.
7898 </result>
7899
7900 </desc>
7901 <param name="userName" type="wstring" dir="in">
7902 <desc>User name string, can be empty</desc>
7903 </param>
7904 <param name="password" type="wstring" dir="in">
7905 <desc>Password string, can be empty</desc>
7906 </param>
7907 <param name="domain" type="wstring" dir="in">
7908 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7909 </param>
7910 <param name="allowInteractiveLogon" type="boolean" dir="in">
7911 <desc>
7912 Flag whether the guest should alternatively allow the user to
7913 interactively specify different credentials. This flag might
7914 not be supported by all versions of the Additions.
7915 </desc>
7916 </param>
7917 </method>
7918
7919 <method name="getStatistic">
7920 <desc>
7921 Query specified guest statistics as reported by the VirtualBox Additions.
7922 </desc>
7923 <param name="cpuId" type="unsigned long" dir="in">
7924 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7925 </param>
7926 <param name="statistic" type="GuestStatisticType" dir="in">
7927 <desc>Statistic type.</desc>
7928 </param>
7929 <param name="statVal" type="unsigned long" dir="return">
7930 <desc>Statistics value</desc>
7931 </param>
7932 </method>
7933
7934 </interface>
7935
7936
7937 <!--
7938 // IProgress
7939 /////////////////////////////////////////////////////////////////////////
7940 -->
7941
7942 <interface
7943 name="IProgress" extends="$unknown"
7944 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7945 wsmap="managed"
7946 >
7947 <desc>
7948 The IProgress interface is used to track and control
7949 asynchronous tasks within VirtualBox.
7950
7951 An instance of this is returned every time VirtualBox starts
7952 an asynchronous task (in other words, a separate thread) which
7953 continues to run after a method call returns. For example,
7954 <link to="IConsole::saveState" />, which saves the state of
7955 a running virtual machine, can take a long time to complete.
7956 To be able to display a progress bar, a user interface such as
7957 the VirtualBox graphical user interface can use the IProgress
7958 object returned by that method.
7959
7960 Note that IProgress is a "read-only" interface in the sense
7961 that only the VirtualBox internals behind the Main API can
7962 create and manipulate progress objects, whereas client code
7963 can only use the IProgress object to monitor a task's
7964 progress and, if <link to="#cancelable" /> is @c true,
7965 cancel the task by calling <link to="#cancel" />.
7966
7967 A task represented by IProgress consists of either one or
7968 several sub-operations that run sequentially, one by one (see
7969 <link to="#operation" /> and <link to="#operationCount" />).
7970 Every operation is identified by a number (starting from 0)
7971 and has a separate description.
7972
7973 You can find the individual percentage of completion of the current
7974 operation in <link to="#operationPercent" /> and the
7975 percentage of completion of the task as a whole
7976 in <link to="#percent" />.
7977
7978 Similarly, you can wait for the completion of a particular
7979 operation via <link to="#waitForOperationCompletion" /> or
7980 for the completion of the whole task via
7981 <link to="#waitForCompletion" />.
7982 </desc>
7983
7984 <attribute name="id" type="uuid" mod="string" readonly="yes">
7985 <desc>ID of the task.</desc>
7986 </attribute>
7987
7988 <attribute name="description" type="wstring" readonly="yes">
7989 <desc>Description of the task.</desc>
7990 </attribute>
7991
7992 <attribute name="initiator" type="$unknown" readonly="yes">
7993 <desc>Initiator of the task.</desc>
7994 </attribute>
7995
7996 <attribute name="cancelable" type="boolean" readonly="yes">
7997 <desc>Whether the task can be interrupted.</desc>
7998 </attribute>
7999
8000 <attribute name="percent" type="unsigned long" readonly="yes">
8001 <desc>
8002 Current progress value of the task as a whole, in percent.
8003 This value depends on how many operations are already complete.
8004 Returns 100 if <link to="#completed" /> is @c true.
8005 </desc>
8006 </attribute>
8007
8008 <attribute name="timeRemaining" type="long" readonly="yes">
8009 <desc>
8010 Estimated remaining time until the task completes, in
8011 seconds. Returns 0 once the task has completed; returns -1
8012 if the remaining time cannot be computed, in particular if
8013 the current progress is 0.
8014
8015 Even if a value is returned, the estimate will be unreliable
8016 for low progress values. It will become more reliable as the
8017 task progresses; it is not recommended to display an ETA
8018 before at least 20% of a task have completed.
8019 </desc>
8020 </attribute>
8021
8022 <attribute name="completed" type="boolean" readonly="yes">
8023 <desc>Whether the task has been completed.</desc>
8024 </attribute>
8025
8026 <attribute name="canceled" type="boolean" readonly="yes">
8027 <desc>Whether the task has been canceled.</desc>
8028 </attribute>
8029
8030 <attribute name="resultCode" type="long" readonly="yes">
8031 <desc>
8032 Result code of the progress task.
8033 Valid only if <link to="#completed"/> is @c true.
8034 </desc>
8035 </attribute>
8036
8037 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8038 <desc>
8039 Extended information about the unsuccessful result of the
8040 progress operation. May be @c null if no extended information
8041 is available.
8042 Valid only if <link to="#completed"/> is @c true and
8043 <link to="#resultCode"/> indicates a failure.
8044 </desc>
8045 </attribute>
8046
8047 <attribute name="operationCount" type="unsigned long" readonly="yes">
8048 <desc>
8049 Number of sub-operations this task is divided into.
8050 Every task consists of at least one suboperation.
8051 </desc>
8052 </attribute>
8053
8054 <attribute name="operation" type="unsigned long" readonly="yes">
8055 <desc>Number of the sub-operation being currently executed.</desc>
8056 </attribute>
8057
8058 <attribute name="operationDescription" type="wstring" readonly="yes">
8059 <desc>
8060 Description of the sub-operation being currently executed.
8061 </desc>
8062 </attribute>
8063
8064 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8065 <desc>Progress value of the current sub-operation only, in percent.</desc>
8066 </attribute>
8067
8068 <method name="setCurrentOperationProgress">
8069 <desc>Internal method, not to be called externally.</desc>
8070 <param name="percent" type="unsigned long" dir="in" />
8071 </method>
8072 <method name="setNextOperation">
8073 <desc>Internal method, not to be called externally.</desc>
8074 <param name="nextOperationDescription" type="wstring" dir="in" />
8075 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8076 </method>
8077
8078 <method name="waitForCompletion">
8079 <desc>
8080 Waits until the task is done (including all sub-operations)
8081 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8082
8083 <result name="VBOX_E_IPRT_ERROR">
8084 Failed to wait for task completion.
8085 </result>
8086 </desc>
8087
8088 <param name="timeout" type="long" dir="in">
8089 <desc>
8090 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8091 </desc>
8092 </param>
8093 </method>
8094
8095 <method name="waitForOperationCompletion">
8096 <desc>
8097 Waits until the given operation is done with a given timeout in
8098 milliseconds; specify -1 for an indefinite wait.
8099
8100 <result name="VBOX_E_IPRT_ERROR">
8101 Failed to wait for operation completion.
8102 </result>
8103
8104 </desc>
8105 <param name="operation" type="unsigned long" dir="in">
8106 <desc>
8107 Number of the operation to wait for.
8108 Must be less than <link to="#operationCount"/>.
8109 </desc>
8110 </param>
8111 <param name="timeout" type="long" dir="in">
8112 <desc>
8113 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8114 </desc>
8115 </param>
8116 </method>
8117
8118 <method name="cancel">
8119 <desc>
8120 Cancels the task.
8121 <note>
8122 If <link to="#cancelable"/> is @c false, then this method will fail.
8123 </note>
8124
8125 <result name="VBOX_E_INVALID_OBJECT_STATE">
8126 Operation cannot be canceled.
8127 </result>
8128
8129 </desc>
8130 </method>
8131
8132 </interface>
8133
8134
8135 <!--
8136 // ISnapshot
8137 /////////////////////////////////////////////////////////////////////////
8138 -->
8139
8140 <interface
8141 name="ISnapshot" extends="$unknown"
8142 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8143 wsmap="managed"
8144 >
8145 <desc>
8146 The ISnapshot interface represents a snapshot of the virtual
8147 machine.
8148
8149 Together with the differencing media that are created
8150 when a snapshot is taken, a machine can be brought back to
8151 the exact state it was in when the snapshot was taken.
8152
8153 The ISnapshot interface has no methods, only attributes; snapshots
8154 are controlled through methods of the <link to="IConsole" /> interface
8155 which also manage the media associated with the snapshot.
8156 The following operations exist:
8157
8158 <ul>
8159 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8160 by creating new, empty differencing images for the machine's
8161 media and saving the VM settings and (if the VM is running)
8162 the current VM state in the snapshot.
8163
8164 The differencing images will then receive all data written to
8165 the machine's media, while their parent (base) images
8166 remain unmodified after the snapshot has been taken (see
8167 <link to="IMedium" /> for details about differencing images).
8168 This simplifies restoring a machine to the state of a snapshot:
8169 only the differencing images need to be deleted.
8170
8171 The current machine state is not changed by taking a snapshot.
8172 If the machine is running, it will resume execution after the
8173 snapshot has been taken.
8174 </li>
8175
8176 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8177 a previous snapshot. This resets the machine's state to that of
8178 the previous snapshot by deleting the differencing image of each
8179 of the machine's media and setting the machine's settings
8180 and state to the state that was saved in the snapshot (if any).
8181
8182 This destroys the machine's current state.
8183 </li>
8184
8185 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8186 without affecting the current machine state.
8187
8188 This does not change the machine, but instead frees the resources
8189 allocated when the snapshot was taken: the settings and machine state
8190 is deleted (if any), and the snapshot's differencing image for each
8191 of the machine's media gets merged with its parent image.
8192
8193 Neither the current machine state nor other snapshots are affected
8194 by this operation, except that parent disk images will be modified
8195 to contain the disk data associated with the snapshot being deleted.
8196 </li>
8197
8198 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8199 this completely reverts the virtual machine to the state it was in
8200 before the current snapshot has been taken. Effectively, this goes
8201 back to the state before the current snapshot, which might be
8202 an earlier snapshot.
8203
8204 The current state, as well as the current snapshot, are lost.
8205 </li>
8206 </ul>
8207
8208 Each snapshot contains the settings of the virtual machine (hardware
8209 configuration etc.). In addition, if the machine was running when the
8210 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8211 the current VM state is saved in the snapshot (similarly to what happens
8212 when a VM's state is saved). The snapshot is then said to
8213 be <i>online</i> because when restoring it, the VM will be running.
8214
8215 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8216 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8217
8218 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8219 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8220 it then contains a so-called "zero execution state", representing a
8221 machine that is powered off.
8222
8223 <h3>Snapshot branches and the "current" snapshot</h3>
8224
8225 Snapshots can be chained, whereby every next snapshot is based on the
8226 previous one. This chaining is related to medium branching
8227 (see the <link to="IMedium"/> description) in that every time
8228 a new snapshot is created, a new differencing medium is implicitly
8229 created for all normal media attached to the machine.
8230
8231 Each virtual machine has a "current snapshot", identified by
8232 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8233 to the last snapshot in the chain. In a future version of VirtualBox,
8234 it will be possible to reset a machine's current state to that of an
8235 earlier snapshot without discarding the current state so that it will be
8236 possible to create alternative snapshot paths in a snapshot tree.
8237
8238 In the current implementation, multiple snapshot branches within one
8239 virtual machine are not allowed. Every machine has a single branch,
8240 and <link to="IConsole::takeSnapshot"/> operation adds a new
8241 snapshot to the top of that branch.
8242 </desc>
8243
8244 <attribute name="id" type="uuid" mod="string" readonly="yes">
8245 <desc>UUID of the snapshot.</desc>
8246 </attribute>
8247
8248 <attribute name="name" type="wstring">
8249 <desc>Short name of the snapshot.</desc>
8250 </attribute>
8251
8252 <attribute name="description" type="wstring">
8253 <desc>Optional description of the snapshot.</desc>
8254 </attribute>
8255
8256 <attribute name="timeStamp" type="long long" readonly="yes">
8257 <desc>
8258 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8259 </desc>
8260 </attribute>
8261
8262 <attribute name="online" type="boolean" readonly="yes">
8263 <desc>
8264 @c true if this snapshot is an online snapshot and @c false otherwise.
8265
8266 When this attribute is @c true, the
8267 <link to="IMachine::stateFilePath"/> attribute of the
8268 <link to="#machine"/> object associated with this snapshot
8269 will point to the saved state file. Otherwise, it will be
8270 an empty string.
8271 </desc>
8272 </attribute>
8273
8274 <attribute name="machine" type="IMachine" readonly="yes">
8275 <desc>
8276 Virtual machine this snapshot is taken on. This object
8277 stores all settings the machine had when taking this snapshot.
8278 <note>
8279 The returned machine object is immutable, i.e. no
8280 any settings can be changed.
8281 </note>
8282 </desc>
8283 </attribute>
8284
8285 <attribute name="parent" type="ISnapshot" readonly="yes">
8286 <desc>
8287 Parent snapshot (a snapshot this one is based on), or
8288 @c null if the snapshot has no parent.
8289 </desc>
8290 </attribute>
8291
8292 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8293 <desc>
8294 Child snapshots (all snapshots having this one as a parent).
8295 <note>
8296 In the current implementation, there can be only one
8297 child snapshot, or no children at all, meaning this is the
8298 last (head) snapshot.
8299 </note>
8300 </desc>
8301 </attribute>
8302
8303 </interface>
8304
8305
8306 <!--
8307 // IMedium
8308 /////////////////////////////////////////////////////////////////////////
8309 -->
8310
8311 <enum
8312 name="MediumState"
8313 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8314 >
8315 <desc>
8316 Virtual medium state.
8317 <see>IMedium</see>
8318 </desc>
8319
8320 <const name="NotCreated" value="0">
8321 <desc>
8322 Associated medium storage does not exist (either was not created yet or
8323 was deleted).
8324 </desc>
8325 </const>
8326 <const name="Created" value="1">
8327 <desc>
8328 Associated storage exists and accessible.
8329 </desc>
8330 </const>
8331 <const name="LockedRead" value="2">
8332 <desc>
8333 Medium is locked for reading, no data modification is possible.
8334 </desc>
8335 </const>
8336 <const name="LockedWrite" value="3">
8337 <desc>
8338 Medium is locked for writing, no concurrent data reading or modification
8339 is possible.
8340 </desc>
8341 </const>
8342 <const name="Inaccessible" value="4">
8343 <desc>
8344 Associated medium storage is not accessible.
8345 </desc>
8346 </const>
8347 <const name="Creating" value="5">
8348 <desc>
8349 Associated medium storage is being created.
8350 </desc>
8351 </const>
8352 <const name="Deleting" value="6">
8353 <desc>
8354 Associated medium storage is being deleted.
8355 </desc>
8356 </const>
8357 </enum>
8358
8359 <enum
8360 name="MediumType"
8361 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8362 >
8363 <desc>
8364 Virtual medium type.
8365 <see>IMedium</see>
8366 </desc>
8367
8368 <const name="Normal" value="0">
8369 <desc>
8370 Normal medium (attached directly or indirectly, preserved
8371 when taking snapshots).
8372 </desc>
8373 </const>
8374 <const name="Immutable" value="1">
8375 <desc>
8376 Immutable medium (attached indirectly, changes are wiped out
8377 after powering off the virtual machine).
8378 </desc>
8379 </const>
8380 <const name="Writethrough" value="2">
8381 <desc>
8382 Write through medium (attached directly, ignored when
8383 taking snapshots).
8384 </desc>
8385 </const>
8386 </enum>
8387
8388 <enum
8389 name="MediumVariant"
8390 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8391 >
8392 <desc>
8393 Virtual medium image variant. More than one flag may be set.
8394 <see>IMedium</see>
8395 </desc>
8396
8397 <const name="Standard" value="0">
8398 <desc>
8399 No particular variant requested, results in using the backend default.
8400 </desc>
8401 </const>
8402 <const name="VmdkSplit2G" value="0x01">
8403 <desc>
8404 VMDK image split in chunks of less than 2GByte.
8405 </desc>
8406 </const>
8407 <const name="VmdkStreamOptimized" value="0x04">
8408 <desc>
8409 VMDK streamOptimized image. Special import/export format which is
8410 read-only/append-only.
8411 </desc>
8412 </const>
8413 <const name="VmdkESX" value="0x08">
8414 <desc>
8415 VMDK format variant used on ESX products.
8416 </desc>
8417 </const>
8418 <const name="Fixed" value="0x10000">
8419 <desc>
8420 Fixed image. Only allowed for base images.
8421 </desc>
8422 </const>
8423 <const name="Diff" value="0x20000">
8424 <desc>
8425 Fixed image. Only allowed for base images.
8426 </desc>
8427 </const>
8428 </enum>
8429
8430 <interface
8431 name="IMediumAttachment" extends="$unknown"
8432 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8433 wsmap="struct"
8434 >
8435 <desc>
8436 The IMediumAttachment interface represents the attachment
8437 of a storage medium to a virtual machine. Each machine contains
8438 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8439
8440 Each medium attachment specifies a storage controller as well as a port
8441 and device number. Fixed media (hard disks) will always also specify
8442 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8443 image or images that represent the virtual hard disk. For removeable media,
8444 the IMedia instance is optional; it can be NULL if no media is mounted (see
8445 <link to="IMachine::mountMedium" />).
8446 </desc>
8447
8448 <attribute name="medium" type="IMedium" readonly="yes">
8449 <desc>Medium object associated with this attachment; it
8450 can be NULL for removable devices.</desc>
8451 </attribute>
8452
8453 <attribute name="controller" type="wstring" readonly="yes">
8454 <desc>Name of the storage controller of this attachment; this
8455 refers to one of the controllers in <link to="IMachine::storageControllers" />
8456 by name.</desc>
8457 </attribute>
8458
8459 <attribute name="port" type="long" readonly="yes">
8460 <desc>Port number of this attachment.</desc>
8461 </attribute>
8462
8463 <attribute name="device" type="long" readonly="yes">
8464 <desc>Device slot number of this attachment.</desc>
8465 </attribute>
8466
8467 <attribute name="type" type="DeviceType" readonly="yes">
8468 <desc>Device type of this attachment.</desc>
8469 </attribute>
8470
8471 <attribute name="passthrough" type="boolean" readonly="no">
8472 <desc>Pass I/O requests through to a device on the host.</desc>
8473 </attribute>
8474
8475 </interface>
8476
8477 <interface
8478 name="IMedium" extends="$unknown"
8479 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8480 wsmap="managed"
8481 >
8482 <desc>
8483 The IMedium interface represents virtual storage for a machine's
8484 hard disks, CD/DVD or floppy drives. It will typically represent
8485 a disk image on the host, for example a VDI or VMDK file representing
8486 a virtual hard disk, or an ISO or RAW file representing virtual
8487 removable media, but can also point to a network location (e.g.
8488 for iSCSI targets).
8489
8490 Instances of IMedium are connected to virtual machines by way of
8491 medium attachments (see <link to="IMediumAttachment" />), which link
8492 the storage medium to a particular device slot of a storage controller
8493 of the virtual machine.
8494 In the VirtualBox API, virtual storage is therefore always represented
8495 by the following chain of object links:
8496
8497 <ul>
8498 <li><link to="IMachine::storageControllers"/> contains an array of
8499 storage controllers (IDE, SATA, SCSI or a floppy controller;
8500 these are instances of <link to="IStorageController"/>).</li>
8501 <li><link to="IMachine::mediumAttachments"/> contains an array of
8502 medium attachments (instances of <link to="IMediumAttachment"/>),
8503 each containing the name of a storage controller from the above
8504 array, a port/device specification, and an instance of
8505 IMedium representing the medium storage (image file). For removable
8506 media, the storage medium is optional; a medium attachment with no
8507 medium represents a CD/DVD or floppy drive with no medium inserted.
8508 By contrast, hard disk attachments will always have an IMedium
8509 object attached.</li>
8510 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8511 computer or a network resource) that holds actual data. The location of
8512 the storage unit is represented by the <link to="#location"/> attribute.
8513 The value of this attribute is medium type dependent.</li>
8514 </ul>
8515
8516 Existing media are opened using the following methods, depending on the
8517 media type:
8518 <ul>
8519 <li><link to="IVirtualBox::openHardDisk"/></li>
8520 <li><link to="IVirtualBox::openDVDImage"/></li>
8521 <li><link to="IVirtualBox::openFloppyImage"/></li>
8522 </ul>
8523
8524 New hard disk media can be created with the VirtualBox API using the
8525 <link to="IVirtualBox::createHardDisk"/> method.
8526
8527 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8528 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8529 type in a regular file.
8530
8531 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8532 drive; in that case the <link to="#id" /> attribute contains the UUID of
8533 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8534
8535 <h3>Known media</h3>
8536
8537 When an existing medium is opened for the first time, it is automatically
8538 remembered by the given VirtualBox installation or, in other words, becomes
8539 a <i>known medium</i>. Known media are stored in the media
8540 registry transparently maintained by VirtualBox and stored in settings
8541 files so that this registry is preserved when VirtualBox is not running.
8542
8543 Newly created virtual media are remembered only when the associated
8544 storage unit is actually created.
8545
8546 All known media can be enumerated using
8547 <link to="IVirtualBox::hardDisks"/>,
8548 <link to="IVirtualBox::DVDImages"/> and
8549 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8550 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8551 and similar methods or by location using
8552 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8553
8554 Only known media can be attached to virtual machines.
8555
8556 Removing known media from the media registry is performed when the given
8557 medium is closed using the <link to="#close"/> method or when its
8558 associated storage unit is deleted.
8559
8560 <h3>Accessibility checks</h3>
8561
8562 The given medium (with the created storage unit) is considered to be
8563 <i>accessible</i> when its storage unit can be read. In that case, the
8564 <link to="#state"/> attribute has a value of "Created".
8565 When the storage unit cannot be read (for example, because it is located on
8566 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8567 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8568 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8569 obtained by reading the <link to="#lastAccessError"/> attribute.
8570
8571 A new accessibility check is performed each time the <link to="#state"/>
8572 attribute is read. This check may take long time (several seconds or even
8573 minutes, depending on the storage unit location and format), and will
8574 block the calling thread until finished. For this reason, it is recommended
8575 to never read this attribute on the main UI thread to avoid making the UI
8576 unresponsive.
8577
8578 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8579 created for the first time), all known media are in the
8580 <link to="MediumState_Inaccessible"/> state but the value of the <link
8581 to="#lastAccessError"/> attribute is an empty string because no actual
8582 accessibility check is made on startup. This is done to make the
8583 VirtualBox object ready for serving requests as
8584 fast as possible and let the end-user application decide if it needs to
8585 check media accessibility right away or not.
8586
8587 <h3>Hard disk types</h3>
8588
8589 There are three types of hard disk images (see <link to="MediumType" />):
8590 "normal", "immutable" and "writethrough", represented by the
8591 <link to="#type"/> attribute. The type of the hard disk defines how the
8592 hard disk is attached to a virtual machine and what happens when a
8593 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8594 attached hard disk is taken.
8595
8596 All hard disks can be also divided in two groups: <i>base</i> hard
8597 disks and <i>differencing</i> hard disks. A base hard disk contains all
8598 sectors of the hard disk data in its own storage and therefore can be
8599 used independently. On the contrary, a differencing hard disk is a
8600 "delta" to some other disk and contains only those sectors which differ
8601 from that other disk, which is then called a <i>parent</i>. The differencing
8602 hard disk is said to be <i>linked to</i> that parent.
8603 The parent may be itself a differencing image, thus forming a chain of
8604 linked hard disks. The last element in that chain
8605 must always be a base medium. Note that several differencing
8606 hard disks may be linked to the same parent hard disk.
8607
8608 Differencing hard disks can be distinguished from base hard disks by
8609 querying the <link to="#parent"/> attribute: base hard disks do not have
8610 parents they would depend on, so the value of this attribute is always
8611 @c null for them. Using this attribute, it is possible to walk up
8612 the hard disk tree (from the child hard disk to its parent). It is also
8613 possible to walk down the tree using the <link to="#children"/>
8614 attribute.
8615
8616 Note that the type of all differencing hard disks is
8617 <link to="MediumType_Normal" />; all other values are
8618 meaningless for them. Base hard disks may be of any type.
8619
8620 <h3>Creating hard disks</h3>
8621
8622 New base hard disks are created using
8623 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8624 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8625 disks are usually implicitly created by VirtualBox when needed but may
8626 also be created explicitly using <link to="#createDiffStorage"/>.
8627
8628 After the hard disk is successfully created (including the storage unit)
8629 or opened, it becomes a known hard disk (remembered in the internal media
8630 registry). Known hard disks can be attached to a virtual machine, accessed
8631 through <link to="IVirtualBox::getHardDisk"/> and
8632 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8633 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8634
8635 The following methods, besides <link to="IMedium::close"/>,
8636 automatically remove the hard disk from the media registry:
8637 <ul>
8638 <li><link to="#deleteStorage"/></li>
8639 <li><link to="#mergeTo"/></li>
8640 </ul>
8641
8642 If the storage unit of the hard disk is a regular file in the host's
8643 file system then the rules stated in the description of the
8644 <link to="IMedium::location"/> attribute apply when setting its value. In
8645 addition, a plain file name without any path may be given, in which case
8646 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8647 folder</link> will be prepended to it.
8648
8649 <h4>Automatic composition of the file name part</h4>
8650
8651 Another extension to the <link to="IMedium::location"/> attribute is that
8652 there is a possibility to cause VirtualBox to compose a unique value for
8653 the file name part of the location using the UUID of the hard disk. This
8654 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8655 e.g. before the storage unit is created, and works as follows. You set the
8656 value of the <link to="IMedium::location"/> attribute to a location
8657 specification which only contains the path specification but not the file
8658 name part and ends with either a forward slash or a backslash character.
8659 In response, VirtualBox will generate a new UUID for the hard disk and
8660 compose the file name using the following pattern:
8661 <pre>
8662 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8663 </pre>
8664 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8665 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8666 is the default extension for the storage format of this hard disk. After
8667 that, you may call any of the methods that create a new hard disk storage
8668 unit and they will use the generated UUID and file name.
8669
8670 <h3>Attaching Hard Disks</h3>
8671
8672 Hard disks are attached to virtual machines using the
8673 <link to="IMachine::attachDevice"/> method and detached using the
8674 <link to="IMachine::detachDevice"/> method. Depending on their
8675 <link to="#type"/>, hard disks are attached either
8676 <i>directly</i> or <i>indirectly</i>.
8677
8678 When a hard disk is being attached directly, it is associated with the
8679 virtual machine and used for hard disk operations when the machine is
8680 running. When a hard disk is being attached indirectly, a new differencing
8681 hard disk linked to it is implicitly created and this differencing hard
8682 disk is associated with the machine and used for hard disk operations.
8683 This also means that if <link to="IMachine::attachDevice"/> performs
8684 a direct attachment then the same hard disk will be returned in response
8685 to the subsequent <link to="IMachine::getMedium"/> call; however if
8686 an indirect attachment is performed then
8687 <link to="IMachine::getMedium"/> will return the implicitly created
8688 differencing hard disk, not the original one passed to <link
8689 to="IMachine::attachDevice"/>. In detail:
8690
8691 <ul>
8692 <li><b>Normal base</b> hard disks that do not have children (i.e.
8693 differencing hard disks linked to them) and that are not already
8694 attached to virtual machines in snapshots are attached <b>directly</b>.
8695 Otherwise, they are attached <b>indirectly</b> because having
8696 dependent children or being part of the snapshot makes it impossible
8697 to modify hard disk contents without breaking the integrity of the
8698 dependent party. The <link to="#readOnly"/> attribute allows to
8699 quickly determine the kind of the attachment for the given hard
8700 disk. Note that if a normal base hard disk is to be indirectly
8701 attached to a virtual machine with snapshots then a special
8702 procedure called <i>smart attachment</i> is performed (see below).</li>
8703 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8704 they are attached <b>directly</b> if they do not have children and are
8705 not attached to virtual machines in snapshots, and <b>indirectly</b>
8706 otherwise. Note that the smart attachment procedure is never performed
8707 for differencing hard disks.</li>
8708 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8709 they are designed to be non-writable. If an immutable hard disk is
8710 attached to a virtual machine with snapshots then a special
8711 procedure called smart attachment is performed (see below).</li>
8712 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8713 also as designed. This also means that writethrough hard disks cannot
8714 have other hard disks linked to them at all.</li>
8715 </ul>
8716
8717 Note that the same hard disk, regardless of its type, may be attached to
8718 more than one virtual machine at a time. In this case, the machine that is
8719 started first gains exclusive access to the hard disk and attempts to
8720 start other machines having this hard disk attached will fail until the
8721 first machine is powered down.
8722
8723 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8724 that the given hard disk remains associated with the given machine after a
8725 successful <link to="IMachine::detachDevice"/> call until
8726 <link to="IMachine::saveSettings"/> is called to save all changes to
8727 machine settings to disk. This deferring is necessary to guarantee that
8728 the hard disk configuration may be restored at any time by a call to
8729 <link to="IMachine::discardSettings"/> before the settings
8730 are saved (committed).
8731
8732 Note that if <link to="IMachine::discardSettings"/> is called after
8733 indirectly attaching some hard disks to the machine but before a call to
8734 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8735 all differencing hard disks implicitly created by
8736 <link to="IMachine::attachDevice"/> for these indirect attachments.
8737 Such implicitly created hard disks will also be immediately deleted when
8738 detached explicitly using the <link to="IMachine::detachDevice"/>
8739 call if it is made before <link to="IMachine::saveSettings"/>. This
8740 implicit deletion is safe because newly created differencing hard
8741 disks do not contain any user data.
8742
8743 However, keep in mind that detaching differencing hard disks that were
8744 implicitly created by <link to="IMachine::attachDevice"/>
8745 before the last <link to="IMachine::saveSettings"/> call will
8746 <b>not</b> implicitly delete them as they may already contain some data
8747 (for example, as a result of virtual machine execution). If these hard
8748 disks are no more necessary, the caller can always delete them explicitly
8749 using <link to="#deleteStorage"/> after they are actually de-associated
8750 from this machine by the <link to="IMachine::saveSettings"/> call.
8751
8752 <h3>Smart Attachment</h3>
8753
8754 When normal base or immutable hard disks are indirectly attached to a
8755 virtual machine then some additional steps are performed to make sure the
8756 virtual machine will have the most recent "view" of the hard disk being
8757 attached. These steps include walking through the machine's snapshots
8758 starting from the current one and going through ancestors up to the first
8759 snapshot. Hard disks attached to the virtual machine in all
8760 of the encountered snapshots are checked whether they are descendants of
8761 the given normal base or immutable hard disk. The first found child (which
8762 is the differencing hard disk) will be used instead of the normal base or
8763 immutable hard disk as a parent for creating a new differencing hard disk
8764 that will be actually attached to the machine. And only if no descendants
8765 are found or if the virtual machine does not have any snapshots then the
8766 normal base or immutable hard disk will be used itself as a parent for
8767 this differencing hard disk.
8768
8769 It is easier to explain what smart attachment does using the
8770 following example:
8771 <pre>
8772BEFORE attaching B.vdi: AFTER attaching B.vdi:
8773
8774Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8775 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8776 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8777 Snapshot 4 (none) Snapshot 4 (none)
8778 CurState (none) CurState (D3->D2.vdi)
8779
8780 NOT
8781 ...
8782 CurState (D3->B.vdi)
8783 </pre>
8784 The first column is the virtual machine configuration before the base hard
8785 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8786 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8787 mean that the hard disk that is actually attached to the machine is a
8788 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8789 another hard disk, <tt>B.vdi</tt>.
8790
8791 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8792 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8793 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8794 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8795 it cannot be attached directly and needs an indirect attachment (i.e.
8796 implicit creation of a new differencing hard disk). Due to the smart
8797 attachment procedure, the new differencing hard disk
8798 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8799 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8800 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8801 machine.
8802
8803 Note that if there is more than one descendant hard disk of the given base
8804 hard disk found in a snapshot, and there is an exact device, channel and
8805 bus match, then this exact match will be used. Otherwise, the youngest
8806 descendant will be picked up.
8807
8808 There is one more important aspect of the smart attachment procedure which
8809 is not related to snapshots at all. Before walking through the snapshots
8810 as described above, the backup copy of the current list of hard disk
8811 attachment is searched for descendants. This backup copy is created when
8812 the hard disk configuration is changed for the first time after the last
8813 <link to="IMachine::saveSettings"/> call and used by
8814 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8815 changes. When such a descendant is found in this backup copy, it will be
8816 simply re-attached back, without creating a new differencing hard disk for
8817 it. This optimization is necessary to make it possible to re-attach the
8818 base or immutable hard disk to a different bus, channel or device slot
8819 without losing the contents of the differencing hard disk actually
8820 attached to the machine in place of it.
8821 </desc>
8822
8823 <attribute name="id" type="uuid" mod="string" readonly="yes">
8824 <desc>
8825 UUID of the medium. For a newly created medium, this value is a randomly
8826 generated UUID.
8827
8828 <note>
8829 For media in one of MediumState_NotCreated, MediumState_Creating or
8830 MediumState_Deleting states, the value of this property is undefined
8831 and will most likely be an empty UUID.
8832 </note>
8833 </desc>
8834 </attribute>
8835
8836 <attribute name="description" type="wstring">
8837 <desc>
8838 Optional description of the medium. For a newly created medium the value
8839 of this attribute is an empty string.
8840
8841 Medium types that don't support this attribute will return E_NOTIMPL in
8842 attempt to get or set this attribute's value.
8843
8844 <note>
8845 For some storage types, reading this attribute may return an outdated
8846 (last known) value when <link to="#state"/> is <link
8847 to="MediumState_Inaccessible"/> or <link
8848 to="MediumState_LockedWrite"/> because the value of this attribute is
8849 stored within the storage unit itself. Also note that changing the
8850 attribute value is not possible in such case, as well as when the
8851 medium is the <link to="MediumState_LockedRead"/> state.
8852 </note>
8853 </desc>
8854 </attribute>
8855
8856 <attribute name="state" type="MediumState" readonly="yes">
8857 <desc>
8858 Current medium state. Inspect <link to="MediumState"/> values for details.
8859
8860 Reading this attribute may take a long time because an accessibility
8861 check of the storage unit is performed each time the attribute is read.
8862 This check may cause a significant delay if the storage unit of the
8863 given medium is, for example, a file located on a network share which is
8864 not currently accessible due to connectivity problems -- the call will
8865 not return until a timeout interval defined by the host OS for this
8866 operation expires.
8867
8868 If the last known state of the medium is <link to="MediumState_Created"/>
8869 and the accessibility check fails then the state would be set to
8870 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8871 may be used to get more details about the failure. If the state of the
8872 medium is <link to="MediumState_LockedRead"/> or
8873 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8874 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8875 accessibility check in this case.
8876
8877 Note that not all medium states are applicable to all medium types.
8878 </desc>
8879 </attribute>
8880
8881 <attribute name="location" type="wstring">
8882 <desc>
8883 Location of the storage unit holding medium data.
8884
8885 The format of the location string is medium type specific. For medium
8886 types using regular files in a host's file system, the location
8887 string is the full file name.
8888
8889 Some medium types may support changing the storage unit location by
8890 simply changing the value of this property. If this operation is not
8891 supported, the implementation will return E_NOTIMPL in attempt to set
8892 this attribute's value.
8893
8894 When setting a value of the location attribute which is a regular file
8895 in the host's file system, the given file name may be either relative to
8896 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8897 absolute. Note that if the given location specification does not contain
8898 the file extension part then a proper default extension will be
8899 automatically appended by the implementation depending on the medium type.
8900 </desc>
8901 </attribute>
8902
8903 <attribute name="name" type="wstring" readonly="yes">
8904 <desc>
8905 Name of the storage unit holding medium data.
8906
8907 The returned string is a short version of the <link to="#location"/>
8908 attribute that is suitable for representing the medium in situations
8909 where the full location specification is too long (such as lists
8910 and comboboxes in GUI frontends). This string is also used by frontends
8911 to sort the media list alphabetically when needed.
8912
8913 For example, for locations that are regular files in the host's file
8914 system, the value of this attribute is just the file name (+ extension),
8915 without the path specification.
8916
8917 Note that as opposed to the <link to="#location"/> attribute, the name
8918 attribute will not necessary be unique for a list of media of the
8919 given type and format.
8920 </desc>
8921 </attribute>
8922
8923 <attribute name="hostDrive" type="boolean" readonly="yes">
8924 <desc>True if this corresponds to a drive on the host.</desc>
8925 </attribute>
8926
8927 <attribute name="size" type="unsigned long long" readonly="yes">
8928 <desc>
8929 Physical size of the storage unit used to hold medium data (in bytes).
8930
8931 <note>
8932 For media whose <link to="#state"/> is <link
8933 to="MediumState_Inaccessible"/>, the value of this property is the
8934 last known size. For <link to="MediumState_NotCreated"/> media,
8935 the returned value is zero.
8936 </note>
8937 </desc>
8938 </attribute>
8939
8940 <attribute name="format" type="wstring" readonly="yes">
8941 <desc>
8942 Storage format of this medium.
8943
8944 The value of this attribute is a string that specifies a backend used to
8945 store hard disk data. The storage format is defined when you create a
8946 new hard disk or automatically detected when you open an existing hard
8947 disk medium, and cannot be changed later.
8948
8949 The list of all storage formats supported by this VirtualBox
8950 installation can be obtained using
8951 <link to="ISystemProperties::mediumFormats"/>.
8952 </desc>
8953 </attribute>
8954
8955 <attribute name="type" type="MediumType">
8956 <desc>
8957 Type (role) of this hard disk.
8958
8959 The following constraints apply when changing the value of this
8960 attribute:
8961 <ul>
8962 <li>If a hard disk is attached to a virtual machine (either in the
8963 current state or in one of the snapshots), its type cannot be
8964 changed.
8965 </li>
8966 <li>As long as the hard disk has children, its type cannot be set
8967 to <link to="MediumType_Writethrough"/>.
8968 </li>
8969 <li>The type of all differencing hard disks is
8970 <link to="MediumType_Normal"/> and cannot be changed.
8971 </li>
8972 </ul>
8973
8974 The type of a newly created or opened hard disk is set to
8975 <link to="MediumType_Normal"/>.
8976 </desc>
8977 </attribute>
8978
8979 <attribute name="parent" type="IMedium" readonly="yes">
8980 <desc>
8981 Parent of this hard disk (a hard disk this hard disk is directly based
8982 on).
8983
8984 Only differencing hard disks have parents. For base (non-differencing)
8985 hard disks, @c null is returned.
8986 </desc>
8987 </attribute>
8988
8989 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8990 <desc>
8991 Children of this hard disk (all differencing hard disks directly based
8992 on this hard disk). A @c null array is returned if this hard disk
8993 does not have any children.
8994 </desc>
8995 </attribute>
8996
8997 <attribute name="base" type="IMedium" readonly="yes">
8998 <desc>
8999 Base medium of this medium.
9000
9001 If this is a differencing medium, its base hard disk is the medium
9002 the given hard disk branch starts from. For all other types of hard
9003 disks, this property returns the hard disk object itself (i.e. the same
9004 object this property is read on).
9005 </desc>
9006 </attribute>
9007
9008 <attribute name="readOnly" type="boolean" readonly="yes">
9009 <desc>
9010 Returns @c true if this hard disk is read-only and @c false otherwise.
9011
9012 A hard disk is considered to be read-only when its contents cannot be
9013 modified without breaking the integrity of other parties that depend on
9014 this hard disk such as its child hard disks or snapshots of virtual
9015 machines where this hard disk is attached to these machines. If there
9016 are no children and no such snapshots then there is no dependency and
9017 the hard disk is not read-only.
9018
9019 The value of this attribute can be used to determine the kind of the
9020 attachment that will take place when attaching this hard disk to a
9021 virtual machine. If the value is @c false then the hard disk will
9022 be attached directly. If the value is @c true then the hard disk
9023 will be attached indirectly by creating a new differencing child hard
9024 disk for that. See the interface description for more information.
9025
9026 Note that all <link to="MediumType_Immutable">Immutable</link> hard
9027 disks are always read-only while all
9028 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
9029 always not.
9030
9031 <note>
9032 The read-only condition represented by this attribute is related to
9033 the hard disk type and usage, not to the current
9034 <link to="IMedium::state">medium state</link> and not to the read-only
9035 state of the storage unit.
9036 </note>
9037 </desc>
9038 </attribute>
9039
9040 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9041 <desc>
9042 Logical size of this hard disk (in megabytes), as reported to the
9043 guest OS running inside the virtual machine this disk is
9044 attached to. The logical size is defined when the hard disk is created
9045 and cannot be changed later.
9046
9047 <note>
9048 Reading this property on a differencing hard disk will return the size
9049 of its <link to="#base"/> medium.
9050 </note>
9051 <note>
9052 For hard disks whose state is <link to="#state"/> is <link
9053 to="MediumState_Inaccessible"/>, the value of this property is the
9054 last known logical size. For <link to="MediumaState_NotCreated"/> hard
9055 disks, the returned value is zero.
9056 </note>
9057 </desc>
9058 </attribute>
9059
9060 <attribute name="autoReset" type="boolean">
9061 <desc>
9062 Whether this differencing hard disk will be automatically reset each
9063 time a virtual machine it is attached to is powered up.
9064
9065 See <link to="#reset()"/> for more information about resetting
9066 differencing hard disks.
9067
9068 <note>
9069 Reading this property on a base (non-differencing) hard disk will
9070 always @c false. Changing the value of this property in this
9071 case is not supported.
9072 </note>
9073
9074 <result name="VBOX_E_NOT_SUPPORTED">
9075 This is not a differencing hard disk (when changing the attribute
9076 value).
9077 </result>
9078 </desc>
9079 </attribute>
9080
9081 <attribute name="lastAccessError" type="wstring" readonly="yes">
9082 <desc>
9083 Text message that represents the result of the last accessibility
9084 check.
9085
9086 Accessibility checks are performed each time the <link to="#state"/>
9087 attribute is read. An empty string is returned if the last
9088 accessibility check was successful. A non-empty string indicates a
9089 failure and should normally describe a reason of the failure (for
9090 example, a file read error).
9091 </desc>
9092 </attribute>
9093
9094 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9095 <desc>
9096 Array of UUIDs of all machines this medium is attached to.
9097
9098 A @c null array is returned if this medium is not attached to any
9099 machine or to any machine's snapshot.
9100
9101 <note>
9102 The returned array will include a machine even if this medium is not
9103 attached to that machine in the current state but attached to it in
9104 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9105 details.
9106 </note>
9107 </desc>
9108 </attribute>
9109
9110 <method name="getSnapshotIds">
9111 <desc>
9112 Returns an array of UUIDs of all snapshots of the given machine where
9113 this medium is attached to.
9114
9115 If the medium is attached to the machine in the current state, then the
9116 first element in the array will always be the ID of the queried machine
9117 (i.e. the value equal to the @c machineId argument), followed by
9118 snapshot IDs (if any).
9119
9120 If the medium is not attached to the machine in the current state, then
9121 the array will contain only snapshot IDs.
9122
9123 The returned array may be @c null if this medium is not attached
9124 to the given machine at all, neither in the current state nor in one of
9125 the snapshots.
9126 </desc>
9127 <param name="machineId" type="uuid" mod="string" dir="in">
9128 <desc>
9129 UUID of the machine to query.
9130 </desc>
9131 </param>
9132 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9133 <desc>
9134 Array of snapshot UUIDs of the given machine using this medium.
9135 </desc>
9136 </param>
9137 </method>
9138
9139 <method name="lockRead">
9140 <desc>
9141 Locks this medium for reading.
9142
9143 The read lock is shared: many clients can simultaneously lock the
9144 same medium for reading unless it is already locked for writing (see
9145 <link to="#lockWrite"/>) in which case an error is returned.
9146
9147 When the medium is locked for reading, it cannot be modified
9148 from within VirtualBox. This means that any method that changes
9149 the properties of this medium or contents of the storage unit
9150 will return an error (unless explicitly stated otherwise) and
9151 that an attempt to start a virtual machine that wants to modify
9152 the medium will also fail.
9153
9154 When the virtual machine is started up, it locks for reading all
9155 media it uses in read-only mode. If some medium cannot be locked
9156 for reading, the startup procedure will fail.
9157
9158 The medium locked for reading must be unlocked using the <link
9159 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9160 can be nested and must be followed by the same number of paired
9161 <link to="#unlockRead"/> calls.
9162
9163 This method sets the medium state to <link
9164 to="MediumState_LockedRead" /> on success. The state prior to
9165 this call must be <link to="MediumState_Created" />,
9166 <link to="MediumState_Inaccessible" /> or
9167 <link to="MediumState_LockedRead" />.
9168 As you can see, an inaccessible medium can be locked too. This is
9169 not an error; this method performs a logical lock that prevents
9170 modifications of this medium through the VirtualBox API, not a
9171 physical lock of the underlying storage unit.
9172
9173 This method returns the current state of the medium
9174 <b>before</b> the operation.
9175
9176 <result name="VBOX_E_INVALID_OBJECT_STATE">
9177 Invalid medium state (e.g. not created, locked, inaccessible,
9178 creating, deleting).
9179 </result>
9180
9181 </desc>
9182 <param name="state" type="MediumState" dir="return">
9183 <desc>
9184 State of the medium after the operation.
9185 </desc>
9186 </param>
9187 </method>
9188
9189 <method name="unlockRead">
9190 <desc>
9191 Cancels the read lock previously set by <link to="#lockRead"/>.
9192
9193 For both, success and failure, this method returns the current state
9194 of the medium <b>after</b> the operation.
9195
9196 See <link to="#lockRead"/> for more details.
9197
9198 <result name="VBOX_E_INVALID_OBJECT_STATE">
9199 Medium not locked for reading.
9200 </result>
9201
9202 </desc>
9203 <param name="state" type="MediumState" dir="return">
9204 <desc>
9205 State of the medium after the operation.
9206 </desc>
9207 </param>
9208 </method>
9209
9210 <method name="lockWrite">
9211 <desc>
9212 Locks this medium for writing.
9213
9214 The write lock, as opposed to <link to="#lockRead"/>, is
9215 exclusive: there may be only one client holding a write lock
9216 and there may be no read locks while the write lock is held.
9217
9218 When the medium is locked for writing, it cannot be modified
9219 from within VirtualBox and it is not guaranteed that the values
9220 of its properties are up-to-date. Any method that changes the
9221 properties of this medium or contents of the storage unit will
9222 return an error (unless explicitly stated otherwise) and an
9223 attempt to start a virtual machine wanting to modify or to
9224 read the medium will fail.
9225
9226 When the virtual machine is started up, it locks for writing all
9227 media it uses to write data to. If any medium could not be locked
9228 for writing, the startup procedure will fail.
9229
9230 The medium locked for writing must be unlocked using the <link
9231 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9232 can <b>not</b> be nested and must be followed by a<link
9233 to="#unlockWrite"/> call before the next lockWrite call.
9234
9235 This method sets the medium state to <link to="MediumState_LockedWrite" />
9236 on success. The state prior to this call must be <link to="MediumState_Created"/>
9237 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9238 medium can be locked too. This is not an error; this method
9239 performs a logical lock preventing modifications of this
9240 medium through the VirtualBox API, not a physical lock of the
9241 underlying storage unit.
9242
9243 For both, success and failure, this method returns the current
9244 state of the medium <b>before</b> the operation.
9245
9246 <result name="VBOX_E_INVALID_OBJECT_STATE">
9247 Invalid medium state (e.g. not created, locked, inaccessible,
9248 creating, deleting).
9249 </result>
9250
9251 </desc>
9252 <param name="state" type="MediumState" dir="return">
9253 <desc>
9254 State of the medium after the operation.
9255 </desc>
9256 </param>
9257 </method>
9258
9259 <method name="unlockWrite">
9260 <desc>
9261 Cancels the write lock previously set by <link to="#lockWrite"/>.
9262
9263 For both, success and failure, this method returns the current
9264 state of the medium <b>after</b> the operation.
9265
9266 See <link to="#lockWrite"/> for more details.
9267
9268 <result name="VBOX_E_INVALID_OBJECT_STATE">
9269 Medium not locked for writing.
9270 </result>
9271
9272 </desc>
9273 <param name="state" type="MediumState" dir="return">
9274 <desc>
9275 State of the medium after the operation.
9276 </desc>
9277 </param>
9278 </method>
9279
9280 <method name="close">
9281 <desc>
9282 Closes this medium.
9283
9284 The medium must not be attached to any known virtual machine
9285 and must not have any known child media, otherwise the
9286 operation will fail.
9287
9288 When the medium is successfully closed, it gets removed from
9289 the list of remembered media, but its storage unit is not
9290 deleted. In particular, this means that this medium can be
9291 later opened again using the <link
9292 to="IVirtualBox::openHardDisk"/> call.
9293
9294 Note that after this method successfully returns, the given medium
9295 object becomes uninitialized. This means that any attempt
9296 to call any of its methods or attributes will fail with the
9297 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9298
9299 <result name="VBOX_E_INVALID_OBJECT_STATE">
9300 Invalid medium state (other than not created, created or
9301 inaccessible).
9302 </result>
9303 <result name="VBOX_E_OBJECT_IN_USE">
9304 Medium attached to virtual machine.
9305 </result>
9306 <result name="VBOX_E_FILE_ERROR">
9307 Settings file not accessible.
9308 </result>
9309 <result name="VBOX_E_XML_ERROR">
9310 Could not parse the settings file.
9311 </result>
9312
9313 </desc>
9314 </method>
9315
9316 <!-- storage methods -->
9317
9318 <method name="getProperty">
9319 <desc>
9320 Returns the value of the custom hard disk property with the given name.
9321
9322 The list of all properties supported by the given hard disk format can
9323 be obtained with <link to="IMediumFormat::describeProperties"/>.
9324
9325 Note that if this method returns an empty string in @a value, the
9326 requested property is supported but currently not assigned any value.
9327
9328 <result name="VBOX_E_OBJECT_NOT_FOUND">
9329 Requested property does not exist (not supported by the format).
9330 </result>
9331 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9332 </desc>
9333 <param name="name" type="wstring" dir="in">
9334 <desc>Name of the property to get.</desc>
9335 </param>
9336 <param name="value" type="wstring" dir="return">
9337 <desc>Current property value.</desc>
9338 </param>
9339 </method>
9340
9341 <method name="setProperty">
9342 <desc>
9343 Sets the value of the custom hard disk property with the given name.
9344
9345 The list of all properties supported by the given hard disk format can
9346 be obtained with <link to="IMediumFormat::describeProperties"/>.
9347
9348 Note that setting the property value to @c null or an empty string is
9349 equivalent to deleting the existing value. A default value (if it is
9350 defined for this property) will be used by the format backend in this
9351 case.
9352
9353 <result name="VBOX_E_OBJECT_NOT_FOUND">
9354 Requested property does not exist (not supported by the format).
9355 </result>
9356 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9357 </desc>
9358 <param name="name" type="wstring" dir="in">
9359 <desc>Name of the property to set.</desc>
9360 </param>
9361 <param name="value" type="wstring" dir="in">
9362 <desc>Property value to set.</desc>
9363 </param>
9364 </method>
9365
9366 <method name="getProperties">
9367 <desc>
9368 Returns values for a group of properties in one call.
9369
9370 The names of the properties to get are specified using the @a names
9371 argument which is a list of comma-separated property names or
9372 an empty string if all properties are to be returned. Note that currently
9373 the value of this argument is ignored and the method always returns all
9374 existing properties.
9375
9376 The list of all properties supported by the given hard disk format can
9377 be obtained with <link to="IMediumFormat::describeProperties"/>.
9378
9379 The method returns two arrays, the array of property names corresponding
9380 to the @a names argument and the current values of these properties.
9381 Both arrays have the same number of elements with each elemend at the
9382 given index in the first array corresponds to an element at the same
9383 index in the second array.
9384
9385 Note that for properties that do not have assigned values,
9386 an empty string is returned at the appropriate index in the
9387 @a returnValues array.
9388
9389 </desc>
9390 <param name="names" type="wstring" dir="in">
9391 <desc>
9392 Names of properties to get.
9393 </desc>
9394 </param>
9395 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9396 <desc>Names of returned properties.</desc>
9397 </param>
9398 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9399 <desc>Values of returned properties.</desc>
9400 </param>
9401 </method>
9402
9403 <method name="setProperties">
9404 <desc>
9405 Sets values for a group of properties in one call.
9406
9407 The names of the properties to set are passed in the @a names
9408 array along with the new values for them in the @a values array. Both
9409 arrays have the same number of elements with each elemend at the given
9410 index in the first array corresponding to an element at the same index
9411 in the second array.
9412
9413 If there is at least one property name in @a names that is not valid,
9414 the method will fail before changing the values of any other properties
9415 from the @a names array.
9416
9417 Using this method over <link to="#setProperty"/> is preferred if you
9418 need to set several properties at once since it will result into less
9419 IPC calls.
9420
9421 The list of all properties supported by the given hard disk format can
9422 be obtained with <link to="IMediumFormat::describeProperties"/>.
9423
9424 Note that setting the property value to @c null or an empty string is
9425 equivalent to deleting the existing value. A default value (if it is
9426 defined for this property) will be used by the format backend in this
9427 case.
9428 </desc>
9429 <param name="names" type="wstring" safearray="yes" dir="in">
9430 <desc>Names of properties to set.</desc>
9431 </param>
9432 <param name="values" type="wstring" safearray="yes" dir="in">
9433 <desc>Values of properties to set.</desc>
9434 </param>
9435 </method>
9436
9437 <!-- storage methods -->
9438
9439 <method name="createBaseStorage">
9440 <desc>
9441 Starts creating a hard disk storage unit (fixed/dynamic, according
9442 to the variant flags) in in the background. The previous storage unit
9443 created for this object, if any, must first be deleted using
9444 <link to="#deleteStorage"/>, otherwise the operation will fail.
9445
9446 Before the operation starts, the hard disk is placed in
9447 <link to="MediumState_Creating"/> state. If the create operation
9448 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9449 state.
9450
9451 After the returned progress object reports that the operation has
9452 successfully completed, the medium state will be set to <link
9453 to="MediumState_Created"/>, the hard disk will be remembered by this
9454 VirtualBox installation and may be attached to virtual machines.
9455
9456 <result name="VBOX_E_NOT_SUPPORTED">
9457 The variant of storage creation operation is not supported. See <link
9458 to="IMediumFormat::capabilities"/>.
9459 </result>
9460 </desc>
9461 <param name="logicalSize" type="unsigned long long" dir="in">
9462 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9463 </param>
9464 <param name="variant" type="MediumVariant" dir="in">
9465 <desc>Exact image variant which should be created.</desc>
9466 </param>
9467 <param name="progress" type="IProgress" dir="return">
9468 <desc>Progress object to track the operation completion.</desc>
9469 </param>
9470 </method>
9471
9472 <method name="deleteStorage">
9473 <desc>
9474 Starts deleting the storage unit of this hard disk.
9475
9476 The hard disk must not be attached to any known virtual machine and must
9477 not have any known child hard disks, otherwise the operation will fail.
9478 It will also fail if there is no storage unit to delete or if deletion
9479 is already in progress, or if the hard disk is being in use (locked for
9480 read or for write) or inaccessible. Therefore, the only valid state for
9481 this operation to succeed is <link to="MediumState_Created"/>.
9482
9483 Before the operation starts, the hard disk is placed to
9484 <link to="MediumState_Deleting"/> state and gets removed from the list
9485 of remembered hard disks (media registry). If the delete operation
9486 fails, the medium will be remembered again and placed back to
9487 <link to="MediumState_Created"/> state.
9488
9489 After the returned progress object reports that the operation is
9490 complete, the medium state will be set to
9491 <link to="MediumState_NotCreated"/> and you will be able to use one of
9492 the storage creation methods to create it again.
9493
9494 <see>#close()</see>
9495
9496 <result name="VBOX_E_OBJECT_IN_USE">
9497 Hard disk is attached to a virtual machine.
9498 </result>
9499 <result name="VBOX_E_NOT_SUPPORTED">
9500 Storage deletion is not allowed because neither of storage creation
9501 operations are supported. See
9502 <link to="IMediumFormat::capabilities"/>.
9503 </result>
9504
9505 <note>
9506 If the deletion operation fails, it is not guaranteed that the storage
9507 unit still exists. You may check the <link to="IMedium::state"/> value
9508 to answer this question.
9509 </note>
9510 </desc>
9511 <param name="progress" type="IProgress" dir="return">
9512 <desc>Progress object to track the operation completion.</desc>
9513 </param>
9514 </method>
9515
9516 <!-- diff methods -->
9517
9518 <method name="createDiffStorage">
9519 <desc>
9520 Starts creating an empty differencing storage unit based on this hard
9521 disk in the format and at the location defined by the @a target
9522 argument.
9523
9524 The target hard disk must be in <link to="MediumState_NotCreated"/>
9525 state (i.e. must not have an existing storage unit). Upon successful
9526 completion, this operation will set the type of the target hard disk to
9527 <link to="MediumType_Normal"/> and create a storage unit necessary to
9528 represent the differencing hard disk data in the given format (according
9529 to the storage format of the target object).
9530
9531 After the returned progress object reports that the operation is
9532 successfully complete, the target hard disk gets remembered by this
9533 VirtualBox installation and may be attached to virtual machines.
9534
9535 <note>
9536 The hard disk will be set to <link to="MediumState_LockedRead"/>
9537 state for the duration of this operation.
9538 </note>
9539 <result name="VBOX_E_OBJECT_IN_USE">
9540 Hard disk not in @c NotCreated state.
9541 </result>
9542 </desc>
9543 <param name="target" type="IMedium" dir="in">
9544 <desc>Target hard disk.</desc>
9545 </param>
9546 <param name="variant" type="MediumVariant" dir="in">
9547 <desc>Exact image variant which should be created.</desc>
9548 </param>
9549 <param name="progress" type="IProgress" dir="return">
9550 <desc>Progress object to track the operation completion.</desc>
9551 </param>
9552 </method>
9553
9554 <method name="mergeTo">
9555 <desc>
9556 Starts merging the contents of this hard disk and all intermediate
9557 differencing hard disks in the chain to the given target hard disk.
9558
9559 The target hard disk must be either a descendant of this hard disk or
9560 its ancestor (otherwise this method will immediately return a failure).
9561 It follows that there are two logical directions of the merge operation:
9562 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9563 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9564 chain:
9565
9566 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9567
9568 Here, calling this method on the <tt>Base</tt> hard disk object with
9569 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9570 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9571 merge. Note that in both cases the contents of the resulting hard disk
9572 will be the same, the only difference is the hard disk object that takes
9573 the result of the merge operation. In case of the forward merge in the
9574 above example, the result will be written to <tt>Diff_2</tt>; in case of
9575 the backward merge, the result will be written to <tt>Base</tt>. In
9576 other words, the result of the operation is always stored in the target
9577 hard disk.
9578
9579 Upon successful operation completion, the storage units of all hard
9580 disks in the chain between this (source) hard disk and the target hard
9581 disk, including the source hard disk itself, will be automatically
9582 deleted and the relevant hard disk objects (including this hard disk)
9583 will become uninitialized. This means that any attempt to call any of
9584 their methods or attributes will fail with the
9585 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9586 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9587 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9588 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9589 disk itself since it will no longer be based on any other hard disk.
9590
9591 Considering the above, all of the following conditions must be met in
9592 order for the merge operation to succeed:
9593 <ul>
9594 <li>
9595 Neither this (source) hard disk nor any intermediate
9596 differencing hard disk in the chain between it and the target
9597 hard disk is attached to any virtual machine.
9598 </li>
9599 <li>
9600 Neither the source hard disk nor the target hard disk is an
9601 <link to="MediumType_Immutable"/> hard disk.
9602 </li>
9603 <li>
9604 The part of the hard disk tree from the source hard disk to the
9605 target hard disk is a linear chain, i.e. all hard disks in this
9606 chain have exactly one child which is the next hard disk in this
9607 chain. The only exception from this rule is the target hard disk in
9608 the forward merge operation; it is allowed to have any number of
9609 child hard disks because the merge operation will hot change its
9610 logical contents (as it is seen by the guest OS or by children).
9611 </li>
9612 <li>
9613 None of the involved hard disks are in
9614 <link to="MediumState_LockedRead"/> or
9615 <link to="MediumState_LockedWrite"/> state.
9616 </li>
9617 </ul>
9618
9619 <note>
9620 This (source) hard disk and all intermediates will be placed to <link
9621 to="MediumState_Deleting"/> state and the target hard disk will be
9622 placed to <link to="MediumState_LockedWrite"/> state and for the
9623 duration of this operation.
9624 </note>
9625 </desc>
9626 <param name="targetId" type="uuid" mod="string" dir="in">
9627 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9628 </param>
9629 <param name="progress" type="IProgress" dir="return">
9630 <desc>Progress object to track the operation completion.</desc>
9631 </param>
9632 </method>
9633
9634 <!-- clone method -->
9635
9636 <method name="cloneTo">
9637 <desc>
9638 Starts creating a clone of this hard disk in the format and at the
9639 location defined by the @a target argument.
9640
9641 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9642 state (i.e. must not have an existing storage unit) or in
9643 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9644 big enough to hold the data or else the copy will be partial). Upon
9645 successful completion, the cloned hard disk will contain exactly the
9646 same sector data as the hard disk being cloned, except that in the
9647 first case a new UUID for the clone will be randomly generated, and in
9648 the second case the UUID will remain unchanged.
9649
9650 The @a parent argument defines which hard disk will be the parent
9651 of the clone. Passing a @c null reference indicates that the clone will
9652 be a base image, i.e. completely independent. It is possible to specify
9653 an arbitrary hard disk for this parameter, including the parent of the
9654 hard disk which is being cloned. Even cloning to a child of the source
9655 hard disk is possible. Note that when cloning to an existing image, the
9656 @a parent irgument is ignored.
9657
9658 After the returned progress object reports that the operation is
9659 successfully complete, the target hard disk gets remembered by this
9660 VirtualBox installation and may be attached to virtual machines.
9661
9662 <note>
9663 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9664 state for the duration of this operation.
9665 </note>
9666 <result name="E_NOTIMPL">
9667 The specified cloning variant is not supported at the moment.
9668 </result>
9669 </desc>
9670 <param name="target" type="IMedium" dir="in">
9671 <desc>Target hard disk.</desc>
9672 </param>
9673 <param name="variant" type="MediumVariant" dir="in">
9674 <desc>Exact image variant which should be created.</desc>
9675 </param>
9676 <param name="parent" type="IMedium" dir="in">
9677 <desc>Parent of the cloned hard disk.</desc>
9678 </param>
9679 <param name="progress" type="IProgress" dir="return">
9680 <desc>Progress object to track the operation completion.</desc>
9681 </param>
9682 </method>
9683
9684 <!-- other methods -->
9685
9686 <method name="compact">
9687 <desc>
9688 Starts compacting of this hard disk. This means that the disk is
9689 transformed into a possibly more compact storage representation.
9690 This potentially creates temporary images, which can require a
9691 substantial amount of additional disk space.
9692
9693 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9694 state and all its parent hard disks (if any) will be placed to
9695 <link to="MediumState_LockedRead"/> state for the duration of this
9696 operation.
9697
9698 Please note that the results can be either returned straight away,
9699 or later as the result of the background operation via the object
9700 returned via the @a progress parameter.
9701
9702 <result name="VBOX_E_NOT_SUPPORTED">
9703 Hard disk format does not support compacting (but potentially
9704 needs it).
9705 </result>
9706 </desc>
9707 <param name="progress" type="IProgress" dir="return">
9708 <desc>Progress object to track the operation completion.</desc>
9709 </param>
9710 </method>
9711
9712 <method name="reset">
9713 <desc>
9714 Starts erasing the contents of this differencing hard disk.
9715
9716 This operation will reset the differencing hard disk to its initial
9717 state when it does not contain any sector data and any read operation is
9718 redirected to its parent hard disk.
9719
9720 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9721 for the duration of this operation.
9722
9723 <result name="VBOX_E_NOT_SUPPORTED">
9724 This is not a differencing hard disk.
9725 </result>
9726 <result name="VBOX_E_INVALID_OBJECT_STATE">
9727 Hard disk is not in <link to="MediumState_Created"/> or
9728 <link to="MediumState_Inaccessible"/> state.
9729 </result>
9730 </desc>
9731 <param name="progress" type="IProgress" dir="return">
9732 <desc>Progress object to track the operation completion.</desc>
9733 </param>
9734 </method>
9735
9736 </interface>
9737
9738
9739 <!--
9740 // IMediumFormat
9741 /////////////////////////////////////////////////////////////////////////
9742 -->
9743
9744 <enum
9745 name="DataType"
9746 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9747 >
9748 <const name="Int32" value="0"/>
9749 <const name="Int8" value="1"/>
9750 <const name="String" value="2"/>
9751 </enum>
9752
9753 <enum
9754 name="DataFlags"
9755 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9756 >
9757 <const name="None" value="0x00"/>
9758 <const name="Mandatory" value="0x01"/>
9759 <const name="Expert" value="0x02"/>
9760 <const name="Array" value="0x04"/>
9761 <const name="FlagMask" value="0x07"/>
9762 </enum>
9763
9764 <enum
9765 name="MediumFormatCapabilities"
9766 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9767 >
9768 <desc>
9769 Hard disk format capability flags.
9770 </desc>
9771
9772 <const name="Uuid" value="0x01">
9773 <desc>
9774 Supports UUIDs as expected by VirtualBox code.
9775 </desc>
9776 </const>
9777
9778 <const name="CreateFixed" value="0x02">
9779 <desc>
9780 Supports creating fixed size images, allocating all space instantly.
9781 </desc>
9782 </const>
9783
9784 <const name="CreateDynamic" value="0x04">
9785 <desc>
9786 Supports creating dynamically growing images, allocating space on
9787 demand.
9788 </desc>
9789 </const>
9790
9791 <const name="CreateSplit2G" value="0x08">
9792 <desc>
9793 Supports creating images split in chunks of a bit less than 2 GBytes.
9794 </desc>
9795 </const>
9796
9797 <const name="Differencing" value="0x10">
9798 <desc>
9799 Supports being used as a format for differencing media (see <link
9800 to="IMedium::createDiffStorage"/>).
9801 </desc>
9802 </const>
9803
9804 <const name="Asynchronous" value="0x20">
9805 <desc>
9806 Supports asynchronous I/O operations for at least some configurations.
9807 </desc>
9808 </const>
9809
9810 <const name="File" value="0x40">
9811 <desc>
9812 The format backend operates on files (the <link to="IMedium::location"/>
9813 attribute of the medium specifies a file used to store medium
9814 data; for a list of supported file extensions see
9815 <link to="IMediumFormat::fileExtensions"/>).
9816 </desc>
9817 </const>
9818
9819 <const name="Properties" value="0x80">
9820 <desc>
9821 The format backend uses the property interface to configure the storage
9822 location and properties (the <link to="IMediumFormat::describeProperties"/>
9823 method is used to get access to properties supported by the given medium format).
9824 </desc>
9825 </const>
9826
9827 <const name="CapabilityMask" value="0xFF"/>
9828 </enum>
9829
9830 <interface
9831 name="IMediumFormat" extends="$unknown"
9832 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9833 wsmap="managed"
9834 >
9835 <desc>
9836 The IMediumFormat interface represents a medium format.
9837
9838 Each medium format has an associated backend which is used to handle
9839 media stored in this format. This interface provides information
9840 about the properties of the associated backend.
9841
9842 Each medium format is identified by a string represented by the
9843 <link to="#id"/> attribute. This string is used in calls like
9844 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9845 format.
9846
9847 The list of all supported medium formats can be obtained using
9848 <link to="ISystemProperties::mediaFormats"/>.
9849
9850 <see>IMedium</see>
9851 </desc>
9852
9853 <attribute name="id" type="wstring" readonly="yes">
9854 <desc>
9855 Identifier of this format.
9856
9857 The format identifier is a non-@c null non-empty ASCII string. Note that
9858 this string is case-insensitive. This means that, for example, all of
9859 the following strings:
9860 <pre>
9861 "VDI"
9862 "vdi"
9863 "VdI"</pre>
9864 refer to the same medium format.
9865
9866 This string is used in methods of other interfaces where it is necessary
9867 to specify a medium format, such as
9868 <link to="IVirtualBox::createHardDisk"/>.
9869 </desc>
9870 </attribute>
9871
9872 <attribute name="name" type="wstring" readonly="yes">
9873 <desc>
9874 Human readable description of this format.
9875
9876 Mainly for use in file open dialogs.
9877 </desc>
9878 </attribute>
9879
9880 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9881 <desc>
9882 Array of strings containing the supported file extensions.
9883
9884 The first extension in the array is the extension preferred by the
9885 backend. It is recommended to use this extension when specifying a
9886 location of the storage unit for a new medium.
9887
9888 Note that some backends do not work on files, so this array may be
9889 empty.
9890
9891 <see>IMediumFormat::capabilities</see>
9892 </desc>
9893 </attribute>
9894
9895 <attribute name="capabilities" type="unsigned long" readonly="yes">
9896 <desc>
9897 Capabilities of the format as a set of bit flags.
9898
9899 For the meaning of individual capability flags see
9900 <link to="MediumFormatCapabilities"/>.
9901 </desc>
9902 </attribute>
9903
9904 <method name="describeProperties">
9905 <desc>
9906 Returns several arrays describing the properties supported by this
9907 format.
9908
9909 An element with the given index in each array describes one
9910 property. Thus, the number of elements in each returned array is the
9911 same and corresponds to the number of supported properties.
9912
9913 The returned arrays are filled in only if the
9914 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9915 All arguments must be non-@c null.
9916
9917 <see>DataType</see>
9918 <see>DataFlags</see>
9919 </desc>
9920
9921 <param name="names" type="wstring" safearray="yes" dir="out">
9922 <desc>Array of property names.</desc>
9923 </param>
9924 <param name="description" type="wstring" safearray="yes" dir="out">
9925 <desc>Array of property descriptions.</desc>
9926 </param>
9927 <param name="types" type="DataType" safearray="yes" dir="out">
9928 <desc>Array of property types.</desc>
9929 </param>
9930 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9931 <desc>Array of property flags.</desc>
9932 </param>
9933 <param name="defaults" type="wstring" safearray="yes" dir="out">
9934 <desc>Array of default property values.</desc>
9935 </param>
9936 </method>
9937
9938 </interface>
9939
9940
9941 <!--
9942 // IKeyboard
9943 /////////////////////////////////////////////////////////////////////////
9944 -->
9945
9946 <interface
9947 name="IKeyboard" extends="$unknown"
9948 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9949 wsmap="managed"
9950 >
9951 <desc>
9952 The IKeyboard interface represents the virtual machine's keyboard. Used
9953 in <link to="IConsole::keyboard"/>.
9954
9955 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9956 to the virtual machine.
9957
9958 </desc>
9959 <method name="putScancode">
9960 <desc>Sends a scancode to the keyboard.
9961
9962 <result name="VBOX_E_IPRT_ERROR">
9963 Could not send scan code to virtual keyboard.
9964 </result>
9965
9966 </desc>
9967 <param name="scancode" type="long" dir="in"/>
9968 </method>
9969
9970 <method name="putScancodes">
9971 <desc>Sends an array of scancodes to the keyboard.
9972
9973 <result name="VBOX_E_IPRT_ERROR">
9974 Could not send all scan codes to virtual keyboard.
9975 </result>
9976
9977 </desc>
9978 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9979 <param name="codesStored" type="unsigned long" dir="return"/>
9980 </method>
9981
9982 <method name="putCAD">
9983 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9984 function is nothing special, it is just a convenience function
9985 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9986
9987 <result name="VBOX_E_IPRT_ERROR">
9988 Could not send all scan codes to virtual keyboard.
9989 </result>
9990
9991 </desc>
9992 </method>
9993
9994 </interface>
9995
9996
9997 <!--
9998 // IMouse
9999 /////////////////////////////////////////////////////////////////////////
10000 -->
10001
10002 <enum
10003 name="MouseButtonState"
10004 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10005 >
10006 <desc>
10007 Mouse button state.
10008 </desc>
10009
10010 <const name="LeftButton" value="0x01"/>
10011 <const name="RightButton" value="0x02"/>
10012 <const name="MiddleButton" value="0x04"/>
10013 <const name="WheelUp" value="0x08"/>
10014 <const name="WheelDown" value="0x10"/>
10015 <const name="XButton1" value="0x20"/>
10016 <const name="XButton2" value="0x40"/>
10017 <const name="MouseStateMask" value="0x7F"/>
10018 </enum>
10019
10020 <interface
10021 name="IMouse" extends="$unknown"
10022 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10023 wsmap="managed"
10024 >
10025 <desc>
10026 The IMouse interface represents the virtual machine's mouse. Used in
10027 <link to="IConsole::mouse"/>.
10028
10029 Through this interface, the virtual machine's virtual mouse can be
10030 controlled.
10031 </desc>
10032
10033 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10034 <desc>
10035 Whether the guest OS supports absolute mouse pointer positioning
10036 or not.
10037 <note>
10038 VirtualBox Guest Tools need to be installed to the guest OS
10039 in order to enable absolute mouse positioning support.
10040 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10041 callback to be instantly informed about changes of this attribute
10042 during virtual machine execution.
10043 </note>
10044 <see><link to="#putMouseEventAbsolute"/></see>
10045 </desc>
10046 </attribute>
10047
10048 <method name="putMouseEvent">
10049 <desc>
10050 Initiates a mouse event using relative pointer movements
10051 along x and y axis.
10052
10053 <result name="E_ACCESSDENIED">
10054 Console not powered up.
10055 </result>
10056 <result name="VBOX_E_IPRT_ERROR">
10057 Could not send mouse event to virtual mouse.
10058 </result>
10059
10060 </desc>
10061
10062 <param name="dx" type="long" dir="in">
10063 <desc>
10064 Amount of pixels the mouse should move to the right.
10065 Negative values move the mouse to the left.
10066 </desc>
10067 </param>
10068 <param name="dy" type="long" dir="in">
10069 <desc>
10070 Amount of pixels the mouse should move downwards.
10071 Negative values move the mouse upwards.
10072 </desc>
10073 </param>
10074 <param name="dz" type="long" dir="in">
10075 <desc>
10076 Amount of mouse wheel moves.
10077 Positive values describe clockwise wheel rotations,
10078 negative values describe counterclockwise rotations.
10079 </desc>
10080 </param>
10081 <param name="dw" type="long" dir="in">
10082 <desc>
10083 Amount of horizontal mouse wheel moves.
10084 Positive values describe a movement to the left,
10085 negative values describe a movement to the right.
10086 </desc>
10087 </param>
10088 <param name="buttonState" type="long" dir="in">
10089 <desc>
10090 The current state of mouse buttons. Every bit represents
10091 a mouse button as follows:
10092 <table>
10093 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10094 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10095 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10096 </table>
10097 A value of <tt>1</tt> means the corresponding button is pressed.
10098 otherwise it is released.
10099 </desc>
10100 </param>
10101 </method>
10102
10103 <method name="putMouseEventAbsolute">
10104 <desc>
10105 Positions the mouse pointer using absolute x and y coordinates.
10106 These coordinates are expressed in pixels and
10107 start from <tt>[1,1]</tt> which corresponds to the top left
10108 corner of the virtual display.
10109
10110 <result name="E_ACCESSDENIED">
10111 Console not powered up.
10112 </result>
10113 <result name="VBOX_E_IPRT_ERROR">
10114 Could not send mouse event to virtual mouse.
10115 </result>
10116
10117 <note>
10118 This method will have effect only if absolute mouse
10119 positioning is supported by the guest OS.
10120 </note>
10121
10122 <see><link to="#absoluteSupported"/></see>
10123 </desc>
10124
10125 <param name="x" type="long" dir="in">
10126 <desc>
10127 X coordinate of the pointer in pixels, starting from @c 1.
10128 </desc>
10129 </param>
10130 <param name="y" type="long" dir="in">
10131 <desc>
10132 Y coordinate of the pointer in pixels, starting from @c 1.
10133 </desc>
10134 </param>
10135 <param name="dz" type="long" dir="in">
10136 <desc>
10137 Amount of mouse wheel moves.
10138 Positive values describe clockwise wheel rotations,
10139 negative values describe counterclockwise rotations.
10140 </desc>
10141 </param>
10142 <param name="dw" type="long" dir="in">
10143 <desc>
10144 Amount of horizontal mouse wheel moves.
10145 Positive values describe a movement to the left,
10146 negative values describe a movement to the right.
10147 </desc>
10148 </param>
10149 <param name="buttonState" type="long" dir="in">
10150 <desc>
10151 The current state of mouse buttons. Every bit represents
10152 a mouse button as follows:
10153 <table>
10154 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10155 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10156 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10157 </table>
10158 A value of @c 1 means the corresponding button is pressed.
10159 otherwise it is released.
10160 </desc>
10161 </param>
10162 </method>
10163
10164 </interface>
10165
10166 <!--
10167 // IDisplay
10168 /////////////////////////////////////////////////////////////////////////
10169 -->
10170
10171 <enum
10172 name="FramebufferPixelFormat"
10173 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10174 >
10175 <desc>
10176 Format of the video memory buffer. Constants represented by this enum can
10177 be used to test for particular values of <link
10178 to="IFramebuffer::pixelFormat"/>. See also <link
10179 to="IFramebuffer::requestResize"/>.
10180
10181 See also www.fourcc.org for more information about FOURCC pixel formats.
10182 </desc>
10183
10184 <const name="Opaque" value="0">
10185 <desc>
10186 Unknown buffer format (the user may not assume any particular format of
10187 the buffer).
10188 </desc>
10189 </const>
10190 <const name="FOURCC_RGB" value="0x32424752">
10191 <desc>
10192 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10193 bit layout).
10194 </desc>
10195 </const>
10196 </enum>
10197
10198 <interface
10199 name="IFramebuffer" extends="$unknown"
10200 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10201 wsmap="suppress"
10202 >
10203 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10204 <desc>Address of the start byte of the frame buffer.</desc>
10205 </attribute>
10206
10207 <attribute name="width" type="unsigned long" readonly="yes">
10208 <desc>Frame buffer width, in pixels.</desc>
10209 </attribute>
10210
10211 <attribute name="height" type="unsigned long" readonly="yes">
10212 <desc>Frame buffer height, in pixels.</desc>
10213 </attribute>
10214
10215 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10216 <desc>
10217 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10218 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10219 are: 8, 15, 16, 24 and 32.
10220 </desc>
10221 </attribute>
10222
10223 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10224 <desc>
10225 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10226 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10227 size of the scan line must be aligned to 32 bits.
10228 </desc>
10229 </attribute>
10230
10231 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10232 <desc>
10233 Frame buffer pixel format. It's either one of the values defined by <link
10234 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10235 <note>
10236 This attribute must never return <link
10237 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10238 <link to="#address"/> points to must be always known.
10239 </note>
10240 </desc>
10241 </attribute>
10242
10243 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10244 <desc>
10245 Defines whether this frame buffer uses the virtual video card's memory
10246 buffer (guest VRAM) directly or not. See <link
10247 to="IFramebuffer::requestResize"/> for more information.
10248 </desc>
10249 </attribute>
10250
10251 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10252 <desc>
10253 Hint from the frame buffer about how much of the standard
10254 screen height it wants to use for itself. This information is
10255 exposed to the guest through the VESA BIOS and VMMDev interface
10256 so that it can use it for determining its video mode table. It
10257 is not guaranteed that the guest respects the value.
10258 </desc>
10259 </attribute>
10260
10261 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10262 <desc>
10263 An alpha-blended overlay which is superposed over the frame buffer.
10264 The initial purpose is to allow the display of icons providing
10265 information about the VM state, including disk activity, in front
10266 ends which do not have other means of doing that. The overlay is
10267 designed to controlled exclusively by IDisplay. It has no locking
10268 of its own, and any changes made to it are not guaranteed to be
10269 visible until the affected portion of IFramebuffer is updated. The
10270 overlay can be created lazily the first time it is requested. This
10271 attribute can also return @c null to signal that the overlay is not
10272 implemented.
10273 </desc>
10274 </attribute>
10275
10276 <attribute name="winId" type="unsigned long long" readonly="yes">
10277 <desc>
10278 Platform-dependent identifier of the window where context of this
10279 frame buffer is drawn, or zero if there's no such window.
10280 </desc>
10281 </attribute>
10282
10283 <method name="lock">
10284 <desc>
10285 Locks the frame buffer.
10286 Gets called by the IDisplay object where this frame buffer is
10287 bound to.
10288 </desc>
10289 </method>
10290
10291 <method name="unlock">
10292 <desc>
10293 Unlocks the frame buffer.
10294 Gets called by the IDisplay object where this frame buffer is
10295 bound to.
10296 </desc>
10297 </method>
10298
10299 <method name="notifyUpdate">
10300 <desc>
10301 Informs about an update.
10302 Gets called by the display object where this buffer is
10303 registered.
10304 </desc>
10305 <param name="x" type="unsigned long" dir="in"/>
10306 <param name="y" type="unsigned long" dir="in"/>
10307 <param name="width" type="unsigned long" dir="in"/>
10308 <param name="height" type="unsigned long" dir="in"/>
10309 </method>
10310
10311 <method name="requestResize">
10312 <desc>
10313 Requests a size and pixel format change.
10314
10315 There are two modes of working with the video buffer of the virtual
10316 machine. The <i>indirect</i> mode implies that the IFramebuffer
10317 implementation allocates a memory buffer for the requested display mode
10318 and provides it to the virtual machine. In <i>direct</i> mode, the
10319 IFramebuffer implementation uses the memory buffer allocated and owned
10320 by the virtual machine. This buffer represents the video memory of the
10321 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10322 usually faster because the implementation gets a raw pointer to the
10323 guest VRAM buffer which it can directly use for visualizing the contents
10324 of the virtual display, as opposed to the indirect mode where the
10325 contents of guest VRAM are copied to the memory buffer provided by
10326 the implementation every time a display update occurs.
10327
10328 It is important to note that the direct mode is really fast only when
10329 the implementation uses the given guest VRAM buffer directly, for
10330 example, by blitting it to the window representing the virtual machine's
10331 display, which saves at least one copy operation comparing to the
10332 indirect mode. However, using the guest VRAM buffer directly is not
10333 always possible: the format and the color depth of this buffer may be
10334 not supported by the target window, or it may be unknown (opaque) as in
10335 case of text or non-linear multi-plane VGA video modes. In this case,
10336 the indirect mode (that is always available) should be used as a
10337 fallback: when the guest VRAM contents are copied to the
10338 implementation-provided memory buffer, color and format conversion is
10339 done automatically by the underlying code.
10340
10341 The @a pixelFormat parameter defines whether the direct mode is
10342 available or not. If @a pixelFormat is <link
10343 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10344 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10345 @a bytesPerLine parameters must be ignored and the implementation must use
10346 the indirect mode (where it provides its own buffer in one of the
10347 supported formats). In all other cases, @a pixelFormat together with
10348 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10349 buffer pointed to by the @a VRAM parameter and the implementation is
10350 free to choose which mode to use. To indicate that this frame buffer uses
10351 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10352 attribute must return @c true and <link to="#address"/> must
10353 return exactly the same address that is passed in the @a VRAM parameter
10354 of this method; otherwise it is assumed that the indirect strategy is
10355 chosen.
10356
10357 The @a width and @a height parameters represent the size of the
10358 requested display mode in both modes. In case of indirect mode, the
10359 provided memory buffer should be big enough to store data of the given
10360 display mode. In case of direct mode, it is guaranteed that the given
10361 @a VRAM buffer contains enough space to represent the display mode of the
10362 given size. Note that this frame buffer's <link to="#width"/> and <link
10363 to="#height"/> attributes must return exactly the same values as
10364 passed to this method after the resize is completed (see below).
10365
10366 The @a finished output parameter determines if the implementation has
10367 finished resizing the frame buffer or not. If, for some reason, the
10368 resize cannot be finished immediately during this call, @a finished
10369 must be set to @c false, and the implementation must call
10370 <link to="IDisplay::resizeCompleted"/> after it has returned from
10371 this method as soon as possible. If @a finished is @c false, the
10372 machine will not call any frame buffer methods until
10373 <link to="IDisplay::resizeCompleted"/> is called.
10374
10375 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10376 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10377 this frame buffer must return exactly the same values as specified in the
10378 parameters of this method, after the resize is completed. If the
10379 indirect mode is chosen, these attributes must return values describing
10380 the format of the implementation's own memory buffer <link
10381 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10382 value must always correlate with <link to="#pixelFormat"/>. Note that
10383 the <link to="#pixelFormat"/> attribute must never return <link
10384 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10385
10386 <note>
10387 This method is called by the IDisplay object under the
10388 <link to="#lock"/> provided by this IFramebuffer
10389 implementation. If this method returns @c false in @a finished, then
10390 this lock is not released until
10391 <link to="IDisplay::resizeCompleted"/> is called.
10392 </note>
10393 </desc>
10394 <param name="screenId" type="unsigned long" dir="in">
10395 <desc>
10396 Logical screen number. Must be used in the corresponding call to
10397 <link to="IDisplay::resizeCompleted"/> if this call is made.
10398 </desc>
10399 </param>
10400 <param name="pixelFormat" type="unsigned long" dir="in">
10401 <desc>
10402 Pixel format of the memory buffer pointed to by @a VRAM.
10403 See also <link to="FramebufferPixelFormat"/>.
10404 </desc>
10405 </param>
10406 <param name="VRAM" type="octet" mod="ptr" dir="in">
10407 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10408 </param>
10409 <param name="bitsPerPixel" type="unsigned long" dir="in">
10410 <desc>Color depth, bits per pixel.</desc>
10411 </param>
10412 <param name="bytesPerLine" type="unsigned long" dir="in">
10413 <desc>Size of one scan line, in bytes.</desc>
10414 </param>
10415 <param name="width" type="unsigned long" dir="in">
10416 <desc>Width of the guest display, in pixels.</desc>
10417 </param>
10418 <param name="height" type="unsigned long" dir="in">
10419 <desc>Height of the guest display, in pixels.</desc>
10420 </param>
10421 <param name="finished" type="boolean" dir="return">
10422 <desc>
10423 Can the VM start using the new frame buffer immediately
10424 after this method returns or it should wait for
10425 <link to="IDisplay::resizeCompleted"/>.
10426 </desc>
10427 </param>
10428 </method>
10429
10430 <method name="videoModeSupported">
10431 <desc>
10432 Returns whether the frame buffer implementation is willing to
10433 support a given video mode. In case it is not able to render
10434 the video mode (or for some reason not willing), it should
10435 return @c false. Usually this method is called when the guest
10436 asks the VMM device whether a given video mode is supported
10437 so the information returned is directly exposed to the guest.
10438 It is important that this method returns very quickly.
10439 </desc>
10440 <param name="width" type="unsigned long" dir="in"/>
10441 <param name="height" type="unsigned long" dir="in"/>
10442 <param name="bpp" type="unsigned long" dir="in"/>
10443 <param name="supported" type="boolean" dir="return"/>
10444 </method>
10445
10446 <method name="getVisibleRegion">
10447 <desc>
10448 Returns the visible region of this frame buffer.
10449
10450 If the @a rectangles parameter is @c null then the value of the
10451 @a count parameter is ignored and the number of elements necessary to
10452 describe the current visible region is returned in @a countCopied.
10453
10454 If @a rectangles is not @c null but @a count is less
10455 than the required number of elements to store region data, the method
10456 will report a failure. If @a count is equal or greater than the
10457 required number of elements, then the actual number of elements copied
10458 to the provided array will be returned in @a countCopied.
10459
10460 <note>
10461 The address of the provided array must be in the process space of
10462 this IFramebuffer object.
10463 </note>
10464 <note>
10465 Method not yet implemented.
10466 </note>
10467 </desc>
10468 <param name="rectangles" type="octet" mod="ptr" dir="in">
10469 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10470 </param>
10471 <param name="count" type="unsigned long" dir="in">
10472 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10473 </param>
10474 <param name="countCopied" type="unsigned long" dir="return">
10475 <desc>Number of elements copied to the @a rectangles array.</desc>
10476 </param>
10477 </method>
10478
10479 <method name="setVisibleRegion">
10480 <desc>
10481 Suggests a new visible region to this frame buffer. This region
10482 represents the area of the VM display which is a union of regions of
10483 all top-level windows of the guest operating system running inside the
10484 VM (if the Guest Additions for this system support this
10485 functionality). This information may be used by the frontends to
10486 implement the seamless desktop integration feature.
10487
10488 <note>
10489 The address of the provided array must be in the process space of
10490 this IFramebuffer object.
10491 </note>
10492 <note>
10493 The IFramebuffer implementation must make a copy of the provided
10494 array of rectangles.
10495 </note>
10496 <note>
10497 Method not yet implemented.
10498 </note>
10499 </desc>
10500 <param name="rectangles" type="octet" mod="ptr" dir="in">
10501 <desc>Pointer to the @c RTRECT array.</desc>
10502 </param>
10503 <param name="count" type="unsigned long" dir="in">
10504 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10505 </param>
10506 </method>
10507
10508 <method name="processVHWACommand">
10509 <desc>
10510 Posts a Video HW Acceleration Command to the frame buffer for processing.
10511 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10512 are posted from quest to the host to be processed by the host hardware.
10513
10514 <note>
10515 The address of the provided command must be in the process space of
10516 this IFramebuffer object.
10517 </note>
10518 </desc>
10519
10520 <param name="command" type="octet" mod="ptr" dir="in">
10521 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10522 </param>
10523 </method>
10524
10525 </interface>
10526
10527 <interface
10528 name="IFramebufferOverlay" extends="IFramebuffer"
10529 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10530 wsmap="suppress"
10531 >
10532 <desc>
10533 The IFramebufferOverlay interface represents an alpha blended overlay
10534 for displaying status icons above an IFramebuffer. It is always created
10535 not visible, so that it must be explicitly shown. It only covers a
10536 portion of the IFramebuffer, determined by its width, height and
10537 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10538 that order) format, and may be written to directly. Do re-read the
10539 width though, after setting it, as it may be adjusted (increased) to
10540 make it more suitable for the front end.
10541 </desc>
10542 <attribute name="x" type="unsigned long" readonly="yes">
10543 <desc>X position of the overlay, relative to the frame buffer.</desc>
10544 </attribute>
10545
10546 <attribute name="y" type="unsigned long" readonly="yes">
10547 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10548 </attribute>
10549
10550 <attribute name="visible" type="boolean" readonly="no">
10551 <desc>
10552 Whether the overlay is currently visible.
10553 </desc>
10554 </attribute>
10555
10556 <attribute name="alpha" type="unsigned long" readonly="no">
10557 <desc>
10558 The global alpha value for the overlay. This may or may not be
10559 supported by a given front end.
10560 </desc>
10561 </attribute>
10562
10563 <method name="move">
10564 <desc>
10565 Changes the overlay's position relative to the IFramebuffer.
10566 </desc>
10567 <param name="x" type="unsigned long" dir="in"/>
10568 <param name="y" type="unsigned long" dir="in"/>
10569 </method>
10570
10571 </interface>
10572
10573 <interface
10574 name="IDisplay" extends="$unknown"
10575 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10576 wsmap="managed"
10577 >
10578 <desc>
10579 The IDisplay interface represents the virtual machine's display.
10580
10581 The object implementing this interface is contained in each
10582 <link to="IConsole::display"/> attribute and represents the visual
10583 output of the virtual machine.
10584
10585 The virtual display supports pluggable output targets represented by the
10586 IFramebuffer interface. Examples of the output target are a window on
10587 the host computer or an RDP session's display on a remote computer.
10588 </desc>
10589 <attribute name="width" type="unsigned long" readonly="yes">
10590 <desc>Current display width.</desc>
10591 </attribute>
10592
10593 <attribute name="height" type="unsigned long" readonly="yes">
10594 <desc>Current display height.</desc>
10595 </attribute>
10596
10597 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10598 <desc>
10599 Current guest display color depth. Note that this may differ
10600 from <link to="IFramebuffer::bitsPerPixel"/>.
10601 </desc>
10602 </attribute>
10603
10604 <method name="setFramebuffer">
10605 <desc>
10606 Sets the framebuffer for given screen.
10607 </desc>
10608 <param name="screenId" type="unsigned long" dir="in"/>
10609 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10610 </method>
10611
10612 <method name="getFramebuffer">
10613 <desc>
10614 Queries the framebuffer for given screen.
10615 </desc>
10616 <param name="screenId" type="unsigned long" dir="in"/>
10617 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10618 <param name="xOrigin" type="long" dir="out"/>
10619 <param name="yOrigin" type="long" dir="out"/>
10620 </method>
10621
10622 <method name="setVideoModeHint">
10623 <desc>
10624 Asks VirtualBox to request the given video mode from
10625 the guest. This is just a hint and it cannot be guaranteed
10626 that the requested resolution will be used. Guest Additions
10627 are required for the request to be seen by guests. The caller
10628 should issue the request and wait for a resolution change and
10629 after a timeout retry.
10630
10631 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10632 parameters means that the corresponding values should be taken from the
10633 current video mode (i.e. left unchanged).
10634
10635 If the guest OS supports multi-monitor configuration then the @a display
10636 parameter specifies the number of the guest display to send the hint to:
10637 @c 0 is the primary display, @c 1 is the first secondary and
10638 so on. If the multi-monitor configuration is not supported, @a display
10639 must be @c 0.
10640
10641 <result name="E_INVALIDARG">
10642 The @a display is not associated with any monitor.
10643 </result>
10644
10645 </desc>
10646 <param name="width" type="unsigned long" dir="in"/>
10647 <param name="height" type="unsigned long" dir="in"/>
10648 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10649 <param name="display" type="unsigned long" dir="in"/>
10650 </method>
10651
10652 <method name="setSeamlessMode">
10653 <desc>
10654 Enables or disables seamless guest display rendering (seamless desktop
10655 integration) mode.
10656 <note>
10657 Calling this method has no effect if <link
10658 to="IGuest::supportsSeamless"/> returns @c false.
10659 </note>
10660 </desc>
10661 <param name="enabled" type="boolean" dir="in"/>
10662 </method>
10663
10664 <method name="takeScreenShot">
10665 <desc>
10666 Takes a screen shot of the requested size and copies it to the
10667 32-bpp buffer allocated by the caller and pointed to by @a address.
10668
10669 <note>This API can be used only by the COM/XPCOM C++ API as it
10670 requires pointer support. Use <link to="#takeScreenShotSlow" />
10671 with other language bindings.
10672 </note>
10673
10674 <result name="E_NOTIMPL">
10675 Feature not implemented.
10676 </result>
10677 <result name="VBOX_E_IPRT_ERROR">
10678 Could not take a screenshot.
10679 </result>
10680
10681 </desc>
10682 <param name="address" type="octet" mod="ptr" dir="in"/>
10683 <param name="width" type="unsigned long" dir="in"/>
10684 <param name="height" type="unsigned long" dir="in"/>
10685 </method>
10686
10687 <method name="takeScreenShotSlow">
10688 <desc>
10689 Takes a guest screen shot of the requested size and returns it as
10690 an array of bytes in uncompressed 32-bit ARGB format.
10691 This API is slow, but could be the only option to get guest screenshot
10692 for scriptable languages not allowed to manipulate with addresses
10693 directly.
10694
10695 <result name="E_NOTIMPL">
10696 Feature not implemented.
10697 </result>
10698 <result name="VBOX_E_IPRT_ERROR">
10699 Could not take a screenshot.
10700 </result>
10701 </desc>
10702 <param name="width" type="unsigned long" dir="in">
10703 <desc>
10704 Desired image width.
10705 </desc>
10706 </param>
10707 <param name="height" type="unsigned long" dir="in">
10708 <desc>
10709 Desired image height.
10710 </desc>
10711 </param>
10712 <param name="screenData" type="octet" dir="return" safearray="yes">
10713 <desc>
10714 Array with resulting screen data.
10715 </desc>
10716 </param>
10717 </method>
10718
10719 <method name="drawToScreen">
10720 <desc>
10721 Draws a 32-bpp image of the specified size from the given buffer
10722 to the given point on the VM display.
10723
10724 <result name="E_NOTIMPL">
10725 Feature not implemented.
10726 </result>
10727 <result name="VBOX_E_IPRT_ERROR">
10728 Could not draw to screen.
10729 </result>
10730
10731 </desc>
10732 <param name="address" type="octet" mod="ptr" dir="in"/>
10733 <param name="x" type="unsigned long" dir="in"/>
10734 <param name="y" type="unsigned long" dir="in"/>
10735 <param name="width" type="unsigned long" dir="in"/>
10736 <param name="height" type="unsigned long" dir="in"/>
10737 </method>
10738
10739 <method name="invalidateAndUpdate">
10740 <desc>
10741 Does a full invalidation of the VM display and instructs the VM
10742 to update it.
10743
10744 <result name="VBOX_E_IPRT_ERROR">
10745 Could not invalidate and update screen.
10746 </result>
10747
10748 </desc>
10749 </method>
10750
10751 <method name="resizeCompleted">
10752 <desc>
10753 Signals that a framebuffer has completed the resize operation.
10754
10755 <result name="VBOX_E_NOT_SUPPORTED">
10756 Operation only valid for external frame buffers.
10757 </result>
10758
10759 </desc>
10760 <param name="screenId" type="unsigned long" dir="in"/>
10761 </method>
10762
10763 <method name="updateCompleted">
10764 <desc>
10765 Signals that a framebuffer has completed the update operation.
10766
10767 <result name="VBOX_E_NOT_SUPPORTED">
10768 Operation only valid for external frame buffers.
10769 </result>
10770
10771 </desc>
10772 </method>
10773
10774 <method name="completeVHWACommand">
10775 <desc>
10776 Signals that the Video HW Acceleration command has completed.
10777 </desc>
10778
10779 <param name="command" type="octet" mod="ptr" dir="in">
10780 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10781 </param>
10782 </method>
10783
10784 </interface>
10785
10786 <!--
10787 // INetworkAdapter
10788 /////////////////////////////////////////////////////////////////////////
10789 -->
10790
10791 <enum
10792 name="NetworkAttachmentType"
10793 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10794 >
10795 <desc>
10796 Network attachment type.
10797 </desc>
10798
10799 <const name="Null" value="0">
10800 <desc>Null value, also means "not attached".</desc>
10801 </const>
10802 <const name="NAT" value="1"/>
10803 <const name="Bridged" value="2"/>
10804 <const name="Internal" value="3"/>
10805 <const name="HostOnly" value="4"/>
10806 </enum>
10807
10808 <enum
10809 name="NetworkAdapterType"
10810 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10811 >
10812 <desc>
10813 Network adapter type.
10814 </desc>
10815
10816 <const name="Null" value="0">
10817 <desc>Null value (never used by the API).</desc>
10818 </const>
10819 <const name="Am79C970A" value="1">
10820 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10821 </const>
10822 <const name="Am79C973" value="2">
10823 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10824 </const>
10825 <const name="I82540EM" value="3">
10826 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10827 </const>
10828 <const name="I82543GC" value="4">
10829 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10830 </const>
10831 <const name="I82545EM" value="5">
10832 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10833 </const>
10834 <const name="Virtio" value="6">
10835 <desc>Virtio network device.</desc>
10836 </const>
10837 </enum>
10838
10839 <interface
10840 name="INetworkAdapter" extends="$unknown"
10841 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10842 wsmap="managed"
10843 >
10844 <desc>
10845 Represents a virtual network adapter that is attached to a virtual machine.
10846 Each virtual machine has a fixed number of network adapter slots with one
10847 instance of this attached to each of them. Call
10848 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10849 is attached to a given slot in a given machine.
10850
10851 Each network adapter can be in one of five attachment modes, which are
10852 represented by the <link to="NetworkAttachmentType" /> enumeration;
10853 see the <link to="#attachmentType" /> attribute.
10854 </desc>
10855
10856 <attribute name="adapterType" type="NetworkAdapterType">
10857 <desc>
10858 Type of the virtual network adapter. Depending on this value,
10859 VirtualBox will provide a different virtual network hardware
10860 to the guest.
10861 </desc>
10862 </attribute>
10863
10864 <attribute name="slot" type="unsigned long" readonly="yes">
10865 <desc>
10866 Slot number this adapter is plugged into. Corresponds to
10867 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10868 to obtain this instance.
10869 </desc>
10870 </attribute>
10871
10872 <attribute name="enabled" type="boolean">
10873 <desc>
10874 Flag whether the network adapter is present in the
10875 guest system. If disabled, the virtual guest hardware will
10876 not contain this network adapter. Can only be changed when
10877 the VM is not running.
10878 </desc>
10879 </attribute>
10880
10881 <attribute name="MACAddress" type="wstring">
10882 <desc>
10883 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10884 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10885 </desc>
10886 </attribute>
10887
10888 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10889
10890 <attribute name="hostInterface" type="wstring">
10891 <desc>
10892 Name of the host network interface the VM is attached to.
10893 </desc>
10894 </attribute>
10895
10896 <attribute name="internalNetwork" type="wstring">
10897 <desc>
10898 Name of the internal network the VM is attached to.
10899 </desc>
10900 </attribute>
10901
10902 <attribute name="NATNetwork" type="wstring">
10903 <desc>
10904 Name of the NAT network the VM is attached to.
10905 </desc>
10906 </attribute>
10907
10908 <attribute name="cableConnected" type="boolean">
10909 <desc>
10910 Flag whether the adapter reports the cable as connected or not.
10911 It can be used to report offline situations to a VM.
10912 </desc>
10913 </attribute>
10914
10915 <attribute name="lineSpeed" type="unsigned long">
10916 <desc>
10917 Line speed reported by custom drivers, in units of 1 kbps.
10918 </desc>
10919 </attribute>
10920
10921 <attribute name="traceEnabled" type="boolean">
10922 <desc>
10923 Flag whether network traffic from/to the network card should be traced.
10924 Can only be toggled when the VM is turned off.
10925 </desc>
10926 </attribute>
10927
10928 <attribute name="traceFile" type="wstring">
10929 <desc>
10930 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10931 will be used.
10932 </desc>
10933 </attribute>
10934
10935 <method name="attachToNAT">
10936 <desc>
10937 Attach the network adapter to the Network Address Translation (NAT) interface.
10938 </desc>
10939 </method>
10940
10941 <method name="attachToBridgedInterface">
10942 <desc>
10943 Attach the network adapter to a bridged host interface.
10944 </desc>
10945 </method>
10946
10947 <method name="attachToInternalNetwork">
10948 <desc>
10949 Attach the network adapter to an internal network.
10950 </desc>
10951 </method>
10952
10953 <method name="attachToHostOnlyInterface">
10954 <desc>
10955 Attach the network adapter to the host-only network.
10956 </desc>
10957 </method>
10958
10959 <method name="detach">
10960 <desc>
10961 Detach the network adapter
10962 </desc>
10963 </method>
10964 </interface>
10965
10966
10967 <!--
10968 // ISerialPort
10969 /////////////////////////////////////////////////////////////////////////
10970 -->
10971
10972 <enum
10973 name="PortMode"
10974 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10975 >
10976 <desc>
10977 The PortMode enumeration represents possible communication modes for
10978 the virtual serial port device.
10979 </desc>
10980
10981 <const name="Disconnected" value="0">
10982 <desc>Virtual device is not attached to any real host device.</desc>
10983 </const>
10984 <const name="HostPipe" value="1">
10985 <desc>Virtual device is attached to a host pipe.</desc>
10986 </const>
10987 <const name="HostDevice" value="2">
10988 <desc>Virtual device is attached to a host device.</desc>
10989 </const>
10990 <const name="RawFile" value="3">
10991 <desc>Virtual device is attached to a raw file.</desc>
10992 </const>
10993 </enum>
10994
10995 <interface
10996 name="ISerialPort" extends="$unknown"
10997 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10998 wsmap="managed"
10999 >
11000
11001 <desc>
11002 The ISerialPort interface represents the virtual serial port device.
11003
11004 The virtual serial port device acts like an ordinary serial port
11005 inside the virtual machine. This device communicates to the real
11006 serial port hardware in one of two modes: host pipe or host device.
11007
11008 In host pipe mode, the #path attribute specifies the path to the pipe on
11009 the host computer that represents a serial port. The #server attribute
11010 determines if this pipe is created by the virtual machine process at
11011 machine startup or it must already exist before starting machine
11012 execution.
11013
11014 In host device mode, the #path attribute specifies the name of the
11015 serial port device on the host computer.
11016
11017 There is also a third communication mode: the disconnected mode. In this
11018 mode, the guest OS running inside the virtual machine will be able to
11019 detect the serial port, but all port write operations will be discarded
11020 and all port read operations will return no data.
11021
11022 <see>IMachine::getSerialPort</see>
11023 </desc>
11024
11025 <attribute name="slot" type="unsigned long" readonly="yes">
11026 <desc>
11027 Slot number this serial port is plugged into. Corresponds to
11028 the value you pass to <link to="IMachine::getSerialPort"/>
11029 to obtain this instance.
11030 </desc>
11031 </attribute>
11032
11033 <attribute name="enabled" type="boolean">
11034 <desc>
11035 Flag whether the serial port is enabled. If disabled,
11036 the serial port will not be reported to the guest OS.
11037 </desc>
11038 </attribute>
11039
11040 <attribute name="IOBase" type="unsigned long">
11041 <desc>Base I/O address of the serial port.</desc>
11042 </attribute>
11043
11044 <attribute name="IRQ" type="unsigned long">
11045 <desc>IRQ number of the serial port.</desc>
11046 </attribute>
11047
11048 <attribute name="hostMode" type="PortMode">
11049 <desc>
11050 How is this port connected to the host.
11051 <note>
11052 Changing this attribute may fail if the conditions for
11053 <link to="#path"/> are not met.
11054 </note>
11055 </desc>
11056 </attribute>
11057
11058 <attribute name="server" type="boolean">
11059 <desc>
11060 Flag whether this serial port acts as a server (creates a new pipe on
11061 the host) or as a client (uses the existing pipe). This attribute is
11062 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11063 </desc>
11064 </attribute>
11065
11066 <attribute name="path" type="wstring">
11067 <desc>
11068 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11069 PortMode_HostPipe, or the host serial device name when
11070 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11071 cases, setting a @c null or empty string as the attribute's value
11072 is an error. Otherwise, the value of this property is ignored.
11073 </desc>
11074 </attribute>
11075
11076 </interface>
11077
11078 <!--
11079 // IParallelPort
11080 /////////////////////////////////////////////////////////////////////////
11081 -->
11082
11083 <interface
11084 name="IParallelPort" extends="$unknown"
11085 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11086 wsmap="managed"
11087 >
11088
11089 <desc>
11090 The IParallelPort interface represents the virtual parallel port device.
11091
11092 The virtual parallel port device acts like an ordinary parallel port
11093 inside the virtual machine. This device communicates to the real
11094 parallel port hardware using the name of the parallel device on the host
11095 computer specified in the #path attribute.
11096
11097 Each virtual parallel port device is assigned a base I/O address and an
11098 IRQ number that will be reported to the guest operating system and used
11099 to operate the given parallel port from within the virtual machine.
11100
11101 <see>IMachine::getParallelPort</see>
11102 </desc>
11103
11104 <attribute name="slot" type="unsigned long" readonly="yes">
11105 <desc>
11106 Slot number this parallel port is plugged into. Corresponds to
11107 the value you pass to <link to="IMachine::getParallelPort"/>
11108 to obtain this instance.
11109 </desc>
11110 </attribute>
11111
11112 <attribute name="enabled" type="boolean">
11113 <desc>
11114 Flag whether the parallel port is enabled. If disabled,
11115 the parallel port will not be reported to the guest OS.
11116 </desc>
11117 </attribute>
11118
11119 <attribute name="IOBase" type="unsigned long">
11120 <desc>Base I/O address of the parallel port.</desc>
11121 </attribute>
11122
11123 <attribute name="IRQ" type="unsigned long">
11124 <desc>IRQ number of the parallel port.</desc>
11125 </attribute>
11126
11127 <attribute name="path" type="wstring">
11128 <desc>
11129 Host parallel device name. If this parallel port is enabled, setting a
11130 @c null or an empty string as this attribute's value will result into
11131 an error.
11132 </desc>
11133 </attribute>
11134
11135 </interface>
11136
11137
11138 <!--
11139 // IMachineDebugger
11140 /////////////////////////////////////////////////////////////////////////
11141 -->
11142
11143 <interface
11144 name="IMachineDebugger" extends="$unknown"
11145 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11146 wsmap="suppress"
11147 >
11148 <method name="resetStats">
11149 <desc>
11150 Reset 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="dumpStats">
11158 <desc>
11159 Dumps VM statistics.
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 </method>
11165
11166 <method name="getStats">
11167 <desc>
11168 Get the VM statistics in a XMLish format.
11169 </desc>
11170 <param name="pattern" type="wstring" dir="in">
11171 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11172 </param>
11173 <param name="withDescriptions" type="boolean" dir="in">
11174 <desc>Whether to include the descriptions.</desc>
11175 </param>
11176 <param name="stats" type="wstring" dir="out">
11177 <desc>The XML document containing the statistics.</desc>
11178 </param>
11179 </method>
11180
11181 <method name="injectNMI">
11182 <desc>
11183 Inject an NMI into a running VT-x/AMD-V VM.
11184 </desc>
11185 </method>
11186
11187 <attribute name="singlestep" type="boolean">
11188 <desc>Switch for enabling singlestepping.</desc>
11189 </attribute>
11190
11191 <attribute name="recompileUser" type="boolean">
11192 <desc>Switch for forcing code recompilation for user mode code.</desc>
11193 </attribute>
11194
11195 <attribute name="recompileSupervisor" type="boolean">
11196 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11197 </attribute>
11198
11199 <attribute name="PATMEnabled" type="boolean">
11200 <desc>Switch for enabling and disabling the PATM component.</desc>
11201 </attribute>
11202
11203 <attribute name="CSAMEnabled" type="boolean">
11204 <desc>Switch for enabling and disabling the CSAM component.</desc>
11205 </attribute>
11206
11207 <attribute name="logEnabled" type="boolean">
11208 <desc>Switch for enabling and disabling logging.</desc>
11209 </attribute>
11210
11211 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11212 <desc>
11213 Flag indicating whether the VM is currently making use of CPU hardware
11214 virtualization extensions.
11215 </desc>
11216 </attribute>
11217
11218 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11219 <desc>
11220 Flag indicating whether the VM is currently making use of the nested paging
11221 CPU hardware virtualization extension.
11222 </desc>
11223 </attribute>
11224
11225 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11226 <desc>
11227 Flag indicating whether the VM is currently making use of the VPID
11228 VT-x extension.
11229 </desc>
11230 </attribute>
11231
11232 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11233 <desc>
11234 Flag indicating whether the VM is currently making use of the Physical
11235 Address Extension CPU feature.
11236 </desc>
11237 </attribute>
11238
11239 <attribute name="virtualTimeRate" type="unsigned long">
11240 <desc>
11241 The rate at which the virtual time runs expressed as a percentage.
11242 The accepted range is 2% to 20000%.
11243 </desc>
11244 </attribute>
11245
11246 <!-- @todo method for setting log flags, groups and destination! -->
11247
11248 <attribute name="VM" type="unsigned long long" readonly="yes">
11249 <desc>
11250 Gets the VM handle. This is only for internal use while
11251 we carve the details of this interface.
11252 </desc>
11253 </attribute>
11254
11255 </interface>
11256
11257 <!--
11258 // IUSBController
11259 /////////////////////////////////////////////////////////////////////////
11260 -->
11261
11262 <interface
11263 name="IUSBController" extends="$unknown"
11264 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11265 wsmap="managed"
11266 >
11267 <attribute name="enabled" type="boolean">
11268 <desc>
11269 Flag whether the USB controller is present in the
11270 guest system. If disabled, the virtual guest hardware will
11271 not contain any USB controller. Can only be changed when
11272 the VM is powered off.
11273 </desc>
11274 </attribute>
11275
11276 <attribute name="enabledEhci" type="boolean">
11277 <desc>
11278 Flag whether the USB EHCI controller is present in the
11279 guest system. If disabled, the virtual guest hardware will
11280 not contain a USB EHCI controller. Can only be changed when
11281 the VM is powered off.
11282 </desc>
11283 </attribute>
11284
11285 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11286 <desc>
11287 USB standard version which the controller implements.
11288 This is a BCD which means that the major version is in the
11289 high byte and minor version is in the low byte.
11290 </desc>
11291 </attribute>
11292
11293 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11294 <desc>
11295 List of USB device filters associated with the machine.
11296
11297 If the machine is currently running, these filters are activated
11298 every time a new (supported) USB device is attached to the host
11299 computer that was not ignored by global filters
11300 (<link to="IHost::USBDeviceFilters"/>).
11301
11302 These filters are also activated when the machine is powered up.
11303 They are run against a list of all currently available USB
11304 devices (in states
11305 <link to="USBDeviceState_Available"/>,
11306 <link to="USBDeviceState_Busy"/>,
11307 <link to="USBDeviceState_Held"/>) that were not previously
11308 ignored by global filters.
11309
11310 If at least one filter matches the USB device in question, this
11311 device is automatically captured (attached to) the virtual USB
11312 controller of this machine.
11313
11314 <see>IUSBDeviceFilter, ::IUSBController</see>
11315 </desc>
11316 </attribute>
11317
11318 <method name="createDeviceFilter">
11319 <desc>
11320 Creates a new USB device filter. All attributes except
11321 the filter name are set to empty (any match),
11322 <i>active</i> is @c false (the filter is not active).
11323
11324 The created filter can then be added to the list of filters using
11325 <link to="#insertDeviceFilter"/>.
11326
11327 <result name="VBOX_E_INVALID_VM_STATE">
11328 The virtual machine is not mutable.
11329 </result>
11330
11331 <see>#deviceFilters</see>
11332 </desc>
11333 <param name="name" type="wstring" dir="in">
11334 <desc>
11335 Filter name. See <link to="IUSBDeviceFilter::name"/>
11336 for more info.
11337 </desc>
11338 </param>
11339 <param name="filter" type="IUSBDeviceFilter" dir="return">
11340 <desc>Created filter object.</desc>
11341 </param>
11342 </method>
11343
11344 <method name="insertDeviceFilter">
11345 <desc>
11346 Inserts the given USB device to the specified position
11347 in the list of filters.
11348
11349 Positions are numbered starting from <tt>0</tt>. If the specified
11350 position is equal to or greater than the number of elements in
11351 the list, the filter is added to the end of the collection.
11352
11353 <note>
11354 Duplicates are not allowed, so an attempt to insert a
11355 filter that is already in the collection, will return an
11356 error.
11357 </note>
11358
11359 <result name="VBOX_E_INVALID_VM_STATE">
11360 Virtual machine is not mutable.
11361 </result>
11362 <result name="E_INVALIDARG">
11363 USB device filter not created within this VirtualBox instance.
11364 </result>
11365 <result name="VBOX_E_INVALID_OBJECT_STATE">
11366 USB device filter already in list.
11367 </result>
11368
11369 <see>#deviceFilters</see>
11370 </desc>
11371 <param name="position" type="unsigned long" dir="in">
11372 <desc>Position to insert the filter to.</desc>
11373 </param>
11374 <param name="filter" type="IUSBDeviceFilter" dir="in">
11375 <desc>USB device filter to insert.</desc>
11376 </param>
11377 </method>
11378
11379 <method name="removeDeviceFilter">
11380 <desc>
11381 Removes a USB device filter from the specified position in the
11382 list of filters.
11383
11384 Positions are numbered starting from <tt>0</tt>. Specifying a
11385 position equal to or greater than the number of elements in
11386 the list will produce an error.
11387
11388 <see>#deviceFilters</see>
11389
11390 <result name="VBOX_E_INVALID_VM_STATE">
11391 Virtual machine is not mutable.
11392 </result>
11393 <result name="E_INVALIDARG">
11394 USB device filter list empty or invalid @a position.
11395 </result>
11396
11397 </desc>
11398 <param name="position" type="unsigned long" dir="in">
11399 <desc>Position to remove the filter from.</desc>
11400 </param>
11401 <param name="filter" type="IUSBDeviceFilter" dir="return">
11402 <desc>Removed USB device filter.</desc>
11403 </param>
11404 </method>
11405
11406 </interface>
11407
11408
11409 <!--
11410 // IUSBDevice
11411 /////////////////////////////////////////////////////////////////////////
11412 -->
11413
11414 <interface
11415 name="IUSBDevice" extends="$unknown"
11416 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11417 wsmap="managed"
11418 >
11419 <desc>
11420 The IUSBDevice interface represents a virtual USB device attached to the
11421 virtual machine.
11422
11423 A collection of objects implementing this interface is stored in the
11424 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11425 attached to a running virtual machine's USB controller.
11426 </desc>
11427
11428 <attribute name="id" type="uuid" mod="string" readonly="yes">
11429 <desc>
11430 Unique USB device ID. This ID is built from #vendorId,
11431 #productId, #revision and #serialNumber.
11432 </desc>
11433 </attribute>
11434
11435 <attribute name="vendorId" type="unsigned short" readonly="yes">
11436 <desc>Vendor ID.</desc>
11437 </attribute>
11438
11439 <attribute name="productId" type="unsigned short" readonly="yes">
11440 <desc>Product ID.</desc>
11441 </attribute>
11442
11443 <attribute name="revision" type="unsigned short" readonly="yes">
11444 <desc>
11445 Product revision number. This is a packed BCD represented as
11446 unsigned short. The high byte is the integer part and the low
11447 byte is the decimal.
11448 </desc>
11449 </attribute>
11450
11451 <attribute name="manufacturer" type="wstring" readonly="yes">
11452 <desc>Manufacturer string.</desc>
11453 </attribute>
11454
11455 <attribute name="product" type="wstring" readonly="yes">
11456 <desc>Product string.</desc>
11457 </attribute>
11458
11459 <attribute name="serialNumber" type="wstring" readonly="yes">
11460 <desc>Serial number string.</desc>
11461 </attribute>
11462
11463 <attribute name="address" type="wstring" readonly="yes">
11464 <desc>Host specific address of the device.</desc>
11465 </attribute>
11466
11467 <attribute name="port" type="unsigned short" readonly="yes">
11468 <desc>
11469 Host USB port number the device is physically
11470 connected to.
11471 </desc>
11472 </attribute>
11473
11474 <attribute name="version" type="unsigned short" readonly="yes">
11475 <desc>
11476 The major USB version of the device - 1 or 2.
11477 </desc>
11478 </attribute>
11479
11480 <attribute name="portVersion" type="unsigned short" readonly="yes">
11481 <desc>
11482 The major USB version of the host USB port the device is
11483 physically connected to - 1 or 2. For devices not connected to
11484 anything this will have the same value as the version attribute.
11485 </desc>
11486 </attribute>
11487
11488 <attribute name="remote" type="boolean" readonly="yes">
11489 <desc>
11490 Whether the device is physically connected to a remote VRDP
11491 client or to a local host machine.
11492 </desc>
11493 </attribute>
11494
11495 </interface>
11496
11497
11498 <!--
11499 // IUSBDeviceFilter
11500 /////////////////////////////////////////////////////////////////////////
11501 -->
11502
11503 <interface
11504 name="IUSBDeviceFilter" extends="$unknown"
11505 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11506 wsmap="managed"
11507 >
11508 <desc>
11509 The IUSBDeviceFilter interface represents an USB device filter used
11510 to perform actions on a group of USB devices.
11511
11512 This type of filters is used by running virtual machines to
11513 automatically capture selected USB devices once they are physically
11514 attached to the host computer.
11515
11516 A USB device is matched to the given device filter if and only if all
11517 attributes of the device match the corresponding attributes of the
11518 filter (that is, attributes are joined together using the logical AND
11519 operation). On the other hand, all together, filters in the list of
11520 filters carry the semantics of the logical OR operation. So if it is
11521 desirable to create a match like "this vendor id OR this product id",
11522 one needs to create two filters and specify "any match" (see below)
11523 for unused attributes.
11524
11525 All filter attributes used for matching are strings. Each string
11526 is an expression representing a set of values of the corresponding
11527 device attribute, that will match the given filter. Currently, the
11528 following filtering expressions are supported:
11529
11530 <ul>
11531 <li><i>Interval filters</i>. Used to specify valid intervals for
11532 integer device attributes (Vendor ID, Product ID and Revision).
11533 The format of the string is:
11534
11535 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11536
11537 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11538 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11539 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11540 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11541 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11542 possible integer is assumed.
11543 </li>
11544 <li><i>Boolean filters</i>. Used to specify acceptable values for
11545 boolean device attributes. The format of the string is:
11546
11547 <tt>true|false|yes|no|0|1</tt>
11548
11549 </li>
11550 <li><i>Exact match</i>. Used to specify a single value for the given
11551 device attribute. Any string that doesn't start with <tt>int:</tt>
11552 represents the exact match. String device attributes are compared to
11553 this string including case of symbols. Integer attributes are first
11554 converted to a string (see individual filter attributes) and then
11555 compared ignoring case.
11556
11557 </li>
11558 <li><i>Any match</i>. Any value of the corresponding device attribute
11559 will match the given filter. An empty or @c null string is
11560 used to construct this type of filtering expressions.
11561
11562 </li>
11563 </ul>
11564
11565 <note>
11566 On the Windows host platform, interval filters are not currently
11567 available. Also all string filter attributes
11568 (<link to="#manufacturer"/>, <link to="#product"/>,
11569 <link to="#serialNumber"/>) are ignored, so they behave as
11570 <i>any match</i> no matter what string expression is specified.
11571 </note>
11572
11573 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11574 </desc>
11575
11576 <attribute name="name" type="wstring">
11577 <desc>
11578 Visible name for this filter.
11579 This name is used to visually distinguish one filter from another,
11580 so it can neither be @c null nor an empty string.
11581 </desc>
11582 </attribute>
11583
11584 <attribute name="active" type="boolean">
11585 <desc>Whether this filter active or has been temporarily disabled.</desc>
11586 </attribute>
11587
11588 <attribute name="vendorId" type="wstring">
11589 <desc>
11590 <link to="IUSBDevice::vendorId">Vendor 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="productId" type="wstring">
11598 <desc>
11599 <link to="IUSBDevice::productId">Product ID</link> filter.
11600 The string representation for the <i>exact matching</i>
11601 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11602 (including leading zeroes).
11603 </desc>
11604 </attribute>
11605
11606 <attribute name="revision" type="wstring">
11607 <desc>
11608 <link to="IUSBDevice::productId">Product revision number</link>
11609 filter. The string representation for the <i>exact matching</i>
11610 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11611 of the integer part of the revision, and <tt>F</tt> is the
11612 decimal digit of its fractional part (including leading and
11613 trailing zeros).
11614 Note that for interval filters, it's best to use the hexadecimal
11615 form, because the revision is stored as a 16 bit packed BCD value;
11616 so the expression <tt>int:0x0100-0x0199</tt> will match any
11617 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11618 </desc>
11619 </attribute>
11620
11621 <attribute name="manufacturer" type="wstring">
11622 <desc>
11623 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11624 </desc>
11625 </attribute>
11626
11627 <attribute name="product" type="wstring">
11628 <desc>
11629 <link to="IUSBDevice::product">Product</link> filter.
11630 </desc>
11631 </attribute>
11632
11633 <attribute name="serialNumber" type="wstring">
11634 <desc>
11635 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11636 </desc>
11637 </attribute>
11638
11639 <attribute name="port" type="wstring">
11640 <desc>
11641 <link to="IUSBDevice::port">Host USB port</link> filter.
11642 </desc>
11643 </attribute>
11644
11645 <attribute name="remote" type="wstring">
11646 <desc>
11647 <link to="IUSBDevice::remote">Remote state</link> filter.
11648 <note>
11649 This filter makes sense only for machine USB filters,
11650 i.e. it is ignored by IHostUSBDeviceFilter objects.
11651 </note>
11652 </desc>
11653 </attribute>
11654
11655 <attribute name="maskedInterfaces" type="unsigned long">
11656 <desc>
11657 This is an advanced option for hiding one or more USB interfaces
11658 from the guest. The value is a bit mask where the bits that are set
11659 means the corresponding USB interface should be hidden, masked off
11660 if you like.
11661 This feature only works on Linux hosts.
11662 </desc>
11663 </attribute>
11664
11665 </interface>
11666
11667
11668 <!--
11669 // IHostUSBDevice
11670 /////////////////////////////////////////////////////////////////////////
11671 -->
11672
11673 <enum
11674 name="USBDeviceState"
11675 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11676 >
11677 <desc>
11678 USB device state. This enumeration represents all possible states
11679 of the USB device physically attached to the host computer regarding
11680 its state on the host computer and availability to guest computers
11681 (all currently running virtual machines).
11682
11683 Once a supported USB device is attached to the host, global USB
11684 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11685 either ignore the device, or put it to USBDeviceState_Held state, or do
11686 nothing. Unless the device is ignored by global filters, filters of all
11687 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11688 activated that can put it to USBDeviceState_Captured state.
11689
11690 If the device was ignored by global filters, or didn't match
11691 any filters at all (including guest ones), it is handled by the host
11692 in a normal way. In this case, the device state is determined by
11693 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11694 or USBDeviceState_Available, depending on the current device usage.
11695
11696 Besides auto-capturing based on filters, the device can be manually
11697 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11698 state is USBDeviceState_Busy, USBDeviceState_Available or
11699 USBDeviceState_Held.
11700
11701 <note>
11702 Due to differences in USB stack implementations in Linux and Win32,
11703 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11704 only to the Linux version of the product. This also means that (<link
11705 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11706 device state is USBDeviceState_Held.
11707 </note>
11708
11709 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11710 </desc>
11711
11712 <const name="NotSupported" value="0">
11713 <desc>
11714 Not supported by the VirtualBox server, not available to guests.
11715 </desc>
11716 </const>
11717 <const name="Unavailable" value="1">
11718 <desc>
11719 Being used by the host computer exclusively,
11720 not available to guests.
11721 </desc>
11722 </const>
11723 <const name="Busy" value="2">
11724 <desc>
11725 Being used by the host computer, potentially available to guests.
11726 </desc>
11727 </const>
11728 <const name="Available" value="3">
11729 <desc>
11730 Not used by the host computer, available to guests (the host computer
11731 can also start using the device at any time).
11732 </desc>
11733 </const>
11734 <const name="Held" value="4">
11735 <desc>
11736 Held by the VirtualBox server (ignored by the host computer),
11737 available to guests.
11738 </desc>
11739 </const>
11740 <const name="Captured" value="5">
11741 <desc>
11742 Captured by one of the guest computers, not available
11743 to anybody else.
11744 </desc>
11745 </const>
11746 </enum>
11747
11748 <interface
11749 name="IHostUSBDevice" extends="IUSBDevice"
11750 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11751 wsmap="managed"
11752 >
11753 <desc>
11754 The IHostUSBDevice interface represents a physical USB device attached
11755 to the host computer.
11756
11757 Besides properties inherited from IUSBDevice, this interface adds the
11758 <link to="#state"/> property that holds the current state of the USB
11759 device.
11760
11761 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11762 </desc>
11763
11764 <attribute name="state" type="USBDeviceState" readonly="yes">
11765 <desc>
11766 Current state of the device.
11767 </desc>
11768 </attribute>
11769
11770 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11771
11772 </interface>
11773
11774
11775 <!--
11776 // IHostUSBDeviceFilter
11777 /////////////////////////////////////////////////////////////////////////
11778 -->
11779
11780 <enum
11781 name="USBDeviceFilterAction"
11782 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11783 >
11784 <desc>
11785 Actions for host USB device filters.
11786 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11787 </desc>
11788
11789 <const name="Null" value="0">
11790 <desc>Null value (never used by the API).</desc>
11791 </const>
11792 <const name="Ignore" value="1">
11793 <desc>Ignore the matched USB device.</desc>
11794 </const>
11795 <const name="Hold" value="2">
11796 <desc>Hold the matched USB device.</desc>
11797 </const>
11798 </enum>
11799
11800 <interface
11801 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11802 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11803 wsmap="managed"
11804 >
11805 <desc>
11806 The IHostUSBDeviceFilter interface represents a global filter for a
11807 physical USB device used by the host computer. Used indirectly in
11808 <link to="IHost::USBDeviceFilters"/>.
11809
11810 Using filters of this type, the host computer determines the initial
11811 state of the USB device after it is physically attached to the
11812 host's USB controller.
11813
11814 <note>
11815 The <link to="#remote"/> attribute is ignored by this type of
11816 filters, because it makes sense only for
11817 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11818 </note>
11819
11820 <see>IHost::USBDeviceFilters</see>
11821 </desc>
11822
11823 <attribute name="action" type="USBDeviceFilterAction">
11824 <desc>
11825 Action performed by the host when an attached USB device
11826 matches this filter.
11827 </desc>
11828 </attribute>
11829
11830 </interface>
11831
11832 <!--
11833 // IAudioAdapter
11834 /////////////////////////////////////////////////////////////////////////
11835 -->
11836
11837 <enum
11838 name="AudioDriverType"
11839 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11840 >
11841 <desc>
11842 Host audio driver type.
11843 </desc>
11844
11845 <const name="Null" value="0">
11846 <desc>Null value, also means "dummy audio driver".</desc>
11847 </const>
11848 <const name="WinMM" value="1">
11849 <desc>Windows multimedia (Windows hosts only).</desc>
11850 </const>
11851 <const name="OSS" value="2">
11852 <desc>Open Sound System (Linux hosts only).</desc>
11853 </const>
11854 <const name="ALSA" value="3">
11855 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11856 </const>
11857 <const name="DirectSound" value="4">
11858 <desc>DirectSound (Windows hosts only).</desc>
11859 </const>
11860 <const name="CoreAudio" value="5">
11861 <desc>CoreAudio (Mac hosts only).</desc>
11862 </const>
11863 <const name="MMPM" value="6">
11864 <desc>Reserved for historical reasons.</desc>
11865 </const>
11866 <const name="Pulse" value="7">
11867 <desc>PulseAudio (Linux hosts only).</desc>
11868 </const>
11869 <const name="SolAudio" value="8">
11870 <desc>Solaris audio (Solaris hosts only).</desc>
11871 </const>
11872 </enum>
11873
11874 <enum
11875 name="AudioControllerType"
11876 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11877 >
11878 <desc>
11879 Virtual audio controller type.
11880 </desc>
11881
11882 <const name="AC97" value="0"/>
11883 <const name="SB16" value="1"/>
11884 </enum>
11885
11886 <interface
11887 name="IAudioAdapter" extends="$unknown"
11888 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11889 wsmap="managed"
11890 >
11891 <desc>
11892 The IAudioAdapter interface represents the virtual audio adapter of
11893 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11894 </desc>
11895 <attribute name="enabled" type="boolean">
11896 <desc>
11897 Flag whether the audio adapter is present in the
11898 guest system. If disabled, the virtual guest hardware will
11899 not contain any audio adapter. Can only be changed when
11900 the VM is not running.
11901 </desc>
11902 </attribute>
11903 <attribute name="audioController" type="AudioControllerType">
11904 <desc>
11905 The audio hardware we emulate.
11906 </desc>
11907 </attribute>
11908 <attribute name="audioDriver" type="AudioDriverType">
11909 <desc>
11910 Audio driver the adapter is connected to. This setting
11911 can only be changed when the VM is not running.
11912 </desc>
11913 </attribute>
11914 </interface>
11915
11916 <!--
11917 // IVRDPServer
11918 /////////////////////////////////////////////////////////////////////////
11919 -->
11920
11921 <enum
11922 name="VRDPAuthType"
11923 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11924 >
11925 <desc>
11926 VRDP authentication type.
11927 </desc>
11928
11929 <const name="Null" value="0">
11930 <desc>Null value, also means "no authentication".</desc>
11931 </const>
11932 <const name="External" value="1"/>
11933 <const name="Guest" value="2"/>
11934 </enum>
11935
11936 <interface
11937 name="IVRDPServer" extends="$unknown"
11938 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11939 wsmap="managed"
11940 >
11941 <attribute name="enabled" type="boolean">
11942 <desc>VRDP server status.</desc>
11943 </attribute>
11944
11945 <attribute name="ports" type="wstring">
11946 <desc>
11947 VRDP server port numbers.
11948 <note>
11949 This is a string of comma separated TCP port numbers or port number ranges.
11950 The server will try to bind to one of ports from the list. Example
11951 <tt>3000,3010-3012,3015</tt>
11952 </note>
11953 </desc>
11954 </attribute>
11955
11956 <attribute name="netAddress" type="wstring">
11957 <desc>VRDP server address.</desc>
11958 </attribute>
11959
11960 <attribute name="authType" type="VRDPAuthType">
11961 <desc>VRDP authentication method.</desc>
11962 </attribute>
11963
11964 <attribute name="authTimeout" type="unsigned long">
11965 <desc>Timeout for guest authentication. Milliseconds.</desc>
11966 </attribute>
11967
11968 <attribute name="allowMultiConnection" type="boolean">
11969 <desc>
11970 Flag whether multiple simultaneous connections to the VM are permitted.
11971 Note that this will be replaced by a more powerful mechanism in the future.
11972 </desc>
11973 </attribute>
11974
11975 <attribute name="reuseSingleConnection" type="boolean">
11976 <desc>
11977 Flag whether the existing connection must be dropped and a new connection
11978 must be established by the VRDP server, when a new client connects in single
11979 connection mode.
11980 </desc>
11981 </attribute>
11982
11983 </interface>
11984
11985
11986 <!--
11987 // ISharedFolder
11988 /////////////////////////////////////////////////////////////////////////
11989 -->
11990
11991 <interface
11992 name="ISharedFolder" extends="$unknown"
11993 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11994 wsmap="struct"
11995 >
11996 <desc>
11997 The ISharedFolder interface represents a folder in the host computer's
11998 file system accessible from the guest OS running inside a virtual
11999 machine using an associated logical name.
12000
12001 There are three types of shared folders:
12002 <ul>
12003 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12004 folders available to all virtual machines.</li>
12005 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12006 VM-specific shared folders available to the given virtual machine at
12007 startup.</li>
12008 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12009 VM-specific shared folders created in the session context (for
12010 example, when the virtual machine is running) and automatically
12011 discarded when the session is closed (the VM is powered off).</li>
12012 </ul>
12013
12014 Logical names of shared folders must be unique within the given scope
12015 (global, permanent or transient). However, they do not need to be unique
12016 across scopes. In this case, the definition of the shared folder in a
12017 more specific scope takes precedence over definitions in all other
12018 scopes. The order of precedence is (more specific to more general):
12019 <ol>
12020 <li>Transient definitions</li>
12021 <li>Permanent definitions</li>
12022 <li>Global definitions</li>
12023 </ol>
12024
12025 For example, if MyMachine has a shared folder named
12026 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12027 transient shared folder named <tt>C_DRIVE</tt> (that points
12028 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12029 of <tt>C_DRIVE</tt> in the guest OS so
12030 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12031 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12032 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12033 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12034 to <tt>C:\\</tt> if it still exists.
12035
12036 Note that permanent and transient shared folders of different machines
12037 are in different name spaces, so they don't overlap and don't need to
12038 have unique logical names.
12039
12040 <note>
12041 Global shared folders are not implemented in the current version of the
12042 product.
12043 </note>
12044 </desc>
12045
12046 <attribute name="name" type="wstring" readonly="yes">
12047 <desc>Logical name of the shared folder.</desc>
12048 </attribute>
12049
12050 <attribute name="hostPath" type="wstring" readonly="yes">
12051 <desc>Full path to the shared folder in the host file system.</desc>
12052 </attribute>
12053
12054 <attribute name="accessible" type="boolean" readonly="yes">
12055 <desc>
12056 Whether the folder defined by the host path is currently
12057 accessible or not.
12058 For example, the folder can be unaccessible if it is placed
12059 on the network share that is not available by the time
12060 this property is read.
12061 </desc>
12062 </attribute>
12063
12064 <attribute name="writable" type="boolean" readonly="yes">
12065 <desc>
12066 Whether the folder defined by the host path is writable or
12067 not.
12068 </desc>
12069 </attribute>
12070
12071 <attribute name="lastAccessError" type="wstring" readonly="yes">
12072 <desc>
12073 Text message that represents the result of the last accessibility
12074 check.
12075
12076 Accessibility checks are performed each time the <link to="#accessible"/>
12077 attribute is read. An empty string is returned if the last
12078 accessibility check was successful. A non-empty string indicates a
12079 failure and should normally describe a reason of the failure (for
12080 example, a file read error).
12081 </desc>
12082 </attribute>
12083
12084 </interface>
12085
12086 <!--
12087 // ISession
12088 /////////////////////////////////////////////////////////////////////////
12089 -->
12090
12091 <interface
12092 name="IInternalSessionControl" extends="$unknown"
12093 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12094 internal="yes"
12095 wsmap="suppress"
12096 >
12097 <method name="getPID">
12098 <desc>PID of the process that has created this Session object.
12099 </desc>
12100 <param name="pid" type="unsigned long" dir="return"/>
12101 </method>
12102
12103 <method name="getRemoteConsole">
12104 <desc>
12105 Returns the console object suitable for remote control.
12106
12107 <result name="VBOX_E_INVALID_VM_STATE">
12108 Session state prevents operation.
12109 </result>
12110 <result name="VBOX_E_INVALID_OBJECT_STATE">
12111 Session type prevents operation.
12112 </result>
12113
12114 </desc>
12115 <param name="console" type="IConsole" dir="return"/>
12116 </method>
12117
12118 <method name="assignMachine">
12119 <desc>
12120 Assigns the machine object associated with this direct-type
12121 session or informs the session that it will be a remote one
12122 (if @a machine == @c null).
12123
12124 <result name="VBOX_E_INVALID_VM_STATE">
12125 Session state prevents operation.
12126 </result>
12127 <result name="VBOX_E_INVALID_OBJECT_STATE">
12128 Session type prevents operation.
12129 </result>
12130
12131 </desc>
12132 <param name="machine" type="IMachine" dir="in"/>
12133 </method>
12134
12135 <method name="assignRemoteMachine">
12136 <desc>
12137 Assigns the machine and the (remote) console object associated with
12138 this remote-type session.
12139
12140 <result name="VBOX_E_INVALID_VM_STATE">
12141 Session state prevents operation.
12142 </result>
12143
12144 </desc>
12145 <param name="machine" type="IMachine" dir="in"/>
12146 <param name="console" type="IConsole" dir="in"/>
12147 </method>
12148
12149 <method name="updateMachineState">
12150 <desc>
12151 Updates the machine state in the VM process.
12152 Must be called only in certain cases
12153 (see the method implementation).
12154
12155 <result name="VBOX_E_INVALID_VM_STATE">
12156 Session state prevents operation.
12157 </result>
12158 <result name="VBOX_E_INVALID_OBJECT_STATE">
12159 Session type prevents operation.
12160 </result>
12161
12162 </desc>
12163 <param name="aMachineState" type="MachineState" dir="in"/>
12164 </method>
12165
12166 <method name="uninitialize">
12167 <desc>
12168 Uninitializes (closes) this session. Used by VirtualBox to close
12169 the corresponding remote session when the direct session dies
12170 or gets closed.
12171
12172 <result name="VBOX_E_INVALID_VM_STATE">
12173 Session state prevents operation.
12174 </result>
12175
12176 </desc>
12177 </method>
12178
12179 <method name="onNetworkAdapterChange">
12180 <desc>
12181 Triggered when settings of a network adapter of the
12182 associated virtual machine have changed.
12183
12184 <result name="VBOX_E_INVALID_VM_STATE">
12185 Session state prevents operation.
12186 </result>
12187 <result name="VBOX_E_INVALID_OBJECT_STATE">
12188 Session type prevents operation.
12189 </result>
12190
12191 </desc>
12192 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12193 <param name="changeAdapter" type="boolean" dir="in"/>
12194 </method>
12195
12196 <method name="onSerialPortChange">
12197 <desc>
12198 Triggered when settings of a serial port of the
12199 associated virtual machine have changed.
12200
12201 <result name="VBOX_E_INVALID_VM_STATE">
12202 Session state prevents operation.
12203 </result>
12204 <result name="VBOX_E_INVALID_OBJECT_STATE">
12205 Session type prevents operation.
12206 </result>
12207
12208 </desc>
12209 <param name="serialPort" type="ISerialPort" dir="in"/>
12210 </method>
12211
12212 <method name="onParallelPortChange">
12213 <desc>
12214 Triggered when settings of a parallel port of the
12215 associated virtual machine have changed.
12216
12217 <result name="VBOX_E_INVALID_VM_STATE">
12218 Session state prevents operation.
12219 </result>
12220 <result name="VBOX_E_INVALID_OBJECT_STATE">
12221 Session type prevents operation.
12222 </result>
12223
12224 </desc>
12225 <param name="parallelPort" type="IParallelPort" dir="in"/>
12226 </method>
12227
12228 <method name="onStorageControllerChange">
12229 <desc>
12230 Triggered when settings of a storage controller of the
12231 associated virtual machine have changed.
12232
12233 <result name="VBOX_E_INVALID_VM_STATE">
12234 Session state prevents operation.
12235 </result>
12236 <result name="VBOX_E_INVALID_OBJECT_STATE">
12237 Session type prevents operation.
12238 </result>
12239
12240 </desc>
12241 </method>
12242
12243 <method name="onMediumChange">
12244 <desc>
12245 Triggered when attached media of the
12246 associated virtual machine have changed.
12247
12248 <result name="VBOX_E_INVALID_VM_STATE">
12249 Session state prevents operation.
12250 </result>
12251 <result name="VBOX_E_INVALID_OBJECT_STATE">
12252 Session type prevents operation.
12253 </result>
12254
12255 </desc>
12256
12257 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12258 </method>
12259
12260 <method name="onVRDPServerChange">
12261 <desc>
12262 Triggered when settings of the VRDP server object of the
12263 associated virtual machine have changed.
12264
12265 <result name="VBOX_E_INVALID_VM_STATE">
12266 Session state prevents operation.
12267 </result>
12268 <result name="VBOX_E_INVALID_OBJECT_STATE">
12269 Session type prevents operation.
12270 </result>
12271
12272 </desc>
12273 </method>
12274
12275 <method name="onUSBControllerChange">
12276 <desc>
12277 Triggered when settings of the USB controller object of the
12278 associated virtual machine have changed.
12279
12280 <result name="VBOX_E_INVALID_VM_STATE">
12281 Session state prevents operation.
12282 </result>
12283 <result name="VBOX_E_INVALID_OBJECT_STATE">
12284 Session type prevents operation.
12285 </result>
12286
12287 </desc>
12288 </method>
12289
12290 <method name="onSharedFolderChange">
12291 <desc>
12292 Triggered when a permanent (global or machine) shared folder has been
12293 created or removed.
12294 <note>
12295 We don't pass shared folder parameters in this notification because
12296 the order in which parallel notifications are delivered is not defined,
12297 therefore it could happen that these parameters were outdated by the
12298 time of processing this notification.
12299 </note>
12300
12301 <result name="VBOX_E_INVALID_VM_STATE">
12302 Session state prevents operation.
12303 </result>
12304 <result name="VBOX_E_INVALID_OBJECT_STATE">
12305 Session type prevents operation.
12306 </result>
12307
12308 </desc>
12309 <param name="global" type="boolean" dir="in"/>
12310 </method>
12311
12312 <method name="onUSBDeviceAttach">
12313 <desc>
12314 Triggered when a request to capture a USB device (as a result
12315 of matched USB filters or direct call to
12316 <link to="IConsole::attachUSBDevice"/>) has completed.
12317 A @c null @a error object means success, otherwise it
12318 describes a failure.
12319
12320 <result name="VBOX_E_INVALID_VM_STATE">
12321 Session state prevents operation.
12322 </result>
12323 <result name="VBOX_E_INVALID_OBJECT_STATE">
12324 Session type prevents operation.
12325 </result>
12326
12327 </desc>
12328 <param name="device" type="IUSBDevice" dir="in"/>
12329 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12330 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12331 </method>
12332
12333 <method name="onUSBDeviceDetach">
12334 <desc>
12335 Triggered when a request to release the USB device (as a result
12336 of machine termination or direct call to
12337 <link to="IConsole::detachUSBDevice"/>) has completed.
12338 A @c null @a error object means success, otherwise it
12339 describes a failure.
12340
12341 <result name="VBOX_E_INVALID_VM_STATE">
12342 Session state prevents operation.
12343 </result>
12344 <result name="VBOX_E_INVALID_OBJECT_STATE">
12345 Session type prevents operation.
12346 </result>
12347
12348 </desc>
12349 <param name="id" type="uuid" mod="string" dir="in"/>
12350 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12351 </method>
12352
12353 <method name="onShowWindow">
12354 <desc>
12355 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12356 <link to="IMachine::showConsoleWindow"/> in order to notify
12357 console callbacks
12358 <link to="IConsoleCallback::onCanShowWindow"/>
12359 and <link to="IConsoleCallback::onShowWindow"/>.
12360
12361 <result name="VBOX_E_INVALID_OBJECT_STATE">
12362 Session type prevents operation.
12363 </result>
12364
12365 </desc>
12366 <param name="check" type="boolean" dir="in"/>
12367 <param name="canShow" type="boolean" dir="out"/>
12368 <param name="winId" type="unsigned long long" dir="out"/>
12369 </method>
12370
12371 <method name="accessGuestProperty">
12372 <desc>
12373 Called by <link to="IMachine::getGuestProperty"/> and by
12374 <link to="IMachine::setGuestProperty"/> in order to read and
12375 modify guest properties.
12376
12377 <result name="VBOX_E_INVALID_VM_STATE">
12378 Machine session is not open.
12379 </result>
12380 <result name="VBOX_E_INVALID_OBJECT_STATE">
12381 Session type is not direct.
12382 </result>
12383
12384 </desc>
12385 <param name="name" type="wstring" dir="in"/>
12386 <param name="value" type="wstring" dir="in"/>
12387 <param name="flags" type="wstring" dir="in"/>
12388 <param name="isSetter" type="boolean" dir="in"/>
12389 <param name="retValue" type="wstring" dir="out"/>
12390 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12391 <param name="retFlags" type="wstring" dir="out"/>
12392 </method>
12393
12394 <method name="enumerateGuestProperties">
12395 <desc>
12396 Return a list of the guest properties matching a set of patterns along
12397 with their values, time stamps and flags.
12398
12399 <result name="VBOX_E_INVALID_VM_STATE">
12400 Machine session is not open.
12401 </result>
12402 <result name="VBOX_E_INVALID_OBJECT_STATE">
12403 Session type is not direct.
12404 </result>
12405
12406 </desc>
12407 <param name="patterns" type="wstring" dir="in">
12408 <desc>
12409 The patterns to match the properties against as a comma-separated
12410 string. If this is empty, all properties currently set will be
12411 returned.
12412 </desc>
12413 </param>
12414 <param name="key" type="wstring" dir="out" safearray="yes">
12415 <desc>
12416 The key names of the properties returned.
12417 </desc>
12418 </param>
12419 <param name="value" type="wstring" dir="out" safearray="yes">
12420 <desc>
12421 The values of the properties returned. The array entries match the
12422 corresponding entries in the @a key array.
12423 </desc>
12424 </param>
12425 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12426 <desc>
12427 The time stamps of the properties returned. The array entries match
12428 the corresponding entries in the @a key array.
12429 </desc>
12430 </param>
12431 <param name="flags" type="wstring" dir="out" safearray="yes">
12432 <desc>
12433 The flags of the properties returned. The array entries match the
12434 corresponding entries in the @a key array.
12435 </desc>
12436 </param>
12437 </method>
12438
12439 </interface>
12440
12441 <interface
12442 name="ISession" extends="$dispatched"
12443 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12444 wsmap="managed"
12445 >
12446 <desc>
12447 The ISession interface represents a serialization primitive for virtual
12448 machines.
12449
12450 With VirtualBox, every time one wishes to manipulate a virtual machine
12451 (e.g. change its settings or start execution), a session object is
12452 required. Such an object must be passed to one of the session methods
12453 that open the given session, which then initiates the machine manipulation.
12454
12455 A session serves several purposes: it identifies to the inter-process VirtualBox
12456 code which process is currently working with the virtual machine, and it ensures
12457 that there are no incompatible requests from several processes for the
12458 same virtual machine. Session objects can therefore be thought of as mutex
12459 semaphores that lock virtual machines to prevent conflicting accesses from
12460 several processes.
12461
12462 How sessions objects are used depends on whether you use the Main API
12463 via COM or via the webservice:
12464
12465 <ul>
12466 <li>When using the COM API directly, an object of the Session class from the
12467 VirtualBox type library needs to be created. In regular COM C++ client code,
12468 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12469 This object will then act as a local session object in further calls to open
12470 a session.
12471 </li>
12472
12473 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12474 one session object automatically when <link to="IWebsessionManager::logon" />
12475 is called. A managed object reference to that session object can be retrieved by
12476 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12477 reference can then be used to open sessions.
12478 </li>
12479 </ul>
12480
12481 Sessions are mainly used in two variations:
12482
12483 <ul>
12484 <li>
12485 To start a virtual machine in a separate process, one would call
12486 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12487 object as its first parameter. This session then identifies the caller
12488 and lets him control the started machine (for example, pause machine
12489 execution or power it down) as well as be notified about machine
12490 execution state changes.
12491 </li>
12492
12493 <li>To alter machine settings, or to start machine execution within the
12494 current process, one needs to open a direct session for the machine first by
12495 calling <link to="IVirtualBox::openSession"/>. While a direct session
12496 is open within one process, no any other process may open another direct
12497 session for the same machine. This prevents the machine from being changed
12498 by other processes while it is running or while the machine is being configured.
12499 </li>
12500 </ul>
12501
12502 One also can attach to an existing direct session already opened by
12503 another process (for example, in order to send a control request to the
12504 virtual machine such as the pause or the reset request). This is done by
12505 calling <link to="IVirtualBox::openExistingSession"/>.
12506
12507 <note>
12508 Unless you are trying to write a new VirtualBox front-end that
12509 performs direct machine execution (like the VirtualBox or VBoxSDL
12510 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12511 session opened by <link to="IVirtualBox::openSession"/> and use this
12512 session only to change virtual machine settings. If you simply want to
12513 start virtual machine execution using one of the existing front-ends
12514 (for example the VirtualBox GUI or headless server), simply use
12515 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12516 will power up the machine automatically for you.
12517 </note>
12518 </desc>
12519
12520 <attribute name="state" type="SessionState" readonly="yes">
12521 <desc>Current state of this session.</desc>
12522 </attribute>
12523
12524 <attribute name="type" type="SessionType" readonly="yes">
12525 <desc>
12526 Type of this session. The value of this attribute is valid only
12527 if the session is currently open (i.e. its #state is
12528 SessionType_SessionOpen), otherwise an error will be returned.
12529 </desc>
12530 </attribute>
12531
12532 <attribute name="machine" type="IMachine" readonly="yes">
12533 <desc>Machine object associated with this session.</desc>
12534 </attribute>
12535
12536 <attribute name="console" type="IConsole" readonly="yes">
12537 <desc>Console object associated with this session.</desc>
12538 </attribute>
12539
12540 <method name="close">
12541 <desc>
12542 Closes a session that was previously opened.
12543
12544 It is recommended that every time an "open session" method (such as
12545 <link to="IVirtualBox::openRemoteSession" /> or
12546 <link to="IVirtualBox::openSession" />) has been called to
12547 manipulate a virtual machine, the caller invoke
12548 ISession::close() when it's done doing so. Since sessions are
12549 serialization primitives much like ordinary mutexes, they are
12550 best used the same way: for each "open" call, there should be
12551 a matching "close" call, even when errors occur.
12552
12553 Otherwise, if a direct session for a machine opened with
12554 <link to="IVirtualBox::openSession"/> is not explicitly closed
12555 when the application terminates, the state of the machine will
12556 be set to <link to="MachineState_Aborted" /> on the server.
12557
12558 Generally, it is recommended to close all open sessions explicitly
12559 before terminating the application (regardless of the reason for
12560 the termination).
12561
12562 <note>
12563 Do not expect the session state (<link to="ISession::state" />
12564 to return to "Closed" immediately after you invoke
12565 ISession::close(), particularly if you have started a remote
12566 session to execute the VM in a new process. The session state will
12567 automatically return to "Closed" once the VM is no longer executing,
12568 which can of course take a very long time.
12569 </note>
12570
12571 <result name="E_UNEXPECTED">
12572 Session is not open.
12573 </result>
12574
12575 </desc>
12576 </method>
12577
12578 </interface>
12579
12580 <!--
12581 // IStorageController
12582 /////////////////////////////////////////////////////////////////////////
12583 -->
12584
12585 <enum
12586 name="StorageBus"
12587 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12588 >
12589 <desc>
12590 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12591 see <link to="IStorageController::bus" />.
12592 </desc>
12593 <const name="Null" value="0">
12594 <desc>@c null value. Never used by the API.</desc>
12595 </const>
12596 <const name="IDE" value="1"/>
12597 <const name="SATA" value="2"/>
12598 <const name="SCSI" value="3"/>
12599 <const name="Floppy" value="4"/>
12600 </enum>
12601
12602 <enum
12603 name="StorageControllerType"
12604 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12605 >
12606 <desc>
12607 The exact variant of storage controller hardware presented
12608 to the guest; see <link to="IStorageController::controllerType" />.
12609 </desc>
12610
12611 <const name="Null" value="0">
12612 <desc>@c null value. Never used by the API.</desc>
12613 </const>
12614 <const name="LsiLogic" value="1">
12615 <desc>A SCSI controller of the LsiLogic variant.</desc>
12616 </const>
12617 <const name="BusLogic" value="2">
12618 <desc>A SCSI controller of the BusLogic variant.</desc>
12619 </const>
12620 <const name="IntelAhci" value="3">
12621 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12622 </const>
12623 <const name="PIIX3" value="4">
12624 <desc>An IDE controller of the PIIX3 variant.</desc>
12625 </const>
12626 <const name="PIIX4" value="5">
12627 <desc>An IDE controller of the PIIX4 variant.</desc>
12628 </const>
12629 <const name="ICH6" value="6">
12630 <desc>An IDE controller of the ICH6 variant.</desc>
12631 </const>
12632 <const name="I82078" value="7">
12633 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12634 </const>
12635 </enum>
12636
12637 <interface
12638 name="IStorageController" extends="$unknown"
12639 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12640 wsmap="managed"
12641 >
12642 <desc>
12643 Represents a storage controller that is attached to a virtual machine
12644 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12645 attached to storage controllers in a real computer, virtual media
12646 (represented by <link to="IMedium" />) are attached to virtual
12647 storage controllers, represented by this interface.
12648
12649 As opposed to physical hardware, VirtualBox has a very generic concept
12650 of a storage controller, and for purposes of the Main API, all virtual
12651 storage is attached to virtual machines via instances of this interface.
12652 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12653 and Floppy (see <link to="#bus" />). Depending on which of these four is
12654 used, certain sub-types may be available and can be selected in
12655 <link to="#controllerType" />.
12656
12657 Depending on these settings, the guest operating system might see
12658 significantly different virtual hardware.
12659 </desc>
12660
12661 <attribute name="name" type="wstring" readonly="yes">
12662 <desc>
12663 Name of the storage controller, as originally specified with
12664 <link to="IMachine::addStorageController" />. This then uniquely
12665 identifies this controller with other method calls such as
12666 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12667 </desc>
12668 </attribute>
12669
12670 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12671 <desc>
12672 Maximum number of devices which can be attached to one port.
12673 </desc>
12674 </attribute>
12675
12676 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12677 <desc>
12678 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12679 </desc>
12680 </attribute>
12681
12682 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12683 <desc>
12684 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12685 </desc>
12686 </attribute>
12687
12688 <attribute name="instance" type="unsigned long">
12689 <desc>
12690 The instance number of the device in the running VM.
12691 </desc>
12692 </attribute>
12693
12694 <attribute name="portCount" type="unsigned long">
12695 <desc>
12696 The number of currently usable ports on the controller.
12697 The minimum and maximum number of ports for one controller are
12698 stored in <link to="IStorageController::minPortCount"/>
12699 and <link to="IStorageController::maxPortCount"/>.
12700 </desc>
12701 </attribute>
12702
12703 <attribute name="bus" type="StorageBus" readonly="yes">
12704 <desc>
12705 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12706 </desc>
12707 </attribute>
12708
12709 <attribute name="controllerType" type="StorageControllerType">
12710 <desc>
12711 The exact variant of storage controller hardware presented
12712 to the guest.
12713 Depending on this value, VirtualBox will provide a different
12714 virtual storage controller hardware to the guest.
12715 For SATA and floppy controllers, only one variant is available,
12716 but for IDE and SCSI, there are several.
12717
12718 For SCSI controllers, the default type is LsiLogic.
12719 </desc>
12720 </attribute>
12721
12722 <method name="GetIDEEmulationPort">
12723 <desc>
12724 Gets the corresponding port number which is emulated as an IDE device.
12725 Works only with SATA controllers.
12726
12727 <result name="E_INVALIDARG">
12728 The @a devicePosition is not in the range 0 to 3.
12729 </result>
12730 <result name="E_NOTIMPL">
12731 The storage controller type is not SATAIntelAhci.
12732 </result>
12733
12734 </desc>
12735 <param name="devicePosition" type="long" dir="in"/>
12736 <param name="portNumber" type="long" dir="return"/>
12737 </method>
12738
12739 <method name="SetIDEEmulationPort">
12740 <desc>
12741 Sets the port number which is emulated as an IDE device.
12742 Works only with SATA controllers.
12743
12744 <result name="E_INVALIDARG">
12745 The @a devicePosition is not in the range 0 to 3 or the
12746 @a portNumber is not in the range 0 to 29.
12747 </result>
12748 <result name="E_NOTIMPL">
12749 The storage controller type is not SATAIntelAhci.
12750 </result>
12751
12752 </desc>
12753 <param name="devicePosition" type="long" dir="in"/>
12754 <param name="portNumber" type="long" dir="in"/>
12755 </method>
12756
12757 </interface>
12758
12759<if target="wsdl">
12760
12761 <!--
12762 // IManagedObjectRef
12763 /////////////////////////////////////////////////////////////////////////
12764 -->
12765
12766 <interface
12767 name="IManagedObjectRef" extends="$unknown"
12768 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12769 internal="yes"
12770 wsmap="managed"
12771 wscpp="hardcoded"
12772 >
12773 <desc>
12774 Managed object reference.
12775
12776 Only within the webservice, a managed object reference (which is really
12777 an opaque number) allows a webservice client to address an object
12778 that lives in the address space of the webservice server.
12779
12780 Behind each managed object reference, there is a COM object that lives
12781 in the webservice server's address space. The COM object is not freed
12782 until the managed object reference is released, either by an explicit
12783 call to <link to="IManagedObjectRef::release" /> or by logging off from
12784 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12785 all objects created during the webservice session.
12786
12787 Whenever a method call of the VirtualBox API returns a COM object, the
12788 webservice representation of that method will instead return a
12789 managed object reference, which can then be used to invoke methods
12790 on that object.
12791 </desc>
12792
12793 <method name="getInterfaceName">
12794 <desc>
12795 Returns the name of the interface that this managed object represents,
12796 for example, "IMachine", as a string.
12797 </desc>
12798 <param name="return" type="wstring" dir="return"/>
12799 </method>
12800
12801 <method name="release">
12802 <desc>
12803 Releases this managed object reference and frees the resources that
12804 were allocated for it in the webservice server process. After calling
12805 this method, the identifier of the reference can no longer be used.
12806 </desc>
12807 </method>
12808
12809 </interface>
12810
12811 <!--
12812 // IWebsessionManager
12813 /////////////////////////////////////////////////////////////////////////
12814 -->
12815
12816 <interface
12817 name="IWebsessionManager" extends="$unknown"
12818 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12819 internal="yes"
12820 wsmap="global"
12821 wscpp="hardcoded"
12822 >
12823 <desc>
12824 Websession manager. This provides essential services
12825 to webservice clients.
12826 </desc>
12827 <method name="logon">
12828 <desc>
12829 Logs a new client onto the webservice and returns a managed object reference to
12830 the IVirtualBox instance, which the client can then use as a basis to further
12831 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12832 interface, in one way or the other.
12833 </desc>
12834 <param name="username" type="wstring" dir="in"/>
12835 <param name="password" type="wstring" dir="in"/>
12836 <param name="return" type="IVirtualBox" dir="return"/>
12837 </method>
12838
12839 <method name="getSessionObject">
12840 <desc>
12841 Returns a managed object reference to the internal ISession object that was created
12842 for this web service session when the client logged on.
12843
12844 <see>ISession</see>
12845 </desc>
12846 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12847 <param name="return" type="ISession" dir="return"/>
12848 </method>
12849
12850 <method name="logoff">
12851 <desc>
12852 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12853 and destroys all resources associated with the session (most importantly, all
12854 managed objects created in the server while the session was active).
12855 </desc>
12856 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12857 </method>
12858
12859 </interface>
12860
12861</if>
12862
12863 <!--
12864 // IPerformanceCollector & friends
12865 /////////////////////////////////////////////////////////////////////////
12866 -->
12867
12868 <interface
12869 name="IPerformanceMetric" extends="$unknown"
12870 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12871 >
12872 <desc>
12873 The IPerformanceMetric interface represents parameters of the given
12874 performance metric.
12875 </desc>
12876
12877 <attribute name="metricName" type="wstring" readonly="yes">
12878 <desc>
12879 Name of the metric.
12880 </desc>
12881 </attribute>
12882
12883 <attribute name="object" type="$unknown" readonly="yes">
12884 <desc>
12885 Object this metric belongs to.
12886 </desc>
12887 </attribute>
12888
12889 <attribute name="description" type="wstring" readonly="yes">
12890 <desc>
12891 Textual description of the metric.
12892 </desc>
12893 </attribute>
12894
12895 <attribute name="period" type="unsigned long" readonly="yes">
12896 <desc>
12897 Time interval between samples, measured in seconds.
12898 </desc>
12899 </attribute>
12900
12901 <attribute name="count" type="unsigned long" readonly="yes">
12902 <desc>
12903 Number of recent samples retained by the performance collector for this
12904 metric.
12905
12906 When the collected sample count exceeds this number, older samples
12907 are discarded.
12908 </desc>
12909 </attribute>
12910
12911 <attribute name="unit" type="wstring" readonly="yes">
12912 <desc>
12913 Unit of measurement.
12914 </desc>
12915 </attribute>
12916
12917 <attribute name="minimumValue" type="long" readonly="yes">
12918 <desc>
12919 Minimum possible value of this metric.
12920 </desc>
12921 </attribute>
12922
12923 <attribute name="maximumValue" type="long" readonly="yes">
12924 <desc>
12925 Maximum possible value of this metric.
12926 </desc>
12927 </attribute>
12928 </interface>
12929
12930 <interface
12931 name="IPerformanceCollector" extends="$unknown"
12932 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12933 wsmap="managed"
12934 >
12935 <desc>
12936 The IPerformanceCollector interface represents a service that collects and
12937 stores performance metrics data.
12938
12939 Performance metrics are associated with objects of interfaces like IHost and
12940 IMachine. Each object has a distinct set of performance metrics.
12941 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12942
12943 Metric data is collected at the specified intervals and is retained
12944 internally. The interval and the number of retained samples can be set
12945 with <link to="IPerformanceCollector::setupMetrics" />.
12946
12947 Metrics are organized hierarchically, with each level separated by a
12948 slash (/) character. Generally, the scheme for metric names is like this:
12949
12950 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12951
12952 "Category/Metric" together form the base metric name. A base metric is the
12953 smallest unit for which a sampling interval and the number of retained
12954 samples can be set. Only base metrics can be enabled and disabled. All
12955 sub-metrics are collected when their base metric is collected.
12956 Collected values for any set of sub-metrics can be queried with
12957 <link to="IPerformanceCollector::queryMetricsData" />.
12958
12959 For example "CPU/Load/User:avg"
12960 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12961 "average" aggregate. An aggregate function is computed over all retained
12962 data. Valid aggregate functions are:
12963
12964 <ul>
12965 <li>avg -- average</li>
12966 <li>min -- minimum</li>
12967 <li>max -- maximum</li>
12968 </ul>
12969
12970 When setting up
12971 metric parameters, querying metric data, enabling or disabling metrics
12972 wildcards can be used in metric names to specify a subset of metrics. For
12973 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12974 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12975 values without aggregates <tt>*:</tt> can be used.
12976
12977 The valid names for base metrics are:
12978
12979 <ul>
12980 <li>CPU/Load</li>
12981 <li>CPU/MHz</li>
12982 <li>RAM/Usage</li>
12983 </ul>
12984
12985 The general sequence for collecting and retrieving the metrics is:
12986 <ul>
12987 <li>
12988 Obtain an instance of IPerformanceCollector with
12989 <link to="IVirtualBox::performanceCollector" />
12990 </li>
12991 <li>
12992 Allocate and populate an array with references to objects the metrics
12993 will be collected for. Use references to IHost and IMachine objects.
12994 </li>
12995 <li>
12996 Allocate and populate an array with base metric names the data will be
12997 collected for.
12998 </li>
12999 <li>
13000 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13001 metric data will be collected and stored.
13002 </li>
13003 <li>
13004 Wait for the data to get collected.
13005 </li>
13006 <li>
13007 Allocate and populate an array with references to objects the metric
13008 values will be queried for. You can re-use the object array used for
13009 setting base metrics.
13010 </li>
13011 <li>
13012 Allocate and populate an array with metric names the data will be
13013 collected for. Note that metric names differ from base metric names.
13014 </li>
13015 <li>
13016 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13017 have been collected so far are returned. Note that the values are still
13018 retained internally and data collection continues.
13019 </li>
13020 </ul>
13021
13022 For an example of usage refer to the following files in VirtualBox SDK:
13023 <ul>
13024 <li>
13025 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13026 </li>
13027 <li>
13028 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13029 </li>
13030 </ul>
13031 </desc>
13032
13033 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13034 <desc>
13035 Array of unique names of metrics.
13036
13037 This array represents all metrics supported by the performance
13038 collector. Individual objects do not necessarily support all of them.
13039 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13040 list of supported metrics for a particular object.
13041 </desc>
13042 </attribute>
13043
13044 <method name="getMetrics">
13045 <desc>
13046 Returns parameters of specified metrics for a set of objects.
13047 <note>
13048 @c Null metrics array means all metrics. @c Null object array means
13049 all existing objects.
13050 </note>
13051 </desc>
13052 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13053 <desc>
13054 Metric name filter. Currently, only a comma-separated list of metrics
13055 is supported.
13056 </desc>
13057 </param>
13058 <param name="objects" type="$unknown" dir="in" safearray="yes">
13059 <desc>
13060 Set of objects to return metric parameters for.
13061 </desc>
13062 </param>
13063 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13064 <desc>
13065 Array of returned metric parameters.
13066 </desc>
13067 </param>
13068 </method>
13069
13070 <method name="setupMetrics">
13071 <desc>
13072 Sets parameters of specified base metrics for a set of objects. Returns
13073 an array of <link to="IPerformanceMetric" /> describing the metrics have
13074 been affected.
13075 <note>
13076 @c Null or empty metric name array means all metrics. @c Null or empty
13077 object array means all existing objects. If metric name array contains
13078 a single element and object array contains many, the single metric
13079 name array element is applied to each object array element to form
13080 metric/object pairs.
13081 </note>
13082 </desc>
13083 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13084 <desc>
13085 Metric name filter. Comma-separated list of metrics with wildcard
13086 support.
13087 </desc>
13088 </param>
13089 <param name="objects" type="$unknown" dir="in" safearray="yes">
13090 <desc>
13091 Set of objects to setup metric parameters for.
13092 </desc>
13093 </param>
13094 <param name="period" type="unsigned long" dir="in">
13095 <desc>
13096 Time interval in seconds between two consecutive samples of performance
13097 data.
13098 </desc>
13099 </param>
13100 <param name="count" type="unsigned long" dir="in">
13101 <desc>
13102 Number of samples to retain in performance data history. Older samples
13103 get discarded.
13104 </desc>
13105 </param>
13106 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13107 <desc>
13108 Array of metrics that have been modified by the call to this method.
13109 </desc>
13110 </param>
13111 </method>
13112
13113 <method name="enableMetrics">
13114 <desc>
13115 Turns on collecting specified base metrics. Returns an array of
13116 <link to="IPerformanceMetric" /> describing the metrics have been
13117 affected.
13118 <note>
13119 @c Null or empty metric name array means all metrics. @c Null or empty
13120 object array means all existing objects. If metric name array contains
13121 a single element and object array contains many, the single metric
13122 name array element is applied to each object array element to form
13123 metric/object pairs.
13124 </note>
13125 </desc>
13126 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13127 <desc>
13128 Metric name filter. Comma-separated list of metrics with wildcard
13129 support.
13130 </desc>
13131 </param>
13132 <param name="objects" type="$unknown" dir="in" safearray="yes">
13133 <desc>
13134 Set of objects to enable metrics for.
13135 </desc>
13136 </param>
13137 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13138 <desc>
13139 Array of metrics that have been modified by the call to this method.
13140 </desc>
13141 </param>
13142 </method>
13143
13144 <method name="disableMetrics">
13145 <desc>
13146 Turns off collecting specified base metrics. Returns an array of
13147 <link to="IPerformanceMetric" /> describing the metrics have been
13148 affected.
13149 <note>
13150 @c Null or empty metric name array means all metrics. @c Null or empty
13151 object array means all existing objects. If metric name array contains
13152 a single element and object array contains many, the single metric
13153 name array element is applied to each object array element to form
13154 metric/object pairs.
13155 </note>
13156 </desc>
13157 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13158 <desc>
13159 Metric name filter. Comma-separated list of metrics with wildcard
13160 support.
13161 </desc>
13162 </param>
13163 <param name="objects" type="$unknown" dir="in" safearray="yes">
13164 <desc>
13165 Set of objects to disable metrics for.
13166 </desc>
13167 </param>
13168 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13169 <desc>
13170 Array of metrics that have been modified by the call to this method.
13171 </desc>
13172 </param>
13173 </method>
13174
13175 <method name="queryMetricsData">
13176 <desc>
13177 Queries collected metrics data for a set of objects.
13178
13179 The data itself and related metric information are returned in seven
13180 parallel and one flattened array of arrays. Elements of
13181 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13182 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13183 the same index describe one set of values corresponding to a single
13184 metric.
13185
13186 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13187 start and length of a sub-array is indicated by
13188 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13189 value for metric <tt>metricNames[i]</tt> is at
13190 <tt>returnData[returnIndices[i]]</tt>.
13191
13192 <note>
13193 @c Null or empty metric name array means all metrics. @c Null or empty
13194 object array means all existing objects. If metric name array contains
13195 a single element and object array contains many, the single metric
13196 name array element is applied to each object array element to form
13197 metric/object pairs.
13198 </note>
13199 <note>
13200 Data collection continues behind the scenes after call to
13201 @c queryMetricsData. The return data can be seen as the snapshot of
13202 the current state at the time of @c queryMetricsData call. The
13203 internally kept metric values are not cleared by the call. This makes
13204 possible querying different subsets of metrics or aggregates with
13205 subsequent calls. If periodic querying is needed it is highly
13206 suggested to query the values with @c interval*count period to avoid
13207 confusion. This way a completely new set of data values will be
13208 provided by each query.
13209 </note>
13210 </desc>
13211 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13212 <desc>
13213 Metric name filter. Comma-separated list of metrics with wildcard
13214 support.
13215 </desc>
13216 </param>
13217 <param name="objects" type="$unknown" dir="in" safearray="yes">
13218 <desc>
13219 Set of objects to query metrics for.
13220 </desc>
13221 </param>
13222 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13223 <desc>
13224 Names of metrics returned in @c returnData.
13225 </desc>
13226 </param>
13227 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13228 <desc>
13229 Objects associated with metrics returned in @c returnData.
13230 </desc>
13231 </param>
13232 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13233 <desc>
13234 Units of measurement for each returned metric.
13235 </desc>
13236 </param>
13237 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13238 <desc>
13239 Divisor that should be applied to return values in order to get
13240 floating point values. For example:
13241 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13242 will retrieve the floating point value of i-th sample of the first
13243 metric.
13244 </desc>
13245 </param>
13246 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13247 <desc>
13248 Sequence numbers of the first elements of value sequences of particular metrics
13249 returned in @c returnData. For aggregate metrics it is the sequence number of
13250 the sample the aggregate started calculation from.
13251 </desc>
13252 </param>
13253 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13254 <desc>
13255 Indices of the first elements of value sequences of particular metrics
13256 returned in @c returnData.
13257 </desc>
13258 </param>
13259 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13260 <desc>
13261 Lengths of value sequences of particular metrics.
13262 </desc>
13263 </param>
13264 <param name="returnData" type="long" dir="return" safearray="yes">
13265 <desc>
13266 Flattened array of all metric data containing sequences of values for
13267 each metric.
13268 </desc>
13269 </param>
13270 </method>
13271
13272 </interface>
13273
13274 <module name="VBoxSVC" context="LocalServer">
13275 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13276 namespace="virtualbox.org">
13277 <interface name="IVirtualBox" default="yes"/>
13278 </class>
13279 </module>
13280
13281 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13282 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13283 namespace="virtualbox.org">
13284 <interface name="ISession" default="yes"/>
13285 </class>
13286 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13287 namespace="virtualbox.org">
13288 <interface name="ILocalOwner" default="yes"/>
13289 <interface name="IVirtualBoxCallback"/>
13290 <interface name="IConsoleCallback"/>
13291 </class>
13292 </module>
13293
13294</library>
13295
13296</idl>
13297
13298<!-- 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