VirtualBox

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

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

Interface changes require a UUID change (!)

  • Property svn:eol-style set to native
File size: 505.0 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="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Teleported" value="3">
619 <desc>
620 The machine was teleported to a different host (or process) and then
621 powered off. Take care when powering it on again may corrupt resources
622 it shares with the teleportation target (e.g. disk and network).
623 </desc>
624 </const>
625 <const name="Aborted" value="4">
626 <desc>
627 The process running the machine has terminated abnormally. This may
628 indicate a crash of the VM process in host execution context, or
629 the VM process has been terminated externally.
630 </desc>
631 </const>
632 <const name="Running" value="5">
633 <desc>
634 The machine is currently being executed.
635 <note internal="yes">
636 For whoever decides to touch this enum: In order to keep the
637 comparisons in the old source code valid, this state must immediately
638 precede the Paused state.
639 TODO: Lift this spectacularly wonderful restriction.
640 </note>
641 </desc>
642 </const>
643 <const name="Paused" value="6">
644 <desc>
645 Execution of the machine has been paused.
646 <note internal="yes">
647 For whoever decides to touch this enum: In order to keep the
648 comparisons in the old source code valid, this state must immediately
649 follow the Running state.
650 TODO: Lift this spectacularly wonderful restriction.
651 </note>
652 </desc>
653 </const>
654 <const name="Stuck" value="7">
655 <desc>
656 Execution of the machine has reached the "Guru Meditation"
657 condition. This indicates a severe error in the hypervisor itself.
658 <note internal="yes">
659 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
660 "Guru", perhaps? Or are there some other VMM states that are
661 intended to be lumped in here as well?
662 </note>
663 </desc>
664 </const>
665 <const name="Teleporting" value="8">
666 <desc>
667 The machine is about to be teleported to a different host or process.
668 It is possible to pause a machine in this state, but it will go to the
669 <link to="MachineState::PausedTeleporting"/> state and it will not be
670 possible to resume it again unless the teleportation fails.
671 </desc>
672 </const>
673 <const name="LiveSnapshotting" value="9">
674 <desc>
675 A live snapshot is being taken. The machine is running normally, but
676 some of the runtime configuration options are inaccessible. Also, if
677 paused while in this state it will transition to
678 <link to="MachineState::Saving"/> and it will not be resume the
679 execution until the snapshot operation has completed.
680 </desc>
681 </const>
682 <const name="Starting" value="10">
683 <desc>
684 Machine is being started after powering it on from a
685 zero execution state.
686 </desc>
687 </const>
688 <const name="Stopping" value="11">
689 <desc>
690 Machine is being normally stopped powering it off, or after the guest OS
691 has initiated a shutdown sequence.
692 </desc>
693 </const>
694 <const name="Saving" value="12">
695 <desc>
696 Machine is saving its execution state to a file, or an online
697 snapshot of the machine is being taken.
698 </desc>
699 </const>
700 <const name="Restoring" value="13">
701 <desc>
702 Execution state of the machine is being restored from a file
703 after powering it on from the saved execution state.
704 </desc>
705 </const>
706 <const name="TeleportingPausedVM" value="14">
707 <desc>
708 The machine is being teleported to another host or process, but it is
709 not running. This is the paused variant of the
710 <link to="MachineState::Teleporting"/> state.
711 </desc>
712 </const>
713 <const name="TeleportingIn" value="15">
714 <desc>
715 Teleporting the machine state in from another host or process.
716 </desc>
717 </const>
718 <const name="RestoringSnapshot" value="16">
719 <desc>
720 A machine snapshot is being restored; this typically does not take long.
721 </desc>
722 </const>
723 <const name="DeletingSnapshot" value="17">
724 <desc>
725 A machine snapshot is being deleted; this can take a long time since this
726 may require merging differencing media.
727 </desc>
728 </const>
729 <const name="SettingUp" value="18">
730 <desc>
731 Lengthy setup operation is in progress.
732 </desc>
733 </const>
734
735 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
736 <desc>
737 Pseudo-state: first online state (for use in relational expressions).
738 </desc>
739 </const>
740 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
741 <desc>
742 Pseudo-state: last online state (for use in relational expressions).
743 </desc>
744 </const>
745
746 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
747 <desc>
748 Pseudo-state: first transient state (for use in relational expressions).
749 </desc>
750 </const>
751 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
752 <desc>
753 Pseudo-state: last transient state (for use in relational expressions).
754 </desc>
755 </const>
756
757 </enum>
758
759 <enum
760 name="SessionState"
761 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
762 >
763 <desc>
764 Session state. This enumeration represents possible values of
765 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
766 attributes. See individual enumerator descriptions for the meaning for
767 every value.
768 </desc>
769
770 <const name="Null" value="0">
771 <desc>Null value (never used by the API).</desc>
772 </const>
773 <const name="Closed" value="1">
774 <desc>
775 The machine has no open sessions (<link to="IMachine::sessionState"/>);
776 the session is closed (<link to="ISession::state"/>)
777 </desc>
778 </const>
779 <const name="Open" value="2">
780 <desc>
781 The machine has an open direct session (<link to="IMachine::sessionState"/>);
782 the session is open (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Spawning" value="3">
786 <desc>
787 A new (direct) session is being opened for the machine as a result of
788 <link to="IVirtualBox::openRemoteSession"/> call
789 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
790 This state also occurs as a short transient state when a new direct
791 session is opened by calling <link to="IVirtualBox::openSession"/>.
792 </desc>
793 </const>
794 <const name="Closing" value="4">
795 <desc>
796 The direct session is being closed (<link to="IMachine::sessionState"/>);
797 the session is being closed (<link to="ISession::state"/>)
798 </desc>
799 </const>
800 </enum>
801
802 <enum
803 name="CpuPropertyType"
804 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
805 >
806 <desc>
807 Virtual CPU property type. This enumeration represents possible values of the
808 IMachine get- and setCpuProperty methods.
809 </desc>
810 <const name="Null" value="0">
811 <desc>Null value (never used by the API).</desc>
812 </const>
813 <const name="PAE" value="1">
814 <desc>
815 This setting determines whether VirtualBox will expose the Physical Address
816 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
817 is not available, it will not be reported.
818 </desc>
819 </const>
820 <const name="Synthetic" value="2">
821 <desc>
822 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
823 teleporting between host systems that differ significantly.
824 </desc>
825 </const>
826 </enum>
827
828
829 <enum
830 name="HWVirtExPropertyType"
831 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
832 >
833 <desc>
834 Hardware virtualization property type. This enumeration represents possible values
835 for the <link to="IMachine::getHWVirtExProperty"/> and
836 <link to="IMachine::setHWVirtExProperty"/> methods.
837 </desc>
838 <const name="Null" value="0">
839 <desc>Null value (never used by the API).</desc>
840 </const>
841 <const name="Enabled" value="1">
842 <desc>
843 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
844 such extensions are not available, they will not be used.
845 </desc>
846 </const>
847 <const name="Exclusive" value="2">
848 <desc>
849 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
850 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
851 feature of the host. To share these with other hypervisors, you must disable this property.
852 </desc>
853 </const>
854 <const name="VPID" value="3">
855 <desc>
856 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
857 </desc>
858 </const>
859 <const name="NestedPaging" value="4">
860 <desc>
861 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
862 </desc>
863 </const>
864 </enum>
865
866 <enum
867 name="SessionType"
868 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
869 >
870 <desc>
871 Session type. This enumeration represents possible values of the
872 <link to="ISession::type"/> attribute.
873 </desc>
874
875 <const name="Null" value="0">
876 <desc>Null value (never used by the API).</desc>
877 </const>
878 <const name="Direct" value="1">
879 <desc>
880 Direct session
881 (opened by <link to="IVirtualBox::openSession"/>)
882 </desc>
883 </const>
884 <const name="Remote" value="2">
885 <desc>
886 Remote session
887 (opened by <link to="IVirtualBox::openRemoteSession"/>)
888 </desc>
889 </const>
890 <const name="Existing" value="3">
891 <desc>
892 Existing session
893 (opened by <link to="IVirtualBox::openExistingSession"/>)
894 </desc>
895 </const>
896 </enum>
897
898 <enum
899 name="DeviceType"
900 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
901 >
902 <desc>
903 Device type.
904 </desc>
905 <const name="Null" value="0">
906 <desc>
907 Null value, may also mean "no device" (not allowed for
908 <link to="IConsole::getDeviceActivity"/>).
909 </desc>
910 </const>
911 <const name="Floppy" value="1">
912 <desc>Floppy device.</desc>
913 </const>
914 <const name="DVD" value="2">
915 <desc>CD/DVD-ROM device.</desc>
916 </const>
917 <const name="HardDisk" value="3">
918 <desc>Hard disk device.</desc>
919 </const>
920 <const name="Network" value="4">
921 <desc>Network device.</desc>
922 </const>
923 <const name="USB" value="5">
924 <desc>USB device.</desc>
925 </const>
926 <const name="SharedFolder" value="6">
927 <desc>Shared folder device.</desc>
928 </const>
929 </enum>
930
931 <enum
932 name="DeviceActivity"
933 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
934 >
935 <desc>
936 Device activity for <link to="IConsole::getDeviceActivity"/>.
937 </desc>
938
939 <const name="Null" value="0"/>
940 <const name="Idle" value="1"/>
941 <const name="Reading" value="2"/>
942 <const name="Writing" value="3"/>
943 </enum>
944
945 <enum
946 name="ClipboardMode"
947 uuid="33364716-4008-4701-8f14-be0fa3d62950"
948 >
949 <desc>
950 Host-Guest clipboard interchange mode.
951 </desc>
952
953 <const name="Disabled" value="0"/>
954 <const name="HostToGuest" value="1"/>
955 <const name="GuestToHost" value="2"/>
956 <const name="Bidirectional" value="3"/>
957 </enum>
958
959 <enum
960 name="Scope"
961 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
962 >
963 <desc>
964 Scope of the operation.
965
966 A generic enumeration used in various methods to define the action or
967 argument scope.
968 </desc>
969
970 <const name="Global" value="0"/>
971 <const name="Machine" value="1"/>
972 <const name="Session" value="2"/>
973 </enum>
974
975 <enum
976 name="GuestStatisticType"
977 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
978 >
979 <desc>
980 Statistics type for <link to="IGuest::getStatistic"/>.
981 </desc>
982
983 <const name="CPULoad_Idle" value="0">
984 <desc>
985 Idle CPU load (0-100%) for last interval.
986 </desc>
987 </const>
988 <const name="CPULoad_Kernel" value="1">
989 <desc>
990 Kernel CPU load (0-100%) for last interval.
991 </desc>
992 </const>
993 <const name="CPULoad_User" value="2">
994 <desc>
995 User CPU load (0-100%) for last interval.
996 </desc>
997 </const>
998 <const name="Threads" value="3">
999 <desc>
1000 Total number of threads in the system.
1001 </desc>
1002 </const>
1003 <const name="Processes" value="4">
1004 <desc>
1005 Total number of processes in the system.
1006 </desc>
1007 </const>
1008 <const name="Handles" value="5">
1009 <desc>
1010 Total number of handles in the system.
1011 </desc>
1012 </const>
1013 <const name="MemoryLoad" value="6">
1014 <desc>
1015 Memory load (0-100%).
1016 </desc>
1017 </const>
1018 <const name="PhysMemTotal" value="7">
1019 <desc>
1020 Total physical memory in megabytes.
1021 </desc>
1022 </const>
1023 <const name="PhysMemAvailable" value="8">
1024 <desc>
1025 Free physical memory in megabytes.
1026 </desc>
1027 </const>
1028 <const name="PhysMemBalloon" value="9">
1029 <desc>
1030 Ballooned physical memory in megabytes.
1031 </desc>
1032 </const>
1033 <const name="MemCommitTotal" value="10">
1034 <desc>
1035 Total amount of memory in the committed state in megabytes.
1036 </desc>
1037 </const>
1038 <const name="MemKernelTotal" value="11">
1039 <desc>
1040 Total amount of memory used by the guest OS's kernel in megabytes.
1041 </desc>
1042 </const>
1043 <const name="MemKernelPaged" value="12">
1044 <desc>
1045 Total amount of paged memory used by the guest OS's kernel in megabytes.
1046 </desc>
1047 </const>
1048 <const name="MemKernelNonpaged" value="13">
1049 <desc>
1050 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1051 </desc>
1052 </const>
1053 <const name="MemSystemCache" value="14">
1054 <desc>
1055 Total amount of memory used by the guest OS's system cache in megabytes.
1056 </desc>
1057 </const>
1058 <const name="PageFileSize" value="15">
1059 <desc>
1060 Pagefile size in megabytes.
1061 </desc>
1062 </const>
1063 <const name="SampleNumber" value="16">
1064 <desc>
1065 Statistics sample number
1066 </desc>
1067 </const>
1068 <const name="MaxVal" value="17"/>
1069 </enum>
1070
1071 <enum
1072 name="BIOSBootMenuMode"
1073 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1074 >
1075 <desc>
1076 BIOS boot menu mode.
1077 </desc>
1078
1079 <const name="Disabled" value="0"/>
1080 <const name="MenuOnly" value="1"/>
1081 <const name="MessageAndMenu" value="2"/>
1082 </enum>
1083
1084 <enum
1085 name="ProcessorFeature"
1086 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1087 >
1088 <desc>
1089 CPU features.
1090 </desc>
1091
1092 <const name="HWVirtEx" value="0"/>
1093 <const name="PAE" value="1"/>
1094 <const name="LongMode" value="2"/>
1095 <const name="NestedPaging" value="3"/>
1096 </enum>
1097
1098 <enum
1099 name="FirmwareType"
1100 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1101 >
1102 <desc>
1103 Firmware type.
1104 </desc>
1105 <const name="BIOS" value="1">
1106 <desc>BIOS Firmware.</desc>
1107 </const>
1108 <const name="EFI" value="2">
1109 <desc>Efi firmware, 32-bit.</desc>
1110 </const>
1111 <const name="EFI64" value="3">
1112 <desc>Efi firmware, 64-bit.</desc>
1113 </const>
1114 <const name="EFIDUAL" value="4">
1115 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1116 </const>
1117 </enum>
1118
1119 <!--
1120 // IVirtualBoxErrorInfo
1121 /////////////////////////////////////////////////////////////////////////
1122 -->
1123
1124 <interface
1125 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1126 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1127 supportsErrorInfo="no"
1128 wsmap="managed"
1129 >
1130 <desc>
1131 The IVirtualBoxErrorInfo interface represents extended error information.
1132
1133 Extended error information can be set by VirtualBox components after
1134 unsuccessful or partially successful method invocation. This information
1135 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1136 and then shown to the client in addition to the plain 32-bit result code.
1137
1138 In MS COM, this interface extends the IErrorInfo interface,
1139 in XPCOM, it extends the nsIException interface. In both cases,
1140 it provides a set of common attributes to retrieve error
1141 information.
1142
1143 Sometimes invocation of some component's method may involve methods of
1144 other components that may also fail (independently of this method's
1145 failure), or a series of non-fatal errors may precede a fatal error that
1146 causes method failure. In cases like that, it may be desirable to preserve
1147 information about all errors happened during method invocation and deliver
1148 it to the caller. The <link to="#next"/> attribute is intended
1149 specifically for this purpose and allows to represent a chain of errors
1150 through a single IVirtualBoxErrorInfo object set after method invocation.
1151
1152 Note that errors are stored to a chain in the reverse order, i.e. the
1153 initial error object you query right after method invocation is the last
1154 error set by the callee, the object it points to in the @a next attribute
1155 is the previous error and so on, up to the first error (which is the last
1156 in the chain).
1157 </desc>
1158
1159 <attribute name="resultCode" type="long" readonly="yes">
1160 <desc>
1161 Result code of the error.
1162 Usually, it will be the same as the result code returned
1163 by the method that provided this error information, but not
1164 always. For example, on Win32, CoCreateInstance() will most
1165 likely return E_NOINTERFACE upon unsuccessful component
1166 instantiation attempt, but not the value the component factory
1167 returned. Value is typed 'long', not 'result',
1168 to make interface usable from scripting languages.
1169 <note>
1170 In MS COM, there is no equivalent.
1171 In XPCOM, it is the same as nsIException::result.
1172 </note>
1173 </desc>
1174 </attribute>
1175
1176 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1177 <desc>
1178 UUID of the interface that defined the error.
1179 <note>
1180 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1181 data type.
1182 In XPCOM, there is no equivalent.
1183 </note>
1184 </desc>
1185 </attribute>
1186
1187 <attribute name="component" type="wstring" readonly="yes">
1188 <desc>
1189 Name of the component that generated the error.
1190 <note>
1191 In MS COM, it is the same as IErrorInfo::GetSource.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="text" type="wstring" readonly="yes">
1198 <desc>
1199 Text description of the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetDescription.
1202 In XPCOM, it is the same as nsIException::message.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1208 <desc>
1209 Next error object if there is any, or @c null otherwise.
1210 <note>
1211 In MS COM, there is no equivalent.
1212 In XPCOM, it is the same as nsIException::inner.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 </interface>
1218
1219 <interface
1220 name="ILocalOwner" extends="$dispatched"
1221 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1222 >
1223 <desc>
1224 The ILocalOwner interface allows to register local objects
1225 (created without COM calls, but with new()).
1226 Once registered, calls to methods of such objects can be made
1227 from remote COM processes.
1228 The main usecase is the event callback implementation where
1229 API clients provide callback objects.
1230 </desc>
1231 <method name="setLocalObject">
1232 <desc>
1233 Set local object.
1234 </desc>
1235 <param name="object" type="$unknown" dir="in">
1236 <desc>Local object to forward requests to.
1237 If null, clears currently set local object.</desc>
1238 </param>
1239 </method>
1240 </interface>
1241
1242 <!--
1243 // IVirtualBox
1244 /////////////////////////////////////////////////////////////////////////
1245 -->
1246
1247 <interface
1248 name="IVirtualBoxCallback" extends="$unknown"
1249 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1250 wsmap="suppress"
1251 >
1252
1253 <method name="onMachineStateChange">
1254 <desc>
1255 The execution state of the given machine has changed.
1256 <see>IMachine::state</see>
1257 </desc>
1258 <param name="machineId" type="uuid" mod="string" dir="in">
1259 <desc>ID of the machine this event relates to.</desc>
1260 </param>
1261 <param name="state" type="MachineState" dir="in">
1262 <desc>New execution state.</desc>
1263 </param>
1264 </method>
1265
1266 <method name="onMachineDataChange">
1267 <desc>
1268 Any of the settings of the given machine has changed.
1269 </desc>
1270 <param name="machineId" type="uuid" mod="string" dir="in">
1271 <desc>ID of the machine this event relates to.</desc>
1272 </param>
1273 </method>
1274
1275 <method name="onExtraDataCanChange">
1276 <desc>
1277 Notification when someone tries to change extra data for
1278 either the given machine or (if @c null) global extra data.
1279 This gives the chance to veto against changes.
1280 </desc>
1281 <param name="machineId" type="uuid" mod="string" dir="in">
1282 <desc>
1283 ID of the machine this event relates to
1284 (@c null ID for global extra data change requests).
1285 </desc>
1286 </param>
1287 <param name="key" type="wstring" dir="in">
1288 <desc>
1289 Extra data key for the attempted write.
1290 </desc>
1291 </param>
1292 <param name="value" type="wstring" dir="in">
1293 <desc>
1294 Extra data value for the given key.
1295 </desc>
1296 </param>
1297 <param name="error" type="wstring" dir="out">
1298 <desc>
1299 Optional error message describing the reason of the
1300 veto (ignored if this notification returns @c true).
1301 </desc>
1302 </param>
1303 <param name="allowChange" type="boolean" dir="return">
1304 <desc>
1305 Flag to indicate whether the callee agrees (@c true)
1306 or vetoes against the change (@c false).
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="onExtraDataChange">
1312 <desc>
1313 Notification when machine specific or global extra data
1314 has changed.
1315 </desc>
1316 <param name="machineId" type="uuid" mod="string" dir="in">
1317 <desc>
1318 ID of the machine this event relates to.
1319 Null for global extra data changes.
1320 </desc>
1321 </param>
1322 <param name="key" type="wstring" dir="in">
1323 <desc>
1324 Extra data key that has changed.
1325 </desc>
1326 </param>
1327 <param name="value" type="wstring" dir="in">
1328 <desc>
1329 Extra data value for the given key.
1330 </desc>
1331 </param>
1332 </method>
1333
1334 <method name="onMediumRegistered">
1335 <desc>
1336 The given medium was registered or unregistered
1337 within this VirtualBox installation.
1338
1339 The @a mediumType parameter describes what type of
1340 medium the specified @a mediumId refers to. Possible
1341 values are:
1342
1343 <ul>
1344 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1345 that, if registered, can be obtained using the
1346 <link to="IVirtualBox::getHardDisk"/> call.</li>
1347 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1348 that, if registered, can be obtained using the
1349 <link to="IVirtualBox::getDVDImage"/> call.</li>
1350 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1351 that, if registered, can be obtained using the
1352 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1353 </ul>
1354
1355 Note that if this is a deregistration notification,
1356 there is no way to access the object representing the
1357 unregistered medium. It is supposed that the
1358 application will do required cleanup based on the
1359 @a mediumId value.
1360 </desc>
1361 <param name="mediumId" type="uuid" mod="string" dir="in">
1362 <desc>ID of the medium this event relates to.</desc>
1363 </param>
1364 <param name="mediumType" type="DeviceType" dir="in">
1365 <desc>Type of the medium this event relates to.</desc>
1366 </param>
1367 <param name="registered" type="boolean" dir="in">
1368 <desc>
1369 If @c true, the medium was registered, otherwise it was
1370 unregistered.
1371 </desc>
1372 </param>
1373 </method>
1374
1375 <method name="onMachineRegistered">
1376 <desc>
1377 The given machine was registered or unregistered
1378 within this VirtualBox installation.
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="registered" type="boolean" dir="in">
1384 <desc>
1385 If @c true, the machine was registered, otherwise it was
1386 unregistered.
1387 </desc>
1388 </param>
1389 </method>
1390
1391 <method name="onSessionStateChange">
1392 <desc>
1393 The state of the session for the given machine was changed.
1394 <see>IMachine::sessionState</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="state" type="SessionState" dir="in">
1400 <desc>New session state.</desc>
1401 </param>
1402 </method>
1403
1404 <method name="onSnapshotTaken">
1405 <desc>
1406 A new snapshot of the machine has been taken.
1407 <see>ISnapshot</see>
1408 </desc>
1409 <param name="machineId" type="uuid" mod="string" dir="in">
1410 <desc>ID of the machine this event relates to.</desc>
1411 </param>
1412 <param name="snapshotId" type="uuid" mod="string" dir="in">
1413 <desc>ID of the new snapshot.</desc>
1414 </param>
1415 </method>
1416
1417 <method name="onSnapshotDiscarded">
1418 <desc>
1419 Snapshot of the given machine has been discarded.
1420
1421 <note>
1422 This notification is delivered <b>after</b> the snapshot
1423 object has been uninitialized on the server (so that any
1424 attempt to call its methods will return an error).
1425 </note>
1426
1427 <see>ISnapshot</see>
1428 </desc>
1429 <param name="machineId" type="uuid" mod="string" dir="in">
1430 <desc>ID of the machine this event relates to.</desc>
1431 </param>
1432 <param name="snapshotId" type="uuid" mod="string" dir="in">
1433 <desc>
1434 ID of the discarded snapshot. @c null means the current machine
1435 state has been discarded (restored from the current snapshot).
1436 </desc>
1437 </param>
1438 </method>
1439
1440 <method name="onSnapshotChange">
1441 <desc>
1442 Snapshot properties (name and/or description) have been changed.
1443 <see>ISnapshot</see>
1444 </desc>
1445 <param name="machineId" type="uuid" mod="string" dir="in">
1446 <desc>ID of the machine this event relates to.</desc>
1447 </param>
1448 <param name="snapshotId" type="uuid" mod="string" dir="in">
1449 <desc>ID of the changed snapshot.</desc>
1450 </param>
1451 </method>
1452
1453 <method name="onGuestPropertyChange">
1454 <desc>
1455 Notification when a guest property has changed.
1456 </desc>
1457 <param name="machineId" type="uuid" mod="string" dir="in">
1458 <desc>
1459 ID of the machine this event relates to.
1460 </desc>
1461 </param>
1462 <param name="name" type="wstring" dir="in">
1463 <desc>
1464 The name of the property that has changed.
1465 </desc>
1466 </param>
1467 <param name="value" type="wstring" dir="in">
1468 <desc>
1469 The new property value.
1470 </desc>
1471 </param>
1472 <param name="flags" type="wstring" dir="in">
1473 <desc>
1474 The new property flags.
1475 </desc>
1476 </param>
1477 </method>
1478
1479 </interface>
1480
1481 <interface
1482 name="IDHCPServer" extends="$unknown"
1483 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1484 wsmap="managed"
1485 >
1486 <desc>
1487 The IDHCPServer interface represents the vbox dhcp server configuration.
1488
1489 To enumerate all the dhcp servers on the host, use the
1490 <link to="IVirtualBox::DHCPServers"/> attribute.
1491 </desc>
1492
1493 <attribute name="enabled" type="boolean">
1494 <desc>
1495 specifies if the dhcp server is enabled
1496 </desc>
1497 </attribute>
1498
1499 <attribute name="IPAddress" type="wstring" readonly="yes">
1500 <desc>
1501 specifies server IP
1502 </desc>
1503 </attribute>
1504
1505 <attribute name="networkMask" type="wstring" readonly="yes">
1506 <desc>
1507 specifies server network mask
1508 </desc>
1509 </attribute>
1510
1511 <attribute name="networkName" type="wstring" readonly="yes">
1512 <desc>
1513 specifies internal network name the server is used for
1514 </desc>
1515 </attribute>
1516
1517 <attribute name="lowerIP" type="wstring" readonly="yes">
1518 <desc>
1519 specifies from IP adrres in server address range
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="upperIP" type="wstring" readonly="yes">
1524 <desc>
1525 specifies to IP adrres in server address range
1526 </desc>
1527 </attribute>
1528
1529 <method name="setConfiguration">
1530 <desc>
1531 configures the server
1532 <result name="E_INVALIDARG">
1533 invalid configuration supplied
1534 </result>
1535 </desc>
1536 <param name="IPAddress" type="wstring" dir="in">
1537 <desc>
1538 server IP address
1539 </desc>
1540 </param>
1541 <param name="networkMask" type="wstring" dir="in">
1542 <desc>
1543 server network mask
1544 </desc>
1545 </param>
1546 <param name="FromIPAddress" type="wstring" dir="in">
1547 <desc>
1548 server From IP address for address range
1549 </desc>
1550 </param>
1551 <param name="ToIPAddress" type="wstring" dir="in">
1552 <desc>
1553 server To IP address for address range
1554 </desc>
1555 </param>
1556 </method>
1557
1558 <method name="start">
1559 <desc>
1560 Starts DHCP server process.
1561 <result name="E_FAIL">
1562 Failed to start the process.
1563 </result>
1564 </desc>
1565 <param name="networkName" type="wstring" dir="in">
1566 <desc>
1567 Name of internal network DHCP server should attach to.
1568 </desc>
1569 </param>
1570 <param name="trunkName" type="wstring" dir="in">
1571 <desc>
1572 Name of internal network trunk.
1573 </desc>
1574 </param>
1575 <param name="trunkType" type="wstring" dir="in">
1576 <desc>
1577 Type of internal network trunk.
1578 </desc>
1579 </param>
1580 </method>
1581
1582 <method name="stop">
1583 <desc>
1584 Stops DHCP server process.
1585 <result name="E_FAIL">
1586 Failed to stop the process.
1587 </result>
1588 </desc>
1589 </method>
1590 </interface>
1591
1592 <interface
1593 name="IVirtualBox" extends="$dispatched"
1594 uuid="cdc78bfb-f4f6-4ab6-aadf-0407ae12fe85"
1595 wsmap="managed"
1596 >
1597 <desc>
1598 The IVirtualBox interface represents the main interface exposed by the
1599 product that provides virtual machine management.
1600
1601 An instance of IVirtualBox is required for the product to do anything
1602 useful. Even though the interface does not expose this, internally,
1603 IVirtualBox is implemented as a singleton and actually lives in the
1604 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1605 IVirtualBox can track the state of all virtual machines on a particular
1606 host, regardless of which frontend started them.
1607
1608 To enumerate all the virtual machines on the host, use the
1609 <link to="IVirtualBox::machines"/> attribute.
1610 </desc>
1611
1612 <attribute name="version" type="wstring" readonly="yes">
1613 <desc>
1614 A string representing the version number of the product. The
1615 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1616 last number represents the build number and will frequently change.
1617 </desc>
1618 </attribute>
1619
1620 <attribute name="revision" type="unsigned long" readonly="yes">
1621 <desc>
1622 The internal build revision number of the product.
1623 </desc>
1624 </attribute>
1625
1626 <attribute name="packageType" type="wstring" readonly="yes">
1627 <desc>
1628 A string representing the package type of this product. The
1629 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1630 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1631 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1632 this.
1633 </desc>
1634 </attribute>
1635
1636 <attribute name="homeFolder" type="wstring" readonly="yes">
1637 <desc>
1638 Full path to the directory where the global settings file,
1639 <tt>VirtualBox.xml</tt>, is stored.
1640
1641 In this version of VirtualBox, the value of this property is
1642 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1643 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1644 as determined by the host OS), and cannot be changed.
1645
1646 This path is also used as the base to resolve relative paths in
1647 places where relative paths are allowed (unless otherwise
1648 expressly indicated).
1649 </desc>
1650 </attribute>
1651
1652 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1653 <desc>
1654 Full name of the global settings file.
1655 The value of this property corresponds to the value of
1656 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1657 </desc>
1658 </attribute>
1659
1660 <attribute name="host" type="IHost" readonly="yes">
1661 <desc>Associated host object.</desc>
1662 </attribute>
1663
1664 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1665 <desc>Associated system information object.</desc>
1666 </attribute>
1667
1668 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1669 <desc>
1670 Array of machine objects registered within this VirtualBox instance.
1671 </desc>
1672 </attribute>
1673
1674 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1675 <desc>
1676 Array of medium objects known to this VirtualBox installation.
1677
1678 This array contains only base media. All differencing
1679 media of the given base medium can be enumerated using
1680 <link to="IMedium::children"/>.
1681 </desc>
1682 </attribute>
1683
1684 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1685 <desc>
1686 Array of CD/DVD image objects registered with this VirtualBox instance.
1687 </desc>
1688 </attribute>
1689
1690 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1691 <desc>
1692 Array of floppy image objects registered with this VirtualBox instance.
1693 </desc>
1694 </attribute>
1695
1696 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1697
1698 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1699
1700 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1701 <desc>
1702 Collection of global shared folders. Global shared folders are
1703 available to all virtual machines.
1704
1705 New shared folders are added to the collection using
1706 <link to="#createSharedFolder"/>. Existing shared folders can be
1707 removed using <link to="#removeSharedFolder"/>.
1708
1709 <note>
1710 In the current version of the product, global shared folders are not
1711 implemented and therefore this collection is always empty.
1712 </note>
1713 </desc>
1714 </attribute>
1715
1716 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1717 <desc>
1718 Associated performance collector object.
1719 </desc>
1720 </attribute>
1721
1722 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1723 <desc>
1724 dhcp server settings.
1725 </desc>
1726 </attribute>
1727
1728 <method name="createMachine">
1729 <desc>
1730 Creates a new virtual machine.
1731
1732 The new machine is created unregistered, with the initial configuration
1733 set according to the specified guest OS type. A typical sequence of
1734 actions to create a new virtual machine is as follows:
1735
1736 <ol>
1737 <li>
1738 Call this method to have a new machine created. The returned machine
1739 object will be "mutable" allowing to change any machine property.
1740 </li>
1741
1742 <li>
1743 Configure the machine using the appropriate attributes and methods.
1744 </li>
1745
1746 <li>
1747 Call <link to="IMachine::saveSettings" /> to write the settings
1748 to the machine's XML settings file. The configuration of the newly
1749 created machine will not be saved to disk until this method is
1750 called.
1751 </li>
1752
1753 <li>
1754 Call <link to="#registerMachine" /> to add the machine to the list
1755 of machines known to VirtualBox.
1756 </li>
1757 </ol>
1758
1759 You should specify valid name for the newly created machine when calling
1760 this method. See the <link to="IMachine::name"/> attribute description
1761 for more details about the machine name.
1762
1763 The specified guest OS type identifier must match an ID of one of known
1764 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1765 array.
1766
1767 Every machine has a <i>settings file</i> that is used to store
1768 the machine configuration. This file is stored in a directory called the
1769 <i>machine settings subfolder</i>. Both the settings subfolder and file
1770 will have a name that corresponds to the name of the virtual machine.
1771 You can specify where to create the machine setting subfolder using the
1772 @a baseFolder argument. The base folder can be absolute (full path) or
1773 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1774 directory</link>.
1775
1776 If @a baseFolder is a @c null or empty string (which is recommended), the
1777 <link to="ISystemProperties::defaultMachineFolder">default machine
1778 settings folder</link> will be used as a base folder for the created
1779 machine. Otherwise the given base folder will be used. In either case,
1780 the full path to the resulting settings file has the following
1781 structure:
1782 <pre>
1783 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1784 </pre>
1785
1786 Note that if the resulting settings file already exists, this method
1787 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1788
1789 Optionally, you may specify an UUID of to assign to the created machine.
1790 However, this is not recommended and you should normally pass an empty
1791 (@c null) UUID to this method so that a new UUID will be automatically
1792 generated for every created machine. You can use UUID
1793 00000000-0000-0000-0000-000000000000 as @c null value.
1794
1795 <note>
1796 There is no way to change the name of the settings file or
1797 subfolder of the created machine directly.
1798 </note>
1799
1800 <result name="VBOX_E_OBJECT_NOT_FOUND">
1801 @a osTypeId is invalid.
1802 </result>
1803 <result name="VBOX_E_FILE_ERROR">
1804 Resulting settings file name is invalid or the settings file already
1805 exists or could not be created due to an I/O error.
1806 </result>
1807 <result name="E_INVALIDARG">
1808 @a name is empty or @c null.
1809 </result>
1810 </desc>
1811
1812 <param name="name" type="wstring" dir="in">
1813 <desc>Machine name.</desc>
1814 </param>
1815 <param name="osTypeId" type="wstring" dir="in">
1816 <desc>Guest OS Type ID.</desc>
1817 </param>
1818 <param name="baseFolder" type="wstring" dir="in">
1819 <desc>Base machine folder (optional).</desc>
1820 </param>
1821 <param name="id" type="uuid" mod="string" dir="in">
1822 <desc>Machine UUID (optional).</desc>
1823 </param>
1824 <param name="machine" type="IMachine" dir="return">
1825 <desc>Created machine object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="createLegacyMachine">
1830 <desc>
1831 Creates a new virtual machine in "legacy" mode, using the specified
1832 settings file to store machine settings.
1833
1834 As opposed to machines created by <link to="#createMachine"/>,
1835 the settings file of the machine created in "legacy" mode is not
1836 automatically renamed when the machine name is changed -- it will always
1837 remain the same as specified in this method call.
1838
1839 The specified settings file name can be absolute (full path) or relative
1840 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1841 directory</link>. If the file name doesn't contain an extension, the
1842 default extension (.xml) will be appended.
1843
1844 Note that the configuration of the newly created machine is not
1845 saved to disk (and therefore no settings file is created)
1846 until <link to="IMachine::saveSettings"/> is called. If the
1847 specified settings file already exists, this method
1848 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1849
1850 See <link to="#createMachine"/> for more information.
1851
1852 @deprecated This method may be removed later. Use <link
1853 to="IVirtualBox::createMachine"/> instead.
1854
1855 <note>
1856 There is no way to change the name of the settings file
1857 of the machine created in "legacy" mode.
1858 </note>
1859
1860 <result name="VBOX_E_OBJECT_NOT_FOUND">
1861 @a osTypeId is invalid.
1862 </result>
1863 <result name="VBOX_E_FILE_ERROR">
1864 @a settingsFile is invalid or the settings file already exists or
1865 could not be created due to an I/O error.
1866 </result>
1867 <result name="E_INVALIDARG">
1868 @a name or @a settingsFile is empty or @c null.
1869 </result>
1870 </desc>
1871
1872 <param name="name" type="wstring" dir="in">
1873 <desc>Machine name.</desc>
1874 </param>
1875 <param name="osTypeId" type="wstring" dir="in">
1876 <desc>Machine OS Type ID.</desc>
1877 </param>
1878 <param name="settingsFile" type="wstring" dir="in">
1879 <desc>Name of the machine settings file.</desc>
1880 </param>
1881 <param name="id" type="uuid" mod="string" dir="in">
1882 <desc>Machine UUID (optional).</desc>
1883 </param>
1884 <param name="machine" type="IMachine" dir="return">
1885 <desc>Created machine object.</desc>
1886 </param>
1887 </method>
1888
1889 <method name="openMachine">
1890 <desc>
1891 Opens a virtual machine from the existing settings file.
1892 The opened machine remains unregistered until you call
1893 <link to="#registerMachine"/>.
1894
1895 The specified settings file name can be absolute
1896 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1897 VirtualBox home directory</link>. This file must exist
1898 and must be a valid machine settings file whose contents
1899 will be used to construct the machine object.
1900
1901 @deprecated Will be removed soon.
1902 <result name="VBOX_E_FILE_ERROR">
1903 Settings file name invalid, not found or sharing violation.
1904 </result>
1905 </desc>
1906 <param name="settingsFile" type="wstring" dir="in">
1907 <desc>
1908 Name of the machine settings file.
1909 </desc>
1910 </param>
1911 <param name="machine" type="IMachine" dir="return">
1912 <desc>Opened machine object.</desc>
1913 </param>
1914 <note>
1915 <link to="IMachine::settingsModified"/> will return
1916 @c false for the created machine, until any of machine settings
1917 are changed.
1918 </note>
1919 </method>
1920
1921 <method name="registerMachine">
1922 <desc>
1923
1924 Registers the machine previously created using
1925 <link to="#createMachine"/> or opened using
1926 <link to="#openMachine"/> within this VirtualBox installation. After
1927 successful method invocation, the
1928 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1929 to all registered callbacks.
1930
1931 <note>
1932 This method implicitly calls <link to="IMachine::saveSettings"/>
1933 to save all current machine settings before registering it.
1934 </note>
1935
1936 <result name="VBOX_E_OBJECT_NOT_FOUND">
1937 No matching virtual machine found.
1938 </result>
1939 <result name="VBOX_E_INVALID_OBJECT_STATE">
1940 Virtual machine was not created within this VirtualBox instance.
1941 </result>
1942
1943 </desc>
1944 <param name="machine" type="IMachine" dir="in"/>
1945 </method>
1946
1947 <method name="getMachine">
1948 <desc>
1949 Attempts to find a virtual machine given its UUID.
1950 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1951 instead.
1952
1953 <result name="VBOX_E_OBJECT_NOT_FOUND">
1954 Could not find registered machine matching @a id.
1955 </result>
1956
1957 </desc>
1958 <param name="id" type="uuid" mod="string" dir="in"/>
1959 <param name="machine" type="IMachine" dir="return"/>
1960 </method>
1961
1962 <method name="findMachine">
1963 <desc>
1964 Attempts to find a virtual machine given its name.
1965 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1966 instead.
1967
1968 <result name="VBOX_E_OBJECT_NOT_FOUND">
1969 Could not find registered machine matching @a name.
1970 </result>
1971
1972 </desc>
1973 <param name="name" type="wstring" dir="in"/>
1974 <param name="machine" type="IMachine" dir="return"/>
1975 </method>
1976
1977 <method name="unregisterMachine">
1978 <desc>
1979
1980 Unregisters the machine previously registered using
1981 <link to="#registerMachine"/>. After successful method invocation, the
1982 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1983 to all registered callbacks.
1984
1985 <note>
1986 The specified machine must not be in the Saved state, have an open
1987 (or a spawning) direct session associated with it, have snapshots or
1988 have any medium attached.
1989 </note>
1990
1991 <note>
1992 This method implicitly calls <link to="IMachine::saveSettings"/> to
1993 save all current machine settings before unregistering it.
1994 </note>
1995
1996 <note>
1997 If the given machine is inaccessible (see
1998 <link to="IMachine::accessible"/>), it will be unregistered and
1999 fully uninitialized right afterwards. As a result, the returned
2000 machine object will be unusable and an attempt to call
2001 <b>any</b> method will return the "Object not ready" error.
2002 </note>
2003
2004 <result name="VBOX_E_OBJECT_NOT_FOUND">
2005 Could not find registered machine matching @a id.
2006 </result>
2007 <result name="VBOX_E_INVALID_VM_STATE">
2008 Machine is in Saved state.
2009 </result>
2010 <result name="VBOX_E_INVALID_OBJECT_STATE">
2011 Machine has snapshot or open session or medium attached.
2012 </result>
2013
2014 </desc>
2015 <param name="id" type="uuid" mod="string" dir="in">
2016 <desc>UUID of the machine to unregister.</desc>
2017 </param>
2018 <param name="machine" type="IMachine" dir="return">
2019 <desc>Unregistered machine object.</desc>
2020 </param>
2021 </method>
2022
2023 <method name="createAppliance">
2024 <desc>
2025 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2026 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2027 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2028 </desc>
2029 <param name="appliance" type="IAppliance" dir="return">
2030 <desc>New appliance.</desc>
2031 </param>
2032 </method>
2033
2034 <method name="createHardDisk">
2035 <desc>
2036 Creates a new base medium object that will use the given storage
2037 format and location for medium data.
2038
2039 Note that the actual storage unit is not created by this method. In
2040 order to do it, and before you are able to attach the created medium
2041 to virtual machines, you must call one of the following methods to
2042 allocate a format-specific storage unit at the specified location:
2043 <ul>
2044 <li><link to="IMedium::createBaseStorage"/></li>
2045 <li><link to="IMedium::createDiffStorage"/></li>
2046 </ul>
2047
2048 Some medium attributes, such as <link to="IMedium::id"/>, may
2049 remain uninitialized until the medium storage unit is successfully
2050 created by one of the above methods.
2051
2052 After the storage unit is successfully created, the medium gets
2053 remembered by this VirtualBox installation and will be accessible
2054 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2055 methods. Remembered base medium are also returned as part of
2056 the <link to="#hardDisks"/> array. See IMedium for more details.
2057
2058 The list of all storage formats supported by this VirtualBox
2059 installation can be obtained using
2060 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2061 attribute is empty or @c null then the default storage format
2062 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2063 be used for creating a storage unit of the medium.
2064
2065 Note that the format of the location string is storage format specific.
2066 See <link to="IMedium::location"/>, IMedium and
2067 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2068
2069 <result name="VBOX_E_OBJECT_NOT_FOUND">
2070 @a format identifier is invalid. See
2071 <link to="ISystemProperties::mediumFormats"/>.
2072 </result>
2073 <result name="VBOX_E_FILE_ERROR">
2074 @a location is a not valid file name (for file-based formats only).
2075 </result>
2076 </desc>
2077 <param name="format" type="wstring" dir="in">
2078 <desc>
2079 Identifier of the storage format to use for the new medium.
2080 </desc>
2081 </param>
2082 <param name="location" type="wstring" dir="in">
2083 <desc>
2084 Location of the storage unit for the new medium.
2085 </desc>
2086 </param>
2087 <param name="medium" type="IMedium" dir="return">
2088 <desc>Created medium object.</desc>
2089 </param>
2090 </method>
2091
2092 <method name="openHardDisk">
2093 <desc>
2094 Opens a medium from an existing location, optionally replacing
2095 the image UUID and/or parent UUID.
2096
2097 After the medium is successfully opened by this method, it gets
2098 remembered by (known to) this VirtualBox installation and will be
2099 accessible through <link to="#getHardDisk"/> and
2100 <link to="#findHardDisk"/> methods. Remembered base media
2101 are also returned as part of the <link to="#hardDisks"/> array and can
2102 be attached to virtual machines. See IMedium for more details.
2103
2104 If a differencing medium is to be opened by this method, the
2105 operation will succeed only if its parent medium and all ancestors,
2106 if any, are already known to this VirtualBox installation (for example,
2107 were opened by this method before).
2108
2109 This method tries to guess the storage format of the specified medium
2110 by reading medium data at the specified location.
2111
2112 If @a write is ReadWrite (which it should be), the image is opened for
2113 read/write access and must have according permissions, as VirtualBox
2114 may actually write status information into the disk's metadata sections.
2115
2116 Note that write access is required for all typical image usage in VirtualBox,
2117 since VirtualBox may need to write metadata such as a UUID into the image.
2118 The only exception is opening a source image temporarily for copying and
2119 cloning when the image will quickly be closed again.
2120
2121 Note that the format of the location string is storage format specific.
2122 See <link to="IMedium::location"/>, IMedium and
2123 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2124
2125 <result name="VBOX_E_FILE_ERROR">
2126 Invalid medium storage file location or could not find the medium
2127 at the specified location.
2128 </result>
2129 <result name="VBOX_E_IPRT_ERROR">
2130 Could not get medium storage format.
2131 </result>
2132 <result name="E_INVALIDARG">
2133 Invalid medium storage format.
2134 </result>
2135
2136 </desc>
2137 <param name="location" type="wstring" dir="in">
2138 <desc>
2139 Location of the storage unit that contains medium data in one of
2140 the supported storage formats.
2141 </desc>
2142 </param>
2143 <param name="accessMode" type="AccessMode" dir="in">
2144 <desc>
2145 Determines whether to open the image in read/write or read-only mode.
2146 </desc>
2147 </param>
2148 <param name="setImageId" type="boolean" dir="in">
2149 <desc>
2150 Select whether a new image UUID is set or not.
2151 </desc>
2152 </param>
2153 <param name="imageId" type="uuid" mod="string" dir="in">
2154 <desc>
2155 New UUID for the image. If an empty string is passed, then a new
2156 UUID is automatically created. Specifying a zero UUIDs is not valid.
2157 </desc>
2158 </param>
2159 <param name="setParentId" type="boolean" dir="in">
2160 <desc>
2161 Select whether a new parent UUID is set or not.
2162 </desc>
2163 </param>
2164 <param name="parentId" type="uuid" mod="string" dir="in">
2165 <desc>
2166 New parent UUID for the image. If an empty string is passed, then a
2167 new UUID is automatically created, provided @a setParentId is
2168 @c true. A zero UUID is valid.
2169 </desc>
2170 </param>
2171 <param name="medium" type="IMedium" dir="return">
2172 <desc>Opened medium object.</desc>
2173 </param>
2174 </method>
2175
2176 <method name="getHardDisk" const="yes">
2177 <desc>
2178 Returns a medium with the given UUID.
2179
2180 The medium with the given UUID must be known to this VirtualBox
2181 installation, i.e. it must be previously created by
2182 <link to="#createHardDisk"/> or opened by <link
2183 to="#openHardDisk"/>, or attached to some known virtual machine.
2184
2185 <result name="VBOX_E_OBJECT_NOT_FOUND">
2186 No medium object matching @a id found.
2187 </result>
2188
2189 </desc>
2190 <param name="id" type="uuid" mod="string" dir="in">
2191 <desc>UUID of the medium to look for.</desc>
2192 </param>
2193 <param name="medium" type="IMedium" dir="return">
2194 <desc>Found medium object.</desc>
2195 </param>
2196 </method>
2197
2198 <method name="findHardDisk">
2199 <desc>
2200 Returns a medium that uses the given location to store medium data.
2201
2202 The given medium must be known to this VirtualBox installation, i.e.
2203 it must be previously created by
2204 <link to="#createHardDisk"/> or opened by <link
2205 to="#openHardDisk"/>, or attached to some known virtual machine.
2206
2207 The search is done by comparing the value of the @a location argument to
2208 the <link to="IMedium::location"/> attribute of each known medium.
2209
2210 For locations represented by file names in the host's file system, the
2211 requested location can be a path relative to the
2212 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2213 only a file name without any path is given, the
2214 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2215 folder</link> will be prepended to the file name before searching. Note
2216 that on case sensitive file systems, a case sensitive comparison is
2217 performed, otherwise the case of symbols in the file path is ignored.
2218
2219 <result name="VBOX_E_OBJECT_NOT_FOUND">
2220 No medium object matching @a location found.
2221 </result>
2222
2223 </desc>
2224 <param name="location" type="wstring" dir="in">
2225 <desc>Location string to search for.</desc>
2226 </param>
2227 <param name="medium" type="IMedium" dir="return">
2228 <desc>Found medium object.</desc>
2229 </param>
2230 </method>
2231
2232 <method name="openDVDImage">
2233 <desc>
2234 Opens a CD/DVD image contained in the specified file of the supported
2235 format and assigns it the given UUID.
2236
2237 After the image is successfully opened by this method, it gets
2238 remembered by (known to) this VirtualBox installation and will be
2239 accessible through <link to="#getDVDImage"/> and
2240 <link to="#findDVDImage"/> methods. Remembered images are also
2241 returned as part of the <link to="#DVDImages"/> array and can be mounted
2242 to virtual machines. See IMedium for more details.
2243
2244 See <link to="IMedium::location"/> to get more details about the format
2245 of the location string.
2246
2247 <note>
2248 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2249 </note>
2250
2251 <result name="VBOX_E_FILE_ERROR">
2252 Invalid CD/DVD image file location or could not find the CD/DVD
2253 image at the specified location.
2254 </result>
2255 <result name="VBOX_E_INVALID_OBJECT_STATE">
2256 CD/DVD image already exists in the media registry.
2257 </result>
2258
2259 </desc>
2260 <param name="location" type="wstring" dir="in">
2261 <desc>
2262 Full path to the file that contains a valid CD/DVD image.
2263 </desc>
2264 </param>
2265 <param name="id" type="uuid" mod="string" dir="in">
2266 <desc>
2267 UUID to assign to the given image within this VirtualBox installation.
2268 If an empty (@c null) UUID is specified, the system will randomly
2269 generate a new UUID.
2270 </desc>
2271 </param>
2272 <param name="image" type="IMedium" dir="return">
2273 <desc>Opened CD/DVD image object.</desc>
2274 </param>
2275 </method>
2276
2277 <method name="getDVDImage">
2278 <desc>
2279 Returns a CD/DVD image with the given UUID.
2280
2281 The image with the given UUID must be known to this VirtualBox
2282 installation, i.e. it must be previously opened by <link
2283 to="#openDVDImage"/>, or mounted to some known virtual machine.
2284
2285 <result name="VBOX_E_OBJECT_NOT_FOUND">
2286 No matching DVD image found in the media registry.
2287 </result>
2288
2289 </desc>
2290 <param name="id" type="uuid" mod="string" dir="in">
2291 <desc>UUID of the image to look for.</desc>
2292 </param>
2293 <param name="image" type="IMedium" dir="return">
2294 <desc>Found CD/DVD image object.</desc>
2295 </param>
2296 </method>
2297
2298 <method name="findDVDImage">
2299 <desc>
2300 Returns a CD/DVD image with the given image location.
2301
2302 The image with the given UUID must be known to this VirtualBox
2303 installation, i.e. it must be previously opened by <link
2304 to="#openDVDImage"/>, or mounted to some known virtual machine.
2305
2306 The search is done by comparing the value of the @a location argument to
2307 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2308
2309 The requested location can be a path relative to the
2310 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2311 only a file name without any path is given, the
2312 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2313 folder</link> will be prepended to the file name before searching. Note
2314 that on case sensitive file systems, a case sensitive comparison is
2315 performed, otherwise the case in the file path is ignored.
2316
2317 <result name="VBOX_E_FILE_ERROR">
2318 Invalid image file location.
2319 </result>
2320 <result name="VBOX_E_OBJECT_NOT_FOUND">
2321 No matching DVD image found in the media registry.
2322 </result>
2323
2324 </desc>
2325 <param name="location" type="wstring" dir="in">
2326 <desc>CD/DVD image file path to look for.</desc>
2327 </param>
2328 <param name="image" type="IMedium" dir="return">
2329 <desc>Found CD/DVD image object.</desc>
2330 </param>
2331 </method>
2332
2333 <method name="openFloppyImage">
2334 <desc>
2335 Opens a floppy image contained in the specified file of the supported
2336 format and assigns it the given UUID.
2337
2338 After the image is successfully opened by this method, it gets
2339 remembered by (known to) this VirtualBox installation and will be
2340 accessible through <link to="#getFloppyImage"/> and
2341 <link to="#findFloppyImage"/> methods. Remembered images are also
2342 returned as part of the <link to="#floppyImages"/> array and can be
2343 mounted to virtual machines. See IMedium for more details.
2344
2345 See <link to="IMedium::location"/> to get more details about the format
2346 of the location string.
2347
2348 <result name="VBOX_E_FILE_ERROR">
2349 Invalid floppy image file location or could not find the floppy
2350 image at the specified location.
2351 </result>
2352 <result name="VBOX_E_INVALID_OBJECT_STATE">
2353 Floppy image already exists in the media registry.
2354 </result>
2355
2356 <note>
2357 Currently, only raw floppy images are supported by VirtualBox.
2358 </note>
2359 </desc>
2360 <param name="location" type="wstring" dir="in">
2361 <desc>
2362 Full path to the file that contains a valid floppy image.
2363 </desc>
2364 </param>
2365 <param name="id" type="uuid" mod="string" dir="in">
2366 <desc>
2367 UUID to assign to the given image file within this VirtualBox
2368 installation. If an empty (@c null) UUID is specified, the system will
2369 randomly generate a new UUID.
2370 </desc>
2371 </param>
2372 <param name="image" type="IMedium" dir="return">
2373 <desc>Opened floppy image object.</desc>
2374 </param>
2375 </method>
2376
2377 <method name="getFloppyImage">
2378 <desc>
2379 Returns a floppy image with the given UUID.
2380
2381 The image with the given UUID must be known to this VirtualBox
2382 installation, i.e. it must be previously opened by <link
2383 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2384
2385 <result name="VBOX_E_OBJECT_NOT_FOUND">
2386 No matching floppy image found in the media registry.
2387 </result>
2388
2389 </desc>
2390 <param name="id" type="uuid" mod="string" dir="in">
2391 <desc>UUID of the image to look for.</desc>
2392 </param>
2393 <param name="image" type="IMedium" dir="return">
2394 <desc>Found floppy image object.</desc>
2395 </param>
2396 </method>
2397
2398 <method name="findFloppyImage">
2399 <desc>
2400 Returns a floppy image with the given image location.
2401
2402 The image with the given UUID must be known to this VirtualBox
2403 installation, i.e. it must be previously opened by <link
2404 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2405
2406 The search is done by comparing the value of the @a location argument to
2407 the <link to="IMedium::location"/> attribute of each known floppy image.
2408
2409 The requested location can be a path relative to the
2410 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2411 only a file name without any path is given, the
2412 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2413 folder</link> will be prepended to the file name before searching. Note
2414 that on case sensitive file systems, a case sensitive comparison is
2415 performed, otherwise the case of symbols in the file path is ignored.
2416
2417 <result name="VBOX_E_FILE_ERROR">
2418 Invalid image file location.
2419 </result>
2420 <result name="VBOX_E_OBJECT_NOT_FOUND">
2421 No matching floppy image found in the media registry.
2422 </result>
2423
2424 </desc>
2425 <param name="location" type="wstring" dir="in">
2426 <desc>Floppy image file path to look for.</desc>
2427 </param>
2428 <param name="image" type="IMedium" dir="return">
2429 <desc>Found floppy image object.</desc>
2430 </param>
2431 </method>
2432
2433 <method name="getGuestOSType">
2434 <desc>
2435 Returns an object describing the specified guest OS type.
2436
2437 The requested guest OS type is specified using a string which is a
2438 mnemonic identifier of the guest operating system, such as
2439 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2440 particular virtual machine can be read or set using the
2441 <link to="IMachine::OSTypeId"/> attribute.
2442
2443 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2444 available guest OS type objects. Each object has an
2445 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2446 the guest OS this object describes.
2447
2448 <result name="E_INVALIDARG">
2449 @a id is not a valid Guest OS type.
2450 </result>
2451
2452 </desc>
2453 <param name="id" type="uuid" mod="string" dir="in">
2454 <desc>Guest OS type ID string.</desc>
2455 </param>
2456 <param name="type" type="IGuestOSType" dir="return">
2457 <desc>Guest OS type object.</desc>
2458 </param>
2459 </method>
2460
2461 <method name="createSharedFolder">
2462 <desc>
2463 Creates a new global shared folder by associating the given logical
2464 name with the given host path, adds it to the collection of shared
2465 folders and starts sharing it. Refer to the description of
2466 <link to="ISharedFolder"/> to read more about logical names.
2467 <note>
2468 In the current implementation, this operation is not
2469 implemented.
2470 </note>
2471 </desc>
2472 <param name="name" type="wstring" dir="in">
2473 <desc>Unique logical name of the shared folder.</desc>
2474 </param>
2475 <param name="hostPath" type="wstring" dir="in">
2476 <desc>Full path to the shared folder in the host file system.</desc>
2477 </param>
2478 <param name="writable" type="boolean" dir="in">
2479 <desc>Whether the share is writable or readonly</desc>
2480 </param>
2481 </method>
2482
2483 <method name="removeSharedFolder">
2484 <desc>
2485 Removes the global shared folder with the given name previously
2486 created by <link to="#createSharedFolder"/> from the collection of
2487 shared folders and stops sharing it.
2488 <note>
2489 In the current implementation, this operation is not
2490 implemented.
2491 </note>
2492 </desc>
2493 <param name="name" type="wstring" dir="in">
2494 <desc>Logical name of the shared folder to remove.</desc>
2495 </param>
2496 </method>
2497
2498 <method name="getExtraDataKeys">
2499 <desc>
2500 Returns an array representing the global extra data keys which currently
2501 have values defined.
2502 </desc>
2503 <param name="value" type="wstring" dir="return" safearray="yes">
2504 <desc>Array of extra data keys.</desc>
2505 </param>
2506 </method>
2507
2508 <method name="getExtraData">
2509 <desc>
2510 Returns associated global extra data.
2511
2512 If the requested data @a key does not exist, this function will
2513 succeed and return an empty string in the @a value argument.
2514
2515 <result name="VBOX_E_FILE_ERROR">
2516 Settings file not accessible.
2517 </result>
2518 <result name="VBOX_E_XML_ERROR">
2519 Could not parse the settings file.
2520 </result>
2521
2522 </desc>
2523 <param name="key" type="wstring" dir="in">
2524 <desc>Name of the data key to get.</desc>
2525 </param>
2526 <param name="value" type="wstring" dir="return">
2527 <desc>Value of the requested data key.</desc>
2528 </param>
2529 </method>
2530
2531 <method name="setExtraData">
2532 <desc>
2533 Sets associated global extra data.
2534
2535 If you pass @c null or empty string as a key @a value, the given @a key
2536 will be deleted.
2537
2538 <note>
2539 Before performing the actual data change, this method will ask all
2540 registered callbacks using the
2541 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2542 notification for a permission. If one of the callbacks refuses the
2543 new value, the change will not be performed.
2544 </note>
2545 <note>
2546 On success, the
2547 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2548 is called to inform all registered callbacks about a successful data
2549 change.
2550 </note>
2551
2552 <result name="VBOX_E_FILE_ERROR">
2553 Settings file not accessible.
2554 </result>
2555 <result name="VBOX_E_XML_ERROR">
2556 Could not parse the settings file.
2557 </result>
2558 <result name="E_ACCESSDENIED">
2559 Modification request refused.
2560 </result>
2561
2562 </desc>
2563 <param name="key" type="wstring" dir="in">
2564 <desc>Name of the data key to set.</desc>
2565 </param>
2566 <param name="value" type="wstring" dir="in">
2567 <desc>Value to assign to the key.</desc>
2568 </param>
2569 </method>
2570
2571 <method name="openSession">
2572 <desc>
2573 Opens a new direct session with the given virtual machine.
2574
2575 A direct session acts as a local lock on the given VM.
2576 There can be only one direct session open at a time for every
2577 virtual machine, protecting the VM from being manipulated by
2578 conflicting actions from different processes. Only after a
2579 direct session has been opened, one can change all VM settings
2580 and execute the VM in the process space of the session object.
2581
2582 Sessions therefore can be compared to mutex semaphores that
2583 lock a given VM for modification and execution.
2584 See <link to="ISession">ISession</link> for details.
2585
2586 <note>Unless you are writing a new VM frontend, you will not
2587 want to execute a VM in the current process. To spawn a new
2588 process that executes a VM, use
2589 <link to="IVirtualBox::openRemoteSession" />
2590 instead.</note>
2591
2592 Upon successful return, the session object can be used to
2593 get access to the machine and to the VM console.
2594
2595 In VirtualBox terminology, the machine becomes "mutable" after
2596 a session has been opened. Note that the "mutable" machine
2597 object, on which you may invoke IMachine methods to change its
2598 settings, will be a different object from the immutable IMachine
2599 objects returned by various IVirtualBox methods. To obtain a
2600 mutable IMachine object (upon which you can invoke settings methods),
2601 use the <link to="ISession::machine" /> attribute.
2602
2603 One must always call <link to="ISession::close" /> to release the
2604 lock on the machine, or the machine's state will eventually be
2605 set to "Aborted".
2606
2607 In other words, to change settings on a machine, the following
2608 sequence is typically performed:
2609
2610 <ol>
2611 <li>Call this method (openSession) to have a machine locked for
2612 the current session.</li>
2613
2614 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2615
2616 <li>Change the settings of the machine.</li>
2617
2618 <li>Call <link to="IMachine::saveSettings" />.</li>
2619
2620 <li>Close the session by calling <link to="ISession::close"/>.</li>
2621 </ol>
2622
2623 <result name="E_UNEXPECTED">
2624 Virtual machine not registered.
2625 </result>
2626 <result name="E_ACCESSDENIED">
2627 Process not started by OpenRemoteSession.
2628 </result>
2629 <result name="VBOX_E_OBJECT_NOT_FOUND">
2630 No matching virtual machine found.
2631 </result>
2632 <result name="VBOX_E_INVALID_OBJECT_STATE">
2633 Session already open or being opened.
2634 </result>
2635 <result name="VBOX_E_VM_ERROR">
2636 Failed to assign machine to session.
2637 </result>
2638
2639 </desc>
2640 <param name="session" type="ISession" dir="in">
2641 <desc>
2642 Session object that will represent the opened session after
2643 successful method invocation. This object must not represent
2644 the already open session.
2645 <note>
2646 This session will be automatically closed if the
2647 VirtualBox server is terminated for some reason.
2648 </note>
2649 </desc>
2650 </param>
2651 <param name="machineId" type="uuid" mod="string" dir="in">
2652 <desc>ID of the virtual machine to open a session with.</desc>
2653 </param>
2654 </method>
2655
2656 <method name="openRemoteSession">
2657 <desc>
2658 Spawns a new process that executes a virtual machine (called a
2659 "remote session").
2660
2661 Opening a remote session causes the VirtualBox server to start a new
2662 process that opens a direct session with the given VM. As a result, the
2663 VM is locked by that direct session in the new process, preventing
2664 conflicting changes from other processes. Since sessions act as locks
2665 that prevent conflicting changes, one cannot open a remote session
2666 for a VM that already has another open session (direct or remote), or
2667 is currently in the process of opening one (see <link
2668 to="IMachine::sessionState"/>).
2669
2670 While the remote session still provides some level of control over the
2671 VM execution to the caller (using the <link to="IConsole" /> interface),
2672 not all VM settings are available for modification within the remote
2673 session context.
2674
2675 This operation can take some time (a new VM is started in a new process,
2676 for which memory and other resources need to be set up). Because of this,
2677 an <link to="IProgress" /> is returned to allow the caller to wait for this
2678 asynchronous operation to be completed. Until then, the remote session
2679 object remains in the closed state, and accessing the machine or its
2680 console through it is invalid. It is recommended to use
2681 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2682 completion.
2683
2684 As with all <link to="ISession" /> objects, it is recommended to call
2685 <link to="ISession::close" /> on the local session object once openRemoteSession()
2686 has been called. However, the session's state (see <link to="ISession::state" />)
2687 will not return to "Closed" until the remote session has also closed (i.e.
2688 until the VM is no longer running). In that case, however, the state of
2689 the session will automatically change back to "Closed".
2690
2691 Currently supported session types (values of the @a type
2692 argument) are:
2693 <ul>
2694 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2695 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2696 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2697 </ul>
2698
2699 The @a environment argument is a string containing definitions of
2700 environment variables in the following format:
2701 @code
2702 NAME[=VALUE]\n
2703 NAME[=VALUE]\n
2704 ...
2705 @endcode
2706 where <tt>\\n</tt> is the new line character. These environment
2707 variables will be appended to the environment of the VirtualBox server
2708 process. If an environment variable exists both in the server process
2709 and in this list, the value from this list takes precedence over the
2710 server's variable. If the value of the environment variable is
2711 omitted, this variable will be removed from the resulting environment.
2712 If the environment string is @c null or empty, the server environment
2713 is inherited by the started process as is.
2714
2715 <see>openExistingSession</see>
2716
2717 <result name="E_UNEXPECTED">
2718 Virtual machine not registered.
2719 </result>
2720 <result name="E_INVALIDARG">
2721 Invalid session type @a type.
2722 </result>
2723 <result name="VBOX_E_OBJECT_NOT_FOUND">
2724 No machine matching @a machineId found.
2725 </result>
2726 <result name="VBOX_E_INVALID_OBJECT_STATE">
2727 Session already open or being opened.
2728 </result>
2729 <result name="VBOX_E_IPRT_ERROR">
2730 Launching process for machine failed.
2731 </result>
2732 <result name="VBOX_E_VM_ERROR">
2733 Failed to assign machine to session.
2734 </result>
2735
2736 </desc>
2737 <param name="session" type="ISession" dir="in">
2738 <desc>
2739 Session object that will represent the opened remote session
2740 after successful method invocation (this object must not
2741 represent an already open session).
2742 </desc>
2743 </param>
2744 <param name="machineId" type="uuid" mod="string" dir="in">
2745 <desc>ID of the virtual machine to open a session with.</desc>
2746 </param>
2747 <param name="type" type="wstring" dir="in">
2748 <desc>
2749 Type of the remote session (case sensitive).
2750 </desc>
2751 </param>
2752 <param name="environment" type="wstring" dir="in">
2753 <desc>
2754 Environment to pass to the opened session.
2755 </desc>
2756 </param>
2757 <param name="progress" type="IProgress" dir="return">
2758 <desc>Progress object to track the operation completion.</desc>
2759 </param>
2760 </method>
2761
2762 <method name="openExistingSession">
2763 <desc>
2764 Opens a new remote session with the virtual machine for
2765 which a direct session is already open.
2766
2767 The remote session provides some level of control over the VM
2768 execution (using the IConsole interface) to the caller; however,
2769 within the remote session context, not all VM settings are available
2770 for modification.
2771
2772 As opposed to <link to="#openRemoteSession"/>, the number of
2773 remote sessions opened this way is not limited by the API
2774
2775 <note>
2776 It is an error to open a remote session with the machine that
2777 doesn't have an open direct session.
2778 </note>
2779
2780 <result name="E_UNEXPECTED">
2781 Virtual machine not registered.
2782 </result>
2783 <result name="VBOX_E_OBJECT_NOT_FOUND">
2784 No machine matching @a machineId found.
2785 </result>
2786 <result name="VBOX_E_INVALID_OBJECT_STATE">
2787 Session already open or being opened.
2788 </result>
2789 <result name="VBOX_E_INVALID_SESSION_STATE">
2790 Direct session state not Open.
2791 </result>
2792 <result name="VBOX_E_VM_ERROR">
2793 Failed to get console object from direct session or assign
2794 machine to session.
2795 </result>
2796
2797 <see>openRemoteSession</see>
2798 </desc>
2799 <param name="session" type="ISession" dir="in">
2800 <desc>
2801 Session object that will represent the open remote session
2802 after successful method invocation. This object must not
2803 represent an already open session.
2804 <note>
2805 This session will be automatically closed when the peer
2806 (direct) session dies or gets closed.
2807 </note>
2808 </desc>
2809 </param>
2810 <param name="machineId" type="uuid" mod="string" dir="in">
2811 <desc>ID of the virtual machine to open a session with.</desc>
2812 </param>
2813 </method>
2814
2815 <method name="registerCallback">
2816 <desc>
2817 Registers a new global VirtualBox callback. The methods of the given
2818 callback object will be called by VirtualBox when an appropriate
2819 event occurs.
2820
2821 <result name="E_INVALIDARG">
2822 A @c null callback cannot be registered.
2823 </result>
2824
2825 </desc>
2826 <param name="callback" type="IVirtualBoxCallback" dir="in">
2827 <desc>Callback object to register.</desc>
2828 </param>
2829 </method>
2830
2831 <method name="unregisterCallback">
2832 <desc>
2833 Unregisters the previously registered global VirtualBox callback.
2834
2835 <result name="E_INVALIDARG">
2836 Specified @a callback not registered.
2837 </result>
2838
2839 </desc>
2840 <param name="callback" type="IVirtualBoxCallback" dir="in">
2841 <desc>Callback object to unregister.</desc>
2842 </param>
2843 </method>
2844
2845 <method name="waitForPropertyChange">
2846 <desc>
2847 Blocks the caller until any of the properties represented by the
2848 @a what argument changes the value or until the given timeout interval
2849 expires.
2850
2851 The @a what argument is a comma separated list of property masks that
2852 describe properties the caller is interested in. The property mask is
2853 a string in the following format:
2854
2855 <pre>
2856 [[group.]subgroup.]name
2857 </pre>
2858
2859 where @c name is the property name and @c group, @c subgroup are zero
2860 or more property group specifiers. Each element (group or name) in
2861 the property mask may be either a Latin string or an asterisk symbol
2862 (@c "*") which is used to match any string for the given element. A
2863 property mask that doesn't contain asterisk symbols represents a
2864 single fully qualified property name.
2865
2866 Groups in the fully qualified property name go from more generic (the
2867 left-most part) to more specific (the right-most part). The first
2868 element is usually a name of the object the property belongs to. The
2869 second element may be either a property name, or a child object name,
2870 or an index if the preceding element names an object which is one of
2871 many objects of the same type. This way, property names form a
2872 hierarchy of properties. Here are some examples of property names:
2873
2874 <table>
2875 <tr>
2876 <td><tt>VirtualBox.version</tt></td>
2877 <td><link to="IVirtualBox::version"/> property</td>
2878 </tr>
2879 <tr>
2880 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2881 <td><link to="IMachine::name"/> property of the machine with the
2882 given UUID</td>
2883 </tr>
2884 </table>
2885
2886 Most property names directly correspond to the properties of objects
2887 (components) provided by the VirtualBox library and may be used to
2888 track changes to these properties. However, there may be
2889 pseudo-property names that don't correspond to any existing object's
2890 property directly, as well as there may be object properties that
2891 don't have a corresponding property name that is understood by this
2892 method, and therefore changes to such properties cannot be
2893 tracked. See individual object's property descriptions to get a
2894 fully qualified property name that can be used with this method (if
2895 any).
2896
2897 There is a special property mask @c "*" (i.e. a string consisting of a
2898 single asterisk symbol) that can be used to match all properties.
2899 Below are more examples of property masks:
2900
2901 <table>
2902 <tr>
2903 <td><tt>VirtualBox.*</tt></td>
2904 <td>Track all properties of the VirtualBox object</td>
2905 </tr>
2906 <tr>
2907 <td><tt>Machine.*.name</tt></td>
2908 <td>Track changes to the <link to="IMachine::name"/> property of
2909 all registered virtual machines</td>
2910 </tr>
2911 </table>
2912
2913 <note>
2914 This function is not implemented in the current version of the
2915 product.
2916 </note>
2917 </desc>
2918 <param name="what" type="wstring" dir="in">
2919 <desc>Comma separated list of property masks.</desc>
2920 </param>
2921 <param name="timeout" type="unsigned long" dir="in">
2922 <desc>
2923 Wait timeout in milliseconds.
2924 Specify -1 for an indefinite wait.
2925 </desc>
2926 </param>
2927 <param name="changed" type="wstring" dir="out">
2928 <desc>
2929 Comma separated list of properties that have been changed and caused
2930 this method to return to the caller.
2931 </desc>
2932 </param>
2933 <param name="values" type="wstring" dir="out">
2934 <desc>Reserved, not currently used.</desc>
2935 </param>
2936 </method>
2937
2938 <!--method name="createDHCPServerForInterface">
2939 <desc>
2940 Creates a dhcp server settings to be used for the given interface
2941 <result name="E_INVALIDARG">
2942 Host network interface @a name already exists.
2943 </result>
2944 </desc>
2945 <param name="interface" type="IHostNetworkInterface" dir="in">
2946 <desc>Network Interface</desc>
2947 </param>
2948 <param name="server" type="IDHCPServer" dir="out">
2949 <desc>Dhcp server settings</desc>
2950 </param>
2951 </method-->
2952
2953 <method name="createDHCPServer">
2954 <desc>
2955 Creates a dhcp server settings to be used for the given internal network name
2956 <result name="E_INVALIDARG">
2957 Host network interface @a name already exists.
2958 </result>
2959 </desc>
2960 <param name="name" type="wstring" dir="in">
2961 <desc>server name</desc>
2962 </param>
2963 <param name="server" type="IDHCPServer" dir="return">
2964 <desc>Dhcp server settings</desc>
2965 </param>
2966 </method>
2967
2968 <method name="findDHCPServerByNetworkName">
2969 <desc>
2970 Searches a dhcp server settings to be used for the given internal network name
2971 <result name="E_INVALIDARG">
2972 Host network interface @a name already exists.
2973 </result>
2974
2975 </desc>
2976 <param name="name" type="wstring" dir="in">
2977 <desc>server name</desc>
2978 </param>
2979 <param name="server" type="IDHCPServer" dir="return">
2980 <desc>Dhcp server settings</desc>
2981 </param>
2982 </method>
2983
2984 <!--method name="findDHCPServerForInterface">
2985 <desc>
2986 Searches a dhcp server settings to be used for the given interface
2987 <result name="E_INVALIDARG">
2988 Host network interface @a name already exists.
2989 </result>
2990 </desc>
2991 <param name="interface" type="IHostNetworkInterface" dir="in">
2992 <desc>Network Interface</desc>
2993 </param>
2994 <param name="server" type="IDHCPServer" dir="out">
2995 <desc>Dhcp server settings</desc>
2996 </param>
2997 </method-->
2998
2999 <method name="removeDHCPServer">
3000 <desc>
3001 Removes the dhcp server settings
3002 <result name="E_INVALIDARG">
3003 Host network interface @a name already exists.
3004 </result>
3005 </desc>
3006 <param name="server" type="IDHCPServer" dir="in">
3007 <desc>Dhcp server settings to be removed</desc>
3008 </param>
3009 </method>
3010
3011
3012 <method name="checkFirmwarePresent">
3013 <desc>
3014 Check if this VirtualBox installation have firmware
3015 of given type available, either system-wide, or per-user.
3016 Optionally, may return a hint where this firmware can be
3017 downloaded from.
3018 </desc>
3019 <param name="firmwareType" type="FirmwareType" dir="in">
3020 <desc>
3021 Type of firmware to check.
3022 </desc>
3023 </param>
3024 <param name="version" type="wstring" dir="in">
3025 <desc>Expected version number, usually empty string.</desc>
3026 </param>
3027
3028 <param name="url" type="wstring" dir="out">
3029 <desc>
3030 Suggested url to download this firmware from.
3031 </desc>
3032 </param>
3033 <param name="result" type="boolean" dir="return">
3034 <desc>If firmware of this type and version is available.</desc>
3035 </param>
3036 </method>
3037
3038 </interface>
3039
3040 <!--
3041 // IVFSExplorer
3042 /////////////////////////////////////////////////////////////////////////
3043 -->
3044
3045 <enum
3046 name="VFSType"
3047 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3048 >
3049 <desc>
3050 Virtual file systems supported by VFSExplorer.
3051 </desc>
3052
3053 <const name="File" value="1" />
3054 <const name="Cloud" value="2" />
3055 <const name="S3" value="3" />
3056 <const name="WebDav" value="4" />
3057 </enum>
3058
3059 <enum
3060 name="VFSFileType"
3061 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3062 >
3063 <desc>
3064 File types known by VFSExplorer.
3065 </desc>
3066
3067 <const name="Unknown" value="1" />
3068 <const name="Fifo" value="2" />
3069 <const name="DevChar" value="3" />
3070 <const name="Directory" value="4" />
3071 <const name="DevBlock" value="5" />
3072 <const name="File" value="6" />
3073 <const name="SymLink" value="7" />
3074 <const name="Socket" value="8" />
3075 <const name="WhiteOut" value="9" />
3076 </enum>
3077
3078 <interface
3079 name="IVFSExplorer" extends="$unknown"
3080 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3081 wsmap="managed"
3082 >
3083 <desc>
3084 The VFSExplorer interface unifies access to different file system
3085 types. This includes local file systems as well remote file systems like
3086 S3. For a list of supported types see <link to="VFSType" />.
3087 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3088 </desc>
3089
3090 <attribute name="path" type="wstring" readonly="yes">
3091 <desc>Returns the current path in the virtual file system.</desc>
3092 </attribute>
3093
3094 <attribute name="type" type="VFSType" readonly="yes">
3095 <desc>Returns the file system type which is currently in use.</desc>
3096 </attribute>
3097
3098 <method name="update">
3099 <desc>Updates the internal list of files/directories from the
3100 current directory level. Use <link to="#entryList" /> to get the full list
3101 after a call to this method.</desc>
3102
3103 <param name="aProgress" type="IProgress" dir="return">
3104 <desc>Progress object to track the operation completion.</desc>
3105 </param>
3106 </method>
3107
3108 <method name="cd">
3109 <desc>Change the current directory level.</desc>
3110
3111 <param name="aDir" type="wstring" dir="in">
3112 <desc>The name of the directory to go in.</desc>
3113 </param>
3114
3115 <param name="aProgress" type="IProgress" dir="return">
3116 <desc>Progress object to track the operation completion.</desc>
3117 </param>
3118 </method>
3119
3120 <method name="cdUp">
3121 <desc>Go one directory upwards from the current directory level.</desc>
3122
3123 <param name="aProgress" type="IProgress" dir="return">
3124 <desc>Progress object to track the operation completion.</desc>
3125 </param>
3126 </method>
3127
3128 <method name="entryList">
3129 <desc>Returns a list of files/directories after a call to <link
3130 to="#update" />. The user is responsible for keeping this internal
3131 list up do date.</desc>
3132
3133 <param name="aNames" type="wstring" safearray="yes" dir="out">
3134 <desc>The list of names for the entries.</desc>
3135 </param>
3136
3137 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3138 <desc>The list of types for the entries.</desc>
3139 </param>
3140 </method>
3141
3142 <method name="exists">
3143 <desc>Checks if the given file list exists in the current directory
3144 level.</desc>
3145
3146 <param name="aNames" type="wstring" safearray="yes" dir="in">
3147 <desc>The names to check.</desc>
3148 </param>
3149
3150 <param name="aExists" type="wstring" safearray="yes" dir="return">
3151 <desc>The names which exist.</desc>
3152 </param>
3153 </method>
3154
3155 <method name="remove">
3156 <desc>Deletes the given files in the current directory level.</desc>
3157
3158 <param name="aNames" type="wstring" safearray="yes" dir="in">
3159 <desc>The names to remove.</desc>
3160 </param>
3161
3162 <param name="aProgress" type="IProgress" dir="return">
3163 <desc>Progress object to track the operation completion.</desc>
3164 </param>
3165 </method>
3166
3167 </interface>
3168
3169 <!--
3170 // IAppliance
3171 /////////////////////////////////////////////////////////////////////////
3172 -->
3173
3174 <interface
3175 name="IAppliance" extends="$unknown"
3176 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3177 wsmap="managed"
3178 >
3179 <desc>
3180 Represents a platform-independent appliance in OVF format. An instance of this is returned
3181 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3182 appliances with VirtualBox.
3183
3184 The OVF standard suggests two different physical file formats:
3185
3186 <ol>
3187 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3188 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3189 this descriptor file references other files, as OVF appliances distributed as a set of
3190 files most likely do, those files must be in the same directory as the descriptor file.</li>
3191
3192 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3193 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3194 files and optionally other files.
3195
3196 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3197 be added with a later version.</li>
3198 </ol>
3199
3200 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3201 <link to="IMachine" /> involves the following sequence of API calls:
3202
3203 <ol>
3204 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3205 </li>
3206
3207 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3208 would like to import. So long as this file is syntactically valid, this will succeed
3209 and return an instance of IAppliance that contains the parsed data from the OVF file.
3210 </li>
3211
3212 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3213 contents of the IAppliance attributes accordingly. These can be inspected by a
3214 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3215 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3216 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3217 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3218 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3219 The GUI can then give the user the option to confirm and/or change these suggestions.
3220 </li>
3221
3222 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3223 virtual system to override the suggestions made by the interpret() routine.
3224 </li>
3225
3226 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3227 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3228 virtual system descriptions.
3229 </li>
3230 </ol>
3231
3232 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3233
3234 <ol>
3235 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3236 an empty IAppliance object.
3237 </li>
3238
3239 <li>For each machine you would like to export, call <link to="IMachine::export" />
3240 with the IAppliance object you just created. This creates an instance of
3241 <link to="IVirtualSystemDescription" /> inside the appliance.
3242 </li>
3243
3244 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3245 virtual system to override the suggestions made by the export() routine.
3246 </li>
3247
3248 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3249 file written.</li>
3250 </ol>
3251
3252 </desc>
3253
3254 <attribute name="path" type="wstring" readonly="yes">
3255 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3256 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3257 <link to="#write" /> (for export).
3258 This attribute is empty until one of these methods has been called.
3259 </desc>
3260 </attribute>
3261
3262 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3263 <desc>
3264 Array of virtual disk definitions. One such description exists for each
3265 disk definition in the OVF; each string array item represents one such piece of
3266 disk information, with the information fields separated by tab (\\t) characters.
3267
3268 The caller should be prepared for additional fields being appended to
3269 this string in future versions of VirtualBox and therefore check for
3270 the number of tabs in the strings returned.
3271
3272 In the current version, the following eight fields are returned per string
3273 in the array:
3274
3275 <ol>
3276 <li>Disk ID (unique string identifier given to disk)</li>
3277
3278 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3279
3280 <li>Populated size (optional unsigned integer indicating the current size of the
3281 disk; can be approximate; -1 if unspecified)</li>
3282
3283 <li>Format (string identifying the disk format, typically
3284 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3285
3286 <li>Reference (where to find the disk image, typically a file name; if empty,
3287 then the disk should be created on import)</li>
3288
3289 <li>Image size (optional unsigned integer indicating the size of the image,
3290 which need not necessarily be the same as the values specified above, since
3291 the image may be compressed or sparse; -1 if not specified)</li>
3292
3293 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3294 presently unsupported and always -1)</li>
3295
3296 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3297 </ol>
3298 </desc>
3299 </attribute>
3300
3301 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3302 <desc> Array of virtual system descriptions. One such description is created
3303 for each virtual system found in the OVF.
3304 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3305 (for export) has been called.
3306 </desc>
3307 </attribute>
3308
3309 <method name="read">
3310 <desc>
3311 Reads an OVF file into the appliance object.
3312
3313 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3314 mere fact that this method returns successfully does not mean that VirtualBox supports all
3315 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3316 </desc>
3317 <param name="file" type="wstring" dir="in">
3318 <desc>
3319 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3320 on whether the appliance is distributed as a set of files or as a single file, respectively).
3321 </desc>
3322 </param>
3323 <param name="aProgress" type="IProgress" dir="return">
3324 <desc></desc>
3325 </param>
3326 </method>
3327
3328 <method name="interpret">
3329 <desc>
3330 Interprets the OVF data that was read when the appliance was constructed. After
3331 calling this method, one can inspect the
3332 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3333 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3334 the appliance.
3335
3336 Calling this method is the second step of importing an appliance into VirtualBox;
3337 see <link to="IAppliance" /> for an overview.
3338
3339 After calling this method, one should call <link to="#getWarnings" /> to find out
3340 if problems were encountered during the processing which might later lead to
3341 errors.
3342 </desc>
3343 </method>
3344
3345 <method name="importMachines">
3346 <desc>
3347 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3348 and other interfaces that match the information contained in the appliance as
3349 closely as possible, as represented by the import instructions in the
3350 <link to="#virtualSystemDescriptions" /> array.
3351
3352 Calling this method is the final step of importing an appliance into VirtualBox;
3353 see <link to="IAppliance" /> for an overview.
3354
3355 Since importing the appliance will most probably involve copying and converting
3356 disk images, which can take a long time, this method operates asynchronously and
3357 returns an IProgress object to allow the caller to monitor the progress.
3358 </desc>
3359
3360 <param name="aProgress" type="IProgress" dir="return">
3361 <desc></desc>
3362 </param>
3363 </method>
3364
3365 <method name="createVFSExplorer">
3366 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3367
3368 <param name="aUri" type="wstring" dir="in">
3369 <desc>The URI describing the file system to use.</desc>
3370 </param>
3371
3372 <param name="aExplorer" type="IVFSExplorer" dir="return">
3373 <desc></desc>
3374 </param>
3375 </method>
3376
3377 <method name="write">
3378 <desc>
3379 Writes the contents of the appliance exports into a new OVF file.
3380
3381 Calling this method is the final step of exporting an appliance from VirtualBox;
3382 see <link to="IAppliance" /> for an overview.
3383
3384 Since exporting the appliance will most probably involve copying and converting
3385 disk images, which can take a long time, this method operates asynchronously and
3386 returns an IProgress object to allow the caller to monitor the progress.
3387 </desc>
3388 <param name="format" type="wstring" dir="in">
3389 <desc>
3390 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3391 future versions of VirtualBox may support additional formats.
3392 </desc>
3393 </param>
3394 <param name="path" type="wstring" dir="in">
3395 <desc>
3396 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3397 on whether the appliance is distributed as a set of files or as a single file, respectively).
3398 </desc>
3399 </param>
3400 <param name="aProgress" type="IProgress" dir="return">
3401 <desc>Progress object to track the operation completion.</desc>
3402 </param>
3403 </method>
3404
3405 <method name="getWarnings">
3406 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3407
3408 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3409 <desc></desc>
3410 </param>
3411 </method>
3412
3413 </interface>
3414
3415 <enum
3416 name="VirtualSystemDescriptionType"
3417 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3418 >
3419 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3420 a configuration value.</desc>
3421
3422 <const name="Ignore" value="1" />
3423 <const name="OS" value="2" />
3424 <const name="Name" value="3" />
3425 <const name="Product" value="4" />
3426 <const name="Vendor" value="5" />
3427 <const name="Version" value="6" />
3428 <const name="ProductUrl" value="7" />
3429 <const name="VendorUrl" value="8" />
3430 <const name="Description" value="9" />
3431 <const name="License" value="10" />
3432 <const name="Miscellaneous" value="11" />
3433 <const name="CPU" value="12" />
3434 <const name="Memory" value="13" />
3435 <const name="HardDiskControllerIDE" value="14" />
3436 <const name="HardDiskControllerSATA" value="15" />
3437 <const name="HardDiskControllerSCSI" value="16" />
3438 <const name="HardDiskImage" value="17" />
3439 <const name="Floppy" value="18" />
3440 <const name="CDROM" value="19" />
3441 <const name="NetworkAdapter" value="20" />
3442 <const name="USBController" value="21" />
3443 <const name="SoundCard" value="22" />
3444
3445 </enum>
3446
3447 <enum
3448 name="VirtualSystemDescriptionValueType"
3449 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3450 >
3451 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3452 type to fetch.</desc>
3453
3454 <const name="Reference" value="1" />
3455 <const name="Original" value="2" />
3456 <const name="Auto" value="3" />
3457 <const name="ExtraConfig" value="4" />
3458
3459 </enum>
3460
3461 <interface
3462 name="IVirtualSystemDescription" extends="$unknown"
3463 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3464 wsmap="managed"
3465 >
3466
3467 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3468 After <link to="IAppliance::interpret" /> has been called, that array contains
3469 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3470 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3471 into VirtualBox.
3472 </desc>
3473
3474 <attribute name="count" type="unsigned long" readonly="yes">
3475 <desc>Return the number of virtual system description entries.</desc>
3476 </attribute>
3477
3478 <method name="getDescription">
3479 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3480 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3481
3482 The list below identifies the value sets that are possible depending on the
3483 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3484 the array item with the same index in aOvfValues[] will contain the original value as contained
3485 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3486 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3487 the aExtraConfigValues[] array item may also be used.
3488
3489 <ul>
3490 <li>
3491 "OS": the guest operating system type. There must be exactly one such array item on import. The
3492 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3493 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3494 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3495 </li>
3496 <li>
3497 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3498 if none is present on import, then an automatic name will be created from the operating system
3499 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3500 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3501 <link to="IMachine" /> name that does not exist yet.
3502 </li>
3503 <li>
3504 "Description": an arbitrary description.
3505 </li>
3506 <li>
3507 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3508 code to display such a license for agreement; the Main API does not enforce any such policy.
3509 </li>
3510 <li>
3511 Miscellaneous: reserved for future use.
3512 </li>
3513 <li>
3514 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3515 </li>
3516 <li>
3517 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3518 is present on import, then VirtualBox will set a meaningful default based on the operating system
3519 type.
3520 </li>
3521 <li>
3522 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3523 has no value in aOvfValues[] or aVBoxValues[].
3524 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3525 type can use to specify which hard disk controller a virtual disk should be connected to.
3526 </li>
3527 <li>
3528 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3529 has no value in aOvfValues[] or aVBoxValues[].
3530 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3531 </li>
3532 <li>
3533 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3534 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3535 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3536 </li>
3537 <li>
3538 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3539 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3540
3541 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3542 a path since the image file should be in the same location as the OVF file itself), whereas the
3543 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3544 hard disk image. This means that on import the image will be copied and converted from the
3545 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3546 On import, the target image will also be registered with VirtualBox.
3547
3548 The matching item in the aExtraConfigValues[] array must contain a string of the following
3549 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3550 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3551 the image to. That number must be the index of an array item with one of the hard disk controller
3552 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3553 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3554 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3555 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3556 </li>
3557 <li>
3558 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3559 attachment information as with "HardDiskImage" items.
3560 </li>
3561 <li>
3562 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3563 attachment information as with "HardDiskImage" items.
3564 </li>
3565 <li>
3566 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3567 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3568 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3569 </li>
3570 <li>
3571 "USBController": a USB controller. There can be at most one such item. If and only if such an
3572 item ispresent, USB support will be enabled for the new virtual machine.
3573 </li>
3574 <li>
3575 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3576 present, sound support will be enabled for the new virtual machine. Note that the virtual
3577 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3578 may be different from the virtual soundcard expected by the appliance.
3579 </li>
3580 </ul>
3581
3582 </desc>
3583
3584 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3585 <desc></desc>
3586 </param>
3587
3588 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3589 <desc></desc>
3590 </param>
3591
3592 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3593 <desc></desc>
3594 </param>
3595
3596 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3597 <desc></desc>
3598 </param>
3599
3600 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3601 <desc></desc>
3602 </param>
3603
3604 </method>
3605
3606 <method name="getDescriptionByType">
3607 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3608 should be returned.</desc>
3609
3610 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3611 <desc></desc>
3612 </param>
3613
3614 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3615 <desc></desc>
3616 </param>
3617
3618 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3619 <desc></desc>
3620 </param>
3621
3622 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3623 <desc></desc>
3624 </param>
3625
3626 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3627 <desc></desc>
3628 </param>
3629
3630 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3631 <desc></desc>
3632 </param>
3633
3634 </method>
3635
3636 <method name="getValuesByType">
3637 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3638 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3639 values.</desc>
3640
3641 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3642 <desc></desc>
3643 </param>
3644
3645 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3646 <desc></desc>
3647 </param>
3648
3649 <param name="aValues" type="wstring" dir="return" safearray="yes">
3650 <desc></desc>
3651 </param>
3652
3653 </method>
3654
3655 <method name="setFinalValues">
3656 <desc>
3657 This method allows the appliance's user to change the configuration for the virtual
3658 system descriptions. For each array item returned from <link to="#getDescription" />,
3659 you must pass in one boolean value and one configuration value.
3660
3661 Each item in the boolean array determines whether the particular configuration item
3662 should be enabled.
3663 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3664 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3665 and SoundCard.
3666
3667 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3668 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3669 the configuration remains unchanged. Please see the documentation for getDescription()
3670 for valid configuration values for the individual array item types. If the
3671 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3672 </desc>
3673
3674 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3675 <desc></desc>
3676 </param>
3677
3678 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3679 <desc></desc>
3680 </param>
3681
3682 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3683 <desc></desc>
3684 </param>
3685 </method>
3686
3687 <method name="addDescription">
3688 <desc>
3689 This method adds an additional description entry to the stack of already
3690 available descriptions for this virtual system. This is handy for writing
3691 values which aren't directly supported by VirtualBox. One example would
3692 be the License type of <link to="VirtualSystemDescriptionType" />.
3693 </desc>
3694
3695 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3696 <desc></desc>
3697 </param>
3698
3699 <param name="aVBoxValue" type="wstring" dir="in">
3700 <desc></desc>
3701 </param>
3702
3703 <param name="aExtraConfigValue" type="wstring" dir="in">
3704 <desc></desc>
3705 </param>
3706 </method>
3707 </interface>
3708
3709
3710 <!--
3711 // IMachine
3712 /////////////////////////////////////////////////////////////////////////
3713 -->
3714
3715 <interface
3716 name="IInternalMachineControl" extends="$unknown"
3717 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3718 internal="yes"
3719 wsmap="suppress"
3720 >
3721 <method name="setRemoveSavedState">
3722 <desc>
3723 Updates the flag whether saved state is removed on a machine state
3724 change from Saved to PoweredOff.
3725 </desc>
3726 <param name="aRemove" type="boolean" dir="in"/>
3727 </method>
3728
3729 <method name="updateState">
3730 <desc>
3731 Updates the VM state.
3732 <note>
3733 This operation will also update the settings file with
3734 the correct information about the saved state file
3735 and delete this file from disk when appropriate.
3736 </note>
3737 </desc>
3738 <param name="state" type="MachineState" dir="in"/>
3739 </method>
3740
3741 <method name="getIPCId">
3742 <param name="id" type="wstring" dir="return"/>
3743 </method>
3744
3745 <method name="runUSBDeviceFilters">
3746 <desc>
3747 Asks the server to run USB devices filters of the associated
3748 machine against the given USB device and tell if there is
3749 a match.
3750 <note>
3751 Intended to be used only for remote USB devices. Local
3752 ones don't require to call this method (this is done
3753 implicitly by the Host and USBProxyService).
3754 </note>
3755 </desc>
3756 <param name="device" type="IUSBDevice" dir="in"/>
3757 <param name="matched" type="boolean" dir="out"/>
3758 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3759 </method>
3760
3761 <method name="captureUSBDevice">
3762 <desc>
3763 Requests a capture of the given host USB device.
3764 When the request is completed, the VM process will
3765 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3766 notification.
3767 </desc>
3768 <param name="id" type="uuid" mod="string" dir="in"/>
3769 </method>
3770
3771 <method name="detachUSBDevice">
3772 <desc>
3773 Notification that a VM is going to detach (@a done = @c false) or has
3774 already detached (@a done = @c true) the given USB device.
3775 When the @a done = @c true request is completed, the VM process will
3776 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3777 notification.
3778 <note>
3779 In the @a done = @c true case, the server must run its own filters
3780 and filters of all VMs but this one on the detached device
3781 as if it were just attached to the host computer.
3782 </note>
3783 </desc>
3784 <param name="id" type="uuid" mod="string" dir="in"/>
3785 <param name="done" type="boolean" dir="in"/>
3786 </method>
3787
3788 <method name="autoCaptureUSBDevices">
3789 <desc>
3790 Requests a capture all matching USB devices attached to the host.
3791 When the request is completed, the VM process will
3792 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3793 notification per every captured device.
3794 </desc>
3795 </method>
3796
3797 <method name="detachAllUSBDevices">
3798 <desc>
3799 Notification that a VM that is being powered down. The done
3800 parameter indicates whether which stage of the power down
3801 we're at. When @a done = @c false the VM is announcing its
3802 intentions, while when @a done = @c true the VM is reporting
3803 what it has done.
3804 <note>
3805 In the @a done = @c true case, the server must run its own filters
3806 and filters of all VMs but this one on all detach devices as
3807 if they were just attached to the host computer.
3808 </note>
3809 </desc>
3810 <param name="done" type="boolean" dir="in"/>
3811 </method>
3812
3813 <method name="onSessionEnd">
3814 <desc>
3815 Triggered by the given session object when the session is about
3816 to close normally.
3817 </desc>
3818 <param name="session" type="ISession" dir="in">
3819 <desc>Session that is being closed</desc>
3820 </param>
3821 <param name="progress" type="IProgress" dir="return">
3822 <desc>
3823 Used to wait until the corresponding machine is actually
3824 dissociated from the given session on the server.
3825 Returned only when this session is a direct one.
3826 </desc>
3827 </param>
3828 </method>
3829
3830 <method name="beginSavingState">
3831 <desc>
3832 Called by the VM process to inform the server it wants to
3833 save the current state and stop the VM execution.
3834 </desc>
3835 <param name="progress" type="IProgress" dir="in">
3836 <desc>
3837 Progress object created by the VM process to wait until
3838 the state is saved.
3839 </desc>
3840 </param>
3841 <param name="stateFilePath" type="wstring" dir="out">
3842 <desc>
3843 File path the VM process must save the execution state to.
3844 </desc>
3845 </param>
3846 </method>
3847
3848 <method name="endSavingState">
3849 <desc>
3850 Called by the VM process to inform the server that saving
3851 the state previously requested by #beginSavingState is either
3852 successfully finished or there was a failure.
3853
3854 <result name="VBOX_E_FILE_ERROR">
3855 Settings file not accessible.
3856 </result>
3857 <result name="VBOX_E_XML_ERROR">
3858 Could not parse the settings file.
3859 </result>
3860
3861 </desc>
3862
3863 <param name="success" type="boolean" dir="in">
3864 <desc>@c true to indicate success and @c false otherwise.
3865 </desc>
3866 </param>
3867 </method>
3868
3869 <method name="adoptSavedState">
3870 <desc>
3871 Gets called by IConsole::adoptSavedState.
3872 <result name="VBOX_E_FILE_ERROR">
3873 Invalid saved state file path.
3874 </result>
3875 </desc>
3876 <param name="savedStateFile" type="wstring" dir="in">
3877 <desc>Path to the saved state file to adopt.</desc>
3878 </param>
3879 </method>
3880
3881 <method name="beginTakingSnapshot">
3882 <desc>
3883 Called from the VM process to request from the server to perform the
3884 server-side actions of creating a snapshot (creating differencing images
3885 and the snapshot object).
3886
3887 <result name="VBOX_E_FILE_ERROR">
3888 Settings file not accessible.
3889 </result>
3890 <result name="VBOX_E_XML_ERROR">
3891 Could not parse the settings file.
3892 </result>
3893 </desc>
3894 <param name="initiator" type="IConsole" dir="in">
3895 <desc>The console object that initiated this call.</desc>
3896 </param>
3897 <param name="name" type="wstring" dir="in">
3898 <desc>Snapshot name.</desc>
3899 </param>
3900 <param name="description" type="wstring" dir="in">
3901 <desc>Snapshot description.</desc>
3902 </param>
3903 <param name="consoleProgress" type="IProgress" dir="in">
3904 <desc>
3905 Progress object created by the VM process tracking the
3906 snapshot's progress. This has the following sub-operations:
3907 <ul>
3908 <li>setting up (weight 1);</li>
3909 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3910 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3911 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3912 <li>finishing up (weight 1)</li>
3913 </ul>
3914 </desc>
3915 </param>
3916 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3917 <desc>
3918 Whether this is an online snapshot (i.e. the machine is running).
3919 </desc>
3920 </param>
3921 <param name="stateFilePath" type="wstring" dir="out">
3922 <desc>
3923 File path the VM process must save the execution state to.
3924 </desc>
3925 </param>
3926 </method>
3927
3928 <method name="endTakingSnapshot">
3929 <desc>
3930 Called by the VM process to inform the server that the snapshot
3931 previously requested by #beginTakingSnapshot is either
3932 successfully taken or there was a failure.
3933 </desc>
3934
3935 <param name="success" type="boolean" dir="in">
3936 <desc>@c true to indicate success and @c false otherwise</desc>
3937 </param>
3938 </method>
3939
3940 <method name="deleteSnapshot">
3941 <desc>
3942 Gets called by IConsole::deleteSnapshot.
3943 <result name="VBOX_E_INVALID_OBJECT_STATE">
3944 Snapshot has more than one child snapshot.
3945 </result>
3946 </desc>
3947 <param name="initiator" type="IConsole" dir="in">
3948 <desc>The console object that initiated this call.</desc>
3949 </param>
3950 <param name="id" type="uuid" mod="string" dir="in">
3951 <desc>UUID of the snapshot to discard.</desc>
3952 </param>
3953 <param name="machineState" type="MachineState" dir="out">
3954 <desc>New machine state after this operation is started.</desc>
3955 </param>
3956 <param name="progress" type="IProgress" dir="return">
3957 <desc>Progress object to track the operation completion.</desc>
3958 </param>
3959 </method>
3960
3961 <method name="restoreSnapshot">
3962 <desc>
3963 Gets called by IConsole::RestoreSnapshot.
3964 </desc>
3965 <param name="initiator" type="IConsole" dir="in">
3966 <desc>The console object that initiated this call.</desc>
3967 </param>
3968 <param name="snapshot" type="ISnapshot" dir="in">
3969 <desc>The snapshot to restore the VM state from.</desc>
3970 </param>
3971 <param name="machineState" type="MachineState" dir="out">
3972 <desc>New machine state after this operation is started.</desc>
3973 </param>
3974 <param name="progress" type="IProgress" dir="return">
3975 <desc>Progress object to track the operation completion.</desc>
3976 </param>
3977 </method>
3978
3979 <method name="pullGuestProperties">
3980 <desc>
3981 Get the list of the guest properties matching a set of patterns along
3982 with their values, time stamps and flags and give responsibility for
3983 managing properties to the console.
3984 </desc>
3985 <param name="name" type="wstring" dir="out" safearray="yes">
3986 <desc>
3987 The names of the properties returned.
3988 </desc>
3989 </param>
3990 <param name="value" type="wstring" dir="out" safearray="yes">
3991 <desc>
3992 The values of the properties returned. The array entries match the
3993 corresponding entries in the @a name array.
3994 </desc>
3995 </param>
3996 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3997 <desc>
3998 The time stamps of the properties returned. The array entries match
3999 the corresponding entries in the @a name array.
4000 </desc>
4001 </param>
4002 <param name="flags" type="wstring" dir="out" safearray="yes">
4003 <desc>
4004 The flags of the properties returned. The array entries match the
4005 corresponding entries in the @a name array.
4006 </desc>
4007 </param>
4008 </method>
4009
4010 <method name="pushGuestProperties">
4011 <desc>
4012 Set the list of the guest properties matching a set of patterns along
4013 with their values, time stamps and flags and return responsibility for
4014 managing properties to IMachine.
4015 </desc>
4016 <param name="name" type="wstring" dir="in" safearray="yes">
4017 <desc>
4018 The names of the properties.
4019 </desc>
4020 </param>
4021 <param name="value" type="wstring" dir="in" safearray="yes">
4022 <desc>
4023 The values of the properties. The array entries match the
4024 corresponding entries in the @a name array.
4025 </desc>
4026 </param>
4027 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
4028 <desc>
4029 The time stamps of the properties. The array entries match
4030 the corresponding entries in the @a name array.
4031 </desc>
4032 </param>
4033 <param name="flags" type="wstring" dir="in" safearray="yes">
4034 <desc>
4035 The flags of the properties. The array entries match the
4036 corresponding entries in the @a name array.
4037 </desc>
4038 </param>
4039 </method>
4040 <method name="pushGuestProperty">
4041 <desc>
4042 Update a single guest property in IMachine.
4043 </desc>
4044 <param name="name" type="wstring" dir="in">
4045 <desc>
4046 The name of the property to be updated.
4047 </desc>
4048 </param>
4049 <param name="value" type="wstring" dir="in">
4050 <desc>
4051 The value of the property.
4052 </desc>
4053 </param>
4054 <param name="timestamp" type="unsigned long long" dir="in">
4055 <desc>
4056 The timestamp of the property.
4057 </desc>
4058 </param>
4059 <param name="flags" type="wstring" dir="in">
4060 <desc>
4061 The flags of the property.
4062 </desc>
4063 </param>
4064 </method>
4065
4066 <method name="lockMedia">
4067 <desc>
4068 Locks all media attached to the machine for writing and parents of
4069 attached differencing media (if any) for reading. This operation is
4070 atomic so that if it fails no media is actually locked.
4071
4072 This method is intended to be called when the machine is in Starting or
4073 Restoring state. The locked media will be automatically unlocked when
4074 the machine is powered off or crashed.
4075 </desc>
4076 </method>
4077 <method name="unlockMedia">
4078 <desc>
4079 Unlocks all media previously locked using
4080 <link to="IInternalMachineControl::lockMedia"/>.
4081
4082 This method is intended to be used with teleportation so that it is
4083 possible to teleport between processes on the same machine.
4084 </desc>
4085 </method>
4086 </interface>
4087
4088 <interface
4089 name="IBIOSSettings" extends="$unknown"
4090 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4091 wsmap="managed"
4092 >
4093 <desc>
4094 The IBIOSSettings interface represents BIOS settings of the virtual
4095 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4096 </desc>
4097 <attribute name="logoFadeIn" type="boolean">
4098 <desc>Fade in flag for BIOS logo animation.</desc>
4099 </attribute>
4100
4101 <attribute name="logoFadeOut" type="boolean">
4102 <desc>Fade out flag for BIOS logo animation.</desc>
4103 </attribute>
4104
4105 <attribute name="logoDisplayTime" type="unsigned long">
4106 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4107 </attribute>
4108
4109 <attribute name="logoImagePath" type="wstring">
4110 <desc>Local file system path for external BIOS image.</desc>
4111 </attribute>
4112
4113 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4114 <desc>Mode of the BIOS boot device menu.</desc>
4115 </attribute>
4116
4117 <attribute name="ACPIEnabled" type="boolean">
4118 <desc>ACPI support flag.</desc>
4119 </attribute>
4120
4121 <attribute name="IOAPICEnabled" type="boolean">
4122 <desc>
4123 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4124 and support IRQs above 15.
4125 </desc>
4126 </attribute>
4127
4128 <attribute name="timeOffset" type="long long">
4129 <desc>
4130 Offset in milliseconds from the host system time. This allows for
4131 guests running with a different system date/time than the host.
4132 It is equivalent to setting the system date/time in the BIOS except
4133 it is not an absolute value but a relative one. Guest Additions
4134 time synchronization honors this offset.
4135 </desc>
4136 </attribute>
4137
4138 <attribute name="PXEDebugEnabled" type="boolean">
4139 <desc>
4140 PXE debug logging flag. If set, VirtualBox will write extensive
4141 PXE trace information to the release log.
4142 </desc>
4143 </attribute>
4144
4145 </interface>
4146
4147 <interface
4148 name="IMachine" extends="$unknown"
4149 uuid="99404f50-dd10-40d3-889b-dd2f79f1e95e"
4150 wsmap="managed"
4151 >
4152 <desc>
4153 The IMachine interface represents a virtual machine, or guest, created
4154 in VirtualBox.
4155
4156 This interface is used in two contexts. First of all, a collection of
4157 objects implementing this interface is stored in the
4158 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4159 machines that are currently registered with this VirtualBox
4160 installation. Also, once a session has been opened for the given virtual
4161 machine (e.g. the virtual machine is running), the machine object
4162 associated with the open session can be queried from the session object;
4163 see <link to="ISession"/> for details.
4164
4165 The main role of this interface is to expose the settings of the virtual
4166 machine and provide methods to change various aspects of the virtual
4167 machine's configuration. For machine objects stored in the
4168 <link to="IVirtualBox::machines"/> collection, all attributes are
4169 read-only unless explicitly stated otherwise in individual attribute
4170 and method descriptions. In order to change a machine setting, a session
4171 for this machine must be opened using one of
4172 <link to="IVirtualBox::openSession"/>,
4173 <link to="IVirtualBox::openRemoteSession"/> or
4174 <link to="IVirtualBox::openExistingSession"/> methods. After the
4175 session has been successfully opened, a mutable machine object needs to
4176 be queried from the session object and then the desired settings changes
4177 can be applied to the returned object using IMachine attributes and
4178 methods. See the <link to="ISession"/> interface description for more
4179 information about sessions.
4180
4181 Note that IMachine does not provide methods to control virtual machine
4182 execution (such as start the machine, or power it down) -- these methods
4183 are grouped in a separate interface called <link to="IConsole" />.
4184
4185 <see>ISession, IConsole</see>
4186 </desc>
4187
4188 <attribute name="parent" type="IVirtualBox" readonly="yes">
4189 <desc>Associated parent object.</desc>
4190 </attribute>
4191
4192 <attribute name="accessible" type="boolean" readonly="yes">
4193 <desc>
4194 Whether this virtual machine is currently accessible or not.
4195
4196 A machine is always deemed accessible unless it is registered <i>and</i>
4197 its settings file cannot be read or parsed (either because the file itself
4198 is unavailable or has invalid XML contents).
4199
4200 Every time this property is read, the accessibility state of
4201 this machine is re-evaluated. If the returned value is @c false,
4202 the <link to="#accessError"/> property may be used to get the
4203 detailed error information describing the reason of
4204 inaccessibility, including XML error messages.
4205
4206 When the machine is inaccessible, only the following properties
4207 can be used on it:
4208 <ul>
4209 <li><link to="#parent"/></li>
4210 <li><link to="#id"/></li>
4211 <li><link to="#settingsFilePath"/></li>
4212 <li><link to="#accessible"/></li>
4213 <li><link to="#accessError"/></li>
4214 </ul>
4215
4216 An attempt to access any other property or method will return
4217 an error.
4218
4219 The only possible action you can perform on an inaccessible
4220 machine is to unregister it using the
4221 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4222 for the accessibility state once more by querying this
4223 property).
4224
4225 <note>
4226 In the current implementation, once this property returns
4227 @c true, the machine will never become inaccessible
4228 later, even if its settings file cannot be successfully
4229 read/written any more (at least, until the VirtualBox
4230 server is restarted). This limitation may be removed in
4231 future releases.
4232 </note>
4233 </desc>
4234 </attribute>
4235
4236 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4237 <desc>
4238 Error information describing the reason of machine
4239 inaccessibility.
4240
4241 Reading this property is only valid after the last call to
4242 <link to="#accessible"/> returned @c false (i.e. the
4243 machine is currently unaccessible). Otherwise, a @c null
4244 IVirtualBoxErrorInfo object will be returned.
4245 </desc>
4246 </attribute>
4247
4248 <attribute name="name" type="wstring">
4249 <desc>
4250 Name of the virtual machine.
4251
4252 Besides being used for human-readable identification purposes
4253 everywhere in VirtualBox, the virtual machine name is also used
4254 as a name of the machine's settings file and as a name of the
4255 subdirectory this settings file resides in. Thus, every time you
4256 change the value of this property, the settings file will be
4257 renamed once you call <link to="#saveSettings"/> to confirm the
4258 change. The containing subdirectory will be also renamed, but
4259 only if it has exactly the same name as the settings file
4260 itself prior to changing this property (for backward compatibility
4261 with previous API releases). The above implies the following
4262 limitations:
4263 <ul>
4264 <li>The machine name cannot be empty.</li>
4265 <li>The machine name can contain only characters that are valid
4266 file name characters according to the rules of the file
4267 system used to store VirtualBox configuration.</li>
4268 <li>You cannot have two or more machines with the same name
4269 if they use the same subdirectory for storing the machine
4270 settings files.</li>
4271 <li>You cannot change the name of the machine if it is running,
4272 or if any file in the directory containing the settings file
4273 is being used by another running machine or by any other
4274 process in the host operating system at a time when
4275 <link to="#saveSettings"/> is called.
4276 </li>
4277 </ul>
4278 If any of the above limitations are hit, <link to="#saveSettings"/>
4279 will return an appropriate error message explaining the exact
4280 reason and the changes you made to this machine will not be
4281 saved.
4282 <note>
4283 For "legacy" machines created using the
4284 <link to="IVirtualBox::createLegacyMachine"/> call,
4285 the above naming limitations do not apply because the
4286 machine name does not affect the settings file name.
4287 The settings file name remains the same as it was specified
4288 during machine creation and never changes.
4289 </note>
4290 </desc>
4291 </attribute>
4292
4293 <attribute name="description" type="wstring">
4294 <desc>
4295 Description of the virtual machine.
4296
4297 The description attribute can contain any text and is
4298 typically used to describe the hardware and software
4299 configuration of the virtual machine in detail (i.e. network
4300 settings, versions of the installed software and so on).
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="id" type="uuid" mod="string" readonly="yes">
4305 <desc>UUID of the virtual machine.</desc>
4306 </attribute>
4307
4308 <attribute name="OSTypeId" type="wstring">
4309 <desc>
4310 User-defined identifier of the Guest OS type.
4311 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4312 an IGuestOSType object representing details about the given
4313 Guest OS type.
4314 <note>
4315 This value may differ from the value returned by
4316 <link to="IGuest::OSTypeId"/> if Guest Additions are
4317 installed to the guest OS.
4318 </note>
4319 </desc>
4320 </attribute>
4321
4322 <attribute name="HardwareVersion" type="wstring">
4323 <desc>Hardware version identifier. Internal use only for now.</desc>
4324 </attribute>
4325
4326 <attribute name="hardwareUUID" type="uuid" mod="string">
4327 <desc>
4328 The UUID presented to the guest via memory tables, hardware and guest
4329 properties. For most VMs this is the same as the @a id, but for VMs
4330 which have been cloned or teleported it may be the same as the source
4331 VM. This latter is because the guest shouldn't notice that it was
4332 cloned or teleported.
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="CPUCount" type="unsigned long">
4337 <desc>Number of virtual CPUs in the VM.</desc>
4338 </attribute>
4339
4340 <attribute name="memorySize" type="unsigned long">
4341 <desc>System memory size in megabytes.</desc>
4342 </attribute>
4343
4344 <attribute name="memoryBalloonSize" type="unsigned long">
4345 <desc>Initial memory balloon size in megabytes.</desc>
4346 </attribute>
4347
4348 <attribute name="statisticsUpdateInterval" type="unsigned long">
4349 <desc>Initial interval to update guest statistics in seconds.</desc>
4350 </attribute>
4351
4352 <attribute name="VRAMSize" type="unsigned long">
4353 <desc>Video memory size in megabytes.</desc>
4354 </attribute>
4355
4356 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4357 <desc>
4358 This setting determines whether VirtualBox allows this machine to make
4359 use of the 3D graphics support available on the host.</desc>
4360 </attribute>
4361
4362 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4363 <desc>
4364 This setting determines whether VirtualBox allows this machine to make
4365 use of the 2D video acceleration support available on the host.</desc>
4366 </attribute>
4367
4368 <attribute name="monitorCount" type="unsigned long">
4369 <desc>
4370 Number of virtual monitors.
4371 <note>
4372 Only effective on Windows XP and later guests with
4373 Guest Additions installed.
4374 </note>
4375 </desc>
4376 </attribute>
4377
4378 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4379 <desc>Object containing all BIOS settings.</desc>
4380 </attribute>
4381
4382 <attribute name="firmwareType" type="FirmwareType">
4383 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4384 bootstrap in this VM.</desc>
4385 </attribute>
4386
4387 <attribute name="snapshotFolder" type="wstring">
4388 <desc>
4389 Full path to the directory used to store snapshot data
4390 (differencing media and saved state files) of this machine.
4391
4392 The initial value of this property is
4393 <tt>&lt;</tt><link to="#settingsFilePath">
4394 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4395 <link to="#id">machine_uuid</link>
4396 <tt>&gt;</tt>.
4397
4398 Currently, it is an error to try to change this property on
4399 a machine that has snapshots (because this would require to
4400 move possibly large files to a different location).
4401 A separate method will be available for this purpose later.
4402
4403 <note>
4404 Setting this property to @c null or to an empty string will restore
4405 the initial value.
4406 </note>
4407 <note>
4408 When setting this property, the specified path can be
4409 absolute (full path) or relative to the directory where the
4410 <link to="#settingsFilePath">machine settings file</link>
4411 is located. When reading this property, a full path is
4412 always returned.
4413 </note>
4414 <note>
4415 The specified path may not exist, it will be created
4416 when necessary.
4417 </note>
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4422 <desc>VRDP server object.</desc>
4423 </attribute>
4424
4425 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4426 <desc>Array of media attached to this machine.</desc>
4427 </attribute>
4428
4429 <attribute name="USBController" type="IUSBController" readonly="yes">
4430 <desc>
4431 Associated USB controller object.
4432
4433 <note>
4434 If USB functionality is not available in the given edition of
4435 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4436 </note>
4437 </desc>
4438 </attribute>
4439
4440 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4441 <desc>Associated audio adapter, always present.</desc>
4442 </attribute>
4443
4444 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4445 <desc>Array of storage controllers attached to this machine.</desc>
4446 </attribute>
4447
4448 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4449 <desc>
4450 Full name of the file containing machine settings data.
4451 </desc>
4452 </attribute>
4453
4454 <attribute name="settingsModified" type="boolean" readonly="yes">
4455 <desc>
4456 Whether the settings of this machine have been modified
4457 (but neither yet saved nor discarded).
4458 <note>
4459 Reading this property is only valid on instances returned
4460 by <link to="ISession::machine"/> and on new machines
4461 created by <link to="IVirtualBox::createMachine"/> or opened
4462 by <link to="IVirtualBox::openMachine"/> but not
4463 yet registered, or on unregistered machines after calling
4464 <link to="IVirtualBox::unregisterMachine"/>. For all other
4465 cases, the settings can never be modified.
4466 </note>
4467 <note>
4468 For newly created unregistered machines, the value of this
4469 property is always @c true until <link to="#saveSettings"/>
4470 is called (no matter if any machine settings have been
4471 changed after the creation or not). For opened machines
4472 the value is set to @c false (and then follows to normal rules).
4473 </note>
4474 </desc>
4475 </attribute>
4476
4477 <attribute name="sessionState" type="SessionState" readonly="yes">
4478 <desc>Current session state for this machine.</desc>
4479 </attribute>
4480
4481 <attribute name="sessionType" type="wstring" readonly="yes">
4482 <desc>
4483 Type of the session. If <link to="#sessionState"/> is
4484 SessionSpawning or SessionOpen, this attribute contains the
4485 same value as passed to the
4486 <link to="IVirtualBox::openRemoteSession"/> method in the
4487 @a type parameter. If the session was opened directly using
4488 <link to="IVirtualBox::openSession"/>, or if
4489 <link to="#sessionState"/> is SessionClosed, the value of this
4490 attribute is an empty string.
4491 </desc>
4492 </attribute>
4493
4494 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4495 <desc>
4496 Identifier of the session process. This attribute contains the
4497 platform-dependent identifier of the process that has opened a
4498 direct session for this machine using the
4499 <link to="IVirtualBox::openSession"/> call. The returned value
4500 is only valid if <link to="#sessionState"/> is SessionOpen or
4501 SessionClosing (i.e. a session is currently open or being
4502 closed) by the time this property is read.
4503 </desc>
4504 </attribute>
4505
4506 <attribute name="state" type="MachineState" readonly="yes">
4507 <desc>Current execution state of this machine.</desc>
4508 </attribute>
4509
4510 <attribute name="lastStateChange" type="long long" readonly="yes">
4511 <desc>
4512 Time stamp of the last execution state change,
4513 in milliseconds since 1970-01-01 UTC.
4514 </desc>
4515 </attribute>
4516
4517 <attribute name="stateFilePath" type="wstring" readonly="yes">
4518 <desc>
4519 Full path to the file that stores the execution state of
4520 the machine when it is in the <link to="MachineState_Saved"/> state.
4521 <note>
4522 When the machine is not in the Saved state, this attribute is
4523 an empty string.
4524 </note>
4525 </desc>
4526 </attribute>
4527
4528 <attribute name="logFolder" type="wstring" readonly="yes">
4529 <desc>
4530 Full path to the folder that stores a set of rotated log files
4531 recorded during machine execution. The most recent log file is
4532 named <tt>VBox.log</tt>, the previous log file is
4533 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4534 in the current version).
4535 </desc>
4536 </attribute>
4537
4538 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4539 <desc>
4540 Current snapshot of this machine. This is @c null if the machine
4541 currently has no snapshots. If it is not @c null, then it was
4542 set by one of <link to="Console::takeSnapshot" />,
4543 <link to="Console::deleteSnapshot" />
4544 or <link to="Console::restoreSnapshot" />, depending on which
4545 was called last. See <link to="ISnapshot"/> for details.
4546 </desc>
4547 </attribute>
4548
4549 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4550 <desc>
4551 Number of snapshots taken on this machine. Zero means the
4552 machine doesn't have any snapshots.
4553 </desc>
4554 </attribute>
4555
4556 <attribute name="currentStateModified" type="boolean" readonly="yes">
4557 <desc>
4558 Returns @c true if the current state of the machine is not
4559 identical to the state stored in the current snapshot.
4560
4561 The current state is identical to the current snapshot only
4562 directly after one of the following calls are made:
4563
4564 <ul>
4565 <li><link to="IConsole::restoreSnapshot"/>
4566 </li>
4567 <li><link to="IConsole::takeSnapshot"/> (issued on a
4568 "powered off" or "saved" machine, for which
4569 <link to="#settingsModified"/> returns @c false)
4570 </li>
4571 <li><link to="IMachine::setCurrentSnapshot"/>
4572 </li>
4573 </ul>
4574
4575 The current state remains identical until one of the following
4576 happens:
4577 <ul>
4578 <li>settings of the machine are changed</li>
4579 <li>the saved state is discarded</li>
4580 <li>the current snapshot is discarded</li>
4581 <li>an attempt to execute the machine is made</li>
4582 </ul>
4583
4584 <note>
4585 For machines that don't have snapshots, this property is
4586 always @c false.
4587 </note>
4588 </desc>
4589 </attribute>
4590
4591 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4592 <desc>
4593 Collection of shared folders for this machine (permanent shared
4594 folders). These folders are shared automatically at machine startup
4595 and available only to the guest OS installed within this machine.
4596
4597 New shared folders are added to the collection using
4598 <link to="#createSharedFolder"/>. Existing shared folders can be
4599 removed using <link to="#removeSharedFolder"/>.
4600 </desc>
4601 </attribute>
4602
4603 <attribute name="clipboardMode" type="ClipboardMode">
4604 <desc>
4605 Synchronization mode between the host OS clipboard
4606 and the guest OS clipboard.
4607 </desc>
4608 </attribute>
4609
4610 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4611 <desc>
4612 A comma-separated list of simple glob patterns. Changes to guest
4613 properties whose name matches one of the patterns will generate an
4614 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4615 </desc>
4616 </attribute>
4617
4618 <attribute name="teleporterEnabled" type="boolean">
4619 <desc>
4620 When set to @a true, the virtual machine becomes a target teleporter
4621 the next time it is powered on. This can only set to @a true when the
4622 VM is in the @a PoweredOff or @a Aborted state.
4623
4624 This property is automatically set to @a false when the VM is powered
4625 on.
4626 </desc>
4627 </attribute>
4628
4629 <attribute name="teleporterPort" type="unsigned long">
4630 <desc>
4631 The TCP port the target teleporter will listen for incoming
4632 teleportations on.
4633
4634 0 means the port is automatically selected upon power on. The actual
4635 value can be read from this property while the machine is waiting for
4636 incoming teleportations.
4637 </desc>
4638 </attribute>
4639
4640 <attribute name="teleporterAddress" type="wstring">
4641 <desc>
4642 The address the target teleporter will listen on. If set to an empty
4643 string, it will listen on all addresses.
4644 </desc>
4645 </attribute>
4646
4647 <attribute name="teleporterPassword" type="wstring">
4648 <desc>
4649 The password the to check for on the target teleporter. This is just a
4650 very basic measure to prevent simple hacks and operators accidentally
4651 beaming a virtual machine to the wrong place.
4652 </desc>
4653 </attribute>
4654
4655 <method name="setBootOrder">
4656 <desc>
4657 Puts the given device to the specified position in
4658 the boot order.
4659
4660 To indicate that no device is associated with the given position,
4661 <link to="DeviceType_Null"/> should be used.
4662
4663 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4664
4665 <result name="E_INVALIDARG">
4666 Boot @a position out of range.
4667 </result>
4668 <result name="E_NOTIMPL">
4669 Booting from USB @a device currently not supported.
4670 </result>
4671
4672 </desc>
4673 <param name="position" type="unsigned long" dir="in">
4674 <desc>
4675 Position in the boot order (@c 1 to the total number of
4676 devices the machine can boot from, as returned by
4677 <link to="ISystemProperties::maxBootPosition"/>).
4678 </desc>
4679 </param>
4680 <param name="device" type="DeviceType" dir="in">
4681 <desc>
4682 The type of the device used to boot at the given position.
4683 </desc>
4684 </param>
4685 </method>
4686
4687 <method name="getBootOrder" const="yes">
4688 <desc>
4689 Returns the device type that occupies the specified
4690 position in the boot order.
4691
4692 @todo [remove?]
4693 If the machine can have more than one device of the returned type
4694 (such as hard disks), then a separate method should be used to
4695 retrieve the individual device that occupies the given position.
4696
4697 If here are no devices at the given position, then
4698 <link to="DeviceType_Null"/> is returned.
4699
4700 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4701
4702 <result name="E_INVALIDARG">
4703 Boot @a position out of range.
4704 </result>
4705
4706 </desc>
4707 <param name="position" type="unsigned long" dir="in">
4708 <desc>
4709 Position in the boot order (@c 1 to the total number of
4710 devices the machine can boot from, as returned by
4711 <link to="ISystemProperties::maxBootPosition"/>).
4712 </desc>
4713 </param>
4714 <param name="device" type="DeviceType" dir="return">
4715 <desc>
4716 Device at the given position.
4717 </desc>
4718 </param>
4719 </method>
4720
4721 <method name="attachDevice">
4722 <desc>
4723 Attaches a device and optionally mounts a medium to the given storage
4724 controller (<link to="IStorageController" />, identified by @a name),
4725 at the indicated port and device.
4726
4727 This method is intended for managing storage devices in general (it works
4728 for both fixed and removable media). For storage devices supporting removable
4729 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4730 for changing the media while the machine is running.
4731
4732 For the IDE bus, the @a controllerPort parameter can be either
4733 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4734 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4735 to specify the master or the slave device, respectively. (In the
4736 default configuration of virtual machines, the secondary master is
4737 used for a CD/DVD drive.)
4738
4739 For an SATA controller, @a controllerPort must be a number ranging
4740 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4741 be a number ranging from @c 0 to @c 15.
4742
4743 For both SCSI and SATA, the @a device parameter is unused and must
4744 be @c 0.
4745
4746 For fixed media such as hard disks, the given medium identifier cannot
4747 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4748 and floppies.
4749
4750 After calling this returns successfully, a new instance of
4751 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4752 attachments (<link to="IMachine::mediumAttachments"/>).
4753
4754 The specified device slot must not have a device attached to it,
4755 or this method will fail.
4756
4757 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4758 information about attaching media.
4759
4760 <note>
4761 You cannot attach a device to a running machine. Also, you cannot
4762 attach a device to a newly created machine until this machine's
4763 settings are saved to disk using <link to="#saveSettings"/>.
4764 </note>
4765 <note>
4766 If the medium is being attached indirectly, a new differencing medium
4767 will implicitly be created for it and attached instead. If the
4768 changes made to the machine settings (including this indirect
4769 attachment) are later cancelled using <link to="#discardSettings"/>,
4770 this implicitly created differencing medium will implicitly
4771 be deleted.
4772 </note>
4773
4774 <result name="E_INVALIDARG">
4775 SATA device, SATA port, IDE port or IDE slot out of range.
4776 </result>
4777 <result name="VBOX_E_INVALID_OBJECT_STATE">
4778 Attempt to attach medium to an unregistered virtual machine.
4779 </result>
4780 <result name="VBOX_E_INVALID_VM_STATE">
4781 Invalid machine state.
4782 </result>
4783 <result name="VBOX_E_OBJECT_IN_USE">
4784 Hard disk already attached to this or another virtual machine.
4785 </result>
4786
4787 </desc>
4788 <param name="name" type="wstring" dir="in">
4789 <desc>Name of the storage controller to attach the device to.</desc>
4790 </param>
4791 <param name="controllerPort" type="long" dir="in">
4792 <desc>Port to attach the device to.</desc>
4793 </param>
4794 <param name="device" type="long" dir="in">
4795 <desc>Device slot in the given port to attach the device to.</desc>
4796 </param>
4797 <param name="type" type="DeviceType" dir="in">
4798 <desc>Device type of the attached device.</desc>
4799 </param>
4800 <param name="id" type="uuid" mod="string" dir="in">
4801 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4802 medium.</desc>
4803 </param>
4804 </method>
4805
4806 <method name="detachDevice">
4807 <desc>
4808 Detaches the device attached to a device slot of the specified bus.
4809
4810 Detaching the device from the virtual machine is deferred. This means
4811 that the medium remains associated with the machine when this method
4812 returns and gets actually de-associated only after a successful
4813 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4814 for more detailed information about attaching media.
4815
4816 <note>
4817 You cannot detach a device from a running machine.
4818 </note>
4819 <note>
4820 Detaching differencing media implicitly created by <link
4821 to="#attachDevice"/> for the indirect attachment using this
4822 method will <b>not</b> implicitly delete them. The
4823 <link to="IMedium::deleteStorage"/> operation should be
4824 explicitly performed by the caller after the medium is successfully
4825 detached and the settings are saved with
4826 <link to="#saveSettings"/>, if it is the desired action.
4827 </note>
4828
4829 <result name="VBOX_E_INVALID_VM_STATE">
4830 Attempt to detach medium from a running virtual machine.
4831 </result>
4832 <result name="VBOX_E_OBJECT_NOT_FOUND">
4833 No medium attached to given slot/bus.
4834 </result>
4835 <result name="VBOX_E_NOT_SUPPORTED">
4836 Medium format does not support storage deletion.
4837 </result>
4838
4839 </desc>
4840 <param name="name" type="wstring" dir="in">
4841 <desc>Name of the storage controller to detach the medium from.</desc>
4842 </param>
4843 <param name="controllerPort" type="long" dir="in">
4844 <desc>Port number to detach the medium from.</desc>
4845 </param>
4846 <param name="device" type="long" dir="in">
4847 <desc>Device slot number to detach the medium from.</desc>
4848 </param>
4849 </method>
4850
4851 <method name="passthroughDevice">
4852 <desc>
4853 Sets the passthrough mode of an existing DVD device. Changing the
4854 setting while the VM is running is forbidden. The setting is only used
4855 if at VM start the device is configured as a host DVD drive, in all
4856 other cases it is ignored. The device must already exist; see
4857 <link to="IMachine::attachDevice"/> for how to attach a new device.
4858
4859 The @a controllerPort and @a device parameters specify the device slot and
4860 have have the same meaning as with <link to="IMachine::attachDevice" />.
4861
4862 <result name="E_INVALIDARG">
4863 SATA device, SATA port, IDE port or IDE slot out of range.
4864 </result>
4865 <result name="VBOX_E_INVALID_OBJECT_STATE">
4866 Attempt to modify an unregistered virtual machine.
4867 </result>
4868 <result name="VBOX_E_INVALID_VM_STATE">
4869 Invalid machine state.
4870 </result>
4871
4872 </desc>
4873 <param name="name" type="wstring" dir="in">
4874 <desc>Name of the storage controller.</desc>
4875 </param>
4876 <param name="controllerPort" type="long" dir="in">
4877 <desc>Storage controller port.</desc>
4878 </param>
4879 <param name="device" type="long" dir="in">
4880 <desc>Device slot in the given port.</desc>
4881 </param>
4882 <param name="passthrough" type="boolean" dir="in">
4883 <desc>New value for the passthrough setting.</desc>
4884 </param>
4885 </method>
4886
4887 <method name="mountMedium">
4888 <desc>
4889 Mounts a medium (<link to="IMedium" />, identified
4890 by the given UUID @a id) to the given storage controller
4891 (<link to="IStorageController" />, identified by @a name),
4892 at the indicated port and device. The device must already exist;
4893 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4894
4895 This method is intended only for managing removable media, where the
4896 device is fixed but media is changeable at runtime (such as DVDs
4897 and floppies). It cannot be used for fixed media such as hard disks.
4898
4899 The @a controllerPort and @a device parameters specify the device slot and
4900 have have the same meaning as with <link to="IMachine::attachDevice" />.
4901
4902 The specified device slot can have a medium mounted, which will be
4903 unmounted first. Specifying a zero UUID (or an empty string) for
4904 @a medium does just an unmount.
4905
4906 See <link to="IMedium"/> for more detailed information about
4907 attaching media.
4908
4909 <result name="E_INVALIDARG">
4910 SATA device, SATA port, IDE port or IDE slot out of range.
4911 </result>
4912 <result name="VBOX_E_INVALID_OBJECT_STATE">
4913 Attempt to attach medium to an unregistered virtual machine.
4914 </result>
4915 <result name="VBOX_E_INVALID_VM_STATE">
4916 Invalid machine state.
4917 </result>
4918 <result name="VBOX_E_OBJECT_IN_USE">
4919 Medium already attached to this or another virtual machine.
4920 </result>
4921
4922 </desc>
4923 <param name="name" type="wstring" dir="in">
4924 <desc>Name of the storage controller to attach the medium to.</desc>
4925 </param>
4926 <param name="controllerPort" type="long" dir="in">
4927 <desc>Port to attach the medium to.</desc>
4928 </param>
4929 <param name="device" type="long" dir="in">
4930 <desc>Device slot in the given port to attach the medium to.</desc>
4931 </param>
4932 <param name="medium" type="uuid" mod="string" dir="in">
4933 <desc>UUID of the medium to attach. A zero UUID means unmount the
4934 currently mounted medium.</desc>
4935 </param>
4936 <param name="force" type="boolean" dir="in">
4937 <desc>Allows to force unmount/mount of a medium which is locked by
4938 theDevice slot in the given port to attach the medium to.</desc>
4939 </param>
4940 </method>
4941
4942 <method name="getMedium" const="yes">
4943 <desc>
4944 Returns the virtual medium attached to a device slot of the specified
4945 bus.
4946
4947 Note that if the medium was indirectly attached by
4948 <link to="#mountMedium"/> to the given device slot then this
4949 method will return not the same object as passed to the
4950 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4951 more detailed information about mounting a medium.
4952
4953 <result name="VBOX_E_OBJECT_NOT_FOUND">
4954 No medium attached to given slot/bus.
4955 </result>
4956
4957 </desc>
4958 <param name="name" type="wstring" dir="in">
4959 <desc>Name of the storage controller the medium is attached to.</desc>
4960 </param>
4961 <param name="controllerPort" type="long" dir="in">
4962 <desc>Port to query.</desc>
4963 </param>
4964 <param name="device" type="long" dir="in">
4965 <desc>Device slot in the given port to query.</desc>
4966 </param>
4967 <param name="medium" type="IMedium" dir="return">
4968 <desc>Attached medium object.</desc>
4969 </param>
4970 </method>
4971
4972 <method name="getMediumAttachmentsOfController" const="yes">
4973 <desc>
4974 Returns an array of medium attachments which are attached to the
4975 the controller with the given name.
4976
4977 <result name="VBOX_E_OBJECT_NOT_FOUND">
4978 A storage controller with given name doesn't exist.
4979 </result>
4980 </desc>
4981 <param name="name" type="wstring" dir="in"/>
4982 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4983 </method>
4984
4985 <method name="getMediumAttachment" const="yes">
4986 <desc>
4987 Returns a medium attachment which corresponds to the controller with
4988 the given name, on the given port and device slot.
4989
4990 <result name="VBOX_E_OBJECT_NOT_FOUND">
4991 No attachment exists for the given controller/port/device combination.
4992 </result>
4993 </desc>
4994 <param name="name" type="wstring" dir="in"/>
4995 <param name="controllerPort" type="long" dir="in"/>
4996 <param name="device" type="long" dir="in"/>
4997 <param name="attachment" type="IMediumAttachment" dir="return"/>
4998 </method>
4999
5000 <method name="getNetworkAdapter" const="yes">
5001 <desc>
5002 Returns the network adapter associated with the given slot.
5003 Slots are numbered sequentially, starting with zero. The total
5004 number of adapters per machine is defined by the
5005 <link to="ISystemProperties::networkAdapterCount"/> property,
5006 so the maximum slot number is one less than that property's value.
5007
5008 <result name="E_INVALIDARG">
5009 Invalid @a slot number.
5010 </result>
5011
5012 </desc>
5013 <param name="slot" type="unsigned long" dir="in"/>
5014 <param name="adapter" type="INetworkAdapter" dir="return"/>
5015 </method>
5016
5017 <method name="addStorageController">
5018 <desc>
5019 Adds a new storage controller (SCSI or SATA controller) to the
5020 machine and returns it as an instance of
5021 <link to="IStorageController" />.
5022
5023 @a name identifies the controller for subsequent calls such as
5024 <link to="#getStorageControllerByName" />,
5025 <link to="#getStorageControllerByInstance" />,
5026 <link to="#removeStorageController" />,
5027 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5028
5029 After the controller has been added, you can set its exact
5030 type by setting the <link to="IStorageController::controllerType" />.
5031
5032 <result name="VBOX_E_OBJECT_IN_USE">
5033 A storage controller with given name exists already.
5034 </result>
5035 <result name="E_INVALIDARG">
5036 Invalid @a controllerType.
5037 </result>
5038 </desc>
5039 <param name="name" type="wstring" dir="in"/>
5040 <param name="connectionType" type="StorageBus" dir="in"/>
5041 <param name="controller" type="IStorageController" dir="return"/>
5042 </method>
5043
5044 <method name="getStorageControllerByName" const="yes">
5045 <desc>
5046 Returns a storage controller with the given name.
5047
5048 <result name="VBOX_E_OBJECT_NOT_FOUND">
5049 A storage controller with given name doesn't exist.
5050 </result>
5051 </desc>
5052 <param name="name" type="wstring" dir="in"/>
5053 <param name="storageController" type="IStorageController" dir="return"/>
5054 </method>
5055
5056 <method name="getStorageControllerByInstance" const="yes">
5057 <desc>
5058 Returns a storage controller with the given instance number.
5059
5060 <result name="VBOX_E_OBJECT_NOT_FOUND">
5061 A storage controller with given instance number doesn't exist.
5062 </result>
5063 </desc>
5064 <param name="instance" type="unsigned long" dir="in"/>
5065 <param name="storageController" type="IStorageController" dir="return"/>
5066 </method>
5067
5068 <method name="removeStorageController">
5069 <desc>
5070 Removes a storage controller from the machine.
5071
5072 <result name="VBOX_E_OBJECT_NOT_FOUND">
5073 A storage controller with given name doesn't exist.
5074 </result>
5075 </desc>
5076 <param name="name" type="wstring" dir="in"/>
5077 </method>
5078
5079 <method name="getSerialPort" const="yes">
5080 <desc>
5081 Returns the serial port associated with the given slot.
5082 Slots are numbered sequentially, starting with zero. The total
5083 number of serial ports per machine is defined by the
5084 <link to="ISystemProperties::serialPortCount"/> property,
5085 so the maximum slot number is one less than that property's value.
5086
5087 <result name="E_INVALIDARG">
5088 Invalid @a slot number.
5089 </result>
5090
5091 </desc>
5092 <param name="slot" type="unsigned long" dir="in"/>
5093 <param name="port" type="ISerialPort" dir="return"/>
5094 </method>
5095
5096 <method name="getParallelPort" const="yes">
5097 <desc>
5098 Returns the parallel port associated with the given slot.
5099 Slots are numbered sequentially, starting with zero. The total
5100 number of parallel ports per machine is defined by the
5101 <link to="ISystemProperties::parallelPortCount"/> property,
5102 so the maximum slot number is one less than that property's value.
5103
5104 <result name="E_INVALIDARG">
5105 Invalid @a slot number.
5106 </result>
5107
5108 </desc>
5109 <param name="slot" type="unsigned long" dir="in"/>
5110 <param name="port" type="IParallelPort" dir="return"/>
5111 </method>
5112
5113 <method name="getExtraDataKeys">
5114 <desc>
5115 Returns an array representing the machine-specific extra data keys
5116 which currently have values defined.
5117 </desc>
5118 <param name="value" type="wstring" dir="return" safearray="yes">
5119 <desc>Array of extra data keys.</desc>
5120 </param>
5121 </method>
5122
5123 <method name="getExtraData">
5124 <desc>
5125 Returns associated machine-specific extra data.
5126
5127 If the requested data @a key does not exist, this function will
5128 succeed and return an empty string in the @a value argument.
5129
5130 <result name="VBOX_E_FILE_ERROR">
5131 Settings file not accessible.
5132 </result>
5133 <result name="VBOX_E_XML_ERROR">
5134 Could not parse the settings file.
5135 </result>
5136
5137 </desc>
5138 <param name="key" type="wstring" dir="in">
5139 <desc>Name of the data key to get.</desc>
5140 </param>
5141 <param name="value" type="wstring" dir="return">
5142 <desc>Value of the requested data key.</desc>
5143 </param>
5144 </method>
5145
5146 <method name="setExtraData">
5147 <desc>
5148 Sets associated machine-specific extra data.
5149
5150 If you pass @c null or an empty string as a key @a value, the given
5151 @a key will be deleted.
5152
5153 <note>
5154 Before performing the actual data change, this method will ask all
5155 registered callbacks using the
5156 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5157 notification for a permission. If one of the callbacks refuses the
5158 new value, the change will not be performed.
5159 </note>
5160 <note>
5161 On success, the
5162 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5163 is called to inform all registered callbacks about a successful data
5164 change.
5165 </note>
5166 <note>
5167 This method can be called outside the machine session and therefore
5168 it's a caller's responsibility to handle possible race conditions
5169 when several clients change the same key at the same time.
5170 </note>
5171
5172 <result name="VBOX_E_FILE_ERROR">
5173 Settings file not accessible.
5174 </result>
5175 <result name="VBOX_E_XML_ERROR">
5176 Could not parse the settings file.
5177 </result>
5178
5179 </desc>
5180 <param name="key" type="wstring" dir="in">
5181 <desc>Name of the data key to set.</desc>
5182 </param>
5183 <param name="value" type="wstring" dir="in">
5184 <desc>Value to assign to the key.</desc>
5185 </param>
5186 </method>
5187
5188 <method name="getCpuProperty" const="yes">
5189 <desc>
5190 Returns the virtual CPU boolean value of the specified property.
5191
5192 <result name="E_INVALIDARG">
5193 Invalid property.
5194 </result>
5195
5196 </desc>
5197 <param name="property" type="CpuPropertyType" dir="in">
5198 <desc>
5199 Property type to query.
5200 </desc>
5201 </param>
5202 <param name="value" type="boolean" dir="return">
5203 <desc>
5204 Property value.
5205 </desc>
5206 </param>
5207 </method>
5208
5209 <method name="setCpuProperty">
5210 <desc>
5211 Sets the virtual CPU boolean value of the specified property.
5212
5213 <result name="E_INVALIDARG">
5214 Invalid property.
5215 </result>
5216
5217 </desc>
5218 <param name="property" type="CpuPropertyType" dir="in">
5219 <desc>
5220 Property type to query.
5221 </desc>
5222 </param>
5223 <param name="value" type="boolean" dir="in">
5224 <desc>
5225 Property value.
5226 </desc>
5227 </param>
5228 </method>
5229
5230 <method name="getCpuIdLeaf" const="yes">
5231 <desc>
5232 Returns the virtual CPU cpuid information for the specified leaf.
5233
5234 Currently supported index values for cpuid:
5235 Standard CPUID leafs: 0 - 0xA
5236 Extended CPUID leafs: 0x80000000 - 0x8000000A
5237
5238 See the Intel and AMD programmer's manuals for detailed information
5239 about the cpuid instruction and its leafs.
5240 <result name="E_INVALIDARG">
5241 Invalid id.
5242 </result>
5243
5244 </desc>
5245 <param name="id" type="unsigned long" dir="in">
5246 <desc>
5247 Cpuid leaf index.
5248 </desc>
5249 </param>
5250 <param name="valEax" type="unsigned long" dir="out">
5251 <desc>
5252 Cpuid leaf value for register eax.
5253 </desc>
5254 </param>
5255 <param name="valEbx" type="unsigned long" dir="out">
5256 <desc>
5257 Cpuid leaf value for register ebx.
5258 </desc>
5259 </param>
5260 <param name="valEcx" type="unsigned long" dir="out">
5261 <desc>
5262 Cpuid leaf value for register ecx.
5263 </desc>
5264 </param>
5265 <param name="valEdx" type="unsigned long" dir="out">
5266 <desc>
5267 Cpuid leaf value for register edx.
5268 </desc>
5269 </param>
5270 </method>
5271
5272 <method name="setCpuIdLeaf" const="yes">
5273 <desc>
5274 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5275 are not passed unmodified. VirtualBox clears features that it doesn't support.
5276
5277 Currently supported index values for cpuid:
5278 Standard CPUID leafs: 0 - 0xA
5279 Extended CPUID leafs: 0x80000000 - 0x8000000A
5280
5281 See the Intel and AMD programmer's manuals for detailed information
5282 about the cpuid instruction and its leafs.
5283
5284 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5285 random crashes inside VMs.
5286 <result name="E_INVALIDARG">
5287 Invalid id.
5288 </result>
5289
5290 </desc>
5291 <param name="id" type="unsigned long" dir="in">
5292 <desc>
5293 Cpuid leaf index.
5294 </desc>
5295 </param>
5296 <param name="valEax" type="unsigned long" dir="in">
5297 <desc>
5298 Cpuid leaf value for register eax.
5299 </desc>
5300 </param>
5301 <param name="valEbx" type="unsigned long" dir="in">
5302 <desc>
5303 Cpuid leaf value for register ebx.
5304 </desc>
5305 </param>
5306 <param name="valEcx" type="unsigned long" dir="in">
5307 <desc>
5308 Cpuid leaf value for register ecx.
5309 </desc>
5310 </param>
5311 <param name="valEdx" type="unsigned long" dir="in">
5312 <desc>
5313 Cpuid leaf value for register edx.
5314 </desc>
5315 </param>
5316 </method>
5317
5318 <method name="removeCpuIdLeaf" const="yes">
5319 <desc>
5320 Removes the virtual CPU cpuid leaf for the specified index
5321
5322 <result name="E_INVALIDARG">
5323 Invalid id.
5324 </result>
5325
5326 </desc>
5327 <param name="id" type="unsigned long" dir="in">
5328 <desc>
5329 Cpuid leaf index.
5330 </desc>
5331 </param>
5332 </method>
5333
5334 <method name="removeAllCpuIdLeafs" const="yes">
5335 <desc>
5336 Removes all the virtual CPU cpuid leafs
5337 </desc>
5338 </method>
5339
5340 <method name="getHWVirtExProperty" const="yes">
5341 <desc>
5342 Returns the value of the specified hardware virtualization boolean property.
5343
5344 <result name="E_INVALIDARG">
5345 Invalid property.
5346 </result>
5347
5348 </desc>
5349 <param name="property" type="HWVirtExPropertyType" dir="in">
5350 <desc>
5351 Property type to query.
5352 </desc>
5353 </param>
5354 <param name="value" type="boolean" dir="return">
5355 <desc>
5356 Property value.
5357 </desc>
5358 </param>
5359 </method>
5360
5361 <method name="setHWVirtExProperty">
5362 <desc>
5363 Sets a new value for the specified hardware virtualization boolean property.
5364
5365 <result name="E_INVALIDARG">
5366 Invalid property.
5367 </result>
5368
5369 </desc>
5370 <param name="property" type="HWVirtExPropertyType" dir="in">
5371 <desc>
5372 Property type to set.
5373 </desc>
5374 </param>
5375 <param name="value" type="boolean" dir="in">
5376 <desc>
5377 New property value.
5378 </desc>
5379 </param>
5380 </method>
5381
5382 <method name="saveSettings">
5383 <desc>
5384 Saves any changes to machine settings made since the session
5385 has been opened or a new machine has been created, or since the
5386 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5387 For registered machines, new settings become visible to all
5388 other VirtualBox clients after successful invocation of this
5389 method.
5390 <note>
5391 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5392 notification event after the configuration has been successfully
5393 saved (only for registered machines).
5394 </note>
5395 <note>
5396 Calling this method is only valid on instances returned
5397 by <link to="ISession::machine"/> and on new machines
5398 created by <link to="IVirtualBox::createMachine"/> but not
5399 yet registered, or on unregistered machines after calling
5400 <link to="IVirtualBox::unregisterMachine"/>.
5401 </note>
5402
5403 <result name="VBOX_E_FILE_ERROR">
5404 Settings file not accessible.
5405 </result>
5406 <result name="VBOX_E_XML_ERROR">
5407 Could not parse the settings file.
5408 </result>
5409 <result name="E_ACCESSDENIED">
5410 Modification request refused.
5411 </result>
5412
5413 </desc>
5414 </method>
5415
5416 <method name="discardSettings">
5417 <desc>
5418 Discards any changes to the machine settings made since the session
5419 has been opened or since the last call to <link to="#saveSettings"/>
5420 or <link to="#discardSettings"/>.
5421 <note>
5422 Calling this method is only valid on instances returned
5423 by <link to="ISession::machine"/> and on new machines
5424 created by <link to="IVirtualBox::createMachine"/> or
5425 opened by <link to="IVirtualBox::openMachine"/> but not
5426 yet registered, or on unregistered machines after calling
5427 <link to="IVirtualBox::unregisterMachine"/>.
5428 </note>
5429
5430 <result name="VBOX_E_INVALID_VM_STATE">
5431 Virtual machine is not mutable.
5432 </result>
5433
5434 </desc>
5435 </method>
5436
5437 <method name="deleteSettings">
5438 <desc>
5439 Deletes the settings file of this machine from disk.
5440 The machine must not be registered in order for this operation
5441 to succeed.
5442 <note>
5443 <link to="#settingsModified"/> will return @c true after this
5444 method successfully returns.
5445 </note>
5446 <note>
5447 Calling this method is only valid on instances returned
5448 by <link to="ISession::machine"/> and on new machines
5449 created by <link to="IVirtualBox::createMachine"/> or
5450 opened by <link to="IVirtualBox::openMachine"/> but not
5451 yet registered, or on unregistered machines after calling
5452 <link to="IVirtualBox::unregisterMachine"/>.
5453 </note>
5454 <note>
5455 The deleted machine settings file can be restored (saved again)
5456 by calling <link to="#saveSettings"/>.
5457 </note>
5458
5459 <result name="VBOX_E_INVALID_VM_STATE">
5460 Cannot delete settings of a registered machine or
5461 machine not mutable.
5462 </result>
5463 <result name="VBOX_E_IPRT_ERROR">
5464 Could not delete the settings file.
5465 </result>
5466
5467 </desc>
5468 </method>
5469
5470 <method name="export">
5471 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5472 steps required to export VirtualBox machines to OVF.
5473 </desc>
5474
5475 <param name="aAppliance" type="IAppliance" dir="in">
5476 <desc>Appliance to export this machine to.</desc>
5477 </param>
5478 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5479 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5480 </param>
5481 </method >
5482
5483 <method name="getSnapshot">
5484 <desc>
5485 Returns a snapshot of this machine with the given UUID.
5486 A @c null UUID can be used to obtain the first snapshot
5487 taken on this machine. This is useful if you want to traverse
5488 the whole tree of snapshots starting from the root.
5489
5490 <result name="VBOX_E_OBJECT_NOT_FOUND">
5491 Virtual machine has no snapshots or snapshot not found.
5492 </result>
5493
5494 </desc>
5495 <param name="id" type="uuid" mod="string" dir="in">
5496 <desc>UUID of the snapshot to get</desc>
5497 </param>
5498 <param name="snapshot" type="ISnapshot" dir="return">
5499 <desc>Snapshot object with the given UUID.</desc>
5500 </param>
5501 </method>
5502
5503 <method name="findSnapshot">
5504 <desc>
5505 Returns a snapshot of this machine with the given name.
5506
5507 <result name="VBOX_E_OBJECT_NOT_FOUND">
5508 Virtual machine has no snapshots or snapshot not found.
5509 </result>
5510
5511 </desc>
5512 <param name="name" type="wstring" dir="in">
5513 <desc>Name of the snapshot to find</desc>
5514 </param>
5515 <param name="snapshot" type="ISnapshot" dir="return">
5516 <desc>Snapshot object with the given name.</desc>
5517 </param>
5518 </method>
5519
5520 <method name="setCurrentSnapshot">
5521 <desc>
5522 Sets the current snapshot of this machine.
5523 <note>
5524 In the current implementation, this operation is not
5525 implemented.
5526 </note>
5527 </desc>
5528 <param name="id" type="uuid" mod="string" dir="in">
5529 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5530 </param>
5531 </method>
5532
5533 <method name="createSharedFolder">
5534 <desc>
5535 Creates a new permanent shared folder by associating the given logical
5536 name with the given host path, adds it to the collection of shared
5537 folders and starts sharing it. Refer to the description of
5538 <link to="ISharedFolder"/> to read more about logical names.
5539
5540 <result name="VBOX_E_OBJECT_IN_USE">
5541 Shared folder already exists.
5542 </result>
5543 <result name="VBOX_E_FILE_ERROR">
5544 Shared folder @a hostPath not accessible.
5545 </result>
5546
5547 </desc>
5548 <param name="name" type="wstring" dir="in">
5549 <desc>Unique logical name of the shared folder.</desc>
5550 </param>
5551 <param name="hostPath" type="wstring" dir="in">
5552 <desc>Full path to the shared folder in the host file system.</desc>
5553 </param>
5554 <param name="writable" type="boolean" dir="in">
5555 <desc>Whether the share is writable or readonly</desc>
5556 </param>
5557 </method>
5558
5559 <method name="removeSharedFolder">
5560 <desc>
5561 Removes the permanent shared folder with the given name previously
5562 created by <link to="#createSharedFolder"/> from the collection of
5563 shared folders and stops sharing it.
5564
5565 <result name="VBOX_E_INVALID_VM_STATE">
5566 Virtual machine is not mutable.
5567 </result>
5568 <result name="VBOX_E_OBJECT_NOT_FOUND">
5569 Shared folder @a name does not exist.
5570 </result>
5571
5572 </desc>
5573 <param name="name" type="wstring" dir="in">
5574 <desc>Logical name of the shared folder to remove.</desc>
5575 </param>
5576 </method>
5577
5578 <method name="canShowConsoleWindow">
5579 <desc>
5580 Returns @c true if the VM console process can activate the
5581 console window and bring it to foreground on the desktop of
5582 the host PC.
5583 <note>
5584 This method will fail if a session for this machine is not
5585 currently open.
5586 </note>
5587
5588 <result name="VBOX_E_INVALID_VM_STATE">
5589 Machine session is not open.
5590 </result>
5591
5592 </desc>
5593 <param name="canShow" type="boolean" dir="return">
5594 <desc>
5595 @c true if the console window can be shown and @c false otherwise.
5596 </desc>
5597 </param>
5598 </method>
5599
5600 <method name="showConsoleWindow">
5601 <desc>
5602 Activates the console window and brings it to foreground on
5603 the desktop of the host PC. Many modern window managers on
5604 many platforms implement some sort of focus stealing
5605 prevention logic, so that it may be impossible to activate
5606 a window without the help of the currently active
5607 application. In this case, this method will return a non-zero
5608 identifier that represents the top-level window of the VM
5609 console process. The caller, if it represents a currently
5610 active process, is responsible to use this identifier (in a
5611 platform-dependent manner) to perform actual window
5612 activation.
5613 <note>
5614 This method will fail if a session for this machine is not
5615 currently open.
5616 </note>
5617
5618 <result name="VBOX_E_INVALID_VM_STATE">
5619 Machine session is not open.
5620 </result>
5621
5622 </desc>
5623 <param name="winId" type="unsigned long long" dir="return">
5624 <desc>
5625 Platform-dependent identifier of the top-level VM console
5626 window, or zero if this method has performed all actions
5627 necessary to implement the <i>show window</i> semantics for
5628 the given platform and/or VirtualBox front-end.
5629 </desc>
5630 </param>
5631 </method>
5632
5633 <method name="getGuestProperty">
5634 <desc>
5635 Reads an entry from the machine's guest property store.
5636
5637 <result name="VBOX_E_INVALID_VM_STATE">
5638 Machine session is not open.
5639 </result>
5640
5641 </desc>
5642 <param name="name" type="wstring" dir="in">
5643 <desc>
5644 The name of the property to read.
5645 </desc>
5646 </param>
5647 <param name="value" type="wstring" dir="out">
5648 <desc>
5649 The value of the property. If the property does not exist then this
5650 will be empty.
5651 </desc>
5652 </param>
5653 <param name="timestamp" type="unsigned long long" dir="out">
5654 <desc>
5655 The time at which the property was last modified, as seen by the
5656 server process.
5657 </desc>
5658 </param>
5659 <param name="flags" type="wstring" dir="out">
5660 <desc>
5661 Additional property parameters, passed as a comma-separated list of
5662 "name=value" type entries.
5663 </desc>
5664 </param>
5665 </method>
5666
5667 <method name="getGuestPropertyValue">
5668 <desc>
5669 Reads a value from the machine's guest property store.
5670
5671 <result name="VBOX_E_INVALID_VM_STATE">
5672 Machine session is not open.
5673 </result>
5674
5675 </desc>
5676 <param name="property" type="wstring" dir="in">
5677 <desc>
5678 The name of the property to read.
5679 </desc>
5680 </param>
5681 <param name="value" type="wstring" dir="return">
5682 <desc>
5683 The value of the property. If the property does not exist then this
5684 will be empty.
5685 </desc>
5686 </param>
5687 </method>
5688
5689 <method name="getGuestPropertyTimestamp">
5690 <desc>
5691 Reads a property timestamp from the machine's guest property store.
5692
5693 <result name="VBOX_E_INVALID_VM_STATE">
5694 Machine session is not open.
5695 </result>
5696
5697 </desc>
5698 <param name="property" type="wstring" dir="in">
5699 <desc>
5700 The name of the property to read.
5701 </desc>
5702 </param>
5703 <param name="value" type="unsigned long long" dir="return">
5704 <desc>
5705 The timestamp. If the property does not exist then this will be
5706 empty.
5707 </desc>
5708 </param>
5709 </method>
5710
5711 <method name="setGuestProperty">
5712 <desc>
5713 Sets, changes or deletes an entry in the machine's guest property
5714 store.
5715
5716 <result name="E_ACCESSDENIED">
5717 Property cannot be changed.
5718 </result>
5719 <result name="E_INVALIDARG">
5720 Invalid @a flags.
5721 </result>
5722 <result name="VBOX_E_INVALID_VM_STATE">
5723 Virtual machine is not mutable or session not open.
5724 </result>
5725 <result name="VBOX_E_INVALID_OBJECT_STATE">
5726 Cannot set transient property when machine not running.
5727 </result>
5728
5729 </desc>
5730 <param name="property" type="wstring" dir="in">
5731 <desc>
5732 The name of the property to set, change or delete.
5733 </desc>
5734 </param>
5735 <param name="value" type="wstring" dir="in">
5736 <desc>
5737 The new value of the property to set, change or delete. If the
5738 property does not yet exist and value is non-empty, it will be
5739 created. If the value is @c null or empty, the property will be
5740 deleted if it exists.
5741 </desc>
5742 </param>
5743 <param name="flags" type="wstring" dir="in">
5744 <desc>
5745 Additional property parameters, passed as a comma-separated list of
5746 "name=value" type entries.
5747 </desc>
5748 </param>
5749 </method>
5750
5751 <method name="setGuestPropertyValue">
5752 <desc>
5753 Sets, changes or deletes a value in the machine's guest property
5754 store. The flags field will be left unchanged or created empty for a
5755 new property.
5756
5757 <result name="E_ACCESSDENIED">
5758 Property cannot be changed.
5759 </result>
5760 <result name="VBOX_E_INVALID_VM_STATE">
5761 Virtual machine is not mutable or session not open.
5762 </result>
5763 <result name="VBOX_E_INVALID_OBJECT_STATE">
5764 Cannot set transient property when machine not running.
5765 </result>
5766 </desc>
5767
5768 <param name="property" type="wstring" dir="in">
5769 <desc>
5770 The name of the property to set, change or delete.
5771 </desc>
5772 </param>
5773 <param name="value" type="wstring" dir="in">
5774 <desc>
5775 The new value of the property to set, change or delete. If the
5776 property does not yet exist and value is non-empty, it will be
5777 created. If the value is @c null or empty, the property will be
5778 deleted if it exists.
5779 </desc>
5780 </param>
5781 </method>
5782
5783 <method name="enumerateGuestProperties">
5784 <desc>
5785 Return a list of the guest properties matching a set of patterns along
5786 with their values, time stamps and flags.
5787 </desc>
5788 <param name="patterns" type="wstring" dir="in">
5789 <desc>
5790 The patterns to match the properties against, separated by '|'
5791 characters. If this is empty or @c null, all properties will match.
5792 </desc>
5793 </param>
5794 <param name="name" type="wstring" dir="out" safearray="yes">
5795 <desc>
5796 The names of the properties returned.
5797 </desc>
5798 </param>
5799 <param name="value" type="wstring" dir="out" safearray="yes">
5800 <desc>
5801 The values of the properties returned. The array entries match the
5802 corresponding entries in the @a name array.
5803 </desc>
5804 </param>
5805 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5806 <desc>
5807 The time stamps of the properties returned. The array entries match
5808 the corresponding entries in the @a name array.
5809 </desc>
5810 </param>
5811 <param name="flags" type="wstring" dir="out" safearray="yes">
5812 <desc>
5813 The flags of the properties returned. The array entries match the
5814 corresponding entries in the @a name array.
5815 </desc>
5816 </param>
5817 </method>
5818
5819 <method name="querySavedThumbnailSize">
5820 <desc>
5821 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5822 </desc>
5823 <param name="size" type="unsigned long" dir="out">
5824 <desc>
5825 Size of buffer required to store the bitmap.
5826 </desc>
5827 </param>
5828 <param name="width" type="unsigned long" dir="out">
5829 <desc>
5830 Bitmap width.
5831 </desc>
5832 </param>
5833 <param name="height" type="unsigned long" dir="out">
5834 <desc>
5835 Bitmap height.
5836 </desc>
5837 </param>
5838 </method>
5839
5840 <method name="readSavedThumbnailToArray">
5841 <desc>
5842 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5843 </desc>
5844 <param name="BGR" type="boolean" dir="in">
5845 <desc>
5846 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5847 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5848 </desc>
5849 </param>
5850 <param name="width" type="unsigned long" dir="out">
5851 <desc>
5852 Bitmap width.
5853 </desc>
5854 </param>
5855 <param name="height" type="unsigned long" dir="out">
5856 <desc>
5857 Bitmap height.
5858 </desc>
5859 </param>
5860 <param name="data" type="octet" dir="return" safearray="yes">
5861 <desc>
5862 Array with resulting bitmap data.
5863 </desc>
5864 </param>
5865 </method>
5866
5867 <method name="querySavedScreenshotPNGSize">
5868 <desc>
5869 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5870 </desc>
5871 <param name="size" type="unsigned long" dir="out">
5872 <desc>
5873 Size of buffer required to store the PNG binary data.
5874 </desc>
5875 </param>
5876 <param name="width" type="unsigned long" dir="out">
5877 <desc>
5878 Image width.
5879 </desc>
5880 </param>
5881 <param name="height" type="unsigned long" dir="out">
5882 <desc>
5883 Image height.
5884 </desc>
5885 </param>
5886 </method>
5887
5888 <method name="readSavedScreenshotPNGToArray">
5889 <desc>
5890 Screenshot in PNG format is retrieved to an array of bytes.
5891 </desc>
5892 <param name="width" type="unsigned long" dir="out">
5893 <desc>
5894 Image width.
5895 </desc>
5896 </param>
5897 <param name="height" type="unsigned long" dir="out">
5898 <desc>
5899 Image height.
5900 </desc>
5901 </param>
5902 <param name="data" type="octet" dir="return" safearray="yes">
5903 <desc>
5904 Array with resulting PNG data.
5905 </desc>
5906 </param>
5907 </method>
5908</interface>
5909
5910 <!--
5911 // IConsole
5912 /////////////////////////////////////////////////////////////////////////
5913 -->
5914
5915 <interface
5916 name="IConsoleCallback" extends="$unknown"
5917 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5918 wsmap="suppress"
5919 >
5920
5921 <desc>
5922 This interface is used by a client of the Main API that need to
5923 be notified of events. For example, a graphical user interface
5924 can use this to learn about machine state changes so they can
5925 update the list of virtual machines without having to rely
5926 on polling.
5927
5928 Whenever relevant events occur in VirtualBox, the callbacks in
5929 objects of this interface are called. In order for this to be
5930 useful, a client needs to create its own subclass that implements
5931 this interface in which the methods for the relevant callbacks
5932 are overridden. An instance of this subclass interface can then
5933 be passed to <link to="IConsole::registerCallback" />.
5934 </desc>
5935
5936 <method name="onMousePointerShapeChange">
5937 <desc>
5938 Notification when the guest mouse pointer shape has
5939 changed. The new shape data is given.
5940 </desc>
5941 <param name="visible" type="boolean" dir="in">
5942 <desc>
5943 Flag whether the pointer is visible.
5944 </desc>
5945 </param>
5946 <param name="alpha" type="boolean" dir="in">
5947 <desc>
5948 Flag whether the pointer has an alpha channel.
5949 </desc>
5950 </param>
5951 <param name="xHot" type="unsigned long" dir="in">
5952 <desc>
5953 The pointer hot spot x coordinate.
5954 </desc>
5955 </param>
5956 <param name="yHot" type="unsigned long" dir="in">
5957 <desc>
5958 The pointer hot spot y coordinate.
5959 </desc>
5960 </param>
5961 <param name="width" type="unsigned long" dir="in">
5962 <desc>
5963 Width of the pointer shape in pixels.
5964 </desc>
5965 </param>
5966 <param name="height" type="unsigned long" dir="in">
5967 <desc>
5968 Height of the pointer shape in pixels.
5969 </desc>
5970 </param>
5971 <param name="shape" type="octet" mod="ptr" dir="in">
5972 <desc>
5973 Address of the shape buffer.
5974
5975 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5976 followed by a 32-bpp XOR (color) mask.
5977
5978 For pointers without alpha channel the XOR mask pixels are 32
5979 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5980 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5981
5982 An AND mask is used for pointers with alpha channel, so if the
5983 callback does not support alpha, the pointer could be
5984 displayed as a normal color pointer.
5985
5986 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5987 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5988 height</tt>. The padding bits at the end of each scanline are
5989 undefined.
5990
5991 The XOR mask follows the AND mask on the next 4-byte aligned
5992 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5993 Bytes in the gap between the AND and the XOR mask are undefined.
5994 The XOR mask scanlines have no gap between them and the size of
5995 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5996
5997 <note>
5998 If @a shape is 0, only the pointer visibility is changed.
5999 </note>
6000 </desc>
6001 </param>
6002 </method>
6003
6004 <method name="onMouseCapabilityChange">
6005 <desc>
6006 Notification when the mouse capabilities reported by the
6007 guest have changed. The new capabilities are passed.
6008 </desc>
6009 <param name="supportsAbsolute" type="boolean" dir="in"/>
6010 <param name="needsHostCursor" type="boolean" dir="in"/>
6011 </method>
6012
6013 <method name="onKeyboardLedsChange">
6014 <desc>
6015 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6016 to alter the state of the keyboard LEDs.
6017 </desc>
6018 <param name="numLock" type="boolean" dir="in"/>
6019 <param name="capsLock" type="boolean" dir="in"/>
6020 <param name="scrollLock" type="boolean" dir="in"/>
6021 </method>
6022
6023 <method name="onStateChange">
6024 <desc>
6025 Notification when the execution state of the machine has changed.
6026 The new state will be given.
6027 </desc>
6028 <param name="state" type="MachineState" dir="in"/>
6029 </method>
6030
6031 <method name="onAdditionsStateChange">
6032 <desc>
6033 Notification when a Guest Additions property changes.
6034 Interested callees should query IGuest attributes to
6035 find out what has changed.
6036 </desc>
6037 </method>
6038
6039 <method name="onNetworkAdapterChange">
6040 <desc>
6041 Notification when a property of one of the
6042 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6043 changes. Interested callees should use INetworkAdapter methods and
6044 attributes to find out what has changed.
6045 </desc>
6046 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6047 <desc>Network adapter that is subject to change.</desc>
6048 </param>
6049 </method>
6050
6051 <method name="onSerialPortChange">
6052 <desc>
6053 Notification when a property of one of the
6054 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6055 Interested callees should use ISerialPort methods and attributes
6056 to find out what has changed.
6057 </desc>
6058 <param name="serialPort" type="ISerialPort" dir="in">
6059 <desc>Serial port that is subject to change.</desc>
6060 </param>
6061 </method>
6062
6063 <method name="onParallelPortChange">
6064 <desc>
6065 Notification when a property of one of the
6066 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6067 changes. Interested callees should use ISerialPort methods and
6068 attributes to find out what has changed.
6069 </desc>
6070 <param name="parallelPort" type="IParallelPort" dir="in">
6071 <desc>Parallel port that is subject to change.</desc>
6072 </param>
6073 </method>
6074
6075 <method name="onStorageControllerChange">
6076 <desc>
6077 Notification when a property of one of the
6078 virtual <link to="IMachine::storageControllers">storage controllers</link>
6079 changes. Interested callees should query the corresponding collections
6080 to find out what has changed.
6081 </desc>
6082 </method>
6083
6084 <method name="onMediumChange">
6085 <desc>
6086 Notification when a
6087 <link to="IMachine::mediumAttachments">medium attachment</link>
6088 changes.
6089 </desc>
6090 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6091 <desc>Medium attachment that is subject to change.</desc>
6092 </param>
6093 </method>
6094
6095 <method name="onVRDPServerChange">
6096 <desc>
6097 Notification when a property of the
6098 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6099 Interested callees should use IVRDPServer methods and attributes to
6100 find out what has changed.
6101 </desc>
6102 </method>
6103
6104 <method name="onRemoteDisplayInfoChange">
6105 <desc>
6106 Notification when the status of the VRDP server changes. Interested callees
6107 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6108 attributes to find out what is the current status.
6109 </desc>
6110 </method>
6111
6112 <method name="onUSBControllerChange">
6113 <desc>
6114 Notification when a property of the virtual
6115 <link to="IMachine::USBController">USB controller</link> changes.
6116 Interested callees should use IUSBController methods and attributes to
6117 find out what has changed.
6118 </desc>
6119 </method>
6120
6121 <method name="onUSBDeviceStateChange">
6122 <desc>
6123 Notification when a USB device is attached to or detached from
6124 the virtual USB controller.
6125
6126 This notification is sent as a result of the indirect
6127 request to attach the device because it matches one of the
6128 machine USB filters, or as a result of the direct request
6129 issued by <link to="IConsole::attachUSBDevice"/> or
6130 <link to="IConsole::detachUSBDevice"/>.
6131
6132 This notification is sent in case of both a succeeded and a
6133 failed request completion. When the request succeeds, the
6134 @a error parameter is @c null, and the given device has been
6135 already added to (when @a attached is @c true) or removed from
6136 (when @a attached is @c false) the collection represented by
6137 <link to="IConsole::USBDevices"/>. On failure, the collection
6138 doesn't change and the @a error parameter represents the error
6139 message describing the failure.
6140
6141 </desc>
6142 <param name="device" type="IUSBDevice" dir="in">
6143 <desc>Device that is subject to state change.</desc>
6144 </param>
6145 <param name="attached" type="boolean" dir="in">
6146 <desc>
6147 @c true if the device was attached and @c false otherwise.
6148 </desc>
6149 </param>
6150 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6151 <desc>
6152 @c null on success or an error message object on failure.
6153 </desc>
6154 </param>
6155 </method>
6156
6157 <method name="onSharedFolderChange">
6158 <desc>
6159 Notification when a shared folder is added or removed.
6160 The @a scope argument defines one of three scopes:
6161 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6162 (<link to="Scope_Global">Global</link>),
6163 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6164 the machine (<link to="Scope_Machine">Machine</link>) or <link
6165 to="IConsole::sharedFolders">transient shared folders</link> of the
6166 machine (<link to="Scope_Session">Session</link>). Interested callees
6167 should use query the corresponding collections to find out what has
6168 changed.
6169 </desc>
6170 <param name="scope" type="Scope" dir="in">
6171 <desc>Scope of the notification.</desc>
6172 </param>
6173 </method>
6174
6175 <method name="onRuntimeError">
6176 <desc>
6177 Notification when an error happens during the virtual
6178 machine execution.
6179
6180 There are three kinds of runtime errors:
6181 <ul>
6182 <li><i>fatal</i></li>
6183 <li><i>non-fatal with retry</i></li>
6184 <li><i>non-fatal warnings</i></li>
6185 </ul>
6186
6187 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6188 to @c true. In case of fatal errors, the virtual machine
6189 execution is always paused before calling this notification, and
6190 the notification handler is supposed either to immediately save
6191 the virtual machine state using <link to="IConsole::saveState"/>
6192 or power it off using <link to="IConsole::powerDown"/>.
6193 Resuming the execution can lead to unpredictable results.
6194
6195 <b>Non-fatal</b> errors and warnings are indicated by the
6196 @a fatal parameter set to @c false. If the virtual machine
6197 is in the Paused state by the time the error notification is
6198 received, it means that the user can <i>try to resume</i> the machine
6199 execution after attempting to solve the problem that caused the
6200 error. In this case, the notification handler is supposed
6201 to show an appropriate message to the user (depending on the
6202 value of the @a id parameter) that offers several actions such
6203 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6204 wants to retry, the notification handler should continue
6205 the machine execution using the <link to="IConsole::resume"/>
6206 call. If the machine execution is not Paused during this
6207 notification, then it means this notification is a <i>warning</i>
6208 (for example, about a fatal condition that can happen very soon);
6209 no immediate action is required from the user, the machine
6210 continues its normal execution.
6211
6212 Note that in either case the notification handler
6213 <b>must not</b> perform any action directly on a thread
6214 where this notification is called. Everything it is allowed to
6215 do is to post a message to another thread that will then talk
6216 to the user and take the corresponding action.
6217
6218 Currently, the following error identifiers are known:
6219 <ul>
6220 <li><tt>"HostMemoryLow"</tt></li>
6221 <li><tt>"HostAudioNotResponding"</tt></li>
6222 <li><tt>"VDIStorageFull"</tt></li>
6223 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6224 </ul>
6225
6226 <note>
6227 This notification is not designed to be implemented by
6228 more than one callback at a time. If you have multiple
6229 IConsoleCallback instances registered on the given
6230 IConsole object, make sure you simply do nothing but
6231 return @c S_OK from all but one of them that does actual
6232 user notification and performs necessary actions.
6233 </note>
6234
6235 </desc>
6236 <param name="fatal" type="boolean" dir="in">
6237 <desc>Whether the error is fatal or not</desc>
6238 </param>
6239 <param name="id" type="wstring" dir="in">
6240 <desc>Error identifier</desc>
6241 </param>
6242 <param name="message" type="wstring" dir="in">
6243 <desc>Optional error message</desc>
6244 </param>
6245 </method>
6246
6247 <method name="onCanShowWindow">
6248 <desc>
6249 Notification when a call to
6250 <link to="IMachine::canShowConsoleWindow"/> is made by a
6251 front-end to check if a subsequent call to
6252 <link to="IMachine::showConsoleWindow"/> can succeed.
6253
6254 The callee should give an answer appropriate to the current
6255 machine state in the @a canShow argument. This answer must
6256 remain valid at least until the next
6257 <link to="IConsole::state">machine state</link> change.
6258
6259 <note>
6260 This notification is not designed to be implemented by
6261 more than one callback at a time. If you have multiple
6262 IConsoleCallback instances registered on the given
6263 IConsole object, make sure you simply do nothing but
6264 return @c true and @c S_OK from all but one of them that
6265 actually manages console window activation.
6266 </note>
6267 </desc>
6268 <param name="canShow" type="boolean" dir="return">
6269 <desc>
6270 @c true if the console window can be shown and @c false otherwise.
6271 </desc>
6272 </param>
6273 </method>
6274
6275 <method name="onShowWindow">
6276 <desc>
6277 Notification when a call to
6278 <link to="IMachine::showConsoleWindow"/>
6279 requests the console window to be activated and brought to
6280 foreground on the desktop of the host PC.
6281
6282 This notification should cause the VM console process to
6283 perform the requested action as described above. If it is
6284 impossible to do it at a time of this notification, this
6285 method should return a failure.
6286
6287 Note that many modern window managers on many platforms
6288 implement some sort of focus stealing prevention logic, so
6289 that it may be impossible to activate a window without the
6290 help of the currently active application (which is supposedly
6291 an initiator of this notification). In this case, this method
6292 must return a non-zero identifier that represents the
6293 top-level window of the VM console process. The caller, if it
6294 represents a currently active process, is responsible to use
6295 this identifier (in a platform-dependent manner) to perform
6296 actual window activation.
6297
6298 This method must set @a winId to zero if it has performed all
6299 actions necessary to complete the request and the console
6300 window is now active and in foreground, to indicate that no
6301 further action is required on the caller's side.
6302
6303 <note>
6304 This notification is not designed to be implemented by
6305 more than one callback at a time. If you have multiple
6306 IConsoleCallback instances registered on the given
6307 IConsole object, make sure you simply do nothing but
6308 return @c S_OK from all but one of them that actually
6309 manages console window activation.
6310 </note>
6311 </desc>
6312 <param name="winId" type="unsigned long long" dir="return">
6313 <desc>
6314 Platform-dependent identifier of the top-level VM console
6315 window, or zero if this method has performed all actions
6316 necessary to implement the <i>show window</i> semantics for
6317 the given platform and/or this VirtualBox front-end.
6318 </desc>
6319 </param>
6320 </method>
6321
6322 </interface>
6323
6324 <interface
6325 name="IRemoteDisplayInfo" extends="$unknown"
6326 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6327 wsmap="struct"
6328 >
6329 <desc>
6330 Contains information about the remote display (VRDP) capabilities and status.
6331 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6332 </desc>
6333
6334 <attribute name="active" type="boolean" readonly="yes">
6335 <desc>
6336 Whether the remote display connection is active.
6337 </desc>
6338 </attribute>
6339
6340 <attribute name="port" type="long" readonly="yes">
6341 <desc>
6342 VRDP server port number. If this property is equal to <tt>0</tt>, then
6343 the VRDP server failed to start, usually because there are no free TCP
6344 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6345 server has not yet been started.
6346 </desc>
6347 </attribute>
6348
6349 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6350 <desc>
6351 How many times a client connected.
6352 </desc>
6353 </attribute>
6354
6355 <attribute name="beginTime" type="long long" readonly="yes">
6356 <desc>
6357 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6358 </desc>
6359 </attribute>
6360
6361 <attribute name="endTime" type="long long" readonly="yes">
6362 <desc>
6363 When the last connection was terminated or the current time, if
6364 connection is still active, in milliseconds since 1970-01-01 UTC.
6365 </desc>
6366 </attribute>
6367
6368 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6369 <desc>
6370 How many bytes were sent in last or current, if still active, connection.
6371 </desc>
6372 </attribute>
6373
6374 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6375 <desc>
6376 How many bytes were sent in all connections.
6377 </desc>
6378 </attribute>
6379
6380 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6381 <desc>
6382 How many bytes were received in last or current, if still active, connection.
6383 </desc>
6384 </attribute>
6385
6386 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6387 <desc>
6388 How many bytes were received in all connections.
6389 </desc>
6390 </attribute>
6391
6392 <attribute name="user" type="wstring" readonly="yes">
6393 <desc>
6394 Login user name supplied by the client.
6395 </desc>
6396 </attribute>
6397
6398 <attribute name="domain" type="wstring" readonly="yes">
6399 <desc>
6400 Login domain name supplied by the client.
6401 </desc>
6402 </attribute>
6403
6404 <attribute name="clientName" type="wstring" readonly="yes">
6405 <desc>
6406 The client name supplied by the client.
6407 </desc>
6408 </attribute>
6409
6410 <attribute name="clientIP" type="wstring" readonly="yes">
6411 <desc>
6412 The IP address of the client.
6413 </desc>
6414 </attribute>
6415
6416 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6417 <desc>
6418 The client software version number.
6419 </desc>
6420 </attribute>
6421
6422 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6423 <desc>
6424 Public key exchange method used when connection was established.
6425 Values: 0 - RDP4 public key exchange scheme.
6426 1 - X509 certificates were sent to client.
6427 </desc>
6428 </attribute>
6429
6430 </interface>
6431
6432 <interface
6433 name="IConsole" extends="$unknown"
6434 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6435 wsmap="managed"
6436 >
6437 <desc>
6438 The IConsole interface represents an interface to control virtual
6439 machine execution.
6440
6441 The console object that implements the IConsole interface is obtained
6442 from a session object after the session for the given machine has been
6443 opened using one of <link to="IVirtualBox::openSession"/>,
6444 <link to="IVirtualBox::openRemoteSession"/> or
6445 <link to="IVirtualBox::openExistingSession"/> methods.
6446
6447 Methods of the IConsole interface allow the caller to query the current
6448 virtual machine execution state, pause the machine or power it down, save
6449 the machine state or take a snapshot, attach and detach removable media
6450 and so on.
6451
6452 <see>ISession</see>
6453 </desc>
6454
6455 <attribute name="machine" type="IMachine" readonly="yes">
6456 <desc>
6457 Machine object this console is sessioned with.
6458 <note>
6459 This is a convenience property, it has the same value as
6460 <link to="ISession::machine"/> of the corresponding session
6461 object.
6462 </note>
6463 </desc>
6464 </attribute>
6465
6466 <attribute name="state" type="MachineState" readonly="yes">
6467 <desc>
6468 Current execution state of the machine.
6469 <note>
6470 This property always returns the same value as the corresponding
6471 property of the IMachine object this console is sessioned with.
6472 For the process that owns (executes) the VM, this is the
6473 preferable way of querying the VM state, because no IPC
6474 calls are made.
6475 </note>
6476 </desc>
6477 </attribute>
6478
6479 <attribute name="guest" type="IGuest" readonly="yes">
6480 <desc>Guest object.</desc>
6481 </attribute>
6482
6483 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6484 <desc>
6485 Virtual keyboard object.
6486 <note>
6487 If the machine is not running, any attempt to use
6488 the returned object will result in an error.
6489 </note>
6490 </desc>
6491 </attribute>
6492
6493 <attribute name="mouse" type="IMouse" readonly="yes">
6494 <desc>
6495 Virtual mouse object.
6496 <note>
6497 If the machine is not running, any attempt to use
6498 the returned object will result in an error.
6499 </note>
6500 </desc>
6501 </attribute>
6502
6503 <attribute name="display" type="IDisplay" readonly="yes">
6504 <desc>Virtual display object.
6505 <note>
6506 If the machine is not running, any attempt to use
6507 the returned object will result in an error.
6508 </note>
6509 </desc>
6510 </attribute>
6511
6512 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6513 <desc>Debugging interface.</desc>
6514 </attribute>
6515
6516 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6517 <desc>
6518 Collection of USB devices currently attached to the virtual
6519 USB controller.
6520 <note>
6521 The collection is empty if the machine is not running.
6522 </note>
6523 </desc>
6524 </attribute>
6525
6526 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6527 <desc>
6528 List of USB devices currently attached to the remote VRDP client.
6529 Once a new device is physically attached to the remote host computer,
6530 it appears in this list and remains there until detached.
6531 </desc>
6532 </attribute>
6533
6534 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6535 <desc>
6536 Collection of shared folders for the current session. These folders
6537 are called transient shared folders because they are available to the
6538 guest OS running inside the associated virtual machine only for the
6539 duration of the session (as opposed to
6540 <link to="IMachine::sharedFolders"/> which represent permanent shared
6541 folders). When the session is closed (e.g. the machine is powered down),
6542 these folders are automatically discarded.
6543
6544 New shared folders are added to the collection using
6545 <link to="#createSharedFolder"/>. Existing shared folders can be
6546 removed using <link to="#removeSharedFolder"/>.
6547 </desc>
6548 </attribute>
6549
6550 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6551 <desc>
6552 Interface that provides information on Remote Display (VRDP) connection.
6553 </desc>
6554 </attribute>
6555
6556 <method name="powerUp">
6557 <desc>
6558 Starts the virtual machine execution using the current machine
6559 state (that is, its current execution state, current settings and
6560 current storage devices).
6561
6562 If the machine is powered off or aborted, the execution will
6563 start from the beginning (as if the real hardware were just
6564 powered on).
6565
6566 If the machine is in the <link to="MachineState_Saved"/> state,
6567 it will continue its execution the point where the state has
6568 been saved.
6569
6570 <note>
6571 Unless you are trying to write a new VirtualBox front-end that
6572 performs direct machine execution (like the VirtualBox or VBoxSDL
6573 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6574 session opened by <link to="IVirtualBox::openSession"/> and use this
6575 session only to change virtual machine settings. If you simply want to
6576 start virtual machine execution using one of the existing front-ends
6577 (for example the VirtualBox GUI or headless server), simply use
6578 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6579 power up the machine automatically for you.
6580 </note>
6581
6582 <see>#saveState</see>
6583 <result name="VBOX_E_INVALID_VM_STATE">
6584 Virtual machine already running.
6585 </result>
6586 <result name="VBOX_E_HOST_ERROR">
6587 Host interface does not exist or name not set.
6588 </result>
6589 <result name="VBOX_E_FILE_ERROR">
6590 Invalid saved state file.
6591 </result>
6592 </desc>
6593 <param name="progress" type="IProgress" dir="return">
6594 <desc>Progress object to track the operation completion.</desc>
6595 </param>
6596 </method>
6597
6598 <method name="powerUpPaused">
6599 <desc>
6600 Identical to powerUp except that the VM will enter the
6601 <link to="MachineState_Paused"/> state, instead of
6602 <link to="MachineState_Running"/>.
6603
6604 <see>#powerUp</see>
6605 <result name="VBOX_E_INVALID_VM_STATE">
6606 Virtual machine already running.
6607 </result>
6608 <result name="VBOX_E_HOST_ERROR">
6609 Host interface does not exist or name not set.
6610 </result>
6611 <result name="VBOX_E_FILE_ERROR">
6612 Invalid saved state file.
6613 </result>
6614 </desc>
6615 <param name="progress" type="IProgress" dir="return">
6616 <desc>Progress object to track the operation completion.</desc>
6617 </param>
6618 </method>
6619
6620 <method name="powerDown">
6621 <desc>
6622 Initiates the power down procedure to stop the virtual machine
6623 execution.
6624
6625 The completion of the power down procedure is tracked using the returned
6626 IProgress object. After the operation is complete, the machine will go
6627 to the PoweredOff state.
6628 <result name="VBOX_E_INVALID_VM_STATE">
6629 Virtual machine must be Running, Paused or Stuck to be powered down.
6630 </result>
6631 </desc>
6632 <param name="progress" type="IProgress" dir="return">
6633 <desc>Progress object to track the operation completion.</desc>
6634 </param>
6635 </method>
6636
6637 <method name="reset">
6638 <desc>Resets the virtual machine.
6639 <result name="VBOX_E_INVALID_VM_STATE">
6640 Virtual machine not in Running state.
6641 </result>
6642 <result name="VBOX_E_VM_ERROR">
6643 Virtual machine error in reset operation.
6644 </result>
6645 </desc>
6646 </method>
6647
6648 <method name="pause">
6649 <desc>Pauses the virtual machine execution.
6650 <result name="VBOX_E_INVALID_VM_STATE">
6651 Virtual machine not in Running state.
6652 </result>
6653 <result name="VBOX_E_VM_ERROR">
6654 Virtual machine error in suspend operation.
6655 </result>
6656 </desc>
6657 </method>
6658
6659 <method name="resume">
6660 <desc>Resumes the virtual machine execution.
6661 <result name="VBOX_E_INVALID_VM_STATE">
6662 Virtual machine not in Paused state.
6663 </result>
6664 <result name="VBOX_E_VM_ERROR">
6665 Virtual machine error in resume operation.
6666 </result>
6667 </desc>
6668 </method>
6669
6670 <method name="powerButton">
6671 <desc>Sends the ACPI power button event to the guest.
6672 <result name="VBOX_E_INVALID_VM_STATE">
6673 Virtual machine not in Running state.
6674 </result>
6675 <result name="VBOX_E_PDM_ERROR">
6676 Controlled power off failed.
6677 </result>
6678 </desc>
6679 </method>
6680
6681 <method name="sleepButton">
6682 <desc>Sends the ACPI sleep button event to the guest.
6683 <result name="VBOX_E_INVALID_VM_STATE">
6684 Virtual machine not in Running state.
6685 </result>
6686 <result name="VBOX_E_PDM_ERROR">
6687 Sending sleep button event failed.
6688 </result>
6689 </desc>
6690 </method>
6691
6692 <method name="getPowerButtonHandled">
6693 <desc>Checks if the last power button event was handled by guest.
6694 <result name="VBOX_E_PDM_ERROR">
6695 Checking if the event was handled by the guest OS failed.
6696 </result>
6697 </desc>
6698 <param name="handled" type="boolean" dir="return"/>
6699 </method>
6700
6701 <method name="getGuestEnteredACPIMode">
6702 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6703 G1 (sleeping). If this method returns @c false, the guest will
6704 most likely not respond to external ACPI events.
6705 <result name="VBOX_E_INVALID_VM_STATE">
6706 Virtual machine not in Running state.
6707 </result>
6708 </desc>
6709 <param name="entered" type="boolean" dir="return"/>
6710 </method>
6711
6712 <method name="saveState">
6713 <desc>
6714 Saves the current execution state of a running virtual machine
6715 and stops its execution.
6716
6717 After this operation completes, the machine will go to the
6718 Saved state. Next time it is powered up, this state will
6719 be restored and the machine will continue its execution from
6720 the place where it was saved.
6721
6722 This operation differs from taking a snapshot to the effect
6723 that it doesn't create new differencing media. Also, once
6724 the machine is powered up from the state saved using this method,
6725 the saved state is deleted, so it will be impossible to return
6726 to this state later.
6727
6728 <note>
6729 On success, this method implicitly calls
6730 <link to="IMachine::saveSettings"/> to save all current machine
6731 settings (including runtime changes to the DVD medium, etc.).
6732 Together with the impossibility to change any VM settings when it is
6733 in the Saved state, this guarantees adequate hardware
6734 configuration of the machine when it is restored from the saved
6735 state file.
6736 </note>
6737
6738 <note>
6739 The machine must be in the Running or Paused state, otherwise
6740 the operation will fail.
6741 </note>
6742 <result name="VBOX_E_INVALID_VM_STATE">
6743 Virtual machine state neither Running nor Paused.
6744 </result>
6745 <result name="VBOX_E_FILE_ERROR">
6746 Failed to create directory for saved state file.
6747 </result>
6748
6749 <see><link to="#takeSnapshot"/></see>
6750 </desc>
6751 <param name="progress" type="IProgress" dir="return">
6752 <desc>Progress object to track the operation completion.</desc>
6753 </param>
6754 </method>
6755
6756 <method name="adoptSavedState">
6757 <desc>
6758 Associates the given saved state file to the virtual machine.
6759
6760 On success, the machine will go to the Saved state. Next time it is
6761 powered up, it will be restored from the adopted saved state and
6762 continue execution from the place where the saved state file was
6763 created.
6764
6765 The specified saved state file path may be absolute or relative to the
6766 folder the VM normally saves the state to (usually,
6767 <link to="IMachine::snapshotFolder"/>).
6768
6769 <note>
6770 It's a caller's responsibility to make sure the given saved state
6771 file is compatible with the settings of this virtual machine that
6772 represent its virtual hardware (memory size, storage disk configuration
6773 etc.). If there is a mismatch, the behavior of the virtual machine
6774 is undefined.
6775 </note>
6776 <result name="VBOX_E_INVALID_VM_STATE">
6777 Virtual machine state neither PoweredOff nor Aborted.
6778 </result>
6779 </desc>
6780 <param name="savedStateFile" type="wstring" dir="in">
6781 <desc>Path to the saved state file to adopt.</desc>
6782 </param>
6783 </method>
6784
6785 <method name="forgetSavedState">
6786 <desc>
6787 Forgets the saved state of the virtual machine previously created
6788 by <link to="#saveState"/>. Next time the machine is powered up, a
6789 clean boot will occur. If @a remove is @c true the saved state file
6790 is deleted.
6791 <note>
6792 This operation is equivalent to resetting or powering off
6793 the machine without doing a proper shutdown in the guest OS.
6794 </note>
6795 <result name="VBOX_E_INVALID_VM_STATE">
6796 Virtual machine not in state Saved.
6797 </result>
6798 </desc>
6799 <param name="remove" type="boolean" dir="in">
6800 <desc>If @c true remove the saved state file.</desc>
6801 </param>
6802 </method>
6803
6804 <method name="getDeviceActivity">
6805 <desc>
6806 Gets the current activity type of a given device or device group.
6807 <result name="E_INVALIDARG">
6808 Invalid device type.
6809 </result>
6810 </desc>
6811 <param name="type" type="DeviceType" dir="in"/>
6812 <param name="activity" type="DeviceActivity" dir="return"/>
6813 </method>
6814
6815 <method name="attachUSBDevice">
6816 <desc>
6817 Attaches a host USB device with the given UUID to the
6818 USB controller of the virtual machine.
6819
6820 The device needs to be in one of the following states:
6821 <link to="USBDeviceState_Busy"/>,
6822 <link to="USBDeviceState_Available"/> or
6823 <link to="USBDeviceState_Held"/>,
6824 otherwise an error is immediately returned.
6825
6826 When the device state is
6827 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6828 be returned if the host computer refuses to release it for some reason.
6829
6830 <see>IUSBController::deviceFilters, USBDeviceState</see>
6831 <result name="VBOX_E_INVALID_VM_STATE">
6832 Virtual machine state neither Running nor Paused.
6833 </result>
6834 <result name="VBOX_E_PDM_ERROR">
6835 Virtual machine does not have a USB controller.
6836 </result>
6837 </desc>
6838 <param name="id" type="uuid" mod="string" dir="in">
6839 <desc>UUID of the host USB device to attach.</desc>
6840 </param>
6841 </method>
6842
6843 <method name="detachUSBDevice">
6844 <desc>
6845 Detaches an USB device with the given UUID from the USB controller
6846 of the virtual machine.
6847
6848 After this method succeeds, the VirtualBox server re-initiates
6849 all USB filters as if the device were just physically attached
6850 to the host, but filters of this machine are ignored to avoid
6851 a possible automatic re-attachment.
6852
6853 <see>IUSBController::deviceFilters, USBDeviceState</see>
6854
6855 <result name="VBOX_E_PDM_ERROR">
6856 Virtual machine does not have a USB controller.
6857 </result>
6858 <result name="E_INVALIDARG">
6859 USB device not attached to this virtual machine.
6860 </result>
6861 </desc>
6862 <param name="id" type="uuid" mod="string" dir="in">
6863 <desc>UUID of the USB device to detach.</desc>
6864 </param>
6865 <param name="device" type="IUSBDevice" dir="return">
6866 <desc>Detached USB device.</desc>
6867 </param>
6868 </method>
6869
6870 <method name="findUSBDeviceByAddress">
6871 <desc>
6872 Searches for a USB device with the given host address.
6873
6874 <result name="VBOX_E_OBJECT_NOT_FOUND">
6875 Given @c name does not correspond to any USB device.
6876 </result>
6877
6878 <see>IUSBDevice::address</see>
6879 </desc>
6880 <param name="name" type="wstring" dir="in">
6881 <desc>
6882 Address of the USB device (as assigned by the host) to
6883 search for.
6884 </desc>
6885 </param>
6886 <param name="device" type="IUSBDevice" dir="return">
6887 <desc>Found USB device object.</desc>
6888 </param>
6889 </method>
6890
6891 <method name="findUSBDeviceById">
6892 <desc>
6893 Searches for a USB device with the given UUID.
6894
6895 <result name="VBOX_E_OBJECT_NOT_FOUND">
6896 Given @c id does not correspond to any USB device.
6897 </result>
6898
6899 <see>IUSBDevice::id</see>
6900 </desc>
6901 <param name="id" type="uuid" mod="string" dir="in">
6902 <desc>UUID of the USB device to search for.</desc>
6903 </param>
6904 <param name="device" type="IUSBDevice" dir="return">
6905 <desc>Found USB device object.</desc>
6906 </param>
6907 </method>
6908
6909 <method name="createSharedFolder">
6910 <desc>
6911 Creates a transient new shared folder by associating the given logical
6912 name with the given host path, adds it to the collection of shared
6913 folders and starts sharing it. Refer to the description of
6914 <link to="ISharedFolder"/> to read more about logical names.
6915
6916 <result name="VBOX_E_INVALID_VM_STATE">
6917 Virtual machine in Saved state or currently changing state.
6918 </result>
6919 <result name="VBOX_E_FILE_ERROR">
6920 Shared folder already exists or not accessible.
6921 </result>
6922 </desc>
6923 <param name="name" type="wstring" dir="in">
6924 <desc>Unique logical name of the shared folder.</desc>
6925 </param>
6926 <param name="hostPath" type="wstring" dir="in">
6927 <desc>Full path to the shared folder in the host file system.</desc>
6928 </param>
6929 <param name="writable" type="boolean" dir="in">
6930 <desc>Whether the share is writable or readonly</desc>
6931 </param>
6932 </method>
6933
6934 <method name="removeSharedFolder">
6935 <desc>
6936 Removes a transient shared folder with the given name previously
6937 created by <link to="#createSharedFolder"/> from the collection of
6938 shared folders and stops sharing it.
6939 <result name="VBOX_E_INVALID_VM_STATE">
6940 Virtual machine in Saved state or currently changing state.
6941 </result>
6942 <result name="VBOX_E_FILE_ERROR">
6943 Shared folder does not exists.
6944 </result>
6945 </desc>
6946 <param name="name" type="wstring" dir="in">
6947 <desc>Logical name of the shared folder to remove.</desc>
6948 </param>
6949 </method>
6950
6951 <method name="takeSnapshot">
6952 <desc>
6953 Saves the current execution state
6954 and all settings of the machine and creates differencing images
6955 for all normal (non-independent) media.
6956 See <link to="ISnapshot" /> for an introduction to snapshots.
6957
6958 This method can be called for a PoweredOff, Saved (see
6959 <link to="#saveState"/>), Running or
6960 Paused virtual machine. When the machine is PoweredOff, an
6961 offline snapshot is created. When the machine is Running a live
6962 snapshot is created, and an online snapshot is is created when Paused.
6963
6964 The taken snapshot is always based on the
6965 <link to="IMachine::currentSnapshot">current snapshot</link>
6966 of the associated virtual machine and becomes a new current snapshot.
6967
6968 <note>
6969 This method implicitly calls <link to="IMachine::saveSettings"/> to
6970 save all current machine settings before taking an offline snapshot.
6971 </note>
6972
6973 <result name="VBOX_E_INVALID_VM_STATE">
6974 Virtual machine currently changing state.
6975 </result>
6976 </desc>
6977 <param name="name" type="wstring" dir="in">
6978 <desc>Short name for the snapshot.</desc>
6979 </param>
6980 <param name="description" type="wstring" dir="in">
6981 <desc>Optional description of the snapshot.</desc>
6982 </param>
6983 <param name="progress" type="IProgress" dir="return">
6984 <desc>Progress object to track the operation completion.</desc>
6985 </param>
6986 </method>
6987
6988 <method name="deleteSnapshot">
6989 <desc>
6990 Starts discarding the specified snapshot asynchronously.
6991 See <link to="ISnapshot" /> for an introduction to snapshots.
6992
6993 The execution state and settings of the associated machine stored in
6994 the snapshot will be deleted. The contents of all differencing media of
6995 this snapshot will be merged with the contents of their dependent child
6996 media to keep the medium chain valid (in other words, all changes
6997 represented by media being discarded will be propagated to their child
6998 medium). After that, this snapshot's differencing medium will be
6999 deleted. The parent of this snapshot will become a new parent for all
7000 its child snapshots.
7001
7002 If the discarded snapshot is the current one, its parent
7003 snapshot will become a new current snapshot. The current machine
7004 state is not directly affected in this case, except that
7005 currently attached differencing media based on media
7006 of the discarded snapshot will be also merged as described
7007 above.
7008
7009 If the discarded snapshot is the first one (the root snapshot)
7010 and it has exactly one child snapshot, this child snapshot will
7011 become the first snapshot after discarding. If there are no
7012 children at all (i.e. the first snapshot is the only snapshot of
7013 the machine), both the current and the first snapshot of the
7014 machine will be set to @c null. In all other cases, the first
7015 snapshot cannot be discarded.
7016
7017 You cannot discard the snapshot if it
7018 stores <link to="MediumType_Normal">normal</link> (non-differencing)
7019 media that have differencing media based on them. Snapshots of
7020 such kind can be discarded only when every normal medium has either
7021 no children at all or exactly one child. In the former case, the normal
7022 medium simply becomes unused (i.e. not attached to any VM). In the
7023 latter case, it receives all the changes stored in the child medium,
7024 and then it replaces the child medium in the configuration of the
7025 corresponding snapshot or machine.
7026
7027 Also, you cannot discard the snapshot if it stores media
7028 (of any type) having differencing child media that belong
7029 to other machines. Such snapshots can be only discarded after
7030 you discard all snapshots of other machines containing "foreign"
7031 child media, or detach these "foreign" child media from machines
7032 they are attached to.
7033
7034 One particular example of the snapshot storing normal media
7035 is the first snapshot of a virtual machine that had normal media
7036 attached when taking the snapshot. Be careful when
7037 discarding such snapshots because this implicitly commits
7038 changes (made since the snapshot being discarded has been taken)
7039 to normal media (as described above), which may be not what
7040 you want.
7041
7042 The virtual machine is put to
7043 the <link to="MachineState_Discarding">Discarding</link> state until
7044 the discard operation is completed.
7045
7046 <note>
7047 The machine must not be running, otherwise the operation
7048 will fail.
7049 </note>
7050
7051 <note>
7052 Child media of all normal media of the discarded snapshot
7053 must be accessible (see <link to="IMedium::state"/>) for this
7054 operation to succeed. In particular, this means that all virtual
7055 machines, whose media are directly or indirectly based on the
7056 media of discarded snapshot, must be powered off.
7057 </note>
7058 <note>
7059 Merging medium contents can be very time and disk space
7060 consuming, if these media are big in size and have many
7061 children. However, if the snapshot being discarded is the last
7062 (head) snapshot on the branch, the operation will be rather
7063 quick.
7064 </note>
7065 <note>
7066 Note that discarding the current snapshot
7067 will implicitly call <link to="IMachine::saveSettings"/> to
7068 make all current machine settings permanent.
7069 </note>
7070 <result name="VBOX_E_INVALID_VM_STATE">
7071 Virtual machine is running.
7072 </result>
7073 </desc>
7074 <param name="id" type="uuid" mod="string" dir="in">
7075 <desc>UUID of the snapshot to discard.</desc>
7076 </param>
7077 <param name="progress" type="IProgress" dir="return">
7078 <desc>Progress object to track the operation completion.</desc>
7079 </param>
7080 </method>
7081
7082 <method name="restoreSnapshot">
7083 <desc>
7084 Starts resetting the machine's current state to the state contained
7085 in the given snapshot, asynchronously. All current settings of the
7086 machine will be reset and changes stored in differencing media
7087 will be lost.
7088 See <link to="ISnapshot" /> for an introduction to snapshots.
7089
7090 After this operation is successfully completed, new empty differencing
7091 media are created for all normal media of the machine.
7092
7093 If the given snapshot is an online snapshot, the machine will go to
7094 the <link to="MachineState_Saved"> saved state</link>, so that the
7095 next time it is powered on, the execution state will be restored
7096 from the state of the snapshot.
7097
7098 <note>
7099 The machine must not be running, otherwise the operation will fail.
7100 </note>
7101
7102 <note>
7103 If the machine state is <link to="MachineState_Saved">Saved</link>
7104 prior to this operation, the saved state file will be implicitly
7105 discarded (as if <link to="IConsole::forgetSavedState"/> were
7106 called).
7107 </note>
7108
7109 <result name="VBOX_E_INVALID_VM_STATE">
7110 Virtual machine is running.
7111 </result>
7112 </desc>
7113 <param name="snapshot" type="ISnapshot" dir="in">
7114 <desc>The snapshot to restore the VM state from.</desc>
7115 </param>
7116 <param name="progress" type="IProgress" dir="return">
7117 <desc>Progress object to track the operation completion.</desc>
7118 </param>
7119 </method>
7120
7121 <method name="teleport">
7122 <desc>
7123 Teleport the VM to a different host machine or process.
7124
7125 TODO explain the details.
7126
7127 <result name="VBOX_E_INVALID_VM_STATE">
7128 Virtual machine not running or paused.
7129 </result>
7130 </desc>
7131 <param name="hostname" type="wstring" dir="in">
7132 <desc>The name or IP of the host to teleport to.</desc>
7133 </param>
7134 <param name="tcpport" type="unsigned long" dir="in">
7135 <desc>The TCP port to connect to (1..65535).</desc>
7136 </param>
7137 <param name="password" type="wstring" dir="in">
7138 <desc>The password.</desc>
7139 </param>
7140 <param name="progress" type="IProgress" dir="return">
7141 <desc>Progress object to track the operation completion.</desc>
7142 </param>
7143 </method>
7144
7145 <method name="registerCallback">
7146 <desc>
7147 Registers a new console callback on this instance. The methods of the
7148 callback interface will be called by this instance when the appropriate
7149 event occurs.
7150 </desc>
7151 <param name="callback" type="IConsoleCallback" dir="in"/>
7152 </method>
7153
7154 <method name="unregisterCallback">
7155 <desc>
7156 Unregisters the console callback previously registered using
7157 <link to="#registerCallback"/>.
7158 <result name="E_INVALIDARG">
7159 Given @a callback handler is not registered.
7160 </result>
7161 </desc>
7162 <param name="callback" type="IConsoleCallback" dir="in"/>
7163 </method>
7164 </interface>
7165
7166 <!--
7167 // IHost
7168 /////////////////////////////////////////////////////////////////////////
7169 -->
7170
7171 <enum
7172 name="HostNetworkInterfaceMediumType"
7173 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7174 >
7175 <desc>
7176 Type of encapsulation. Ethernet encapsulation includes both wired and
7177 wireless Ethernet connections.
7178 <see>IHostNetworkInterface</see>
7179 </desc>
7180
7181 <const name="Unknown" value="0">
7182 <desc>
7183 The type of interface cannot be determined.
7184 </desc>
7185 </const>
7186 <const name="Ethernet" value="1">
7187 <desc>
7188 Ethernet frame encapsulation.
7189 </desc>
7190 </const>
7191 <const name="PPP" value="2">
7192 <desc>
7193 Point-to-point protocol encapsulation.
7194 </desc>
7195 </const>
7196 <const name="SLIP" value="3">
7197 <desc>
7198 Serial line IP encapsulation.
7199 </desc>
7200 </const>
7201 </enum>
7202
7203 <enum
7204 name="HostNetworkInterfaceStatus"
7205 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7206 >
7207 <desc>
7208 Current status of the interface.
7209 <see>IHostNetworkInterface</see>
7210 </desc>
7211
7212 <const name="Unknown" value="0">
7213 <desc>
7214 The state of interface cannot be determined.
7215 </desc>
7216 </const>
7217 <const name="Up" value="1">
7218 <desc>
7219 The interface is fully operational.
7220 </desc>
7221 </const>
7222 <const name="Down" value="2">
7223 <desc>
7224 The interface is not functioning.
7225 </desc>
7226 </const>
7227 </enum>
7228
7229 <enum
7230 name="HostNetworkInterfaceType"
7231 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7232 >
7233 <desc>
7234 Network interface type.
7235 </desc>
7236 <const name="Bridged" value="1"/>
7237 <const name="HostOnly" value="2"/>
7238 </enum>
7239
7240 <interface
7241 name="IHostNetworkInterface" extends="$unknown"
7242 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7243 wsmap="managed"
7244 >
7245 <desc>
7246 Represents one of host's network interfaces. IP V6 address and network
7247 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7248 separated by colons.
7249 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7250 </desc>
7251 <attribute name="name" type="wstring" readonly="yes">
7252 <desc>Returns the host network interface name.</desc>
7253 </attribute>
7254
7255 <attribute name="id" type="uuid" mod="string" readonly="yes">
7256 <desc>Returns the interface UUID.</desc>
7257 </attribute>
7258
7259 <attribute name="networkName" type="wstring" readonly="yes">
7260 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7261 </attribute>
7262
7263 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7264 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7265 </attribute>
7266
7267 <attribute name="IPAddress" type="wstring" readonly="yes">
7268 <desc>Returns the IP V4 address of the interface.</desc>
7269 </attribute>
7270
7271 <attribute name="networkMask" type="wstring" readonly="yes">
7272 <desc>Returns the network mask of the interface.</desc>
7273 </attribute>
7274
7275 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7276 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7277 </attribute>
7278
7279 <attribute name="IPV6Address" type="wstring" readonly="yes">
7280 <desc>Returns the IP V6 address of the interface.</desc>
7281 </attribute>
7282
7283 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7284 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7285 </attribute>
7286
7287 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7288 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7289 </attribute>
7290
7291 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7292 <desc>Type of protocol encapsulation used.</desc>
7293 </attribute>
7294
7295 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7296 <desc>Status of the interface.</desc>
7297 </attribute>
7298
7299 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7300 <desc>specifies the host interface type.</desc>
7301 </attribute>
7302
7303 <method name="enableStaticIpConfig">
7304 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7305 <param name="IPAddress" type="wstring" dir="in">
7306 <desc>
7307 IP address.
7308 </desc>
7309 </param>
7310 <param name="networkMask" type="wstring" dir="in">
7311 <desc>
7312 network mask.
7313 </desc>
7314 </param>
7315 </method>
7316
7317 <method name="enableStaticIpConfigV6">
7318 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7319 <param name="IPV6Address" type="wstring" dir="in">
7320 <desc>
7321 IP address.
7322 </desc>
7323 </param>
7324 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7325 <desc>
7326 network mask.
7327 </desc>
7328 </param>
7329 </method>
7330
7331 <method name="enableDynamicIpConfig">
7332 <desc>enables the dynamic IP configuration.</desc>
7333 </method>
7334
7335 <method name="dhcpRediscover">
7336 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7337 </method>
7338
7339 </interface>
7340
7341 <interface
7342 name="IHost" extends="$unknown"
7343 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7344 wsmap="managed"
7345 >
7346 <desc>
7347 The IHost interface represents the physical machine that this VirtualBox
7348 installation runs on.
7349
7350 An object implementing this interface is returned by the
7351 <link to="IVirtualBox::host" /> attribute. This interface contains
7352 read-only information about the host's physical hardware (such as what
7353 processors and disks are available, what the host operating system is,
7354 and so on) and also allows for manipulating some of the host's hardware,
7355 such as global USB device filters and host interface networking.
7356
7357 </desc>
7358 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7359 <desc>List of DVD drives available on the host.</desc>
7360 </attribute>
7361
7362 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7363 <desc>List of floppy drives available on the host.</desc>
7364 </attribute>
7365
7366 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7367 <desc>
7368 List of USB devices currently attached to the host.
7369 Once a new device is physically attached to the host computer,
7370 it appears in this list and remains there until detached.
7371
7372 <note>
7373 If USB functionality is not available in the given edition of
7374 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7375 </note>
7376 </desc>
7377 </attribute>
7378
7379 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7380 <desc>
7381 List of USB device filters in action.
7382 When a new device is physically attached to the host computer,
7383 filters from this list are applied to it (in order they are stored
7384 in the list). The first matched filter will determine the
7385 <link to="IHostUSBDeviceFilter::action">action</link>
7386 performed on the device.
7387
7388 Unless the device is ignored by these filters, filters of all
7389 currently running virtual machines
7390 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7391
7392 <note>
7393 If USB functionality is not available in the given edition of
7394 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7395 </note>
7396
7397 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7398 </desc>
7399 </attribute>
7400
7401 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7402 <desc>List of host network interfaces currently defined on the host.</desc>
7403 </attribute>
7404
7405 <attribute name="processorCount" type="unsigned long" readonly="yes">
7406 <desc>Number of (logical) CPUs installed in the host system.</desc>
7407 </attribute>
7408
7409 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7410 <desc>Number of (logical) CPUs online in the host system.</desc>
7411 </attribute>
7412
7413 <method name="getProcessorSpeed">
7414 <desc>Query the (approximate) maximum speed of a specified host CPU in
7415 Megahertz.
7416 </desc>
7417 <param name="cpuId" type="unsigned long" dir="in">
7418 <desc>
7419 Identifier of the CPU.
7420 </desc>
7421 </param>
7422 <param name="speed" type="unsigned long" dir="return">
7423 <desc>
7424 Speed value. 0 is returned if value is not known or @a cpuId is
7425 invalid.
7426 </desc>
7427 </param>
7428 </method>
7429
7430 <method name="getProcessorFeature">
7431 <desc>Query whether a CPU feature is supported or not.</desc>
7432 <param name="feature" type="ProcessorFeature" dir="in">
7433 <desc>
7434 CPU Feature identifier.
7435 </desc>
7436 </param>
7437 <param name="supported" type="boolean" dir="return">
7438 <desc>
7439 Feature is supported or not.
7440 </desc>
7441 </param>
7442 </method>
7443
7444 <method name="getProcessorDescription">
7445 <desc>Query the model string of a specified host CPU.
7446 </desc>
7447 <param name="cpuId" type="unsigned long" dir="in">
7448 <desc>
7449 Identifier of the CPU.
7450 <note>
7451 The current implementation might not necessarily return the
7452 description for this exact CPU.
7453 </note>
7454 </desc>
7455 </param>
7456 <param name="description" type="wstring" dir="return">
7457 <desc>
7458 Model string. An empty string is returned if value is not known or
7459 @a cpuId is invalid.
7460 </desc>
7461 </param>
7462 </method>
7463
7464 <method name="getProcessorCpuIdLeaf">
7465 <desc>
7466 Returns the CPU cpuid information for the specified leaf.
7467 </desc>
7468 <param name="cpuId" type="unsigned long" dir="in">
7469 <desc>
7470 Identifier of the CPU. The CPU most be online.
7471 <note>
7472 The current implementation might not necessarily return the
7473 description for this exact CPU.
7474 </note>
7475 </desc>
7476 </param>
7477 <param name="leaf" type="unsigned long" dir="in">
7478 <desc>
7479 Cpuid leaf index (eax).
7480 </desc>
7481 </param>
7482 <param name="subLeaf" type="unsigned long" dir="in">
7483 <desc>
7484 Cpuid leaf sub index (ecx). This currently only applies to cache
7485 information on Intel CPUs. Use 0 if retriving values for
7486 <link to="IMachine::setCpuIdLeaf"/>.
7487 </desc>
7488 </param>
7489 <param name="valEax" type="unsigned long" dir="out">
7490 <desc>
7491 Cpuid leaf value for register eax.
7492 </desc>
7493 </param>
7494 <param name="valEbx" type="unsigned long" dir="out">
7495 <desc>
7496 Cpuid leaf value for register ebx.
7497 </desc>
7498 </param>
7499 <param name="valEcx" type="unsigned long" dir="out">
7500 <desc>
7501 Cpuid leaf value for register ecx.
7502 </desc>
7503 </param>
7504 <param name="valEdx" type="unsigned long" dir="out">
7505 <desc>
7506 Cpuid leaf value for register edx.
7507 </desc>
7508 </param>
7509 </method>
7510
7511 <attribute name="memorySize" type="unsigned long" readonly="yes">
7512 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7513 </attribute>
7514
7515 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7516 <desc>Available system memory in the host system.</desc>
7517 </attribute>
7518
7519 <attribute name="operatingSystem" type="wstring" readonly="yes">
7520 <desc>Name of the host system's operating system.</desc>
7521 </attribute>
7522
7523 <attribute name="OSVersion" type="wstring" readonly="yes">
7524 <desc>Host operating system's version string.</desc>
7525 </attribute>
7526
7527 <attribute name="UTCTime" type="long long" readonly="yes">
7528 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7529 </attribute>
7530
7531 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7532 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7533 </attribute>
7534
7535 <method name="createHostOnlyNetworkInterface">
7536 <desc>
7537 Creates a new adapter for Host Only Networking.
7538 <result name="E_INVALIDARG">
7539 Host network interface @a name already exists.
7540 </result>
7541 </desc>
7542 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7543 <desc>
7544 Created host interface object.
7545 </desc>
7546 </param>
7547 <param name="progress" type="IProgress" dir="return">
7548 <desc>
7549 Progress object to track the operation completion.
7550 </desc>
7551 </param>
7552 </method>
7553
7554 <method name="removeHostOnlyNetworkInterface">
7555 <desc>
7556 Removes the given Host Only Networking interface.
7557 <result name="VBOX_E_OBJECT_NOT_FOUND">
7558 No host network interface matching @a id found.
7559 </result>
7560 </desc>
7561 <param name="id" type="uuid" mod="string" dir="in">
7562 <desc>
7563 Adapter GUID.
7564 </desc>
7565 </param>
7566 <param name="progress" type="IProgress" dir="return">
7567 <desc>
7568 Progress object to track the operation completion.
7569 </desc>
7570 </param>
7571 </method>
7572
7573 <method name="createUSBDeviceFilter">
7574 <desc>
7575 Creates a new USB device filter. All attributes except
7576 the filter name are set to empty (any match),
7577 <i>active</i> is @c false (the filter is not active).
7578
7579 The created filter can be added to the list of filters using
7580 <link to="#insertUSBDeviceFilter"/>.
7581
7582 <see>#USBDeviceFilters</see>
7583 </desc>
7584 <param name="name" type="wstring" dir="in">
7585 <desc>
7586 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7587 for more info.
7588 </desc>
7589 </param>
7590 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7591 <desc>Created filter object.</desc>
7592 </param>
7593 </method>
7594
7595 <method name="insertUSBDeviceFilter">
7596 <desc>
7597 Inserts the given USB device to the specified position
7598 in the list of filters.
7599
7600 Positions are numbered starting from @c 0. If the specified
7601 position is equal to or greater than the number of elements in
7602 the list, the filter is added at the end of the collection.
7603
7604 <note>
7605 Duplicates are not allowed, so an attempt to insert a
7606 filter already in the list is an error.
7607 </note>
7608 <note>
7609 If USB functionality is not available in the given edition of
7610 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7611 </note>
7612
7613 <see>#USBDeviceFilters</see>
7614
7615 <result name="VBOX_E_INVALID_OBJECT_STATE">
7616 USB device filter is not created within this VirtualBox instance.
7617 </result>
7618 <result name="E_INVALIDARG">
7619 USB device filter already in list.
7620 </result>
7621
7622 </desc>
7623 <param name="position" type="unsigned long" dir="in">
7624 <desc>Position to insert the filter to.</desc>
7625 </param>
7626 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7627 <desc>USB device filter to insert.</desc>
7628 </param>
7629 </method>
7630
7631 <method name="removeUSBDeviceFilter">
7632 <desc>
7633 Removes a USB device filter from the specified position in the
7634 list of filters.
7635
7636 Positions are numbered starting from @c 0. Specifying a
7637 position equal to or greater than the number of elements in
7638 the list will produce an error.
7639
7640 <note>
7641 If USB functionality is not available in the given edition of
7642 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7643 </note>
7644
7645 <see>#USBDeviceFilters</see>
7646
7647 <result name="E_INVALIDARG">
7648 USB device filter list empty or invalid @a position.
7649 </result>
7650
7651 </desc>
7652 <param name="position" type="unsigned long" dir="in">
7653 <desc>Position to remove the filter from.</desc>
7654 </param>
7655 </method>
7656
7657 <method name="findHostDVDDrive">
7658 <desc>
7659 Searches for a host DVD drive with the given @c name.
7660
7661 <result name="VBOX_E_OBJECT_NOT_FOUND">
7662 Given @c name does not correspond to any host drive.
7663 </result>
7664
7665 </desc>
7666 <param name="name" type="wstring" dir="in">
7667 <desc>Name of the host drive to search for</desc>
7668 </param>
7669 <param name="drive" type="IMedium" dir="return">
7670 <desc>Found host drive object</desc>
7671 </param>
7672 </method>
7673
7674 <method name="findHostFloppyDrive">
7675 <desc>
7676 Searches for a host floppy drive with the given @c name.
7677
7678 <result name="VBOX_E_OBJECT_NOT_FOUND">
7679 Given @c name does not correspond to any host floppy drive.
7680 </result>
7681
7682 </desc>
7683 <param name="name" type="wstring" dir="in">
7684 <desc>Name of the host floppy drive to search for</desc>
7685 </param>
7686 <param name="drive" type="IMedium" dir="return">
7687 <desc>Found host floppy drive object</desc>
7688 </param>
7689 </method>
7690
7691 <method name="findHostNetworkInterfaceByName">
7692 <desc>
7693 Searches through all host network interfaces for an interface with
7694 the given @c name.
7695 <note>
7696 The method returns an error if the given @c name does not
7697 correspond to any host network interface.
7698 </note>
7699 </desc>
7700 <param name="name" type="wstring" dir="in">
7701 <desc>Name of the host network interface to search for.</desc>
7702 </param>
7703 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7704 <desc>Found host network interface object.</desc>
7705 </param>
7706 </method>
7707 <method name="findHostNetworkInterfaceById">
7708 <desc>
7709 Searches through all host network interfaces for an interface with
7710 the given GUID.
7711 <note>
7712 The method returns an error if the given GUID does not
7713 correspond to any host network interface.
7714 </note>
7715 </desc>
7716 <param name="id" type="uuid" mod="string" dir="in">
7717 <desc>GUID of the host network interface to search for.</desc>
7718 </param>
7719 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7720 <desc>Found host network interface object.</desc>
7721 </param>
7722 </method>
7723 <method name="findHostNetworkInterfacesOfType">
7724 <desc>
7725 Searches through all host network interfaces and returns a list of interfaces of the specified type
7726 </desc>
7727 <param name="type" type="HostNetworkInterfaceType" dir="in">
7728 <desc>type of the host network interfaces to search for.</desc>
7729 </param>
7730 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7731 <desc>Found host network interface objects.</desc>
7732 </param>
7733 </method>
7734
7735 <method name="findUSBDeviceById">
7736 <desc>
7737 Searches for a USB device with the given UUID.
7738
7739 <result name="VBOX_E_OBJECT_NOT_FOUND">
7740 Given @c id does not correspond to any USB device.
7741 </result>
7742
7743 <see>IHostUSBDevice::id</see>
7744 </desc>
7745 <param name="id" type="uuid" mod="string" dir="in">
7746 <desc>UUID of the USB device to search for.</desc>
7747 </param>
7748 <param name="device" type="IHostUSBDevice" dir="return">
7749 <desc>Found USB device object.</desc>
7750 </param>
7751 </method>
7752
7753 <method name="findUSBDeviceByAddress">
7754 <desc>
7755 Searches for a USB device with the given host address.
7756
7757 <result name="VBOX_E_OBJECT_NOT_FOUND">
7758 Given @c name does not correspond to any USB device.
7759 </result>
7760
7761 <see>IHostUSBDevice::address</see>
7762 </desc>
7763 <param name="name" type="wstring" dir="in">
7764 <desc>
7765 Address of the USB device (as assigned by the host) to
7766 search for.
7767 </desc>
7768 </param>
7769 <param name="device" type="IHostUSBDevice" dir="return">
7770 <desc>Found USB device object.</desc>
7771 </param>
7772 </method>
7773
7774 </interface>
7775
7776 <!--
7777 // ISystemProperties
7778 /////////////////////////////////////////////////////////////////////////
7779 -->
7780
7781 <interface
7782 name="ISystemProperties"
7783 extends="$unknown"
7784 uuid="8030645c-8fef-4320-bb7b-c829f00069dc"
7785 wsmap="managed"
7786 >
7787 <desc>
7788 The ISystemProperties interface represents global properties of the given
7789 VirtualBox installation.
7790
7791 These properties define limits and default values for various attributes
7792 and parameters. Most of the properties are read-only, but some can be
7793 changed by a user.
7794 </desc>
7795
7796 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7797 <desc>Minimum guest system memory in Megabytes.</desc>
7798 </attribute>
7799
7800 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7801 <desc>Maximum guest system memory in Megabytes.</desc>
7802 </attribute>
7803
7804 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7805 <desc>Minimum guest video memory in Megabytes.</desc>
7806 </attribute>
7807
7808 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7809 <desc>Maximum guest video memory in Megabytes.</desc>
7810 </attribute>
7811
7812 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7813 <desc>Minimum CPU count.</desc>
7814 </attribute>
7815
7816 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7817 <desc>Maximum CPU count.</desc>
7818 </attribute>
7819
7820 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7821 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7822 </attribute>
7823
7824 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7825 <desc>
7826 Number of network adapters associated with every
7827 <link to="IMachine"/> instance.
7828 </desc>
7829 </attribute>
7830
7831 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7832 <desc>
7833 Number of serial ports associated with every
7834 <link to="IMachine"/> instance.
7835 </desc>
7836 </attribute>
7837
7838 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7839 <desc>
7840 Number of parallel ports associated with every
7841 <link to="IMachine"/> instance.
7842 </desc>
7843 </attribute>
7844
7845 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7846 <desc>
7847 Maximum device position in the boot order. This value corresponds
7848 to the total number of devices a machine can boot from, to make it
7849 possible to include all possible devices to the boot list.
7850 <see><link to="IMachine::setBootOrder"/></see>
7851 </desc>
7852 </attribute>
7853
7854 <attribute name="defaultMachineFolder" type="wstring">
7855 <desc>
7856 Full path to the default directory used to create new or open
7857 existing machines when a settings file name contains no
7858 path.
7859
7860 The initial value of this property is
7861 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7862 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7863
7864 <note>
7865 Setting this property to @c null or an empty string will restore the
7866 initial value.
7867 </note>
7868 <note>
7869 When settings this property, the specified path can be
7870 absolute (full path) or relative
7871 to the <link to="IVirtualBox::homeFolder">
7872 VirtualBox home directory</link>.
7873 When reading this property, a full path is
7874 always returned.
7875 </note>
7876 <note>
7877 The specified path may not exist, it will be created
7878 when necessary.
7879 </note>
7880
7881 <see>
7882 <link to="IVirtualBox::createMachine"/>,
7883 <link to="IVirtualBox::openMachine"/>
7884 </see>
7885 </desc>
7886 </attribute>
7887
7888 <attribute name="defaultHardDiskFolder" type="wstring">
7889 <desc>
7890 Full path to the default directory used to create new or open existing
7891 virtual disks.
7892
7893 This path is used when the storage unit of a hard disk is a regular file
7894 in the host's file system and only a file name that contains no path is
7895 given.
7896
7897 The initial value of this property is
7898 <tt>&lt;</tt>
7899 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7900 <tt>&gt;/HardDisks</tt>.
7901
7902 <note>
7903 Setting this property to @c null or empty string will restore the
7904 initial value.
7905 </note>
7906 <note>
7907 When settings this property, the specified path can be relative
7908 to the
7909 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7910 absolute. When reading this property, a full path is
7911 always returned.
7912 </note>
7913 <note>
7914 The specified path may not exist, it will be created
7915 when necessary.
7916 </note>
7917
7918 <see>
7919 IMedium,
7920 <link to="IVirtualBox::createHardDisk"/>,
7921 <link to="IVirtualBox::openHardDisk"/>,
7922 <link to="IMedium::location"/>
7923 </see>
7924 </desc>
7925 </attribute>
7926
7927 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7928 <desc>
7929 List of all medium storage formats supported by this VirtualBox
7930 installation.
7931
7932 Keep in mind that the medium format identifier
7933 (<link to="IMediumFormat::id"/>) used in other API calls like
7934 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7935 medium format is a case-insensitive string. This means that, for
7936 example, all of the following strings:
7937 <pre>
7938 "VDI"
7939 "vdi"
7940 "VdI"</pre>
7941 refer to the same medium format.
7942
7943 Note that the virtual medium framework is backend-based, therefore
7944 the list of supported formats depends on what backends are currently
7945 installed.
7946
7947 <see>
7948 <link to="IMediumFormat"/>,
7949 </see>
7950 </desc>
7951 </attribute>
7952
7953 <attribute name="defaultHardDiskFormat" type="wstring">
7954 <desc>
7955 Identifier of the default medium format used by VirtualBox.
7956
7957 The medium format set by this attribute is used by VirtualBox
7958 when the medium format was not specified explicitly. One example is
7959 <link to="IVirtualBox::createHardDisk"/> with the empty
7960 format argument. A more complex example is implicit creation of
7961 differencing media when taking a snapshot of a virtual machine:
7962 this operation will try to use a format of the parent medium first
7963 and if this format does not support differencing media the default
7964 format specified by this argument will be used.
7965
7966 The list of supported medium formats may be obtained by the
7967 <link to="#mediaFormats"/> call. Note that the default medium
7968 format must have a capability to create differencing media;
7969 otherwise operations that create media implicitly may fail
7970 unexpectedly.
7971
7972 The initial value of this property is <tt>"VDI"</tt> in the current
7973 version of the VirtualBox product, but may change in the future.
7974
7975 <note>
7976 Setting this property to @c null or empty string will restore the
7977 initial value.
7978 </note>
7979
7980 <see>
7981 <link to="#mediaFormats"/>,
7982 <link to="IMediumFormat::id"/>,
7983 <link to="IVirtualBox::createHardDisk"/>
7984 </see>
7985 </desc>
7986 </attribute>
7987
7988 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7989 <desc>
7990 Library that provides authentication for VRDP clients. The library
7991 is used if a virtual machine's authentication type is set to "external"
7992 in the VM RemoteDisplay configuration.
7993
7994 The system library extension (".DLL" or ".so") must be omitted.
7995 A full path can be specified; if not, then the library must reside on the
7996 system's default library path.
7997
7998 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7999 of that name in one of the default VirtualBox library directories.
8000
8001 For details about VirtualBox authentication libraries and how to implement
8002 them, please refer to the VirtualBox manual.
8003
8004 <note>
8005 Setting this property to @c null or empty string will restore the
8006 initial value.
8007 </note>
8008 </desc>
8009 </attribute>
8010
8011 <attribute name="webServiceAuthLibrary" type="wstring">
8012 <desc>
8013 Library that provides authentication for webservice clients. The library
8014 is used if a virtual machine's authentication type is set to "external"
8015 in the VM RemoteDisplay configuration and will be called from
8016 within the <link to="IWebsessionManager::logon" /> implementation.
8017
8018 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8019 there is no per-VM setting for this, as the webservice is a global
8020 resource (if it is running). Only for this setting (for the webservice),
8021 setting this value to a literal <tt>"null"</tt> string disables authentication,
8022 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8023 no matter what user name and password are supplied.
8024
8025 The initial value of this property is <tt>"VRDPAuth"</tt>,
8026 meaning that the webservice will use the same authentication
8027 library that is used by default for VBoxVRDP (again, see
8028 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8029 The format and calling convention of authentication libraries
8030 is the same for the webservice as it is for VBoxVRDP.
8031
8032 <note>
8033 Setting this property to @c null or empty string will restore the
8034 initial value.
8035 </note>
8036 </desc>
8037 </attribute>
8038
8039 <attribute name="LogHistoryCount" type="unsigned long">
8040 <desc>
8041 This value specifies how many old release log files are kept.
8042 </desc>
8043 </attribute>
8044
8045 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8046 <desc>This value hold the default audio driver for the current
8047 system.</desc>
8048 </attribute>
8049
8050 <method name="getMaxDevicesPerPortForStorageBus">
8051 <desc>Returns the maximum number of devices which can be attached to a port
8052 for the given storage bus.</desc>
8053
8054 <param name="bus" type="StorageBus" dir="in">
8055 <desc>The storage bus type to get the value for.</desc>
8056 </param>
8057
8058 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8059 <desc>The maximum number of devices which can eb attached to the port for the given
8060 storage bus.</desc>
8061 </param>
8062 </method>
8063
8064 <method name="getMinPortCountForStorageBus">
8065 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8066
8067 <param name="bus" type="StorageBus" dir="in">
8068 <desc>The storage bus type to get the value for.</desc>
8069 </param>
8070
8071 <param name="minPortCount" type="unsigned long" dir="return">
8072 <desc>The minimum number of ports for the given storage bus.</desc>
8073 </param>
8074 </method>
8075
8076 <method name="getMaxPortCountForStorageBus">
8077 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8078
8079 <param name="bus" type="StorageBus" dir="in">
8080 <desc>The storage bus type to get the value for.</desc>
8081 </param>
8082
8083 <param name="maxPortCount" type="unsigned long" dir="return">
8084 <desc>The maximum number of ports for the given storage bus.</desc>
8085 </param>
8086 </method>
8087
8088 <method name="getMaxInstancesOfStorageBus">
8089 <desc>Returns the maximum number of storage bus instances which
8090 can be configured for each VM. This corresponds to the number of
8091 storage controllers one can have.</desc>
8092
8093 <param name="bus" type="StorageBus" dir="in">
8094 <desc>The storage bus type to get the value for.</desc>
8095 </param>
8096
8097 <param name="maxInstances" type="unsigned long" dir="return">
8098 <desc>The maximum number of instances for the given storage bus.</desc>
8099 </param>
8100 </method>
8101
8102 <method name="getDeviceTypesForStorageBus">
8103 <desc>Returns list of all the supported device types
8104 (<link to="DeviceType"/>) for the given type of storage
8105 bus.</desc>
8106
8107 <param name="bus" type="StorageBus" dir="in">
8108 <desc>The storage bus type to get the value for.</desc>
8109 </param>
8110
8111 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8112 <desc>The list of all supported device types for the given storage bus.</desc>
8113 </param>
8114 </method>
8115 </interface>
8116
8117 <!--
8118 // IGuest
8119 /////////////////////////////////////////////////////////////////////////
8120 -->
8121
8122 <interface
8123 name="IGuestOSType" extends="$unknown"
8124 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
8125 wsmap="struct"
8126 >
8127 <desc>
8128 </desc>
8129
8130 <attribute name="familyId" type="wstring" readonly="yes">
8131 <desc>Guest OS family identifier string.</desc>
8132 </attribute>
8133
8134 <attribute name="familyDescription" type="wstring" readonly="yes">
8135 <desc>Human readable description of the guest OS family.</desc>
8136 </attribute>
8137
8138 <attribute name="id" type="wstring" readonly="yes">
8139 <desc>Guest OS identifier string.</desc>
8140 </attribute>
8141
8142 <attribute name="description" type="wstring" readonly="yes">
8143 <desc>Human readable description of the guest OS.</desc>
8144 </attribute>
8145
8146 <attribute name="is64Bit" type="boolean" readonly="yes">
8147 <desc>Returns @c true if the given OS is 64-bit</desc>
8148 </attribute>
8149
8150 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8151 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8152 </attribute>
8153
8154 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8155 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8156 </attribute>
8157
8158 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8159 <desc>Recommended RAM size in Megabytes.</desc>
8160 </attribute>
8161
8162 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8163 <desc>Recommended video RAM size in Megabytes.</desc>
8164 </attribute>
8165
8166 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8167 <desc>Recommended hard disk size in Megabytes.</desc>
8168 </attribute>
8169
8170 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8171 <desc>Returns recommended network adapter for this OS type.</desc>
8172 </attribute>
8173 </interface>
8174
8175 <interface
8176 name="IGuest" extends="$unknown"
8177 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8178 wsmap="managed"
8179 >
8180 <desc>
8181 The IGuest interface represents information about the operating system
8182 running inside the virtual machine. Used in
8183 <link to="IConsole::guest"/>.
8184
8185 IGuest provides information about the guest operating system, whether
8186 Guest Additions are installed and other OS-specific virtual machine
8187 properties.
8188 </desc>
8189
8190 <attribute name="OSTypeId" type="wstring" readonly="yes">
8191 <desc>
8192 Identifier of the Guest OS type as reported by the Guest
8193 Additions.
8194 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8195 an IGuestOSType object representing details about the given
8196 Guest OS type.
8197 <note>
8198 If Guest Additions are not installed, this value will be
8199 the same as <link to="IMachine::OSTypeId"/>.
8200 </note>
8201 </desc>
8202 </attribute>
8203
8204 <attribute name="additionsActive" type="boolean" readonly="yes">
8205 <desc>
8206 Flag whether the Guest Additions are installed and active
8207 in which case their version will be returned by the
8208 <link to="#additionsVersion"/> property.
8209 </desc>
8210 </attribute>
8211
8212 <attribute name="additionsVersion" type="wstring" readonly="yes">
8213 <desc>
8214 Version of the Guest Additions (3 decimal numbers separated
8215 by dots) or empty when the Additions are not installed. The
8216 Additions may also report a version but yet not be active as
8217 the version might be refused by VirtualBox (incompatible) or
8218 other failures occurred.
8219 </desc>
8220 </attribute>
8221
8222 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8223 <desc>
8224 Flag whether seamless guest display rendering (seamless desktop
8225 integration) is supported.
8226 </desc>
8227 </attribute>
8228
8229 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8230 <desc>
8231 Flag whether the guest is in graphics mode. If it is not, then
8232 seamless rendering will not work, resize hints are not immediately
8233 acted on and guest display resizes are probably not initiated by
8234 the guest additions.
8235 </desc>
8236 </attribute>
8237
8238 <attribute name="memoryBalloonSize" type="unsigned long">
8239 <desc>Guest system memory balloon size in megabytes.</desc>
8240 </attribute>
8241
8242 <attribute name="statisticsUpdateInterval" type="unsigned long">
8243 <desc>Interval to update guest statistics in seconds.</desc>
8244 </attribute>
8245
8246 <method name="setCredentials">
8247 <desc>
8248 Store login credentials that can be queried by guest operating
8249 systems with Additions installed. The credentials are transient
8250 to the session and the guest may also choose to erase them. Note
8251 that the caller cannot determine whether the guest operating system
8252 has queried or made use of the credentials.
8253
8254 <result name="VBOX_E_VM_ERROR">
8255 VMM device is not available.
8256 </result>
8257
8258 </desc>
8259 <param name="userName" type="wstring" dir="in">
8260 <desc>User name string, can be empty</desc>
8261 </param>
8262 <param name="password" type="wstring" dir="in">
8263 <desc>Password string, can be empty</desc>
8264 </param>
8265 <param name="domain" type="wstring" dir="in">
8266 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8267 </param>
8268 <param name="allowInteractiveLogon" type="boolean" dir="in">
8269 <desc>
8270 Flag whether the guest should alternatively allow the user to
8271 interactively specify different credentials. This flag might
8272 not be supported by all versions of the Additions.
8273 </desc>
8274 </param>
8275 </method>
8276
8277 <method name="getStatistic">
8278 <desc>
8279 Query specified guest statistics as reported by the VirtualBox Additions.
8280 </desc>
8281 <param name="cpuId" type="unsigned long" dir="in">
8282 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8283 </param>
8284 <param name="statistic" type="GuestStatisticType" dir="in">
8285 <desc>Statistic type.</desc>
8286 </param>
8287 <param name="statVal" type="unsigned long" dir="return">
8288 <desc>Statistics value</desc>
8289 </param>
8290 </method>
8291
8292 </interface>
8293
8294
8295 <!--
8296 // IProgress
8297 /////////////////////////////////////////////////////////////////////////
8298 -->
8299
8300 <interface
8301 name="IProgress" extends="$unknown"
8302 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
8303 wsmap="managed"
8304 >
8305 <desc>
8306 The IProgress interface is used to track and control
8307 asynchronous tasks within VirtualBox.
8308
8309 An instance of this is returned every time VirtualBox starts
8310 an asynchronous task (in other words, a separate thread) which
8311 continues to run after a method call returns. For example,
8312 <link to="IConsole::saveState" />, which saves the state of
8313 a running virtual machine, can take a long time to complete.
8314 To be able to display a progress bar, a user interface such as
8315 the VirtualBox graphical user interface can use the IProgress
8316 object returned by that method.
8317
8318 Note that IProgress is a "read-only" interface in the sense
8319 that only the VirtualBox internals behind the Main API can
8320 create and manipulate progress objects, whereas client code
8321 can only use the IProgress object to monitor a task's
8322 progress and, if <link to="#cancelable" /> is @c true,
8323 cancel the task by calling <link to="#cancel" />.
8324
8325 A task represented by IProgress consists of either one or
8326 several sub-operations that run sequentially, one by one (see
8327 <link to="#operation" /> and <link to="#operationCount" />).
8328 Every operation is identified by a number (starting from 0)
8329 and has a separate description.
8330
8331 You can find the individual percentage of completion of the current
8332 operation in <link to="#operationPercent" /> and the
8333 percentage of completion of the task as a whole
8334 in <link to="#percent" />.
8335
8336 Similarly, you can wait for the completion of a particular
8337 operation via <link to="#waitForOperationCompletion" /> or
8338 for the completion of the whole task via
8339 <link to="#waitForCompletion" />.
8340 </desc>
8341
8342 <attribute name="id" type="uuid" mod="string" readonly="yes">
8343 <desc>ID of the task.</desc>
8344 </attribute>
8345
8346 <attribute name="description" type="wstring" readonly="yes">
8347 <desc>Description of the task.</desc>
8348 </attribute>
8349
8350 <attribute name="initiator" type="$unknown" readonly="yes">
8351 <desc>Initiator of the task.</desc>
8352 </attribute>
8353
8354 <attribute name="cancelable" type="boolean" readonly="yes">
8355 <desc>Whether the task can be interrupted.</desc>
8356 </attribute>
8357
8358 <attribute name="percent" type="unsigned long" readonly="yes">
8359 <desc>
8360 Current progress value of the task as a whole, in percent.
8361 This value depends on how many operations are already complete.
8362 Returns 100 if <link to="#completed" /> is @c true.
8363 </desc>
8364 </attribute>
8365
8366 <attribute name="timeRemaining" type="long" readonly="yes">
8367 <desc>
8368 Estimated remaining time until the task completes, in
8369 seconds. Returns 0 once the task has completed; returns -1
8370 if the remaining time cannot be computed, in particular if
8371 the current progress is 0.
8372
8373 Even if a value is returned, the estimate will be unreliable
8374 for low progress values. It will become more reliable as the
8375 task progresses; it is not recommended to display an ETA
8376 before at least 20% of a task have completed.
8377 </desc>
8378 </attribute>
8379
8380 <attribute name="completed" type="boolean" readonly="yes">
8381 <desc>Whether the task has been completed.</desc>
8382 </attribute>
8383
8384 <attribute name="canceled" type="boolean" readonly="yes">
8385 <desc>Whether the task has been canceled.</desc>
8386 </attribute>
8387
8388 <attribute name="resultCode" type="long" readonly="yes">
8389 <desc>
8390 Result code of the progress task.
8391 Valid only if <link to="#completed"/> is @c true.
8392 </desc>
8393 </attribute>
8394
8395 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8396 <desc>
8397 Extended information about the unsuccessful result of the
8398 progress operation. May be @c null if no extended information
8399 is available.
8400 Valid only if <link to="#completed"/> is @c true and
8401 <link to="#resultCode"/> indicates a failure.
8402 </desc>
8403 </attribute>
8404
8405 <attribute name="operationCount" type="unsigned long" readonly="yes">
8406 <desc>
8407 Number of sub-operations this task is divided into.
8408 Every task consists of at least one suboperation.
8409 </desc>
8410 </attribute>
8411
8412 <attribute name="operation" type="unsigned long" readonly="yes">
8413 <desc>Number of the sub-operation being currently executed.</desc>
8414 </attribute>
8415
8416 <attribute name="operationDescription" type="wstring" readonly="yes">
8417 <desc>
8418 Description of the sub-operation being currently executed.
8419 </desc>
8420 </attribute>
8421
8422 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8423 <desc>Progress value of the current sub-operation only, in percent.</desc>
8424 </attribute>
8425
8426 <method name="setCurrentOperationProgress">
8427 <desc>Internal method, not to be called externally.</desc>
8428 <param name="percent" type="unsigned long" dir="in" />
8429 </method>
8430 <method name="setNextOperation">
8431 <desc>Internal method, not to be called externally.</desc>
8432 <param name="nextOperationDescription" type="wstring" dir="in" />
8433 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8434 </method>
8435
8436 <method name="waitForCompletion">
8437 <desc>
8438 Waits until the task is done (including all sub-operations)
8439 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8440
8441 <result name="VBOX_E_IPRT_ERROR">
8442 Failed to wait for task completion.
8443 </result>
8444 </desc>
8445
8446 <param name="timeout" type="long" dir="in">
8447 <desc>
8448 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8449 </desc>
8450 </param>
8451 </method>
8452
8453 <method name="waitForOperationCompletion">
8454 <desc>
8455 Waits until the given operation is done with a given timeout in
8456 milliseconds; specify -1 for an indefinite wait.
8457
8458 <result name="VBOX_E_IPRT_ERROR">
8459 Failed to wait for operation completion.
8460 </result>
8461
8462 </desc>
8463 <param name="operation" type="unsigned long" dir="in">
8464 <desc>
8465 Number of the operation to wait for.
8466 Must be less than <link to="#operationCount"/>.
8467 </desc>
8468 </param>
8469 <param name="timeout" type="long" dir="in">
8470 <desc>
8471 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8472 </desc>
8473 </param>
8474 </method>
8475
8476 <method name="cancel">
8477 <desc>
8478 Cancels the task.
8479 <note>
8480 If <link to="#cancelable"/> is @c false, then this method will fail.
8481 </note>
8482
8483 <result name="VBOX_E_INVALID_OBJECT_STATE">
8484 Operation cannot be canceled.
8485 </result>
8486
8487 </desc>
8488 </method>
8489
8490 </interface>
8491
8492
8493 <!--
8494 // ISnapshot
8495 /////////////////////////////////////////////////////////////////////////
8496 -->
8497
8498 <interface
8499 name="ISnapshot" extends="$unknown"
8500 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8501 wsmap="managed"
8502 >
8503 <desc>
8504 The ISnapshot interface represents a snapshot of the virtual
8505 machine.
8506
8507 Together with the differencing media that are created
8508 when a snapshot is taken, a machine can be brought back to
8509 the exact state it was in when the snapshot was taken.
8510
8511 The ISnapshot interface has no methods, only attributes; snapshots
8512 are controlled through methods of the <link to="IConsole" /> interface
8513 which also manage the media associated with the snapshot.
8514 The following operations exist:
8515
8516 <ul>
8517 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8518 by creating new, empty differencing images for the machine's
8519 media and saving the VM settings and (if the VM is running)
8520 the current VM state in the snapshot.
8521
8522 The differencing images will then receive all data written to
8523 the machine's media, while their parent (base) images
8524 remain unmodified after the snapshot has been taken (see
8525 <link to="IMedium" /> for details about differencing images).
8526 This simplifies restoring a machine to the state of a snapshot:
8527 only the differencing images need to be deleted.
8528
8529 The current machine state is not changed by taking a snapshot.
8530 If the machine is running, it will resume execution after the
8531 snapshot has been taken.
8532 </li>
8533
8534 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8535 a previous snapshot. This resets the machine's state to that of
8536 the previous snapshot by deleting the differencing image of each
8537 of the machine's media and setting the machine's settings
8538 and state to the state that was saved in the snapshot (if any).
8539
8540 This destroys the machine's current state.
8541 </li>
8542
8543 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8544 without affecting the current machine state.
8545
8546 This does not change the machine, but instead frees the resources
8547 allocated when the snapshot was taken: the settings and machine state
8548 is deleted (if any), and the snapshot's differencing image for each
8549 of the machine's media gets merged with its parent image.
8550
8551 Neither the current machine state nor other snapshots are affected
8552 by this operation, except that parent media will be modified
8553 to contain the disk data associated with the snapshot being deleted.
8554 </li>
8555 </ul>
8556
8557 Each snapshot contains the settings of the virtual machine (hardware
8558 configuration etc.). In addition, if the machine was running when the
8559 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8560 the current VM state is saved in the snapshot (similarly to what happens
8561 when a VM's state is saved). The snapshot is then said to
8562 be <i>online</i> because when restoring it, the VM will be running.
8563
8564 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8565 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8566
8567 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8568 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8569 it then contains a so-called "zero execution state", representing a
8570 machine that is powered off.
8571
8572 <h3>Snapshot branches and the "current" snapshot</h3>
8573
8574 Snapshots can be chained, whereby every next snapshot is based on the
8575 previous one. This chaining is related to medium branching
8576 (see the <link to="IMedium"/> description) in that every time
8577 a new snapshot is created, a new differencing medium is implicitly
8578 created for all normal media attached to the machine.
8579
8580 Each virtual machine has a "current snapshot", identified by
8581 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8582 to the last snapshot in the chain. In a future version of VirtualBox,
8583 it will be possible to reset a machine's current state to that of an
8584 earlier snapshot without discarding the current state so that it will be
8585 possible to create alternative snapshot paths in a snapshot tree.
8586
8587 In the current implementation, multiple snapshot branches within one
8588 virtual machine are not allowed. Every machine has a single branch,
8589 and <link to="IConsole::takeSnapshot"/> operation adds a new
8590 snapshot to the top of that branch.
8591 </desc>
8592
8593 <attribute name="id" type="uuid" mod="string" readonly="yes">
8594 <desc>UUID of the snapshot.</desc>
8595 </attribute>
8596
8597 <attribute name="name" type="wstring">
8598 <desc>Short name of the snapshot.</desc>
8599 </attribute>
8600
8601 <attribute name="description" type="wstring">
8602 <desc>Optional description of the snapshot.</desc>
8603 </attribute>
8604
8605 <attribute name="timeStamp" type="long long" readonly="yes">
8606 <desc>
8607 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8608 </desc>
8609 </attribute>
8610
8611 <attribute name="online" type="boolean" readonly="yes">
8612 <desc>
8613 @c true if this snapshot is an online snapshot and @c false otherwise.
8614
8615 When this attribute is @c true, the
8616 <link to="IMachine::stateFilePath"/> attribute of the
8617 <link to="#machine"/> object associated with this snapshot
8618 will point to the saved state file. Otherwise, it will be
8619 an empty string.
8620 </desc>
8621 </attribute>
8622
8623 <attribute name="machine" type="IMachine" readonly="yes">
8624 <desc>
8625 Virtual machine this snapshot is taken on. This object
8626 stores all settings the machine had when taking this snapshot.
8627 <note>
8628 The returned machine object is immutable, i.e. no
8629 any settings can be changed.
8630 </note>
8631 </desc>
8632 </attribute>
8633
8634 <attribute name="parent" type="ISnapshot" readonly="yes">
8635 <desc>
8636 Parent snapshot (a snapshot this one is based on), or
8637 @c null if the snapshot has no parent (i.e. is the first snapshot).
8638 </desc>
8639 </attribute>
8640
8641 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8642 <desc>
8643 Child snapshots (all snapshots having this one as a parent).
8644 </desc>
8645 </attribute>
8646
8647 </interface>
8648
8649
8650 <!--
8651 // IMedium
8652 /////////////////////////////////////////////////////////////////////////
8653 -->
8654
8655 <enum
8656 name="MediumState"
8657 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8658 >
8659 <desc>
8660 Virtual medium state.
8661 <see>IMedium</see>
8662 </desc>
8663
8664 <const name="NotCreated" value="0">
8665 <desc>
8666 Associated medium storage does not exist (either was not created yet or
8667 was deleted).
8668 </desc>
8669 </const>
8670 <const name="Created" value="1">
8671 <desc>
8672 Associated storage exists and accessible; this gets set if the
8673 accessibility check performed by <link to="IMedium::refreshState" />
8674 was successful.
8675 </desc>
8676 </const>
8677 <const name="LockedRead" value="2">
8678 <desc>
8679 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8680 no data modification is possible.
8681 </desc>
8682 </const>
8683 <const name="LockedWrite" value="3">
8684 <desc>
8685 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8686 no concurrent data reading or modification is possible.
8687 </desc>
8688 </const>
8689 <const name="Inaccessible" value="4">
8690 <desc>
8691 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8692 not yet been performed, or else, associated medium storage is not
8693 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8694 is empty, in the second case, it describes the error that occured.
8695 </desc>
8696 </const>
8697 <const name="Creating" value="5">
8698 <desc>
8699 Associated medium storage is being created.
8700 </desc>
8701 </const>
8702 <const name="Deleting" value="6">
8703 <desc>
8704 Associated medium storage is being deleted.
8705 </desc>
8706 </const>
8707 </enum>
8708
8709 <enum
8710 name="MediumType"
8711 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8712 >
8713 <desc>
8714 Virtual medium type.
8715 <see>IMedium</see>
8716 </desc>
8717
8718 <const name="Normal" value="0">
8719 <desc>
8720 Normal medium (attached directly or indirectly, preserved
8721 when taking snapshots).
8722 </desc>
8723 </const>
8724 <const name="Immutable" value="1">
8725 <desc>
8726 Immutable medium (attached indirectly, changes are wiped out
8727 the next time the virtual machine is started).
8728 </desc>
8729 </const>
8730 <const name="Writethrough" value="2">
8731 <desc>
8732 Write through medium (attached directly, ignored when
8733 taking snapshots).
8734 </desc>
8735 </const>
8736 </enum>
8737
8738 <enum
8739 name="MediumVariant"
8740 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8741 >
8742 <desc>
8743 Virtual medium image variant. More than one flag may be set.
8744 <see>IMedium</see>
8745 </desc>
8746
8747 <const name="Standard" value="0">
8748 <desc>
8749 No particular variant requested, results in using the backend default.
8750 </desc>
8751 </const>
8752 <const name="VmdkSplit2G" value="0x01">
8753 <desc>
8754 VMDK image split in chunks of less than 2GByte.
8755 </desc>
8756 </const>
8757 <const name="VmdkStreamOptimized" value="0x04">
8758 <desc>
8759 VMDK streamOptimized image. Special import/export format which is
8760 read-only/append-only.
8761 </desc>
8762 </const>
8763 <const name="VmdkESX" value="0x08">
8764 <desc>
8765 VMDK format variant used on ESX products.
8766 </desc>
8767 </const>
8768 <const name="Fixed" value="0x10000">
8769 <desc>
8770 Fixed image. Only allowed for base images.
8771 </desc>
8772 </const>
8773 <const name="Diff" value="0x20000">
8774 <desc>
8775 Fixed image. Only allowed for base images.
8776 </desc>
8777 </const>
8778 </enum>
8779
8780 <interface
8781 name="IMediumAttachment" extends="$unknown"
8782 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8783 wsmap="struct"
8784 >
8785 <desc>
8786 The IMediumAttachment interface represents the attachment
8787 of a storage medium to a virtual machine. Each machine contains
8788 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8789
8790 Each medium attachment specifies a storage controller as well as a port
8791 and device number. Fixed media (hard disks) will always also specify
8792 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8793 medium. For removeable media, the IMedia instance is optional; it can be
8794 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8795 </desc>
8796
8797 <attribute name="medium" type="IMedium" readonly="yes">
8798 <desc>Medium object associated with this attachment; it
8799 can be @c null for removable devices.</desc>
8800 </attribute>
8801
8802 <attribute name="controller" type="wstring" readonly="yes">
8803 <desc>Name of the storage controller of this attachment; this
8804 refers to one of the controllers in <link to="IMachine::storageControllers" />
8805 by name.</desc>
8806 </attribute>
8807
8808 <attribute name="port" type="long" readonly="yes">
8809 <desc>Port number of this attachment.</desc>
8810 </attribute>
8811
8812 <attribute name="device" type="long" readonly="yes">
8813 <desc>Device slot number of this attachment.</desc>
8814 </attribute>
8815
8816 <attribute name="type" type="DeviceType" readonly="yes">
8817 <desc>Device type of this attachment.</desc>
8818 </attribute>
8819
8820 <attribute name="passthrough" type="boolean" readonly="yes">
8821 <desc>Pass I/O requests through to a device on the host.</desc>
8822 </attribute>
8823
8824 </interface>
8825
8826 <interface
8827 name="IMedium" extends="$unknown"
8828 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8829 wsmap="managed"
8830 >
8831 <desc>
8832 The IMedium interface represents virtual storage for a machine's
8833 hard disks, CD/DVD or floppy drives. It will typically represent
8834 a disk image on the host, for example a VDI or VMDK file representing
8835 a virtual hard disk, or an ISO or RAW file representing virtual
8836 removable media, but can also point to a network location (e.g.
8837 for iSCSI targets).
8838
8839 Instances of IMedium are connected to virtual machines by way of
8840 medium attachments (see <link to="IMediumAttachment" />), which link
8841 the storage medium to a particular device slot of a storage controller
8842 of the virtual machine.
8843 In the VirtualBox API, virtual storage is therefore always represented
8844 by the following chain of object links:
8845
8846 <ul>
8847 <li><link to="IMachine::storageControllers"/> contains an array of
8848 storage controllers (IDE, SATA, SCSI or a floppy controller;
8849 these are instances of <link to="IStorageController"/>).</li>
8850 <li><link to="IMachine::mediumAttachments"/> contains an array of
8851 medium attachments (instances of <link to="IMediumAttachment"/>),
8852 each containing a storage controller from the above array, a
8853 port/device specification, and an instance of IMedium representing
8854 the medium storage (image file).
8855
8856 For removable media, the storage medium is optional; a medium
8857 attachment with no medium represents a CD/DVD or floppy drive
8858 with no medium inserted. By contrast, hard disk attachments
8859 will always have an IMedium object attached.</li>
8860 <li>Each IMedium in turn points to a storage unit (such as a file
8861 on the host computer or a network resource) that holds actual
8862 data. This location is represented by the <link to="#location"/>
8863 attribute.</li>
8864 </ul>
8865
8866 Existing media are opened using the following methods, depending on the
8867 media type:
8868 <ul>
8869 <li><link to="IVirtualBox::openHardDisk"/></li>
8870 <li><link to="IVirtualBox::openDVDImage"/></li>
8871 <li><link to="IVirtualBox::openFloppyImage"/></li>
8872 </ul>
8873
8874 New hard disk media can be created with the VirtualBox API using the
8875 <link to="IVirtualBox::createHardDisk"/> method.
8876
8877 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8878 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8879 type in a regular file.
8880
8881 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8882 drive; in that case the <link to="#id" /> attribute contains the UUID of
8883 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8884
8885 <h3>Known media</h3>
8886
8887 When an existing medium is opened for the first time, it is automatically
8888 remembered by the given VirtualBox installation or, in other words, becomes
8889 a <i>known medium</i>. Known media are stored in the media
8890 registry transparently maintained by VirtualBox and stored in settings
8891 files so that this registry is preserved when VirtualBox is not running.
8892
8893 Newly created virtual media are remembered only when the associated
8894 storage unit is actually created.
8895
8896 All known media can be enumerated using
8897 <link to="IVirtualBox::hardDisks"/>,
8898 <link to="IVirtualBox::DVDImages"/> and
8899 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8900 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8901 and similar methods or by location using
8902 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8903
8904 Only known media can be attached to virtual machines.
8905
8906 Removing known media from the media registry is performed when the given
8907 medium is closed using the <link to="#close"/> method or when its
8908 associated storage unit is deleted.
8909
8910 <h3>Accessibility checks</h3>
8911
8912 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8913 method is called explicitly on a medium. This is done to make the VirtualBox object
8914 ready for serving requests as fast as possible and let the end-user
8915 application decide if it needs to check media accessibility right away or not.
8916
8917 As a result, when VirtualBox starts up (e.g. the VirtualBox
8918 object gets created for the first time), all known media are in the
8919 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8920 attribute is an empty string because no actual accessibility check has
8921 been made yet.
8922
8923 After calling <link to="#refreshState" />, a medium is considered
8924 <i>accessible</i> if its storage unit can be read. In that case, the
8925 <link to="#state"/> attribute has a value of "Created". If the storage
8926 unit cannot be read (for example, because it is located on a disconnected
8927 network resource, or was accidentally deleted outside VirtualBox),
8928 the medium is considered <i>inaccessible</i>, which is indicated by the
8929 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8930 obtained by reading the <link to="#lastAccessError"/> attribute.
8931
8932 <h3>Medium types</h3>
8933
8934 There are three types of medium behavior (see <link to="MediumType" />):
8935 "normal", "immutable" and "writethrough", represented by the
8936 <link to="#type"/> attribute. The type of the medium defines how the
8937 medium is attached to a virtual machine and what happens when a
8938 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8939 attached medium is taken. At the moment DVD and floppy media are always
8940 of type "writethrough".
8941
8942 All media can be also divided in two groups: <i>base</i> media and
8943 <i>differencing</i> media. A base medium contains all sectors of the
8944 medium data in its own storage and therefore can be used independently.
8945 In contrast, a differencing mediun is a "delta" to some other medium and
8946 contains only those sectors which differ from that other medium, which is
8947 then called a <i>parent</i>. The differencing medium is said to be
8948 <i>linked to</i> that parent. The parent may be itself a differencing
8949 medium, thus forming a chain of linked media. The last element in that
8950 chain must always be a base medium. Note that several differencing
8951 media may be linked to the same parent medium.
8952
8953 Differencing media can be distinguished from base media by querying the
8954 <link to="#parent"/> attribute: base media do not have parents they would
8955 depend on, so the value of this attribute is always @c null for them.
8956 Using this attribute, it is possible to walk up the medium tree (from the
8957 child medium to its parent). It is also possible to walk down the tree
8958 using the <link to="#children"/> attribute.
8959
8960 Note that the type of all differencing media is
8961 <link to="MediumType_Normal" />; all other values are meaningless for
8962 them. Base media may be of any type.
8963
8964 <h3>Creating hard disks</h3>
8965
8966 New base hard disks are created using
8967 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8968 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8969 disks are usually implicitly created by VirtualBox when needed but may
8970 also be created explicitly using <link to="#createDiffStorage"/>.
8971
8972 After the hard disk is successfully created (including the storage unit)
8973 or opened, it becomes a known hard disk (remembered in the internal media
8974 registry). Known hard disks can be attached to a virtual machine, accessed
8975 through <link to="IVirtualBox::getHardDisk"/> and
8976 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8977 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8978
8979 The following methods, besides <link to="IMedium::close"/>,
8980 automatically remove the hard disk from the media registry:
8981 <ul>
8982 <li><link to="#deleteStorage"/></li>
8983 <li><link to="#mergeTo"/></li>
8984 </ul>
8985
8986 If the storage unit of the hard disk is a regular file in the host's
8987 file system then the rules stated in the description of the
8988 <link to="IMedium::location"/> attribute apply when setting its value. In
8989 addition, a plain file name without any path may be given, in which case
8990 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8991 folder</link> will be prepended to it.
8992
8993 <h4>Automatic composition of the file name part</h4>
8994
8995 Another extension to the <link to="IMedium::location"/> attribute is that
8996 there is a possibility to cause VirtualBox to compose a unique value for
8997 the file name part of the location using the UUID of the hard disk. This
8998 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8999 e.g. before the storage unit is created, and works as follows. You set the
9000 value of the <link to="IMedium::location"/> attribute to a location
9001 specification which only contains the path specification but not the file
9002 name part and ends with either a forward slash or a backslash character.
9003 In response, VirtualBox will generate a new UUID for the hard disk and
9004 compose the file name using the following pattern:
9005 <pre>
9006 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9007 </pre>
9008 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9009 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9010 is the default extension for the storage format of this hard disk. After
9011 that, you may call any of the methods that create a new hard disk storage
9012 unit and they will use the generated UUID and file name.
9013
9014 <h3>Attaching Hard Disks</h3>
9015
9016 Hard disks are attached to virtual machines using the
9017 <link to="IMachine::attachDevice"/> method and detached using the
9018 <link to="IMachine::detachDevice"/> method. Depending on their
9019 <link to="#type"/>, hard disks are attached either
9020 <i>directly</i> or <i>indirectly</i>.
9021
9022 When a hard disk is being attached directly, it is associated with the
9023 virtual machine and used for hard disk operations when the machine is
9024 running. When a hard disk is being attached indirectly, a new differencing
9025 hard disk linked to it is implicitly created and this differencing hard
9026 disk is associated with the machine and used for hard disk operations.
9027 This also means that if <link to="IMachine::attachDevice"/> performs
9028 a direct attachment then the same hard disk will be returned in response
9029 to the subsequent <link to="IMachine::getMedium"/> call; however if
9030 an indirect attachment is performed then
9031 <link to="IMachine::getMedium"/> will return the implicitly created
9032 differencing hard disk, not the original one passed to <link
9033 to="IMachine::attachDevice"/>. In detail:
9034
9035 <ul>
9036 <li><b>Normal base</b> hard disks that do not have children (i.e.
9037 differencing hard disks linked to them) and that are not already
9038 attached to virtual machines in snapshots are attached <b>directly</b>.
9039 Otherwise, they are attached <b>indirectly</b> because having
9040 dependent children or being part of the snapshot makes it impossible
9041 to modify hard disk contents without breaking the integrity of the
9042 dependent party. The <link to="#readOnly"/> attribute allows to
9043 quickly determine the kind of the attachment for the given hard
9044 disk. Note that if a normal base hard disk is to be indirectly
9045 attached to a virtual machine with snapshots then a special
9046 procedure called <i>smart attachment</i> is performed (see below).</li>
9047 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9048 they are attached <b>directly</b> if they do not have children and are
9049 not attached to virtual machines in snapshots, and <b>indirectly</b>
9050 otherwise. Note that the smart attachment procedure is never performed
9051 for differencing hard disks.</li>
9052 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9053 they are designed to be non-writable. If an immutable hard disk is
9054 attached to a virtual machine with snapshots then a special
9055 procedure called smart attachment is performed (see below).</li>
9056 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9057 also as designed. This also means that writethrough hard disks cannot
9058 have other hard disks linked to them at all.</li>
9059 </ul>
9060
9061 Note that the same hard disk, regardless of its type, may be attached to
9062 more than one virtual machine at a time. In this case, the machine that is
9063 started first gains exclusive access to the hard disk and attempts to
9064 start other machines having this hard disk attached will fail until the
9065 first machine is powered down.
9066
9067 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9068 that the given hard disk remains associated with the given machine after a
9069 successful <link to="IMachine::detachDevice"/> call until
9070 <link to="IMachine::saveSettings"/> is called to save all changes to
9071 machine settings to disk. This deferring is necessary to guarantee that
9072 the hard disk configuration may be restored at any time by a call to
9073 <link to="IMachine::discardSettings"/> before the settings
9074 are saved (committed).
9075
9076 Note that if <link to="IMachine::discardSettings"/> is called after
9077 indirectly attaching some hard disks to the machine but before a call to
9078 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9079 all differencing hard disks implicitly created by
9080 <link to="IMachine::attachDevice"/> for these indirect attachments.
9081 Such implicitly created hard disks will also be immediately deleted when
9082 detached explicitly using the <link to="IMachine::detachDevice"/>
9083 call if it is made before <link to="IMachine::saveSettings"/>. This
9084 implicit deletion is safe because newly created differencing hard
9085 disks do not contain any user data.
9086
9087 However, keep in mind that detaching differencing hard disks that were
9088 implicitly created by <link to="IMachine::attachDevice"/>
9089 before the last <link to="IMachine::saveSettings"/> call will
9090 <b>not</b> implicitly delete them as they may already contain some data
9091 (for example, as a result of virtual machine execution). If these hard
9092 disks are no more necessary, the caller can always delete them explicitly
9093 using <link to="#deleteStorage"/> after they are actually de-associated
9094 from this machine by the <link to="IMachine::saveSettings"/> call.
9095
9096 <h3>Smart Attachment</h3>
9097
9098 When normal base or immutable hard disks are indirectly attached to a
9099 virtual machine then some additional steps are performed to make sure the
9100 virtual machine will have the most recent "view" of the hard disk being
9101 attached. These steps include walking through the machine's snapshots
9102 starting from the current one and going through ancestors up to the first
9103 snapshot. Hard disks attached to the virtual machine in all
9104 of the encountered snapshots are checked whether they are descendants of
9105 the given normal base or immutable hard disk. The first found child (which
9106 is the differencing hard disk) will be used instead of the normal base or
9107 immutable hard disk as a parent for creating a new differencing hard disk
9108 that will be actually attached to the machine. And only if no descendants
9109 are found or if the virtual machine does not have any snapshots then the
9110 normal base or immutable hard disk will be used itself as a parent for
9111 this differencing hard disk.
9112
9113 It is easier to explain what smart attachment does using the
9114 following example:
9115 <pre>
9116BEFORE attaching B.vdi: AFTER attaching B.vdi:
9117
9118Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9119 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9120 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9121 Snapshot 4 (none) Snapshot 4 (none)
9122 CurState (none) CurState (D3->D2.vdi)
9123
9124 NOT
9125 ...
9126 CurState (D3->B.vdi)
9127 </pre>
9128 The first column is the virtual machine configuration before the base hard
9129 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9130 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9131 mean that the hard disk that is actually attached to the machine is a
9132 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9133 another hard disk, <tt>B.vdi</tt>.
9134
9135 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9136 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9137 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9138 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9139 it cannot be attached directly and needs an indirect attachment (i.e.
9140 implicit creation of a new differencing hard disk). Due to the smart
9141 attachment procedure, the new differencing hard disk
9142 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9143 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9144 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9145 machine.
9146
9147 Note that if there is more than one descendant hard disk of the given base
9148 hard disk found in a snapshot, and there is an exact device, channel and
9149 bus match, then this exact match will be used. Otherwise, the youngest
9150 descendant will be picked up.
9151
9152 There is one more important aspect of the smart attachment procedure which
9153 is not related to snapshots at all. Before walking through the snapshots
9154 as described above, the backup copy of the current list of hard disk
9155 attachment is searched for descendants. This backup copy is created when
9156 the hard disk configuration is changed for the first time after the last
9157 <link to="IMachine::saveSettings"/> call and used by
9158 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9159 changes. When such a descendant is found in this backup copy, it will be
9160 simply re-attached back, without creating a new differencing hard disk for
9161 it. This optimization is necessary to make it possible to re-attach the
9162 base or immutable hard disk to a different bus, channel or device slot
9163 without losing the contents of the differencing hard disk actually
9164 attached to the machine in place of it.
9165 </desc>
9166
9167 <attribute name="id" type="uuid" mod="string" readonly="yes">
9168 <desc>
9169 UUID of the medium. For a newly created medium, this value is a randomly
9170 generated UUID.
9171
9172 <note>
9173 For media in one of MediumState_NotCreated, MediumState_Creating or
9174 MediumState_Deleting states, the value of this property is undefined
9175 and will most likely be an empty UUID.
9176 </note>
9177 </desc>
9178 </attribute>
9179
9180 <attribute name="description" type="wstring">
9181 <desc>
9182 Optional description of the medium. For a newly created medium the value
9183 of this attribute is an empty string.
9184
9185 Medium types that don't support this attribute will return E_NOTIMPL in
9186 attempt to get or set this attribute's value.
9187
9188 <note>
9189 For some storage types, reading this attribute may return an outdated
9190 (last known) value when <link to="#state"/> is <link
9191 to="MediumState_Inaccessible"/> or <link
9192 to="MediumState_LockedWrite"/> because the value of this attribute is
9193 stored within the storage unit itself. Also note that changing the
9194 attribute value is not possible in such case, as well as when the
9195 medium is the <link to="MediumState_LockedRead"/> state.
9196 </note>
9197 </desc>
9198 </attribute>
9199
9200 <attribute name="state" type="MediumState" readonly="yes">
9201 <desc>
9202 Returns the current medium state, which is the last state set by
9203 the accessibility check performed by <link to="#refreshState"/>.
9204 If that method has not yet been called on the medium, the state
9205 is "Inaccessible"; as opposed to truly inaccessible media, the
9206 value of <link to="#lastAccessError"/> will be an empty string in
9207 that case.
9208
9209 <note>As of version 3.1, this no longer performs an accessibility check
9210 automatically; call <link to="#refreshState"/> for that.
9211 </note>
9212 </desc>
9213 </attribute>
9214
9215 <attribute name="location" type="wstring">
9216 <desc>
9217 Location of the storage unit holding medium data.
9218
9219 The format of the location string is medium type specific. For medium
9220 types using regular files in a host's file system, the location
9221 string is the full file name.
9222
9223 Some medium types may support changing the storage unit location by
9224 simply changing the value of this property. If this operation is not
9225 supported, the implementation will return E_NOTIMPL in attempt to set
9226 this attribute's value.
9227
9228 When setting a value of the location attribute which is a regular file
9229 in the host's file system, the given file name may be either relative to
9230 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9231 absolute. Note that if the given location specification does not contain
9232 the file extension part then a proper default extension will be
9233 automatically appended by the implementation depending on the medium type.
9234 </desc>
9235 </attribute>
9236
9237 <attribute name="name" type="wstring" readonly="yes">
9238 <desc>
9239 Name of the storage unit holding medium data.
9240
9241 The returned string is a short version of the <link to="#location"/>
9242 attribute that is suitable for representing the medium in situations
9243 where the full location specification is too long (such as lists
9244 and comboboxes in GUI frontends). This string is also used by frontends
9245 to sort the media list alphabetically when needed.
9246
9247 For example, for locations that are regular files in the host's file
9248 system, the value of this attribute is just the file name (+ extension),
9249 without the path specification.
9250
9251 Note that as opposed to the <link to="#location"/> attribute, the name
9252 attribute will not necessary be unique for a list of media of the
9253 given type and format.
9254 </desc>
9255 </attribute>
9256
9257 <attribute name="deviceType" type="DeviceType" readonly="yes">
9258 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9259 medium.</desc>
9260 </attribute>
9261
9262 <attribute name="hostDrive" type="boolean" readonly="yes">
9263 <desc>True if this corresponds to a drive on the host.</desc>
9264 </attribute>
9265
9266 <attribute name="size" type="unsigned long long" readonly="yes">
9267 <desc>
9268 Physical size of the storage unit used to hold medium data (in bytes).
9269
9270 <note>
9271 For media whose <link to="#state"/> is <link
9272 to="MediumState_Inaccessible"/>, the value of this property is the
9273 last known size. For <link to="MediumState_NotCreated"/> media,
9274 the returned value is zero.
9275 </note>
9276 </desc>
9277 </attribute>
9278
9279 <attribute name="format" type="wstring" readonly="yes">
9280 <desc>
9281 Storage format of this medium.
9282
9283 The value of this attribute is a string that specifies a backend used
9284 to store medium data. The storage format is defined when you create a
9285 new medium or automatically detected when you open an existing medium,
9286 and cannot be changed later.
9287
9288 The list of all storage formats supported by this VirtualBox
9289 installation can be obtained using
9290 <link to="ISystemProperties::mediumFormats"/>.
9291 </desc>
9292 </attribute>
9293
9294 <attribute name="type" type="MediumType">
9295 <desc>
9296 Type (role) of this medium.
9297
9298 The following constraints apply when changing the value of this
9299 attribute:
9300 <ul>
9301 <li>If a medium is attached to a virtual machine (either in the
9302 current state or in one of the snapshots), its type cannot be
9303 changed.
9304 </li>
9305 <li>As long as the medium has children, its type cannot be set
9306 to <link to="MediumType_Writethrough"/>.
9307 </li>
9308 <li>The type of all differencing media is
9309 <link to="MediumType_Normal"/> and cannot be changed.
9310 </li>
9311 </ul>
9312
9313 The type of a newly created or opened medium is set to
9314 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9315 which have a type of <link to="MediumType_Writethrough"/>.
9316 </desc>
9317 </attribute>
9318
9319 <attribute name="parent" type="IMedium" readonly="yes">
9320 <desc>
9321 Parent of this medium (the medium this medium is directly based
9322 on).
9323
9324 Only differencing media have parents. For base (non-differencing)
9325 media, @c null is returned.
9326 </desc>
9327 </attribute>
9328
9329 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9330 <desc>
9331 Children of this medium (all differencing media directly based
9332 on this medium). A @c null array is returned if this medium
9333 does not have any children.
9334 </desc>
9335 </attribute>
9336
9337 <attribute name="base" type="IMedium" readonly="yes">
9338 <desc>
9339 Base medium of this medium.
9340
9341 If this is a differencing medium, its base medium is the medium
9342 the given medium branch starts from. For all other types of media, this
9343 property returns the medium object itself (i.e. the same object this
9344 property is read on).
9345 </desc>
9346 </attribute>
9347
9348 <attribute name="readOnly" type="boolean" readonly="yes">
9349 <desc>
9350 Returns @c true if this medium is read-only and @c false otherwise.
9351
9352 A medium is considered to be read-only when its contents cannot be
9353 modified without breaking the integrity of other parties that depend on
9354 this medium such as its child media or snapshots of virtual machines
9355 where this medium is attached to these machines. If there are no
9356 children and no such snapshots then there is no dependency and the
9357 medium is not read-only.
9358
9359 The value of this attribute can be used to determine the kind of the
9360 attachment that will take place when attaching this medium to a
9361 virtual machine. If the value is @c false then the medium will
9362 be attached directly. If the value is @c true then the medium
9363 will be attached indirectly by creating a new differencing child
9364 medium for that. See the interface description for more information.
9365
9366 Note that all <link to="MediumType_Immutable">Immutable</link> media
9367 are always read-only while all
9368 <link to="MediumType_Writethrough">Writethrough</link> media are
9369 always not.
9370
9371 <note>
9372 The read-only condition represented by this attribute is related to
9373 the medium type and usage, not to the current
9374 <link to="IMedium::state">medium state</link> and not to the read-only
9375 state of the storage unit.
9376 </note>
9377 </desc>
9378 </attribute>
9379
9380 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9381 <desc>
9382 Logical size of this medium (in megabytes), as reported to the
9383 guest OS running inside the virtual machine this medium is
9384 attached to. The logical size is defined when the medium is created
9385 and cannot be changed later.
9386
9387 <note>
9388 Reading this property on a differencing medium will return the size
9389 of its <link to="#base"/> medium.
9390 </note>
9391 <note>
9392 For media whose state is <link to="#state"/> is <link
9393 to="MediumState_Inaccessible"/>, the value of this property is the
9394 last known logical size. For <link to="MediumaState_NotCreated"/>
9395 media, the returned value is zero.
9396 </note>
9397 </desc>
9398 </attribute>
9399
9400 <attribute name="autoReset" type="boolean">
9401 <desc>
9402 Whether this differencing medium will be automatically reset each
9403 time a virtual machine it is attached to is powered up.
9404
9405 See <link to="#reset()"/> for more information about resetting
9406 differencing media.
9407
9408 <note>
9409 Reading this property on a base (non-differencing) medium will
9410 always @c false. Changing the value of this property in this
9411 case is not supported.
9412 </note>
9413
9414 <result name="VBOX_E_NOT_SUPPORTED">
9415 This is not a differencing medium (when changing the attribute
9416 value).
9417 </result>
9418 </desc>
9419 </attribute>
9420
9421 <attribute name="lastAccessError" type="wstring" readonly="yes">
9422 <desc>
9423 Text message that represents the result of the last accessibility
9424 check performed by <link to="#refreshState"/>.
9425
9426 An empty string is returned if the last accessibility check
9427 was successful or has not yet been called. As a result, if
9428 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9429 then <link to="#refreshState"/> has yet to be called; this is the
9430 default value of media after VirtualBox initialization.
9431 A non-empty string indicates a failure and should normally describe
9432 a reason of the failure (for example, a file read error).
9433 </desc>
9434 </attribute>
9435
9436 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9437 <desc>
9438 Array of UUIDs of all machines this medium is attached to.
9439
9440 A @c null array is returned if this medium is not attached to any
9441 machine or to any machine's snapshot.
9442
9443 <note>
9444 The returned array will include a machine even if this medium is not
9445 attached to that machine in the current state but attached to it in
9446 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9447 details.
9448 </note>
9449 </desc>
9450 </attribute>
9451
9452 <method name="refreshState">
9453 <desc>
9454 If the current medium state (see <link to="MediumState"/>) is one of
9455 "Created", "Inaccessible" or "LockedRead", then this performs an
9456 accessibility check on the medium and sets the value of the <link to="#state"/>
9457 attribute accordingly; that value is also returned for convenience.
9458
9459 For all other state values, this does not perform a refresh but returns
9460 the state only.
9461
9462 The refresh, if performed, may take a long time (several seconds or even
9463 minutes, depending on the storage unit location and format) because it performs an
9464 accessibility check of the storage unit. This check may cause a significant
9465 delay if the storage unit of the given medium is, for example, a file located
9466 on a network share which is not currently accessible due to connectivity
9467 problems. In that case, the call will not return until a timeout
9468 interval defined by the host OS for this operation expires. For this reason,
9469 it is recommended to never read this attribute on the main UI thread to avoid
9470 making the UI unresponsive.
9471
9472 If the last known state of the medium is "Created" and the accessibility
9473 check fails, then the state would be set to "Inaccessible", and
9474 <link to="#lastAccessError"/> may be used to get more details about the
9475 failure. If the state of the medium is "LockedRead", then it remains the
9476 same, and a non-empty value of <link to="#lastAccessError"/> will
9477 indicate a failed accessibility check in this case.
9478
9479 Note that not all medium states are applicable to all medium types.
9480 </desc>
9481 <param name="state" type="MediumState" dir="return">
9482 <desc>
9483 New medium state.
9484 </desc>
9485 </param>
9486 </method>
9487
9488 <method name="getSnapshotIds">
9489 <desc>
9490 Returns an array of UUIDs of all snapshots of the given machine where
9491 this medium is attached to.
9492
9493 If the medium is attached to the machine in the current state, then the
9494 first element in the array will always be the ID of the queried machine
9495 (i.e. the value equal to the @c machineId argument), followed by
9496 snapshot IDs (if any).
9497
9498 If the medium is not attached to the machine in the current state, then
9499 the array will contain only snapshot IDs.
9500
9501 The returned array may be @c null if this medium is not attached
9502 to the given machine at all, neither in the current state nor in one of
9503 the snapshots.
9504 </desc>
9505 <param name="machineId" type="uuid" mod="string" dir="in">
9506 <desc>
9507 UUID of the machine to query.
9508 </desc>
9509 </param>
9510 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9511 <desc>
9512 Array of snapshot UUIDs of the given machine using this medium.
9513 </desc>
9514 </param>
9515 </method>
9516
9517 <method name="lockRead">
9518 <desc>
9519 Locks this medium for reading.
9520
9521 A read lock is shared: many clients can simultaneously lock the
9522 same medium for reading unless it is already locked for writing (see
9523 <link to="#lockWrite"/>) in which case an error is returned.
9524
9525 When the medium is locked for reading, it cannot be modified
9526 from within VirtualBox. This means that any method that changes
9527 the properties of this medium or contents of the storage unit
9528 will return an error (unless explicitly stated otherwise). That
9529 includes an attempt to start a virtual machine that wants to
9530 write to the the medium.
9531
9532 When the virtual machine is started up, it locks for reading all
9533 media it uses in read-only mode. If some medium cannot be locked
9534 for reading, the startup procedure will fail.
9535 A medium is typically locked for reading while it is used by a running
9536 virtual machine but has a depending differencing image that receives
9537 the actual write operations. This way one base medium can have
9538 multiple child differencing images which can be written to
9539 simultaneously. Read-only media such as DVD and floppy images are
9540 also locked for reading only (so they can be in use by multiple
9541 machines simultaneously).
9542
9543 A medium is also locked for reading when it is the source of a
9544 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9545
9546 The medium locked for reading must be unlocked using the <link
9547 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9548 can be nested and must be followed by the same number of paired
9549 <link to="#unlockRead"/> calls.
9550
9551 This method sets the medium state (see <link to="#state"/>) to
9552 "LockedRead" on success. The medium's previous state must be
9553 one of "Created", "Inaccessible" or "LockedRead".
9554
9555 Locking an inaccessible medium is not an error; this method performs
9556 a logical lock that prevents modifications of this medium through
9557 the VirtualBox API, not a physical file-system lock of the underlying
9558 storage unit.
9559
9560 This method returns the current state of the medium
9561 <i>before</i> the operation.
9562
9563 <result name="VBOX_E_INVALID_OBJECT_STATE">
9564 Invalid medium state (e.g. not created, locked, inaccessible,
9565 creating, deleting).
9566 </result>
9567
9568 </desc>
9569 <param name="state" type="MediumState" dir="return">
9570 <desc>
9571 State of the medium after the operation.
9572 </desc>
9573 </param>
9574 </method>
9575
9576 <method name="unlockRead">
9577 <desc>
9578 Cancels the read lock previously set by <link to="#lockRead"/>.
9579
9580 For both success and failure, this method returns the current state
9581 of the medium <i>after</i> the operation.
9582
9583 See <link to="#lockRead"/> for more details.
9584
9585 <result name="VBOX_E_INVALID_OBJECT_STATE">
9586 Medium not locked for reading.
9587 </result>
9588
9589 </desc>
9590 <param name="state" type="MediumState" dir="return">
9591 <desc>
9592 State of the medium after the operation.
9593 </desc>
9594 </param>
9595 </method>
9596
9597 <method name="lockWrite">
9598 <desc>
9599 Locks this medium for writing.
9600
9601 A write lock, as opposed to <link to="#lockRead"/>, is
9602 exclusive: there may be only one client holding a write lock,
9603 and there may be no read locks while the write lock is held.
9604 As a result, read-locking fails if a write lock is held, and
9605 write-locking fails if either a read or another write lock is held.
9606
9607 When a medium is locked for writing, it cannot be modified
9608 from within VirtualBox, and it is not guaranteed that the values
9609 of its properties are up-to-date. Any method that changes the
9610 properties of this medium or contents of the storage unit will
9611 return an error (unless explicitly stated otherwise).
9612
9613 When a virtual machine is started up, it locks for writing all
9614 media it uses to write data to. If any medium could not be locked
9615 for writing, the startup procedure will fail. If a medium has
9616 differencing images, then while the machine is running, only
9617 the last ("leaf") differencing image is locked for writing,
9618 whereas its parents are locked for reading only.
9619
9620 A medium is also locked for writing when it is the target of a
9621 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9622
9623 The medium locked for writing must be unlocked using the <link
9624 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9625
9626 This method sets the medium state (see <link to="#state"/>) to
9627 "LockedWrite" on success. The medium's previous state must be
9628 either "Created" or "Inaccessible".
9629
9630 Locking an inaccessible medium is not an error; this method performs
9631 a logical lock that prevents modifications of this medium through
9632 the VirtualBox API, not a physical file-system lock of the underlying
9633 storage unit.
9634
9635 For both, success and failure, this method returns the current
9636 state of the medium <i>before</i> the operation.
9637
9638 <result name="VBOX_E_INVALID_OBJECT_STATE">
9639 Invalid medium state (e.g. not created, locked, inaccessible,
9640 creating, deleting).
9641 </result>
9642
9643 </desc>
9644 <param name="state" type="MediumState" dir="return">
9645 <desc>
9646 State of the medium after the operation.
9647 </desc>
9648 </param>
9649 </method>
9650
9651 <method name="unlockWrite">
9652 <desc>
9653 Cancels the write lock previously set by <link to="#lockWrite"/>.
9654
9655 For both success and failure, this method returns the current
9656 state of the medium <i>after</i> the operation.
9657
9658 See <link to="#lockWrite"/> for more details.
9659
9660 <result name="VBOX_E_INVALID_OBJECT_STATE">
9661 Medium not locked for writing.
9662 </result>
9663
9664 </desc>
9665 <param name="state" type="MediumState" dir="return">
9666 <desc>
9667 State of the medium after the operation.
9668 </desc>
9669 </param>
9670 </method>
9671
9672 <method name="close">
9673 <desc>
9674 Closes this medium.
9675
9676 The medium must not be attached to any known virtual machine
9677 and must not have any known child media, otherwise the
9678 operation will fail.
9679
9680 When the medium is successfully closed, it gets removed from
9681 the list of remembered media, but its storage unit is not
9682 deleted. In particular, this means that this medium can be
9683 later opened again using the <link
9684 to="IVirtualBox::openHardDisk"/> call.
9685
9686 Note that after this method successfully returns, the given medium
9687 object becomes uninitialized. This means that any attempt
9688 to call any of its methods or attributes will fail with the
9689 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9690
9691 <result name="VBOX_E_INVALID_OBJECT_STATE">
9692 Invalid medium state (other than not created, created or
9693 inaccessible).
9694 </result>
9695 <result name="VBOX_E_OBJECT_IN_USE">
9696 Medium attached to virtual machine.
9697 </result>
9698 <result name="VBOX_E_FILE_ERROR">
9699 Settings file not accessible.
9700 </result>
9701 <result name="VBOX_E_XML_ERROR">
9702 Could not parse the settings file.
9703 </result>
9704
9705 </desc>
9706 </method>
9707
9708 <!-- storage methods -->
9709
9710 <method name="getProperty">
9711 <desc>
9712 Returns the value of the custom medium property with the given name.
9713
9714 The list of all properties supported by the given medium format can
9715 be obtained with <link to="IMediumFormat::describeProperties"/>.
9716
9717 Note that if this method returns an empty string in @a value, the
9718 requested property is supported but currently not assigned any value.
9719
9720 <result name="VBOX_E_OBJECT_NOT_FOUND">
9721 Requested property does not exist (not supported by the format).
9722 </result>
9723 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9724 </desc>
9725 <param name="name" type="wstring" dir="in">
9726 <desc>Name of the property to get.</desc>
9727 </param>
9728 <param name="value" type="wstring" dir="return">
9729 <desc>Current property value.</desc>
9730 </param>
9731 </method>
9732
9733 <method name="setProperty">
9734 <desc>
9735 Sets the value of the custom medium property with the given name.
9736
9737 The list of all properties supported by the given medium format can
9738 be obtained with <link to="IMediumFormat::describeProperties"/>.
9739
9740 Note that setting the property value to @c null or an empty string is
9741 equivalent to deleting the existing value. A default value (if it is
9742 defined for this property) will be used by the format backend in this
9743 case.
9744
9745 <result name="VBOX_E_OBJECT_NOT_FOUND">
9746 Requested property does not exist (not supported by the format).
9747 </result>
9748 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9749 </desc>
9750 <param name="name" type="wstring" dir="in">
9751 <desc>Name of the property to set.</desc>
9752 </param>
9753 <param name="value" type="wstring" dir="in">
9754 <desc>Property value to set.</desc>
9755 </param>
9756 </method>
9757
9758 <method name="getProperties">
9759 <desc>
9760 Returns values for a group of properties in one call.
9761
9762 The names of the properties to get are specified using the @a names
9763 argument which is a list of comma-separated property names or
9764 an empty string if all properties are to be returned. Note that currently
9765 the value of this argument is ignored and the method always returns all
9766 existing properties.
9767
9768 The list of all properties supported by the given medium format can
9769 be obtained with <link to="IMediumFormat::describeProperties"/>.
9770
9771 The method returns two arrays, the array of property names corresponding
9772 to the @a names argument and the current values of these properties.
9773 Both arrays have the same number of elements with each elemend at the
9774 given index in the first array corresponds to an element at the same
9775 index in the second array.
9776
9777 Note that for properties that do not have assigned values,
9778 an empty string is returned at the appropriate index in the
9779 @a returnValues array.
9780
9781 </desc>
9782 <param name="names" type="wstring" dir="in">
9783 <desc>
9784 Names of properties to get.
9785 </desc>
9786 </param>
9787 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9788 <desc>Names of returned properties.</desc>
9789 </param>
9790 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9791 <desc>Values of returned properties.</desc>
9792 </param>
9793 </method>
9794
9795 <method name="setProperties">
9796 <desc>
9797 Sets values for a group of properties in one call.
9798
9799 The names of the properties to set are passed in the @a names
9800 array along with the new values for them in the @a values array. Both
9801 arrays have the same number of elements with each elemend at the given
9802 index in the first array corresponding to an element at the same index
9803 in the second array.
9804
9805 If there is at least one property name in @a names that is not valid,
9806 the method will fail before changing the values of any other properties
9807 from the @a names array.
9808
9809 Using this method over <link to="#setProperty"/> is preferred if you
9810 need to set several properties at once since it will result into less
9811 IPC calls.
9812
9813 The list of all properties supported by the given medium format can
9814 be obtained with <link to="IMediumFormat::describeProperties"/>.
9815
9816 Note that setting the property value to @c null or an empty string is
9817 equivalent to deleting the existing value. A default value (if it is
9818 defined for this property) will be used by the format backend in this
9819 case.
9820 </desc>
9821 <param name="names" type="wstring" safearray="yes" dir="in">
9822 <desc>Names of properties to set.</desc>
9823 </param>
9824 <param name="values" type="wstring" safearray="yes" dir="in">
9825 <desc>Values of properties to set.</desc>
9826 </param>
9827 </method>
9828
9829 <!-- storage methods -->
9830
9831 <method name="createBaseStorage">
9832 <desc>
9833 Starts creating a hard disk storage unit (fixed/dynamic, according
9834 to the variant flags) in in the background. The previous storage unit
9835 created for this object, if any, must first be deleted using
9836 <link to="#deleteStorage"/>, otherwise the operation will fail.
9837
9838 Before the operation starts, the medium is placed in
9839 <link to="MediumState_Creating"/> state. If the create operation
9840 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9841 state.
9842
9843 After the returned progress object reports that the operation has
9844 successfully completed, the medium state will be set to <link
9845 to="MediumState_Created"/>, the medium will be remembered by this
9846 VirtualBox installation and may be attached to virtual machines.
9847
9848 <result name="VBOX_E_NOT_SUPPORTED">
9849 The variant of storage creation operation is not supported. See <link
9850 to="IMediumFormat::capabilities"/>.
9851 </result>
9852 </desc>
9853 <param name="logicalSize" type="unsigned long long" dir="in">
9854 <desc>Maximum logical size of the medium in megabytes.</desc>
9855 </param>
9856 <param name="variant" type="MediumVariant" dir="in">
9857 <desc>Exact image variant which should be created.</desc>
9858 </param>
9859 <param name="progress" type="IProgress" dir="return">
9860 <desc>Progress object to track the operation completion.</desc>
9861 </param>
9862 </method>
9863
9864 <method name="deleteStorage">
9865 <desc>
9866 Starts deleting the storage unit of this medium.
9867
9868 The medium must not be attached to any known virtual machine and must
9869 not have any known child media, otherwise the operation will fail.
9870 It will also fail if there is no storage unit to delete or if deletion
9871 is already in progress, or if the medium is being in use (locked for
9872 read or for write) or inaccessible. Therefore, the only valid state for
9873 this operation to succeed is <link to="MediumState_Created"/>.
9874
9875 Before the operation starts, the medium is placed in
9876 <link to="MediumState_Deleting"/> state and gets removed from the list
9877 of remembered hard disks (media registry). If the delete operation
9878 fails, the medium will be remembered again and placed back to
9879 <link to="MediumState_Created"/> state.
9880
9881 After the returned progress object reports that the operation is
9882 complete, the medium state will be set to
9883 <link to="MediumState_NotCreated"/> and you will be able to use one of
9884 the storage creation methods to create it again.
9885
9886 <see>#close()</see>
9887
9888 <result name="VBOX_E_OBJECT_IN_USE">
9889 Medium is attached to a virtual machine.
9890 </result>
9891 <result name="VBOX_E_NOT_SUPPORTED">
9892 Storage deletion is not allowed because neither of storage creation
9893 operations are supported. See
9894 <link to="IMediumFormat::capabilities"/>.
9895 </result>
9896
9897 <note>
9898 If the deletion operation fails, it is not guaranteed that the storage
9899 unit still exists. You may check the <link to="IMedium::state"/> value
9900 to answer this question.
9901 </note>
9902 </desc>
9903 <param name="progress" type="IProgress" dir="return">
9904 <desc>Progress object to track the operation completion.</desc>
9905 </param>
9906 </method>
9907
9908 <!-- diff methods -->
9909
9910 <method name="createDiffStorage">
9911 <desc>
9912 Starts creating an empty differencing storage unit based on this
9913 medium in the format and at the location defined by the @a target
9914 argument.
9915
9916 The target medium must be in <link to="MediumState_NotCreated"/>
9917 state (i.e. must not have an existing storage unit). Upon successful
9918 completion, this operation will set the type of the target medium to
9919 <link to="MediumType_Normal"/> and create a storage unit necessary to
9920 represent the differencing medium data in the given format (according
9921 to the storage format of the target object).
9922
9923 After the returned progress object reports that the operation is
9924 successfully complete, the target medium gets remembered by this
9925 VirtualBox installation and may be attached to virtual machines.
9926
9927 <note>
9928 The medium will be set to <link to="MediumState_LockedRead"/>
9929 state for the duration of this operation.
9930 </note>
9931 <result name="VBOX_E_OBJECT_IN_USE">
9932 Medium not in @c NotCreated state.
9933 </result>
9934 </desc>
9935 <param name="target" type="IMedium" dir="in">
9936 <desc>Target medium.</desc>
9937 </param>
9938 <param name="variant" type="MediumVariant" dir="in">
9939 <desc>Exact image variant which should be created.</desc>
9940 </param>
9941 <param name="progress" type="IProgress" dir="return">
9942 <desc>Progress object to track the operation completion.</desc>
9943 </param>
9944 </method>
9945
9946 <method name="mergeTo">
9947 <desc>
9948 Starts merging the contents of this medium and all intermediate
9949 differencing media in the chain to the given target medium.
9950
9951 The target medium must be either a descendant of this medium or
9952 its ancestor (otherwise this method will immediately return a failure).
9953 It follows that there are two logical directions of the merge operation:
9954 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9955 ancestor (<i>backward merge</i>). Let us consider the following medium
9956 chain:
9957
9958 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9959
9960 Here, calling this method on the <tt>Base</tt> medium object with
9961 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9962 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9963 merge. Note that in both cases the contents of the resulting medium
9964 will be the same, the only difference is the medium object that takes
9965 the result of the merge operation. In case of the forward merge in the
9966 above example, the result will be written to <tt>Diff_2</tt>; in case of
9967 the backward merge, the result will be written to <tt>Base</tt>. In
9968 other words, the result of the operation is always stored in the target
9969 medium.
9970
9971 Upon successful operation completion, the storage units of all media in
9972 the chain between this (source) medium and the target medium, including
9973 the source medium itself, will be automatically deleted and the
9974 relevant medium objects (including this medium) will become
9975 uninitialized. This means that any attempt to call any of
9976 their methods or attributes will fail with the
9977 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9978 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9979 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9980 Note that <tt>Diff_2</tt> in this case will become a base medium
9981 itself since it will no longer be based on any other medium.
9982
9983 Considering the above, all of the following conditions must be met in
9984 order for the merge operation to succeed:
9985 <ul>
9986 <li>
9987 Neither this (source) medium nor any intermediate
9988 differencing medium in the chain between it and the target
9989 medium is attached to any virtual machine.
9990 </li>
9991 <li>
9992 Neither the source medium nor the target medium is an
9993 <link to="MediumType_Immutable"/> medium.
9994 </li>
9995 <li>
9996 The part of the medium tree from the source medium to the
9997 target medium is a linear chain, i.e. all medium in this
9998 chain have exactly one child which is the next medium in this
9999 chain. The only exception from this rule is the target medium in
10000 the forward merge operation; it is allowed to have any number of
10001 child media because the merge operation will not change its
10002 logical contents (as it is seen by the guest OS or by children).
10003 </li>
10004 <li>
10005 None of the involved media are in
10006 <link to="MediumState_LockedRead"/> or
10007 <link to="MediumState_LockedWrite"/> state.
10008 </li>
10009 </ul>
10010
10011 <note>
10012 This (source) medium and all intermediates will be placed to <link
10013 to="MediumState_Deleting"/> state and the target medium will be
10014 placed to <link to="MediumState_LockedWrite"/> state and for the
10015 duration of this operation.
10016 </note>
10017 </desc>
10018 <param name="targetId" type="uuid" mod="string" dir="in">
10019 <desc>UUID of the target ancestor or descendant medium.</desc>
10020 </param>
10021 <param name="progress" type="IProgress" dir="return">
10022 <desc>Progress object to track the operation completion.</desc>
10023 </param>
10024 </method>
10025
10026 <!-- clone method -->
10027
10028 <method name="cloneTo">
10029 <desc>
10030 Starts creating a clone of this medium in the format and at the
10031 location defined by the @a target argument.
10032
10033 The target medium must be either in <link to="MediumState_NotCreated"/>
10034 state (i.e. must not have an existing storage unit) or in
10035 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10036 big enough to hold the data or else the copy will be partial). Upon
10037 successful completion, the cloned medium will contain exactly the
10038 same sector data as the medium being cloned, except that in the
10039 first case a new UUID for the clone will be randomly generated, and in
10040 the second case the UUID will remain unchanged.
10041
10042 The @a parent argument defines which medium will be the parent
10043 of the clone. Passing a @c null reference indicates that the clone will
10044 be a base image, i.e. completely independent. It is possible to specify
10045 an arbitrary medium for this parameter, including the parent of the
10046 medium which is being cloned. Even cloning to a child of the source
10047 medium is possible. Note that when cloning to an existing image, the
10048 @a parent irgument is ignored.
10049
10050 After the returned progress object reports that the operation is
10051 successfully complete, the target medium gets remembered by this
10052 VirtualBox installation and may be attached to virtual machines.
10053
10054 <note>
10055 This medium will be placed to <link to="MediumState_LockedRead"/>
10056 state for the duration of this operation.
10057 </note>
10058 <result name="E_NOTIMPL">
10059 The specified cloning variant is not supported at the moment.
10060 </result>
10061 </desc>
10062 <param name="target" type="IMedium" dir="in">
10063 <desc>Target medium.</desc>
10064 </param>
10065 <param name="variant" type="MediumVariant" dir="in">
10066 <desc>Exact image variant which should be created.</desc>
10067 </param>
10068 <param name="parent" type="IMedium" dir="in">
10069 <desc>Parent of the cloned medium.</desc>
10070 </param>
10071 <param name="progress" type="IProgress" dir="return">
10072 <desc>Progress object to track the operation completion.</desc>
10073 </param>
10074 </method>
10075
10076 <!-- other methods -->
10077
10078 <method name="compact">
10079 <desc>
10080 Starts compacting of this medium. This means that the medium is
10081 transformed into a possibly more compact storage representation.
10082 This potentially creates temporary images, which can require a
10083 substantial amount of additional disk space.
10084
10085 This medium will be placed to <link to="MediumState_LockedWrite"/>
10086 state and all its parent media (if any) will be placed to
10087 <link to="MediumState_LockedRead"/> state for the duration of this
10088 operation.
10089
10090 Please note that the results can be either returned straight away,
10091 or later as the result of the background operation via the object
10092 returned via the @a progress parameter.
10093
10094 <result name="VBOX_E_NOT_SUPPORTED">
10095 Medium format does not support compacting (but potentially
10096 needs it).
10097 </result>
10098 </desc>
10099 <param name="progress" type="IProgress" dir="return">
10100 <desc>Progress object to track the operation completion.</desc>
10101 </param>
10102 </method>
10103
10104 <method name="resize">
10105 <desc>
10106 Starts resizing this medium. This means that the nominal size of the
10107 medium is set to the new value. Both increasing and decreasing the
10108 size is possible, and there are no safety checks, since VirtualBox
10109 does not make any assumptions about the medium contents.
10110
10111 Resizing usually needs additional disk space, and possibly also
10112 some temporary disk space. Note that resize does not create a full
10113 temporary copy of the medium, so the additional disk space requirement
10114 is usually much lower than using the clone operation.
10115
10116 This medium will be placed to <link to="MediumState_LockedWrite"/>
10117 state for the duration of this operation.
10118
10119 Please note that the results can be either returned straight away,
10120 or later as the result of the background operation via the object
10121 returned via the @a progress parameter.
10122
10123 <result name="VBOX_E_NOT_SUPPORTED">
10124 Medium format does not support resizing.
10125 </result>
10126 </desc>
10127 <param name="logicalSize" type="unsigned long long" dir="in">
10128 <desc>New nominal capacity of the medium in megabytes.</desc>
10129 </param>
10130 <param name="progress" type="IProgress" dir="return">
10131 <desc>Progress object to track the operation completion.</desc>
10132 </param>
10133 </method>
10134
10135 <method name="reset">
10136 <desc>
10137 Starts erasing the contents of this differencing medium.
10138
10139 This operation will reset the differencing medium to its initial
10140 state when it does not contain any sector data and any read operation is
10141 redirected to its parent medium.
10142
10143 This medium will be placed to <link to="MediumState_LockedWrite"/>
10144 for the duration of this operation.
10145
10146 <result name="VBOX_E_NOT_SUPPORTED">
10147 This is not a differencing medium.
10148 </result>
10149 <result name="VBOX_E_INVALID_OBJECT_STATE">
10150 Medium is not in <link to="MediumState_Created"/> or
10151 <link to="MediumState_Inaccessible"/> state.
10152 </result>
10153 </desc>
10154 <param name="progress" type="IProgress" dir="return">
10155 <desc>Progress object to track the operation completion.</desc>
10156 </param>
10157 </method>
10158
10159 </interface>
10160
10161
10162 <!--
10163 // IMediumFormat
10164 /////////////////////////////////////////////////////////////////////////
10165 -->
10166
10167 <enum
10168 name="DataType"
10169 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10170 >
10171 <const name="Int32" value="0"/>
10172 <const name="Int8" value="1"/>
10173 <const name="String" value="2"/>
10174 </enum>
10175
10176 <enum
10177 name="DataFlags"
10178 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10179 >
10180 <const name="None" value="0x00"/>
10181 <const name="Mandatory" value="0x01"/>
10182 <const name="Expert" value="0x02"/>
10183 <const name="Array" value="0x04"/>
10184 <const name="FlagMask" value="0x07"/>
10185 </enum>
10186
10187 <enum
10188 name="MediumFormatCapabilities"
10189 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10190 >
10191 <desc>
10192 Medium format capability flags.
10193 </desc>
10194
10195 <const name="Uuid" value="0x01">
10196 <desc>
10197 Supports UUIDs as expected by VirtualBox code.
10198 </desc>
10199 </const>
10200
10201 <const name="CreateFixed" value="0x02">
10202 <desc>
10203 Supports creating fixed size images, allocating all space instantly.
10204 </desc>
10205 </const>
10206
10207 <const name="CreateDynamic" value="0x04">
10208 <desc>
10209 Supports creating dynamically growing images, allocating space on
10210 demand.
10211 </desc>
10212 </const>
10213
10214 <const name="CreateSplit2G" value="0x08">
10215 <desc>
10216 Supports creating images split in chunks of a bit less than 2 GBytes.
10217 </desc>
10218 </const>
10219
10220 <const name="Differencing" value="0x10">
10221 <desc>
10222 Supports being used as a format for differencing media (see <link
10223 to="IMedium::createDiffStorage"/>).
10224 </desc>
10225 </const>
10226
10227 <const name="Asynchronous" value="0x20">
10228 <desc>
10229 Supports asynchronous I/O operations for at least some configurations.
10230 </desc>
10231 </const>
10232
10233 <const name="File" value="0x40">
10234 <desc>
10235 The format backend operates on files (the <link to="IMedium::location"/>
10236 attribute of the medium specifies a file used to store medium
10237 data; for a list of supported file extensions see
10238 <link to="IMediumFormat::fileExtensions"/>).
10239 </desc>
10240 </const>
10241
10242 <const name="Properties" value="0x80">
10243 <desc>
10244 The format backend uses the property interface to configure the storage
10245 location and properties (the <link to="IMediumFormat::describeProperties"/>
10246 method is used to get access to properties supported by the given medium format).
10247 </desc>
10248 </const>
10249
10250 <const name="CapabilityMask" value="0xFF"/>
10251 </enum>
10252
10253 <interface
10254 name="IMediumFormat" extends="$unknown"
10255 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10256 wsmap="managed"
10257 >
10258 <desc>
10259 The IMediumFormat interface represents a medium format.
10260
10261 Each medium format has an associated backend which is used to handle
10262 media stored in this format. This interface provides information
10263 about the properties of the associated backend.
10264
10265 Each medium format is identified by a string represented by the
10266 <link to="#id"/> attribute. This string is used in calls like
10267 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10268 format.
10269
10270 The list of all supported medium formats can be obtained using
10271 <link to="ISystemProperties::mediaFormats"/>.
10272
10273 <see>IMedium</see>
10274 </desc>
10275
10276 <attribute name="id" type="wstring" readonly="yes">
10277 <desc>
10278 Identifier of this format.
10279
10280 The format identifier is a non-@c null non-empty ASCII string. Note that
10281 this string is case-insensitive. This means that, for example, all of
10282 the following strings:
10283 <pre>
10284 "VDI"
10285 "vdi"
10286 "VdI"</pre>
10287 refer to the same medium format.
10288
10289 This string is used in methods of other interfaces where it is necessary
10290 to specify a medium format, such as
10291 <link to="IVirtualBox::createHardDisk"/>.
10292 </desc>
10293 </attribute>
10294
10295 <attribute name="name" type="wstring" readonly="yes">
10296 <desc>
10297 Human readable description of this format.
10298
10299 Mainly for use in file open dialogs.
10300 </desc>
10301 </attribute>
10302
10303 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10304 <desc>
10305 Array of strings containing the supported file extensions.
10306
10307 The first extension in the array is the extension preferred by the
10308 backend. It is recommended to use this extension when specifying a
10309 location of the storage unit for a new medium.
10310
10311 Note that some backends do not work on files, so this array may be
10312 empty.
10313
10314 <see>IMediumFormat::capabilities</see>
10315 </desc>
10316 </attribute>
10317
10318 <attribute name="capabilities" type="unsigned long" readonly="yes">
10319 <desc>
10320 Capabilities of the format as a set of bit flags.
10321
10322 For the meaning of individual capability flags see
10323 <link to="MediumFormatCapabilities"/>.
10324 </desc>
10325 </attribute>
10326
10327 <method name="describeProperties">
10328 <desc>
10329 Returns several arrays describing the properties supported by this
10330 format.
10331
10332 An element with the given index in each array describes one
10333 property. Thus, the number of elements in each returned array is the
10334 same and corresponds to the number of supported properties.
10335
10336 The returned arrays are filled in only if the
10337 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10338 All arguments must be non-@c null.
10339
10340 <see>DataType</see>
10341 <see>DataFlags</see>
10342 </desc>
10343
10344 <param name="names" type="wstring" safearray="yes" dir="out">
10345 <desc>Array of property names.</desc>
10346 </param>
10347 <param name="description" type="wstring" safearray="yes" dir="out">
10348 <desc>Array of property descriptions.</desc>
10349 </param>
10350 <param name="types" type="DataType" safearray="yes" dir="out">
10351 <desc>Array of property types.</desc>
10352 </param>
10353 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10354 <desc>Array of property flags.</desc>
10355 </param>
10356 <param name="defaults" type="wstring" safearray="yes" dir="out">
10357 <desc>Array of default property values.</desc>
10358 </param>
10359 </method>
10360
10361 </interface>
10362
10363
10364 <!--
10365 // IKeyboard
10366 /////////////////////////////////////////////////////////////////////////
10367 -->
10368
10369 <interface
10370 name="IKeyboard" extends="$unknown"
10371 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10372 wsmap="managed"
10373 >
10374 <desc>
10375 The IKeyboard interface represents the virtual machine's keyboard. Used
10376 in <link to="IConsole::keyboard"/>.
10377
10378 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10379 to the virtual machine.
10380
10381 </desc>
10382 <method name="putScancode">
10383 <desc>Sends a scancode to the keyboard.
10384
10385 <result name="VBOX_E_IPRT_ERROR">
10386 Could not send scan code to virtual keyboard.
10387 </result>
10388
10389 </desc>
10390 <param name="scancode" type="long" dir="in"/>
10391 </method>
10392
10393 <method name="putScancodes">
10394 <desc>Sends an array of scancodes to the keyboard.
10395
10396 <result name="VBOX_E_IPRT_ERROR">
10397 Could not send all scan codes to virtual keyboard.
10398 </result>
10399
10400 </desc>
10401 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10402 <param name="codesStored" type="unsigned long" dir="return"/>
10403 </method>
10404
10405 <method name="putCAD">
10406 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10407 function is nothing special, it is just a convenience function
10408 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10409
10410 <result name="VBOX_E_IPRT_ERROR">
10411 Could not send all scan codes to virtual keyboard.
10412 </result>
10413
10414 </desc>
10415 </method>
10416
10417 </interface>
10418
10419
10420 <!--
10421 // IMouse
10422 /////////////////////////////////////////////////////////////////////////
10423 -->
10424
10425 <enum
10426 name="MouseButtonState"
10427 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10428 >
10429 <desc>
10430 Mouse button state.
10431 </desc>
10432
10433 <const name="LeftButton" value="0x01"/>
10434 <const name="RightButton" value="0x02"/>
10435 <const name="MiddleButton" value="0x04"/>
10436 <const name="WheelUp" value="0x08"/>
10437 <const name="WheelDown" value="0x10"/>
10438 <const name="XButton1" value="0x20"/>
10439 <const name="XButton2" value="0x40"/>
10440 <const name="MouseStateMask" value="0x7F"/>
10441 </enum>
10442
10443 <interface
10444 name="IMouse" extends="$unknown"
10445 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10446 wsmap="managed"
10447 >
10448 <desc>
10449 The IMouse interface represents the virtual machine's mouse. Used in
10450 <link to="IConsole::mouse"/>.
10451
10452 Through this interface, the virtual machine's virtual mouse can be
10453 controlled.
10454 </desc>
10455
10456 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10457 <desc>
10458 Whether the guest OS supports absolute mouse pointer positioning
10459 or not.
10460 <note>
10461 VirtualBox Guest Tools need to be installed to the guest OS
10462 in order to enable absolute mouse positioning support.
10463 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10464 callback to be instantly informed about changes of this attribute
10465 during virtual machine execution.
10466 </note>
10467 <see><link to="#putMouseEventAbsolute"/></see>
10468 </desc>
10469 </attribute>
10470
10471 <method name="putMouseEvent">
10472 <desc>
10473 Initiates a mouse event using relative pointer movements
10474 along x and y axis.
10475
10476 <result name="E_ACCESSDENIED">
10477 Console not powered up.
10478 </result>
10479 <result name="VBOX_E_IPRT_ERROR">
10480 Could not send mouse event to virtual mouse.
10481 </result>
10482
10483 </desc>
10484
10485 <param name="dx" type="long" dir="in">
10486 <desc>
10487 Amount of pixels the mouse should move to the right.
10488 Negative values move the mouse to the left.
10489 </desc>
10490 </param>
10491 <param name="dy" type="long" dir="in">
10492 <desc>
10493 Amount of pixels the mouse should move downwards.
10494 Negative values move the mouse upwards.
10495 </desc>
10496 </param>
10497 <param name="dz" type="long" dir="in">
10498 <desc>
10499 Amount of mouse wheel moves.
10500 Positive values describe clockwise wheel rotations,
10501 negative values describe counterclockwise rotations.
10502 </desc>
10503 </param>
10504 <param name="dw" type="long" dir="in">
10505 <desc>
10506 Amount of horizontal mouse wheel moves.
10507 Positive values describe a movement to the left,
10508 negative values describe a movement to the right.
10509 </desc>
10510 </param>
10511 <param name="buttonState" type="long" dir="in">
10512 <desc>
10513 The current state of mouse buttons. Every bit represents
10514 a mouse button as follows:
10515 <table>
10516 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10517 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10518 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10519 </table>
10520 A value of <tt>1</tt> means the corresponding button is pressed.
10521 otherwise it is released.
10522 </desc>
10523 </param>
10524 </method>
10525
10526 <method name="putMouseEventAbsolute">
10527 <desc>
10528 Positions the mouse pointer using absolute x and y coordinates.
10529 These coordinates are expressed in pixels and
10530 start from <tt>[1,1]</tt> which corresponds to the top left
10531 corner of the virtual display.
10532
10533 <result name="E_ACCESSDENIED">
10534 Console not powered up.
10535 </result>
10536 <result name="VBOX_E_IPRT_ERROR">
10537 Could not send mouse event to virtual mouse.
10538 </result>
10539
10540 <note>
10541 This method will have effect only if absolute mouse
10542 positioning is supported by the guest OS.
10543 </note>
10544
10545 <see><link to="#absoluteSupported"/></see>
10546 </desc>
10547
10548 <param name="x" type="long" dir="in">
10549 <desc>
10550 X coordinate of the pointer in pixels, starting from @c 1.
10551 </desc>
10552 </param>
10553 <param name="y" type="long" dir="in">
10554 <desc>
10555 Y coordinate of the pointer in pixels, starting from @c 1.
10556 </desc>
10557 </param>
10558 <param name="dz" type="long" dir="in">
10559 <desc>
10560 Amount of mouse wheel moves.
10561 Positive values describe clockwise wheel rotations,
10562 negative values describe counterclockwise rotations.
10563 </desc>
10564 </param>
10565 <param name="dw" type="long" dir="in">
10566 <desc>
10567 Amount of horizontal mouse wheel moves.
10568 Positive values describe a movement to the left,
10569 negative values describe a movement to the right.
10570 </desc>
10571 </param>
10572 <param name="buttonState" type="long" dir="in">
10573 <desc>
10574 The current state of mouse buttons. Every bit represents
10575 a mouse button as follows:
10576 <table>
10577 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10578 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10579 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10580 </table>
10581 A value of @c 1 means the corresponding button is pressed.
10582 otherwise it is released.
10583 </desc>
10584 </param>
10585 </method>
10586
10587 </interface>
10588
10589 <!--
10590 // IDisplay
10591 /////////////////////////////////////////////////////////////////////////
10592 -->
10593
10594 <enum
10595 name="FramebufferPixelFormat"
10596 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10597 >
10598 <desc>
10599 Format of the video memory buffer. Constants represented by this enum can
10600 be used to test for particular values of <link
10601 to="IFramebuffer::pixelFormat"/>. See also <link
10602 to="IFramebuffer::requestResize"/>.
10603
10604 See also www.fourcc.org for more information about FOURCC pixel formats.
10605 </desc>
10606
10607 <const name="Opaque" value="0">
10608 <desc>
10609 Unknown buffer format (the user may not assume any particular format of
10610 the buffer).
10611 </desc>
10612 </const>
10613 <const name="FOURCC_RGB" value="0x32424752">
10614 <desc>
10615 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10616 bit layout).
10617 </desc>
10618 </const>
10619 </enum>
10620
10621 <interface
10622 name="IFramebuffer" extends="$unknown"
10623 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10624 wsmap="suppress"
10625 >
10626 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10627 <desc>Address of the start byte of the frame buffer.</desc>
10628 </attribute>
10629
10630 <attribute name="width" type="unsigned long" readonly="yes">
10631 <desc>Frame buffer width, in pixels.</desc>
10632 </attribute>
10633
10634 <attribute name="height" type="unsigned long" readonly="yes">
10635 <desc>Frame buffer height, in pixels.</desc>
10636 </attribute>
10637
10638 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10639 <desc>
10640 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10641 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10642 are: 8, 15, 16, 24 and 32.
10643 </desc>
10644 </attribute>
10645
10646 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10647 <desc>
10648 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10649 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10650 size of the scan line must be aligned to 32 bits.
10651 </desc>
10652 </attribute>
10653
10654 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10655 <desc>
10656 Frame buffer pixel format. It's either one of the values defined by <link
10657 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10658 <note>
10659 This attribute must never return <link
10660 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10661 <link to="#address"/> points to must be always known.
10662 </note>
10663 </desc>
10664 </attribute>
10665
10666 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10667 <desc>
10668 Defines whether this frame buffer uses the virtual video card's memory
10669 buffer (guest VRAM) directly or not. See <link
10670 to="IFramebuffer::requestResize"/> for more information.
10671 </desc>
10672 </attribute>
10673
10674 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10675 <desc>
10676 Hint from the frame buffer about how much of the standard
10677 screen height it wants to use for itself. This information is
10678 exposed to the guest through the VESA BIOS and VMMDev interface
10679 so that it can use it for determining its video mode table. It
10680 is not guaranteed that the guest respects the value.
10681 </desc>
10682 </attribute>
10683
10684 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10685 <desc>
10686 An alpha-blended overlay which is superposed over the frame buffer.
10687 The initial purpose is to allow the display of icons providing
10688 information about the VM state, including disk activity, in front
10689 ends which do not have other means of doing that. The overlay is
10690 designed to controlled exclusively by IDisplay. It has no locking
10691 of its own, and any changes made to it are not guaranteed to be
10692 visible until the affected portion of IFramebuffer is updated. The
10693 overlay can be created lazily the first time it is requested. This
10694 attribute can also return @c null to signal that the overlay is not
10695 implemented.
10696 </desc>
10697 </attribute>
10698
10699 <attribute name="winId" type="unsigned long long" readonly="yes">
10700 <desc>
10701 Platform-dependent identifier of the window where context of this
10702 frame buffer is drawn, or zero if there's no such window.
10703 </desc>
10704 </attribute>
10705
10706 <method name="lock">
10707 <desc>
10708 Locks the frame buffer.
10709 Gets called by the IDisplay object where this frame buffer is
10710 bound to.
10711 </desc>
10712 </method>
10713
10714 <method name="unlock">
10715 <desc>
10716 Unlocks the frame buffer.
10717 Gets called by the IDisplay object where this frame buffer is
10718 bound to.
10719 </desc>
10720 </method>
10721
10722 <method name="notifyUpdate">
10723 <desc>
10724 Informs about an update.
10725 Gets called by the display object where this buffer is
10726 registered.
10727 </desc>
10728 <param name="x" type="unsigned long" dir="in"/>
10729 <param name="y" type="unsigned long" dir="in"/>
10730 <param name="width" type="unsigned long" dir="in"/>
10731 <param name="height" type="unsigned long" dir="in"/>
10732 </method>
10733
10734 <method name="requestResize">
10735 <desc>
10736 Requests a size and pixel format change.
10737
10738 There are two modes of working with the video buffer of the virtual
10739 machine. The <i>indirect</i> mode implies that the IFramebuffer
10740 implementation allocates a memory buffer for the requested display mode
10741 and provides it to the virtual machine. In <i>direct</i> mode, the
10742 IFramebuffer implementation uses the memory buffer allocated and owned
10743 by the virtual machine. This buffer represents the video memory of the
10744 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10745 usually faster because the implementation gets a raw pointer to the
10746 guest VRAM buffer which it can directly use for visualizing the contents
10747 of the virtual display, as opposed to the indirect mode where the
10748 contents of guest VRAM are copied to the memory buffer provided by
10749 the implementation every time a display update occurs.
10750
10751 It is important to note that the direct mode is really fast only when
10752 the implementation uses the given guest VRAM buffer directly, for
10753 example, by blitting it to the window representing the virtual machine's
10754 display, which saves at least one copy operation comparing to the
10755 indirect mode. However, using the guest VRAM buffer directly is not
10756 always possible: the format and the color depth of this buffer may be
10757 not supported by the target window, or it may be unknown (opaque) as in
10758 case of text or non-linear multi-plane VGA video modes. In this case,
10759 the indirect mode (that is always available) should be used as a
10760 fallback: when the guest VRAM contents are copied to the
10761 implementation-provided memory buffer, color and format conversion is
10762 done automatically by the underlying code.
10763
10764 The @a pixelFormat parameter defines whether the direct mode is
10765 available or not. If @a pixelFormat is <link
10766 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10767 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10768 @a bytesPerLine parameters must be ignored and the implementation must use
10769 the indirect mode (where it provides its own buffer in one of the
10770 supported formats). In all other cases, @a pixelFormat together with
10771 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10772 buffer pointed to by the @a VRAM parameter and the implementation is
10773 free to choose which mode to use. To indicate that this frame buffer uses
10774 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10775 attribute must return @c true and <link to="#address"/> must
10776 return exactly the same address that is passed in the @a VRAM parameter
10777 of this method; otherwise it is assumed that the indirect strategy is
10778 chosen.
10779
10780 The @a width and @a height parameters represent the size of the
10781 requested display mode in both modes. In case of indirect mode, the
10782 provided memory buffer should be big enough to store data of the given
10783 display mode. In case of direct mode, it is guaranteed that the given
10784 @a VRAM buffer contains enough space to represent the display mode of the
10785 given size. Note that this frame buffer's <link to="#width"/> and <link
10786 to="#height"/> attributes must return exactly the same values as
10787 passed to this method after the resize is completed (see below).
10788
10789 The @a finished output parameter determines if the implementation has
10790 finished resizing the frame buffer or not. If, for some reason, the
10791 resize cannot be finished immediately during this call, @a finished
10792 must be set to @c false, and the implementation must call
10793 <link to="IDisplay::resizeCompleted"/> after it has returned from
10794 this method as soon as possible. If @a finished is @c false, the
10795 machine will not call any frame buffer methods until
10796 <link to="IDisplay::resizeCompleted"/> is called.
10797
10798 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10799 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10800 this frame buffer must return exactly the same values as specified in the
10801 parameters of this method, after the resize is completed. If the
10802 indirect mode is chosen, these attributes must return values describing
10803 the format of the implementation's own memory buffer <link
10804 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10805 value must always correlate with <link to="#pixelFormat"/>. Note that
10806 the <link to="#pixelFormat"/> attribute must never return <link
10807 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10808
10809 <note>
10810 This method is called by the IDisplay object under the
10811 <link to="#lock"/> provided by this IFramebuffer
10812 implementation. If this method returns @c false in @a finished, then
10813 this lock is not released until
10814 <link to="IDisplay::resizeCompleted"/> is called.
10815 </note>
10816 </desc>
10817 <param name="screenId" type="unsigned long" dir="in">
10818 <desc>
10819 Logical screen number. Must be used in the corresponding call to
10820 <link to="IDisplay::resizeCompleted"/> if this call is made.
10821 </desc>
10822 </param>
10823 <param name="pixelFormat" type="unsigned long" dir="in">
10824 <desc>
10825 Pixel format of the memory buffer pointed to by @a VRAM.
10826 See also <link to="FramebufferPixelFormat"/>.
10827 </desc>
10828 </param>
10829 <param name="VRAM" type="octet" mod="ptr" dir="in">
10830 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10831 </param>
10832 <param name="bitsPerPixel" type="unsigned long" dir="in">
10833 <desc>Color depth, bits per pixel.</desc>
10834 </param>
10835 <param name="bytesPerLine" type="unsigned long" dir="in">
10836 <desc>Size of one scan line, in bytes.</desc>
10837 </param>
10838 <param name="width" type="unsigned long" dir="in">
10839 <desc>Width of the guest display, in pixels.</desc>
10840 </param>
10841 <param name="height" type="unsigned long" dir="in">
10842 <desc>Height of the guest display, in pixels.</desc>
10843 </param>
10844 <param name="finished" type="boolean" dir="return">
10845 <desc>
10846 Can the VM start using the new frame buffer immediately
10847 after this method returns or it should wait for
10848 <link to="IDisplay::resizeCompleted"/>.
10849 </desc>
10850 </param>
10851 </method>
10852
10853 <method name="videoModeSupported">
10854 <desc>
10855 Returns whether the frame buffer implementation is willing to
10856 support a given video mode. In case it is not able to render
10857 the video mode (or for some reason not willing), it should
10858 return @c false. Usually this method is called when the guest
10859 asks the VMM device whether a given video mode is supported
10860 so the information returned is directly exposed to the guest.
10861 It is important that this method returns very quickly.
10862 </desc>
10863 <param name="width" type="unsigned long" dir="in"/>
10864 <param name="height" type="unsigned long" dir="in"/>
10865 <param name="bpp" type="unsigned long" dir="in"/>
10866 <param name="supported" type="boolean" dir="return"/>
10867 </method>
10868
10869 <method name="getVisibleRegion">
10870 <desc>
10871 Returns the visible region of this frame buffer.
10872
10873 If the @a rectangles parameter is @c null then the value of the
10874 @a count parameter is ignored and the number of elements necessary to
10875 describe the current visible region is returned in @a countCopied.
10876
10877 If @a rectangles is not @c null but @a count is less
10878 than the required number of elements to store region data, the method
10879 will report a failure. If @a count is equal or greater than the
10880 required number of elements, then the actual number of elements copied
10881 to the provided array will be returned in @a countCopied.
10882
10883 <note>
10884 The address of the provided array must be in the process space of
10885 this IFramebuffer object.
10886 </note>
10887 <note>
10888 Method not yet implemented.
10889 </note>
10890 </desc>
10891 <param name="rectangles" type="octet" mod="ptr" dir="in">
10892 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10893 </param>
10894 <param name="count" type="unsigned long" dir="in">
10895 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10896 </param>
10897 <param name="countCopied" type="unsigned long" dir="return">
10898 <desc>Number of elements copied to the @a rectangles array.</desc>
10899 </param>
10900 </method>
10901
10902 <method name="setVisibleRegion">
10903 <desc>
10904 Suggests a new visible region to this frame buffer. This region
10905 represents the area of the VM display which is a union of regions of
10906 all top-level windows of the guest operating system running inside the
10907 VM (if the Guest Additions for this system support this
10908 functionality). This information may be used by the frontends to
10909 implement the seamless desktop integration feature.
10910
10911 <note>
10912 The address of the provided array must be in the process space of
10913 this IFramebuffer object.
10914 </note>
10915 <note>
10916 The IFramebuffer implementation must make a copy of the provided
10917 array of rectangles.
10918 </note>
10919 <note>
10920 Method not yet implemented.
10921 </note>
10922 </desc>
10923 <param name="rectangles" type="octet" mod="ptr" dir="in">
10924 <desc>Pointer to the @c RTRECT array.</desc>
10925 </param>
10926 <param name="count" type="unsigned long" dir="in">
10927 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10928 </param>
10929 </method>
10930
10931 <method name="processVHWACommand">
10932 <desc>
10933 Posts a Video HW Acceleration Command to the frame buffer for processing.
10934 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10935 are posted from quest to the host to be processed by the host hardware.
10936
10937 <note>
10938 The address of the provided command must be in the process space of
10939 this IFramebuffer object.
10940 </note>
10941 </desc>
10942
10943 <param name="command" type="octet" mod="ptr" dir="in">
10944 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10945 </param>
10946 </method>
10947
10948 </interface>
10949
10950 <interface
10951 name="IFramebufferOverlay" extends="IFramebuffer"
10952 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10953 wsmap="suppress"
10954 >
10955 <desc>
10956 The IFramebufferOverlay interface represents an alpha blended overlay
10957 for displaying status icons above an IFramebuffer. It is always created
10958 not visible, so that it must be explicitly shown. It only covers a
10959 portion of the IFramebuffer, determined by its width, height and
10960 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10961 that order) format, and may be written to directly. Do re-read the
10962 width though, after setting it, as it may be adjusted (increased) to
10963 make it more suitable for the front end.
10964 </desc>
10965 <attribute name="x" type="unsigned long" readonly="yes">
10966 <desc>X position of the overlay, relative to the frame buffer.</desc>
10967 </attribute>
10968
10969 <attribute name="y" type="unsigned long" readonly="yes">
10970 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10971 </attribute>
10972
10973 <attribute name="visible" type="boolean" readonly="no">
10974 <desc>
10975 Whether the overlay is currently visible.
10976 </desc>
10977 </attribute>
10978
10979 <attribute name="alpha" type="unsigned long" readonly="no">
10980 <desc>
10981 The global alpha value for the overlay. This may or may not be
10982 supported by a given front end.
10983 </desc>
10984 </attribute>
10985
10986 <method name="move">
10987 <desc>
10988 Changes the overlay's position relative to the IFramebuffer.
10989 </desc>
10990 <param name="x" type="unsigned long" dir="in"/>
10991 <param name="y" type="unsigned long" dir="in"/>
10992 </method>
10993
10994 </interface>
10995
10996 <interface
10997 name="IDisplay" extends="$unknown"
10998 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10999 wsmap="managed"
11000 >
11001 <desc>
11002 The IDisplay interface represents the virtual machine's display.
11003
11004 The object implementing this interface is contained in each
11005 <link to="IConsole::display"/> attribute and represents the visual
11006 output of the virtual machine.
11007
11008 The virtual display supports pluggable output targets represented by the
11009 IFramebuffer interface. Examples of the output target are a window on
11010 the host computer or an RDP session's display on a remote computer.
11011 </desc>
11012 <attribute name="width" type="unsigned long" readonly="yes">
11013 <desc>Current display width.</desc>
11014 </attribute>
11015
11016 <attribute name="height" type="unsigned long" readonly="yes">
11017 <desc>Current display height.</desc>
11018 </attribute>
11019
11020 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11021 <desc>
11022 Current guest display color depth. Note that this may differ
11023 from <link to="IFramebuffer::bitsPerPixel"/>.
11024 </desc>
11025 </attribute>
11026
11027 <method name="setFramebuffer">
11028 <desc>
11029 Sets the framebuffer for given screen.
11030 </desc>
11031 <param name="screenId" type="unsigned long" dir="in"/>
11032 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11033 </method>
11034
11035 <method name="getFramebuffer">
11036 <desc>
11037 Queries the framebuffer for given screen.
11038 </desc>
11039 <param name="screenId" type="unsigned long" dir="in"/>
11040 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11041 <param name="xOrigin" type="long" dir="out"/>
11042 <param name="yOrigin" type="long" dir="out"/>
11043 </method>
11044
11045 <method name="setVideoModeHint">
11046 <desc>
11047 Asks VirtualBox to request the given video mode from
11048 the guest. This is just a hint and it cannot be guaranteed
11049 that the requested resolution will be used. Guest Additions
11050 are required for the request to be seen by guests. The caller
11051 should issue the request and wait for a resolution change and
11052 after a timeout retry.
11053
11054 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11055 parameters means that the corresponding values should be taken from the
11056 current video mode (i.e. left unchanged).
11057
11058 If the guest OS supports multi-monitor configuration then the @a display
11059 parameter specifies the number of the guest display to send the hint to:
11060 @c 0 is the primary display, @c 1 is the first secondary and
11061 so on. If the multi-monitor configuration is not supported, @a display
11062 must be @c 0.
11063
11064 <result name="E_INVALIDARG">
11065 The @a display is not associated with any monitor.
11066 </result>
11067
11068 </desc>
11069 <param name="width" type="unsigned long" dir="in"/>
11070 <param name="height" type="unsigned long" dir="in"/>
11071 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11072 <param name="display" type="unsigned long" dir="in"/>
11073 </method>
11074
11075 <method name="setSeamlessMode">
11076 <desc>
11077 Enables or disables seamless guest display rendering (seamless desktop
11078 integration) mode.
11079 <note>
11080 Calling this method has no effect if <link
11081 to="IGuest::supportsSeamless"/> returns @c false.
11082 </note>
11083 </desc>
11084 <param name="enabled" type="boolean" dir="in"/>
11085 </method>
11086
11087 <method name="takeScreenShot">
11088 <desc>
11089 Takes a screen shot of the requested size and copies it to the
11090 32-bpp buffer allocated by the caller and pointed to by @a address.
11091 A pixel consists of 4 bytes in order: B, G, R, 0.
11092
11093 <note>This API can be used only by the COM/XPCOM C++ API as it
11094 requires pointer support. Use <link to="#takeScreenShotSlow" />
11095 with other language bindings.
11096 </note>
11097
11098 <result name="E_NOTIMPL">
11099 Feature not implemented.
11100 </result>
11101 <result name="VBOX_E_IPRT_ERROR">
11102 Could not take a screenshot.
11103 </result>
11104
11105 </desc>
11106 <param name="address" type="octet" mod="ptr" dir="in"/>
11107 <param name="width" type="unsigned long" dir="in"/>
11108 <param name="height" type="unsigned long" dir="in"/>
11109 </method>
11110
11111 <method name="takeScreenShotSlow">
11112 <desc>
11113 Takes a guest screen shot of the requested size and returns it as
11114 an array of bytes in uncompressed 32-bit RGBA format.
11115 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11116
11117 This API is slow, but could be the only option to get guest screenshot
11118 for scriptable languages not allowed to manipulate with addresses
11119 directly.
11120
11121 <result name="E_NOTIMPL">
11122 Feature not implemented.
11123 </result>
11124 <result name="VBOX_E_IPRT_ERROR">
11125 Could not take a screenshot.
11126 </result>
11127 </desc>
11128 <param name="width" type="unsigned long" dir="in">
11129 <desc>
11130 Desired image width.
11131 </desc>
11132 </param>
11133 <param name="height" type="unsigned long" dir="in">
11134 <desc>
11135 Desired image height.
11136 </desc>
11137 </param>
11138 <param name="screenData" type="octet" dir="return" safearray="yes">
11139 <desc>
11140 Array with resulting screen data.
11141 </desc>
11142 </param>
11143 </method>
11144
11145 <method name="drawToScreen">
11146 <desc>
11147 Draws a 32-bpp image of the specified size from the given buffer
11148 to the given point on the VM display.
11149
11150 <result name="E_NOTIMPL">
11151 Feature not implemented.
11152 </result>
11153 <result name="VBOX_E_IPRT_ERROR">
11154 Could not draw to screen.
11155 </result>
11156
11157 </desc>
11158 <param name="address" type="octet" mod="ptr" dir="in"/>
11159 <param name="x" type="unsigned long" dir="in"/>
11160 <param name="y" type="unsigned long" dir="in"/>
11161 <param name="width" type="unsigned long" dir="in"/>
11162 <param name="height" type="unsigned long" dir="in"/>
11163 </method>
11164
11165 <method name="invalidateAndUpdate">
11166 <desc>
11167 Does a full invalidation of the VM display and instructs the VM
11168 to update it.
11169
11170 <result name="VBOX_E_IPRT_ERROR">
11171 Could not invalidate and update screen.
11172 </result>
11173
11174 </desc>
11175 </method>
11176
11177 <method name="resizeCompleted">
11178 <desc>
11179 Signals that a framebuffer has completed the resize operation.
11180
11181 <result name="VBOX_E_NOT_SUPPORTED">
11182 Operation only valid for external frame buffers.
11183 </result>
11184
11185 </desc>
11186 <param name="screenId" type="unsigned long" dir="in"/>
11187 </method>
11188
11189 <method name="updateCompleted">
11190 <desc>
11191 Signals that a framebuffer has completed the update operation.
11192
11193 <result name="VBOX_E_NOT_SUPPORTED">
11194 Operation only valid for external frame buffers.
11195 </result>
11196
11197 </desc>
11198 </method>
11199
11200 <method name="completeVHWACommand">
11201 <desc>
11202 Signals that the Video HW Acceleration command has completed.
11203 </desc>
11204
11205 <param name="command" type="octet" mod="ptr" dir="in">
11206 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11207 </param>
11208 </method>
11209
11210 </interface>
11211
11212 <!--
11213 // INetworkAdapter
11214 /////////////////////////////////////////////////////////////////////////
11215 -->
11216
11217 <enum
11218 name="NetworkAttachmentType"
11219 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11220 >
11221 <desc>
11222 Network attachment type.
11223 </desc>
11224
11225 <const name="Null" value="0">
11226 <desc>Null value, also means "not attached".</desc>
11227 </const>
11228 <const name="NAT" value="1"/>
11229 <const name="Bridged" value="2"/>
11230 <const name="Internal" value="3"/>
11231 <const name="HostOnly" value="4"/>
11232 </enum>
11233
11234 <enum
11235 name="NetworkAdapterType"
11236 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11237 >
11238 <desc>
11239 Network adapter type.
11240 </desc>
11241
11242 <const name="Null" value="0">
11243 <desc>Null value (never used by the API).</desc>
11244 </const>
11245 <const name="Am79C970A" value="1">
11246 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11247 </const>
11248 <const name="Am79C973" value="2">
11249 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11250 </const>
11251 <const name="I82540EM" value="3">
11252 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11253 </const>
11254 <const name="I82543GC" value="4">
11255 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11256 </const>
11257 <const name="I82545EM" value="5">
11258 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11259 </const>
11260 <const name="Virtio" value="6">
11261 <desc>Virtio network device.</desc>
11262 </const>
11263 </enum>
11264
11265 <interface
11266 name="INetworkAdapter" extends="$unknown"
11267 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11268 wsmap="managed"
11269 >
11270 <desc>
11271 Represents a virtual network adapter that is attached to a virtual machine.
11272 Each virtual machine has a fixed number of network adapter slots with one
11273 instance of this attached to each of them. Call
11274 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11275 is attached to a given slot in a given machine.
11276
11277 Each network adapter can be in one of five attachment modes, which are
11278 represented by the <link to="NetworkAttachmentType" /> enumeration;
11279 see the <link to="#attachmentType" /> attribute.
11280 </desc>
11281
11282 <attribute name="adapterType" type="NetworkAdapterType">
11283 <desc>
11284 Type of the virtual network adapter. Depending on this value,
11285 VirtualBox will provide a different virtual network hardware
11286 to the guest.
11287 </desc>
11288 </attribute>
11289
11290 <attribute name="slot" type="unsigned long" readonly="yes">
11291 <desc>
11292 Slot number this adapter is plugged into. Corresponds to
11293 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11294 to obtain this instance.
11295 </desc>
11296 </attribute>
11297
11298 <attribute name="enabled" type="boolean">
11299 <desc>
11300 Flag whether the network adapter is present in the
11301 guest system. If disabled, the virtual guest hardware will
11302 not contain this network adapter. Can only be changed when
11303 the VM is not running.
11304 </desc>
11305 </attribute>
11306
11307 <attribute name="MACAddress" type="wstring">
11308 <desc>
11309 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11310 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11311 </desc>
11312 </attribute>
11313
11314 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11315
11316 <attribute name="hostInterface" type="wstring">
11317 <desc>
11318 Name of the host network interface the VM is attached to.
11319 </desc>
11320 </attribute>
11321
11322 <attribute name="internalNetwork" type="wstring">
11323 <desc>
11324 Name of the internal network the VM is attached to.
11325 </desc>
11326 </attribute>
11327
11328 <attribute name="NATNetwork" type="wstring">
11329 <desc>
11330 Name of the NAT network the VM is attached to.
11331 </desc>
11332 </attribute>
11333
11334 <attribute name="cableConnected" type="boolean">
11335 <desc>
11336 Flag whether the adapter reports the cable as connected or not.
11337 It can be used to report offline situations to a VM.
11338 </desc>
11339 </attribute>
11340
11341 <attribute name="lineSpeed" type="unsigned long">
11342 <desc>
11343 Line speed reported by custom drivers, in units of 1 kbps.
11344 </desc>
11345 </attribute>
11346
11347 <attribute name="traceEnabled" type="boolean">
11348 <desc>
11349 Flag whether network traffic from/to the network card should be traced.
11350 Can only be toggled when the VM is turned off.
11351 </desc>
11352 </attribute>
11353
11354 <attribute name="traceFile" type="wstring">
11355 <desc>
11356 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11357 will be used.
11358 </desc>
11359 </attribute>
11360
11361 <method name="attachToNAT">
11362 <desc>
11363 Attach the network adapter to the Network Address Translation (NAT) interface.
11364 </desc>
11365 </method>
11366
11367 <method name="attachToBridgedInterface">
11368 <desc>
11369 Attach the network adapter to a bridged host interface.
11370 </desc>
11371 </method>
11372
11373 <method name="attachToInternalNetwork">
11374 <desc>
11375 Attach the network adapter to an internal network.
11376 </desc>
11377 </method>
11378
11379 <method name="attachToHostOnlyInterface">
11380 <desc>
11381 Attach the network adapter to the host-only network.
11382 </desc>
11383 </method>
11384
11385 <method name="detach">
11386 <desc>
11387 Detach the network adapter
11388 </desc>
11389 </method>
11390 </interface>
11391
11392
11393 <!--
11394 // ISerialPort
11395 /////////////////////////////////////////////////////////////////////////
11396 -->
11397
11398 <enum
11399 name="PortMode"
11400 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11401 >
11402 <desc>
11403 The PortMode enumeration represents possible communication modes for
11404 the virtual serial port device.
11405 </desc>
11406
11407 <const name="Disconnected" value="0">
11408 <desc>Virtual device is not attached to any real host device.</desc>
11409 </const>
11410 <const name="HostPipe" value="1">
11411 <desc>Virtual device is attached to a host pipe.</desc>
11412 </const>
11413 <const name="HostDevice" value="2">
11414 <desc>Virtual device is attached to a host device.</desc>
11415 </const>
11416 <const name="RawFile" value="3">
11417 <desc>Virtual device is attached to a raw file.</desc>
11418 </const>
11419 </enum>
11420
11421 <interface
11422 name="ISerialPort" extends="$unknown"
11423 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11424 wsmap="managed"
11425 >
11426
11427 <desc>
11428 The ISerialPort interface represents the virtual serial port device.
11429
11430 The virtual serial port device acts like an ordinary serial port
11431 inside the virtual machine. This device communicates to the real
11432 serial port hardware in one of two modes: host pipe or host device.
11433
11434 In host pipe mode, the #path attribute specifies the path to the pipe on
11435 the host computer that represents a serial port. The #server attribute
11436 determines if this pipe is created by the virtual machine process at
11437 machine startup or it must already exist before starting machine
11438 execution.
11439
11440 In host device mode, the #path attribute specifies the name of the
11441 serial port device on the host computer.
11442
11443 There is also a third communication mode: the disconnected mode. In this
11444 mode, the guest OS running inside the virtual machine will be able to
11445 detect the serial port, but all port write operations will be discarded
11446 and all port read operations will return no data.
11447
11448 <see>IMachine::getSerialPort</see>
11449 </desc>
11450
11451 <attribute name="slot" type="unsigned long" readonly="yes">
11452 <desc>
11453 Slot number this serial port is plugged into. Corresponds to
11454 the value you pass to <link to="IMachine::getSerialPort"/>
11455 to obtain this instance.
11456 </desc>
11457 </attribute>
11458
11459 <attribute name="enabled" type="boolean">
11460 <desc>
11461 Flag whether the serial port is enabled. If disabled,
11462 the serial port will not be reported to the guest OS.
11463 </desc>
11464 </attribute>
11465
11466 <attribute name="IOBase" type="unsigned long">
11467 <desc>Base I/O address of the serial port.</desc>
11468 </attribute>
11469
11470 <attribute name="IRQ" type="unsigned long">
11471 <desc>IRQ number of the serial port.</desc>
11472 </attribute>
11473
11474 <attribute name="hostMode" type="PortMode">
11475 <desc>
11476 How is this port connected to the host.
11477 <note>
11478 Changing this attribute may fail if the conditions for
11479 <link to="#path"/> are not met.
11480 </note>
11481 </desc>
11482 </attribute>
11483
11484 <attribute name="server" type="boolean">
11485 <desc>
11486 Flag whether this serial port acts as a server (creates a new pipe on
11487 the host) or as a client (uses the existing pipe). This attribute is
11488 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11489 </desc>
11490 </attribute>
11491
11492 <attribute name="path" type="wstring">
11493 <desc>
11494 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11495 PortMode_HostPipe, or the host serial device name when
11496 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11497 cases, setting a @c null or empty string as the attribute's value
11498 is an error. Otherwise, the value of this property is ignored.
11499 </desc>
11500 </attribute>
11501
11502 </interface>
11503
11504 <!--
11505 // IParallelPort
11506 /////////////////////////////////////////////////////////////////////////
11507 -->
11508
11509 <interface
11510 name="IParallelPort" extends="$unknown"
11511 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11512 wsmap="managed"
11513 >
11514
11515 <desc>
11516 The IParallelPort interface represents the virtual parallel port device.
11517
11518 The virtual parallel port device acts like an ordinary parallel port
11519 inside the virtual machine. This device communicates to the real
11520 parallel port hardware using the name of the parallel device on the host
11521 computer specified in the #path attribute.
11522
11523 Each virtual parallel port device is assigned a base I/O address and an
11524 IRQ number that will be reported to the guest operating system and used
11525 to operate the given parallel port from within the virtual machine.
11526
11527 <see>IMachine::getParallelPort</see>
11528 </desc>
11529
11530 <attribute name="slot" type="unsigned long" readonly="yes">
11531 <desc>
11532 Slot number this parallel port is plugged into. Corresponds to
11533 the value you pass to <link to="IMachine::getParallelPort"/>
11534 to obtain this instance.
11535 </desc>
11536 </attribute>
11537
11538 <attribute name="enabled" type="boolean">
11539 <desc>
11540 Flag whether the parallel port is enabled. If disabled,
11541 the parallel port will not be reported to the guest OS.
11542 </desc>
11543 </attribute>
11544
11545 <attribute name="IOBase" type="unsigned long">
11546 <desc>Base I/O address of the parallel port.</desc>
11547 </attribute>
11548
11549 <attribute name="IRQ" type="unsigned long">
11550 <desc>IRQ number of the parallel port.</desc>
11551 </attribute>
11552
11553 <attribute name="path" type="wstring">
11554 <desc>
11555 Host parallel device name. If this parallel port is enabled, setting a
11556 @c null or an empty string as this attribute's value will result into
11557 an error.
11558 </desc>
11559 </attribute>
11560
11561 </interface>
11562
11563
11564 <!--
11565 // IMachineDebugger
11566 /////////////////////////////////////////////////////////////////////////
11567 -->
11568
11569 <interface
11570 name="IMachineDebugger" extends="$unknown"
11571 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11572 wsmap="suppress"
11573 >
11574 <method name="resetStats">
11575 <desc>
11576 Reset VM statistics.
11577 </desc>
11578 <param name="pattern" type="wstring" dir="in">
11579 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11580 </param>
11581 </method>
11582
11583 <method name="dumpStats">
11584 <desc>
11585 Dumps VM statistics.
11586 </desc>
11587 <param name="pattern" type="wstring" dir="in">
11588 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11589 </param>
11590 </method>
11591
11592 <method name="getStats">
11593 <desc>
11594 Get the VM statistics in a XMLish format.
11595 </desc>
11596 <param name="pattern" type="wstring" dir="in">
11597 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11598 </param>
11599 <param name="withDescriptions" type="boolean" dir="in">
11600 <desc>Whether to include the descriptions.</desc>
11601 </param>
11602 <param name="stats" type="wstring" dir="out">
11603 <desc>The XML document containing the statistics.</desc>
11604 </param>
11605 </method>
11606
11607 <method name="injectNMI">
11608 <desc>
11609 Inject an NMI into a running VT-x/AMD-V VM.
11610 </desc>
11611 </method>
11612
11613 <attribute name="singlestep" type="boolean">
11614 <desc>Switch for enabling singlestepping.</desc>
11615 </attribute>
11616
11617 <attribute name="recompileUser" type="boolean">
11618 <desc>Switch for forcing code recompilation for user mode code.</desc>
11619 </attribute>
11620
11621 <attribute name="recompileSupervisor" type="boolean">
11622 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11623 </attribute>
11624
11625 <attribute name="PATMEnabled" type="boolean">
11626 <desc>Switch for enabling and disabling the PATM component.</desc>
11627 </attribute>
11628
11629 <attribute name="CSAMEnabled" type="boolean">
11630 <desc>Switch for enabling and disabling the CSAM component.</desc>
11631 </attribute>
11632
11633 <attribute name="logEnabled" type="boolean">
11634 <desc>Switch for enabling and disabling logging.</desc>
11635 </attribute>
11636
11637 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11638 <desc>
11639 Flag indicating whether the VM is currently making use of CPU hardware
11640 virtualization extensions.
11641 </desc>
11642 </attribute>
11643
11644 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11645 <desc>
11646 Flag indicating whether the VM is currently making use of the nested paging
11647 CPU hardware virtualization extension.
11648 </desc>
11649 </attribute>
11650
11651 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11652 <desc>
11653 Flag indicating whether the VM is currently making use of the VPID
11654 VT-x extension.
11655 </desc>
11656 </attribute>
11657
11658 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11659 <desc>
11660 Flag indicating whether the VM is currently making use of the Physical
11661 Address Extension CPU feature.
11662 </desc>
11663 </attribute>
11664
11665 <attribute name="virtualTimeRate" type="unsigned long">
11666 <desc>
11667 The rate at which the virtual time runs expressed as a percentage.
11668 The accepted range is 2% to 20000%.
11669 </desc>
11670 </attribute>
11671
11672 <!-- @todo method for setting log flags, groups and destination! -->
11673
11674 <attribute name="VM" type="unsigned long long" readonly="yes">
11675 <desc>
11676 Gets the VM handle. This is only for internal use while
11677 we carve the details of this interface.
11678 </desc>
11679 </attribute>
11680
11681 </interface>
11682
11683 <!--
11684 // IUSBController
11685 /////////////////////////////////////////////////////////////////////////
11686 -->
11687
11688 <interface
11689 name="IUSBController" extends="$unknown"
11690 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11691 wsmap="managed"
11692 >
11693 <attribute name="enabled" type="boolean">
11694 <desc>
11695 Flag whether the USB controller is present in the
11696 guest system. If disabled, the virtual guest hardware will
11697 not contain any USB controller. Can only be changed when
11698 the VM is powered off.
11699 </desc>
11700 </attribute>
11701
11702 <attribute name="enabledEhci" type="boolean">
11703 <desc>
11704 Flag whether the USB EHCI controller is present in the
11705 guest system. If disabled, the virtual guest hardware will
11706 not contain a USB EHCI controller. Can only be changed when
11707 the VM is powered off.
11708 </desc>
11709 </attribute>
11710
11711 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11712 <desc>
11713 USB standard version which the controller implements.
11714 This is a BCD which means that the major version is in the
11715 high byte and minor version is in the low byte.
11716 </desc>
11717 </attribute>
11718
11719 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11720 <desc>
11721 List of USB device filters associated with the machine.
11722
11723 If the machine is currently running, these filters are activated
11724 every time a new (supported) USB device is attached to the host
11725 computer that was not ignored by global filters
11726 (<link to="IHost::USBDeviceFilters"/>).
11727
11728 These filters are also activated when the machine is powered up.
11729 They are run against a list of all currently available USB
11730 devices (in states
11731 <link to="USBDeviceState_Available"/>,
11732 <link to="USBDeviceState_Busy"/>,
11733 <link to="USBDeviceState_Held"/>) that were not previously
11734 ignored by global filters.
11735
11736 If at least one filter matches the USB device in question, this
11737 device is automatically captured (attached to) the virtual USB
11738 controller of this machine.
11739
11740 <see>IUSBDeviceFilter, ::IUSBController</see>
11741 </desc>
11742 </attribute>
11743
11744 <method name="createDeviceFilter">
11745 <desc>
11746 Creates a new USB device filter. All attributes except
11747 the filter name are set to empty (any match),
11748 <i>active</i> is @c false (the filter is not active).
11749
11750 The created filter can then be added to the list of filters using
11751 <link to="#insertDeviceFilter"/>.
11752
11753 <result name="VBOX_E_INVALID_VM_STATE">
11754 The virtual machine is not mutable.
11755 </result>
11756
11757 <see>#deviceFilters</see>
11758 </desc>
11759 <param name="name" type="wstring" dir="in">
11760 <desc>
11761 Filter name. See <link to="IUSBDeviceFilter::name"/>
11762 for more info.
11763 </desc>
11764 </param>
11765 <param name="filter" type="IUSBDeviceFilter" dir="return">
11766 <desc>Created filter object.</desc>
11767 </param>
11768 </method>
11769
11770 <method name="insertDeviceFilter">
11771 <desc>
11772 Inserts the given USB device to the specified position
11773 in the list of filters.
11774
11775 Positions are numbered starting from <tt>0</tt>. If the specified
11776 position is equal to or greater than the number of elements in
11777 the list, the filter is added to the end of the collection.
11778
11779 <note>
11780 Duplicates are not allowed, so an attempt to insert a
11781 filter that is already in the collection, will return an
11782 error.
11783 </note>
11784
11785 <result name="VBOX_E_INVALID_VM_STATE">
11786 Virtual machine is not mutable.
11787 </result>
11788 <result name="E_INVALIDARG">
11789 USB device filter not created within this VirtualBox instance.
11790 </result>
11791 <result name="VBOX_E_INVALID_OBJECT_STATE">
11792 USB device filter already in list.
11793 </result>
11794
11795 <see>#deviceFilters</see>
11796 </desc>
11797 <param name="position" type="unsigned long" dir="in">
11798 <desc>Position to insert the filter to.</desc>
11799 </param>
11800 <param name="filter" type="IUSBDeviceFilter" dir="in">
11801 <desc>USB device filter to insert.</desc>
11802 </param>
11803 </method>
11804
11805 <method name="removeDeviceFilter">
11806 <desc>
11807 Removes a USB device filter from the specified position in the
11808 list of filters.
11809
11810 Positions are numbered starting from <tt>0</tt>. Specifying a
11811 position equal to or greater than the number of elements in
11812 the list will produce an error.
11813
11814 <see>#deviceFilters</see>
11815
11816 <result name="VBOX_E_INVALID_VM_STATE">
11817 Virtual machine is not mutable.
11818 </result>
11819 <result name="E_INVALIDARG">
11820 USB device filter list empty or invalid @a position.
11821 </result>
11822
11823 </desc>
11824 <param name="position" type="unsigned long" dir="in">
11825 <desc>Position to remove the filter from.</desc>
11826 </param>
11827 <param name="filter" type="IUSBDeviceFilter" dir="return">
11828 <desc>Removed USB device filter.</desc>
11829 </param>
11830 </method>
11831
11832 </interface>
11833
11834
11835 <!--
11836 // IUSBDevice
11837 /////////////////////////////////////////////////////////////////////////
11838 -->
11839
11840 <interface
11841 name="IUSBDevice" extends="$unknown"
11842 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11843 wsmap="managed"
11844 >
11845 <desc>
11846 The IUSBDevice interface represents a virtual USB device attached to the
11847 virtual machine.
11848
11849 A collection of objects implementing this interface is stored in the
11850 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11851 attached to a running virtual machine's USB controller.
11852 </desc>
11853
11854 <attribute name="id" type="uuid" mod="string" readonly="yes">
11855 <desc>
11856 Unique USB device ID. This ID is built from #vendorId,
11857 #productId, #revision and #serialNumber.
11858 </desc>
11859 </attribute>
11860
11861 <attribute name="vendorId" type="unsigned short" readonly="yes">
11862 <desc>Vendor ID.</desc>
11863 </attribute>
11864
11865 <attribute name="productId" type="unsigned short" readonly="yes">
11866 <desc>Product ID.</desc>
11867 </attribute>
11868
11869 <attribute name="revision" type="unsigned short" readonly="yes">
11870 <desc>
11871 Product revision number. This is a packed BCD represented as
11872 unsigned short. The high byte is the integer part and the low
11873 byte is the decimal.
11874 </desc>
11875 </attribute>
11876
11877 <attribute name="manufacturer" type="wstring" readonly="yes">
11878 <desc>Manufacturer string.</desc>
11879 </attribute>
11880
11881 <attribute name="product" type="wstring" readonly="yes">
11882 <desc>Product string.</desc>
11883 </attribute>
11884
11885 <attribute name="serialNumber" type="wstring" readonly="yes">
11886 <desc>Serial number string.</desc>
11887 </attribute>
11888
11889 <attribute name="address" type="wstring" readonly="yes">
11890 <desc>Host specific address of the device.</desc>
11891 </attribute>
11892
11893 <attribute name="port" type="unsigned short" readonly="yes">
11894 <desc>
11895 Host USB port number the device is physically
11896 connected to.
11897 </desc>
11898 </attribute>
11899
11900 <attribute name="version" type="unsigned short" readonly="yes">
11901 <desc>
11902 The major USB version of the device - 1 or 2.
11903 </desc>
11904 </attribute>
11905
11906 <attribute name="portVersion" type="unsigned short" readonly="yes">
11907 <desc>
11908 The major USB version of the host USB port the device is
11909 physically connected to - 1 or 2. For devices not connected to
11910 anything this will have the same value as the version attribute.
11911 </desc>
11912 </attribute>
11913
11914 <attribute name="remote" type="boolean" readonly="yes">
11915 <desc>
11916 Whether the device is physically connected to a remote VRDP
11917 client or to a local host machine.
11918 </desc>
11919 </attribute>
11920
11921 </interface>
11922
11923
11924 <!--
11925 // IUSBDeviceFilter
11926 /////////////////////////////////////////////////////////////////////////
11927 -->
11928
11929 <interface
11930 name="IUSBDeviceFilter" extends="$unknown"
11931 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11932 wsmap="managed"
11933 >
11934 <desc>
11935 The IUSBDeviceFilter interface represents an USB device filter used
11936 to perform actions on a group of USB devices.
11937
11938 This type of filters is used by running virtual machines to
11939 automatically capture selected USB devices once they are physically
11940 attached to the host computer.
11941
11942 A USB device is matched to the given device filter if and only if all
11943 attributes of the device match the corresponding attributes of the
11944 filter (that is, attributes are joined together using the logical AND
11945 operation). On the other hand, all together, filters in the list of
11946 filters carry the semantics of the logical OR operation. So if it is
11947 desirable to create a match like "this vendor id OR this product id",
11948 one needs to create two filters and specify "any match" (see below)
11949 for unused attributes.
11950
11951 All filter attributes used for matching are strings. Each string
11952 is an expression representing a set of values of the corresponding
11953 device attribute, that will match the given filter. Currently, the
11954 following filtering expressions are supported:
11955
11956 <ul>
11957 <li><i>Interval filters</i>. Used to specify valid intervals for
11958 integer device attributes (Vendor ID, Product ID and Revision).
11959 The format of the string is:
11960
11961 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11962
11963 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11964 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11965 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11966 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11967 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11968 possible integer is assumed.
11969 </li>
11970 <li><i>Boolean filters</i>. Used to specify acceptable values for
11971 boolean device attributes. The format of the string is:
11972
11973 <tt>true|false|yes|no|0|1</tt>
11974
11975 </li>
11976 <li><i>Exact match</i>. Used to specify a single value for the given
11977 device attribute. Any string that doesn't start with <tt>int:</tt>
11978 represents the exact match. String device attributes are compared to
11979 this string including case of symbols. Integer attributes are first
11980 converted to a string (see individual filter attributes) and then
11981 compared ignoring case.
11982
11983 </li>
11984 <li><i>Any match</i>. Any value of the corresponding device attribute
11985 will match the given filter. An empty or @c null string is
11986 used to construct this type of filtering expressions.
11987
11988 </li>
11989 </ul>
11990
11991 <note>
11992 On the Windows host platform, interval filters are not currently
11993 available. Also all string filter attributes
11994 (<link to="#manufacturer"/>, <link to="#product"/>,
11995 <link to="#serialNumber"/>) are ignored, so they behave as
11996 <i>any match</i> no matter what string expression is specified.
11997 </note>
11998
11999 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12000 </desc>
12001
12002 <attribute name="name" type="wstring">
12003 <desc>
12004 Visible name for this filter.
12005 This name is used to visually distinguish one filter from another,
12006 so it can neither be @c null nor an empty string.
12007 </desc>
12008 </attribute>
12009
12010 <attribute name="active" type="boolean">
12011 <desc>Whether this filter active or has been temporarily disabled.</desc>
12012 </attribute>
12013
12014 <attribute name="vendorId" type="wstring">
12015 <desc>
12016 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12017 The string representation for the <i>exact matching</i>
12018 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12019 (including leading zeroes).
12020 </desc>
12021 </attribute>
12022
12023 <attribute name="productId" type="wstring">
12024 <desc>
12025 <link to="IUSBDevice::productId">Product ID</link> filter.
12026 The string representation for the <i>exact matching</i>
12027 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12028 (including leading zeroes).
12029 </desc>
12030 </attribute>
12031
12032 <attribute name="revision" type="wstring">
12033 <desc>
12034 <link to="IUSBDevice::productId">Product revision number</link>
12035 filter. The string representation for the <i>exact matching</i>
12036 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12037 of the integer part of the revision, and <tt>F</tt> is the
12038 decimal digit of its fractional part (including leading and
12039 trailing zeros).
12040 Note that for interval filters, it's best to use the hexadecimal
12041 form, because the revision is stored as a 16 bit packed BCD value;
12042 so the expression <tt>int:0x0100-0x0199</tt> will match any
12043 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12044 </desc>
12045 </attribute>
12046
12047 <attribute name="manufacturer" type="wstring">
12048 <desc>
12049 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12050 </desc>
12051 </attribute>
12052
12053 <attribute name="product" type="wstring">
12054 <desc>
12055 <link to="IUSBDevice::product">Product</link> filter.
12056 </desc>
12057 </attribute>
12058
12059 <attribute name="serialNumber" type="wstring">
12060 <desc>
12061 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12062 </desc>
12063 </attribute>
12064
12065 <attribute name="port" type="wstring">
12066 <desc>
12067 <link to="IUSBDevice::port">Host USB port</link> filter.
12068 </desc>
12069 </attribute>
12070
12071 <attribute name="remote" type="wstring">
12072 <desc>
12073 <link to="IUSBDevice::remote">Remote state</link> filter.
12074 <note>
12075 This filter makes sense only for machine USB filters,
12076 i.e. it is ignored by IHostUSBDeviceFilter objects.
12077 </note>
12078 </desc>
12079 </attribute>
12080
12081 <attribute name="maskedInterfaces" type="unsigned long">
12082 <desc>
12083 This is an advanced option for hiding one or more USB interfaces
12084 from the guest. The value is a bit mask where the bits that are set
12085 means the corresponding USB interface should be hidden, masked off
12086 if you like.
12087 This feature only works on Linux hosts.
12088 </desc>
12089 </attribute>
12090
12091 </interface>
12092
12093
12094 <!--
12095 // IHostUSBDevice
12096 /////////////////////////////////////////////////////////////////////////
12097 -->
12098
12099 <enum
12100 name="USBDeviceState"
12101 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12102 >
12103 <desc>
12104 USB device state. This enumeration represents all possible states
12105 of the USB device physically attached to the host computer regarding
12106 its state on the host computer and availability to guest computers
12107 (all currently running virtual machines).
12108
12109 Once a supported USB device is attached to the host, global USB
12110 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12111 either ignore the device, or put it to USBDeviceState_Held state, or do
12112 nothing. Unless the device is ignored by global filters, filters of all
12113 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12114 activated that can put it to USBDeviceState_Captured state.
12115
12116 If the device was ignored by global filters, or didn't match
12117 any filters at all (including guest ones), it is handled by the host
12118 in a normal way. In this case, the device state is determined by
12119 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12120 or USBDeviceState_Available, depending on the current device usage.
12121
12122 Besides auto-capturing based on filters, the device can be manually
12123 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12124 state is USBDeviceState_Busy, USBDeviceState_Available or
12125 USBDeviceState_Held.
12126
12127 <note>
12128 Due to differences in USB stack implementations in Linux and Win32,
12129 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12130 only to the Linux version of the product. This also means that (<link
12131 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12132 device state is USBDeviceState_Held.
12133 </note>
12134
12135 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12136 </desc>
12137
12138 <const name="NotSupported" value="0">
12139 <desc>
12140 Not supported by the VirtualBox server, not available to guests.
12141 </desc>
12142 </const>
12143 <const name="Unavailable" value="1">
12144 <desc>
12145 Being used by the host computer exclusively,
12146 not available to guests.
12147 </desc>
12148 </const>
12149 <const name="Busy" value="2">
12150 <desc>
12151 Being used by the host computer, potentially available to guests.
12152 </desc>
12153 </const>
12154 <const name="Available" value="3">
12155 <desc>
12156 Not used by the host computer, available to guests (the host computer
12157 can also start using the device at any time).
12158 </desc>
12159 </const>
12160 <const name="Held" value="4">
12161 <desc>
12162 Held by the VirtualBox server (ignored by the host computer),
12163 available to guests.
12164 </desc>
12165 </const>
12166 <const name="Captured" value="5">
12167 <desc>
12168 Captured by one of the guest computers, not available
12169 to anybody else.
12170 </desc>
12171 </const>
12172 </enum>
12173
12174 <interface
12175 name="IHostUSBDevice" extends="IUSBDevice"
12176 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12177 wsmap="managed"
12178 >
12179 <desc>
12180 The IHostUSBDevice interface represents a physical USB device attached
12181 to the host computer.
12182
12183 Besides properties inherited from IUSBDevice, this interface adds the
12184 <link to="#state"/> property that holds the current state of the USB
12185 device.
12186
12187 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12188 </desc>
12189
12190 <attribute name="state" type="USBDeviceState" readonly="yes">
12191 <desc>
12192 Current state of the device.
12193 </desc>
12194 </attribute>
12195
12196 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12197
12198 </interface>
12199
12200
12201 <!--
12202 // IHostUSBDeviceFilter
12203 /////////////////////////////////////////////////////////////////////////
12204 -->
12205
12206 <enum
12207 name="USBDeviceFilterAction"
12208 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12209 >
12210 <desc>
12211 Actions for host USB device filters.
12212 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12213 </desc>
12214
12215 <const name="Null" value="0">
12216 <desc>Null value (never used by the API).</desc>
12217 </const>
12218 <const name="Ignore" value="1">
12219 <desc>Ignore the matched USB device.</desc>
12220 </const>
12221 <const name="Hold" value="2">
12222 <desc>Hold the matched USB device.</desc>
12223 </const>
12224 </enum>
12225
12226 <interface
12227 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12228 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12229 wsmap="managed"
12230 >
12231 <desc>
12232 The IHostUSBDeviceFilter interface represents a global filter for a
12233 physical USB device used by the host computer. Used indirectly in
12234 <link to="IHost::USBDeviceFilters"/>.
12235
12236 Using filters of this type, the host computer determines the initial
12237 state of the USB device after it is physically attached to the
12238 host's USB controller.
12239
12240 <note>
12241 The <link to="#remote"/> attribute is ignored by this type of
12242 filters, because it makes sense only for
12243 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12244 </note>
12245
12246 <see>IHost::USBDeviceFilters</see>
12247 </desc>
12248
12249 <attribute name="action" type="USBDeviceFilterAction">
12250 <desc>
12251 Action performed by the host when an attached USB device
12252 matches this filter.
12253 </desc>
12254 </attribute>
12255
12256 </interface>
12257
12258 <!--
12259 // IAudioAdapter
12260 /////////////////////////////////////////////////////////////////////////
12261 -->
12262
12263 <enum
12264 name="AudioDriverType"
12265 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12266 >
12267 <desc>
12268 Host audio driver type.
12269 </desc>
12270
12271 <const name="Null" value="0">
12272 <desc>Null value, also means "dummy audio driver".</desc>
12273 </const>
12274 <const name="WinMM" value="1">
12275 <desc>Windows multimedia (Windows hosts only).</desc>
12276 </const>
12277 <const name="OSS" value="2">
12278 <desc>Open Sound System (Linux hosts only).</desc>
12279 </const>
12280 <const name="ALSA" value="3">
12281 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12282 </const>
12283 <const name="DirectSound" value="4">
12284 <desc>DirectSound (Windows hosts only).</desc>
12285 </const>
12286 <const name="CoreAudio" value="5">
12287 <desc>CoreAudio (Mac hosts only).</desc>
12288 </const>
12289 <const name="MMPM" value="6">
12290 <desc>Reserved for historical reasons.</desc>
12291 </const>
12292 <const name="Pulse" value="7">
12293 <desc>PulseAudio (Linux hosts only).</desc>
12294 </const>
12295 <const name="SolAudio" value="8">
12296 <desc>Solaris audio (Solaris hosts only).</desc>
12297 </const>
12298 </enum>
12299
12300 <enum
12301 name="AudioControllerType"
12302 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12303 >
12304 <desc>
12305 Virtual audio controller type.
12306 </desc>
12307
12308 <const name="AC97" value="0"/>
12309 <const name="SB16" value="1"/>
12310 </enum>
12311
12312 <interface
12313 name="IAudioAdapter" extends="$unknown"
12314 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12315 wsmap="managed"
12316 >
12317 <desc>
12318 The IAudioAdapter interface represents the virtual audio adapter of
12319 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12320 </desc>
12321 <attribute name="enabled" type="boolean">
12322 <desc>
12323 Flag whether the audio adapter is present in the
12324 guest system. If disabled, the virtual guest hardware will
12325 not contain any audio adapter. Can only be changed when
12326 the VM is not running.
12327 </desc>
12328 </attribute>
12329 <attribute name="audioController" type="AudioControllerType">
12330 <desc>
12331 The audio hardware we emulate.
12332 </desc>
12333 </attribute>
12334 <attribute name="audioDriver" type="AudioDriverType">
12335 <desc>
12336 Audio driver the adapter is connected to. This setting
12337 can only be changed when the VM is not running.
12338 </desc>
12339 </attribute>
12340 </interface>
12341
12342 <!--
12343 // IVRDPServer
12344 /////////////////////////////////////////////////////////////////////////
12345 -->
12346
12347 <enum
12348 name="VRDPAuthType"
12349 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12350 >
12351 <desc>
12352 VRDP authentication type.
12353 </desc>
12354
12355 <const name="Null" value="0">
12356 <desc>Null value, also means "no authentication".</desc>
12357 </const>
12358 <const name="External" value="1"/>
12359 <const name="Guest" value="2"/>
12360 </enum>
12361
12362 <interface
12363 name="IVRDPServer" extends="$unknown"
12364 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12365 wsmap="managed"
12366 >
12367 <attribute name="enabled" type="boolean">
12368 <desc>VRDP server status.</desc>
12369 </attribute>
12370
12371 <attribute name="ports" type="wstring">
12372 <desc>
12373 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12374 <note>
12375 This is a string of comma separated TCP port numbers or port number ranges.
12376 Example <tt>5000,5010-5012,5015</tt>
12377 </note>
12378 </desc>
12379 </attribute>
12380
12381 <attribute name="netAddress" type="wstring">
12382 <desc>VRDP server address.</desc>
12383 </attribute>
12384
12385 <attribute name="authType" type="VRDPAuthType">
12386 <desc>VRDP authentication method.</desc>
12387 </attribute>
12388
12389 <attribute name="authTimeout" type="unsigned long">
12390 <desc>Timeout for guest authentication. Milliseconds.</desc>
12391 </attribute>
12392
12393 <attribute name="allowMultiConnection" type="boolean">
12394 <desc>
12395 Flag whether multiple simultaneous connections to the VM are permitted.
12396 Note that this will be replaced by a more powerful mechanism in the future.
12397 </desc>
12398 </attribute>
12399
12400 <attribute name="reuseSingleConnection" type="boolean">
12401 <desc>
12402 Flag whether the existing connection must be dropped and a new connection
12403 must be established by the VRDP server, when a new client connects in single
12404 connection mode.
12405 </desc>
12406 </attribute>
12407
12408 </interface>
12409
12410
12411 <!--
12412 // ISharedFolder
12413 /////////////////////////////////////////////////////////////////////////
12414 -->
12415
12416 <interface
12417 name="ISharedFolder" extends="$unknown"
12418 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12419 wsmap="struct"
12420 >
12421 <desc>
12422 The ISharedFolder interface represents a folder in the host computer's
12423 file system accessible from the guest OS running inside a virtual
12424 machine using an associated logical name.
12425
12426 There are three types of shared folders:
12427 <ul>
12428 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12429 folders available to all virtual machines.</li>
12430 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12431 VM-specific shared folders available to the given virtual machine at
12432 startup.</li>
12433 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12434 VM-specific shared folders created in the session context (for
12435 example, when the virtual machine is running) and automatically
12436 discarded when the session is closed (the VM is powered off).</li>
12437 </ul>
12438
12439 Logical names of shared folders must be unique within the given scope
12440 (global, permanent or transient). However, they do not need to be unique
12441 across scopes. In this case, the definition of the shared folder in a
12442 more specific scope takes precedence over definitions in all other
12443 scopes. The order of precedence is (more specific to more general):
12444 <ol>
12445 <li>Transient definitions</li>
12446 <li>Permanent definitions</li>
12447 <li>Global definitions</li>
12448 </ol>
12449
12450 For example, if MyMachine has a shared folder named
12451 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12452 transient shared folder named <tt>C_DRIVE</tt> (that points
12453 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12454 of <tt>C_DRIVE</tt> in the guest OS so
12455 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12456 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12457 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12458 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12459 to <tt>C:\\</tt> if it still exists.
12460
12461 Note that permanent and transient shared folders of different machines
12462 are in different name spaces, so they don't overlap and don't need to
12463 have unique logical names.
12464
12465 <note>
12466 Global shared folders are not implemented in the current version of the
12467 product.
12468 </note>
12469 </desc>
12470
12471 <attribute name="name" type="wstring" readonly="yes">
12472 <desc>Logical name of the shared folder.</desc>
12473 </attribute>
12474
12475 <attribute name="hostPath" type="wstring" readonly="yes">
12476 <desc>Full path to the shared folder in the host file system.</desc>
12477 </attribute>
12478
12479 <attribute name="accessible" type="boolean" readonly="yes">
12480 <desc>
12481 Whether the folder defined by the host path is currently
12482 accessible or not.
12483 For example, the folder can be unaccessible if it is placed
12484 on the network share that is not available by the time
12485 this property is read.
12486 </desc>
12487 </attribute>
12488
12489 <attribute name="writable" type="boolean" readonly="yes">
12490 <desc>
12491 Whether the folder defined by the host path is writable or
12492 not.
12493 </desc>
12494 </attribute>
12495
12496 <attribute name="lastAccessError" type="wstring" readonly="yes">
12497 <desc>
12498 Text message that represents the result of the last accessibility
12499 check.
12500
12501 Accessibility checks are performed each time the <link to="#accessible"/>
12502 attribute is read. An empty string is returned if the last
12503 accessibility check was successful. A non-empty string indicates a
12504 failure and should normally describe a reason of the failure (for
12505 example, a file read error).
12506 </desc>
12507 </attribute>
12508
12509 </interface>
12510
12511 <!--
12512 // ISession
12513 /////////////////////////////////////////////////////////////////////////
12514 -->
12515
12516 <interface
12517 name="IInternalSessionControl" extends="$unknown"
12518 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12519 internal="yes"
12520 wsmap="suppress"
12521 >
12522 <method name="getPID">
12523 <desc>PID of the process that has created this Session object.
12524 </desc>
12525 <param name="pid" type="unsigned long" dir="return"/>
12526 </method>
12527
12528 <method name="getRemoteConsole">
12529 <desc>
12530 Returns the console object suitable for remote control.
12531
12532 <result name="VBOX_E_INVALID_VM_STATE">
12533 Session state prevents operation.
12534 </result>
12535 <result name="VBOX_E_INVALID_OBJECT_STATE">
12536 Session type prevents operation.
12537 </result>
12538
12539 </desc>
12540 <param name="console" type="IConsole" dir="return"/>
12541 </method>
12542
12543 <method name="assignMachine">
12544 <desc>
12545 Assigns the machine object associated with this direct-type
12546 session or informs the session that it will be a remote one
12547 (if @a machine == @c null).
12548
12549 <result name="VBOX_E_INVALID_VM_STATE">
12550 Session state prevents operation.
12551 </result>
12552 <result name="VBOX_E_INVALID_OBJECT_STATE">
12553 Session type prevents operation.
12554 </result>
12555
12556 </desc>
12557 <param name="machine" type="IMachine" dir="in"/>
12558 </method>
12559
12560 <method name="assignRemoteMachine">
12561 <desc>
12562 Assigns the machine and the (remote) console object associated with
12563 this remote-type session.
12564
12565 <result name="VBOX_E_INVALID_VM_STATE">
12566 Session state prevents operation.
12567 </result>
12568
12569 </desc>
12570 <param name="machine" type="IMachine" dir="in"/>
12571 <param name="console" type="IConsole" dir="in"/>
12572 </method>
12573
12574 <method name="updateMachineState">
12575 <desc>
12576 Updates the machine state in the VM process.
12577 Must be called only in certain cases
12578 (see the method implementation).
12579
12580 <result name="VBOX_E_INVALID_VM_STATE">
12581 Session state prevents operation.
12582 </result>
12583 <result name="VBOX_E_INVALID_OBJECT_STATE">
12584 Session type prevents operation.
12585 </result>
12586
12587 </desc>
12588 <param name="aMachineState" type="MachineState" dir="in"/>
12589 </method>
12590
12591 <method name="uninitialize">
12592 <desc>
12593 Uninitializes (closes) this session. Used by VirtualBox to close
12594 the corresponding remote session when the direct session dies
12595 or gets closed.
12596
12597 <result name="VBOX_E_INVALID_VM_STATE">
12598 Session state prevents operation.
12599 </result>
12600
12601 </desc>
12602 </method>
12603
12604 <method name="onNetworkAdapterChange">
12605 <desc>
12606 Triggered when settings of a network adapter of the
12607 associated virtual machine have changed.
12608
12609 <result name="VBOX_E_INVALID_VM_STATE">
12610 Session state prevents operation.
12611 </result>
12612 <result name="VBOX_E_INVALID_OBJECT_STATE">
12613 Session type prevents operation.
12614 </result>
12615
12616 </desc>
12617 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12618 <param name="changeAdapter" type="boolean" dir="in"/>
12619 </method>
12620
12621 <method name="onSerialPortChange">
12622 <desc>
12623 Triggered when settings of a serial port of the
12624 associated virtual machine have changed.
12625
12626 <result name="VBOX_E_INVALID_VM_STATE">
12627 Session state prevents operation.
12628 </result>
12629 <result name="VBOX_E_INVALID_OBJECT_STATE">
12630 Session type prevents operation.
12631 </result>
12632
12633 </desc>
12634 <param name="serialPort" type="ISerialPort" dir="in"/>
12635 </method>
12636
12637 <method name="onParallelPortChange">
12638 <desc>
12639 Triggered when settings of a parallel port of the
12640 associated virtual machine have changed.
12641
12642 <result name="VBOX_E_INVALID_VM_STATE">
12643 Session state prevents operation.
12644 </result>
12645 <result name="VBOX_E_INVALID_OBJECT_STATE">
12646 Session type prevents operation.
12647 </result>
12648
12649 </desc>
12650 <param name="parallelPort" type="IParallelPort" dir="in"/>
12651 </method>
12652
12653 <method name="onStorageControllerChange">
12654 <desc>
12655 Triggered when settings of a storage controller of the
12656 associated virtual machine have changed.
12657
12658 <result name="VBOX_E_INVALID_VM_STATE">
12659 Session state prevents operation.
12660 </result>
12661 <result name="VBOX_E_INVALID_OBJECT_STATE">
12662 Session type prevents operation.
12663 </result>
12664
12665 </desc>
12666 </method>
12667
12668 <method name="onMediumChange">
12669 <desc>
12670 Triggered when attached media of the
12671 associated virtual machine have changed.
12672
12673 <result name="VBOX_E_INVALID_VM_STATE">
12674 Session state prevents operation.
12675 </result>
12676 <result name="VBOX_E_INVALID_OBJECT_STATE">
12677 Session type prevents operation.
12678 </result>
12679
12680 </desc>
12681
12682 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12683 <param name="force" type="boolean" dir="in"/>
12684 </method>
12685
12686 <method name="onVRDPServerChange">
12687 <desc>
12688 Triggered when settings of the VRDP server object of the
12689 associated virtual machine have changed.
12690
12691 <result name="VBOX_E_INVALID_VM_STATE">
12692 Session state prevents operation.
12693 </result>
12694 <result name="VBOX_E_INVALID_OBJECT_STATE">
12695 Session type prevents operation.
12696 </result>
12697
12698 </desc>
12699 </method>
12700
12701 <method name="onUSBControllerChange">
12702 <desc>
12703 Triggered when settings of the USB controller object of the
12704 associated virtual machine have changed.
12705
12706 <result name="VBOX_E_INVALID_VM_STATE">
12707 Session state prevents operation.
12708 </result>
12709 <result name="VBOX_E_INVALID_OBJECT_STATE">
12710 Session type prevents operation.
12711 </result>
12712
12713 </desc>
12714 </method>
12715
12716 <method name="onSharedFolderChange">
12717 <desc>
12718 Triggered when a permanent (global or machine) shared folder has been
12719 created or removed.
12720 <note>
12721 We don't pass shared folder parameters in this notification because
12722 the order in which parallel notifications are delivered is not defined,
12723 therefore it could happen that these parameters were outdated by the
12724 time of processing this notification.
12725 </note>
12726
12727 <result name="VBOX_E_INVALID_VM_STATE">
12728 Session state prevents operation.
12729 </result>
12730 <result name="VBOX_E_INVALID_OBJECT_STATE">
12731 Session type prevents operation.
12732 </result>
12733
12734 </desc>
12735 <param name="global" type="boolean" dir="in"/>
12736 </method>
12737
12738 <method name="onUSBDeviceAttach">
12739 <desc>
12740 Triggered when a request to capture a USB device (as a result
12741 of matched USB filters or direct call to
12742 <link to="IConsole::attachUSBDevice"/>) has completed.
12743 A @c null @a error object means success, otherwise it
12744 describes a failure.
12745
12746 <result name="VBOX_E_INVALID_VM_STATE">
12747 Session state prevents operation.
12748 </result>
12749 <result name="VBOX_E_INVALID_OBJECT_STATE">
12750 Session type prevents operation.
12751 </result>
12752
12753 </desc>
12754 <param name="device" type="IUSBDevice" dir="in"/>
12755 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12756 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12757 </method>
12758
12759 <method name="onUSBDeviceDetach">
12760 <desc>
12761 Triggered when a request to release the USB device (as a result
12762 of machine termination or direct call to
12763 <link to="IConsole::detachUSBDevice"/>) has completed.
12764 A @c null @a error object means success, otherwise it
12765 describes a failure.
12766
12767 <result name="VBOX_E_INVALID_VM_STATE">
12768 Session state prevents operation.
12769 </result>
12770 <result name="VBOX_E_INVALID_OBJECT_STATE">
12771 Session type prevents operation.
12772 </result>
12773
12774 </desc>
12775 <param name="id" type="uuid" mod="string" dir="in"/>
12776 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12777 </method>
12778
12779 <method name="onShowWindow">
12780 <desc>
12781 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12782 <link to="IMachine::showConsoleWindow"/> in order to notify
12783 console callbacks
12784 <link to="IConsoleCallback::onCanShowWindow"/>
12785 and <link to="IConsoleCallback::onShowWindow"/>.
12786
12787 <result name="VBOX_E_INVALID_OBJECT_STATE">
12788 Session type prevents operation.
12789 </result>
12790
12791 </desc>
12792 <param name="check" type="boolean" dir="in"/>
12793 <param name="canShow" type="boolean" dir="out"/>
12794 <param name="winId" type="unsigned long long" dir="out"/>
12795 </method>
12796
12797 <method name="accessGuestProperty">
12798 <desc>
12799 Called by <link to="IMachine::getGuestProperty"/> and by
12800 <link to="IMachine::setGuestProperty"/> in order to read and
12801 modify guest properties.
12802
12803 <result name="VBOX_E_INVALID_VM_STATE">
12804 Machine session is not open.
12805 </result>
12806 <result name="VBOX_E_INVALID_OBJECT_STATE">
12807 Session type is not direct.
12808 </result>
12809
12810 </desc>
12811 <param name="name" type="wstring" dir="in"/>
12812 <param name="value" type="wstring" dir="in"/>
12813 <param name="flags" type="wstring" dir="in"/>
12814 <param name="isSetter" type="boolean" dir="in"/>
12815 <param name="retValue" type="wstring" dir="out"/>
12816 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12817 <param name="retFlags" type="wstring" dir="out"/>
12818 </method>
12819
12820 <method name="enumerateGuestProperties">
12821 <desc>
12822 Return a list of the guest properties matching a set of patterns along
12823 with their values, time stamps and flags.
12824
12825 <result name="VBOX_E_INVALID_VM_STATE">
12826 Machine session is not open.
12827 </result>
12828 <result name="VBOX_E_INVALID_OBJECT_STATE">
12829 Session type is not direct.
12830 </result>
12831
12832 </desc>
12833 <param name="patterns" type="wstring" dir="in">
12834 <desc>
12835 The patterns to match the properties against as a comma-separated
12836 string. If this is empty, all properties currently set will be
12837 returned.
12838 </desc>
12839 </param>
12840 <param name="key" type="wstring" dir="out" safearray="yes">
12841 <desc>
12842 The key names of the properties returned.
12843 </desc>
12844 </param>
12845 <param name="value" type="wstring" dir="out" safearray="yes">
12846 <desc>
12847 The values of the properties returned. The array entries match the
12848 corresponding entries in the @a key array.
12849 </desc>
12850 </param>
12851 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12852 <desc>
12853 The time stamps of the properties returned. The array entries match
12854 the corresponding entries in the @a key array.
12855 </desc>
12856 </param>
12857 <param name="flags" type="wstring" dir="out" safearray="yes">
12858 <desc>
12859 The flags of the properties returned. The array entries match the
12860 corresponding entries in the @a key array.
12861 </desc>
12862 </param>
12863 </method>
12864
12865 </interface>
12866
12867 <interface
12868 name="ISession" extends="$dispatched"
12869 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12870 wsmap="managed"
12871 >
12872 <desc>
12873 The ISession interface represents a serialization primitive for virtual
12874 machines.
12875
12876 With VirtualBox, every time one wishes to manipulate a virtual machine
12877 (e.g. change its settings or start execution), a session object is
12878 required. Such an object must be passed to one of the session methods
12879 that open the given session, which then initiates the machine manipulation.
12880
12881 A session serves several purposes: it identifies to the inter-process VirtualBox
12882 code which process is currently working with the virtual machine, and it ensures
12883 that there are no incompatible requests from several processes for the
12884 same virtual machine. Session objects can therefore be thought of as mutex
12885 semaphores that lock virtual machines to prevent conflicting accesses from
12886 several processes.
12887
12888 How sessions objects are used depends on whether you use the Main API
12889 via COM or via the webservice:
12890
12891 <ul>
12892 <li>When using the COM API directly, an object of the Session class from the
12893 VirtualBox type library needs to be created. In regular COM C++ client code,
12894 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12895 This object will then act as a local session object in further calls to open
12896 a session.
12897 </li>
12898
12899 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12900 one session object automatically when <link to="IWebsessionManager::logon" />
12901 is called. A managed object reference to that session object can be retrieved by
12902 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12903 reference can then be used to open sessions.
12904 </li>
12905 </ul>
12906
12907 Sessions are mainly used in two variations:
12908
12909 <ul>
12910 <li>
12911 To start a virtual machine in a separate process, one would call
12912 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12913 object as its first parameter. This session then identifies the caller
12914 and lets him control the started machine (for example, pause machine
12915 execution or power it down) as well as be notified about machine
12916 execution state changes.
12917 </li>
12918
12919 <li>To alter machine settings, or to start machine execution within the
12920 current process, one needs to open a direct session for the machine first by
12921 calling <link to="IVirtualBox::openSession"/>. While a direct session
12922 is open within one process, no any other process may open another direct
12923 session for the same machine. This prevents the machine from being changed
12924 by other processes while it is running or while the machine is being configured.
12925 </li>
12926 </ul>
12927
12928 One also can attach to an existing direct session already opened by
12929 another process (for example, in order to send a control request to the
12930 virtual machine such as the pause or the reset request). This is done by
12931 calling <link to="IVirtualBox::openExistingSession"/>.
12932
12933 <note>
12934 Unless you are trying to write a new VirtualBox front-end that
12935 performs direct machine execution (like the VirtualBox or VBoxSDL
12936 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12937 session opened by <link to="IVirtualBox::openSession"/> and use this
12938 session only to change virtual machine settings. If you simply want to
12939 start virtual machine execution using one of the existing front-ends
12940 (for example the VirtualBox GUI or headless server), simply use
12941 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12942 will power up the machine automatically for you.
12943 </note>
12944 </desc>
12945
12946 <attribute name="state" type="SessionState" readonly="yes">
12947 <desc>Current state of this session.</desc>
12948 </attribute>
12949
12950 <attribute name="type" type="SessionType" readonly="yes">
12951 <desc>
12952 Type of this session. The value of this attribute is valid only
12953 if the session is currently open (i.e. its #state is
12954 SessionType_SessionOpen), otherwise an error will be returned.
12955 </desc>
12956 </attribute>
12957
12958 <attribute name="machine" type="IMachine" readonly="yes">
12959 <desc>Machine object associated with this session.</desc>
12960 </attribute>
12961
12962 <attribute name="console" type="IConsole" readonly="yes">
12963 <desc>Console object associated with this session.</desc>
12964 </attribute>
12965
12966 <method name="close">
12967 <desc>
12968 Closes a session that was previously opened.
12969
12970 It is recommended that every time an "open session" method (such as
12971 <link to="IVirtualBox::openRemoteSession" /> or
12972 <link to="IVirtualBox::openSession" />) has been called to
12973 manipulate a virtual machine, the caller invoke
12974 ISession::close() when it's done doing so. Since sessions are
12975 serialization primitives much like ordinary mutexes, they are
12976 best used the same way: for each "open" call, there should be
12977 a matching "close" call, even when errors occur.
12978
12979 Otherwise, if a direct session for a machine opened with
12980 <link to="IVirtualBox::openSession"/> is not explicitly closed
12981 when the application terminates, the state of the machine will
12982 be set to <link to="MachineState_Aborted" /> on the server.
12983
12984 Generally, it is recommended to close all open sessions explicitly
12985 before terminating the application (regardless of the reason for
12986 the termination).
12987
12988 <note>
12989 Do not expect the session state (<link to="ISession::state" />
12990 to return to "Closed" immediately after you invoke
12991 ISession::close(), particularly if you have started a remote
12992 session to execute the VM in a new process. The session state will
12993 automatically return to "Closed" once the VM is no longer executing,
12994 which can of course take a very long time.
12995 </note>
12996
12997 <result name="E_UNEXPECTED">
12998 Session is not open.
12999 </result>
13000
13001 </desc>
13002 </method>
13003
13004 </interface>
13005
13006 <!--
13007 // IStorageController
13008 /////////////////////////////////////////////////////////////////////////
13009 -->
13010
13011 <enum
13012 name="StorageBus"
13013 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13014 >
13015 <desc>
13016 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13017 see <link to="IStorageController::bus" />.
13018 </desc>
13019 <const name="Null" value="0">
13020 <desc>@c null value. Never used by the API.</desc>
13021 </const>
13022 <const name="IDE" value="1"/>
13023 <const name="SATA" value="2"/>
13024 <const name="SCSI" value="3"/>
13025 <const name="Floppy" value="4"/>
13026 </enum>
13027
13028 <enum
13029 name="StorageControllerType"
13030 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13031 >
13032 <desc>
13033 The exact variant of storage controller hardware presented
13034 to the guest; see <link to="IStorageController::controllerType" />.
13035 </desc>
13036
13037 <const name="Null" value="0">
13038 <desc>@c null value. Never used by the API.</desc>
13039 </const>
13040 <const name="LsiLogic" value="1">
13041 <desc>A SCSI controller of the LsiLogic variant.</desc>
13042 </const>
13043 <const name="BusLogic" value="2">
13044 <desc>A SCSI controller of the BusLogic variant.</desc>
13045 </const>
13046 <const name="IntelAhci" value="3">
13047 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13048 </const>
13049 <const name="PIIX3" value="4">
13050 <desc>An IDE controller of the PIIX3 variant.</desc>
13051 </const>
13052 <const name="PIIX4" value="5">
13053 <desc>An IDE controller of the PIIX4 variant.</desc>
13054 </const>
13055 <const name="ICH6" value="6">
13056 <desc>An IDE controller of the ICH6 variant.</desc>
13057 </const>
13058 <const name="I82078" value="7">
13059 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13060 </const>
13061 </enum>
13062
13063 <interface
13064 name="IStorageController" extends="$unknown"
13065 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13066 wsmap="managed"
13067 >
13068 <desc>
13069 Represents a storage controller that is attached to a virtual machine
13070 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13071 attached to storage controllers in a real computer, virtual drives
13072 (represented by <link to="IMediumAttachment" />) are attached to virtual
13073 storage controllers, represented by this interface.
13074
13075 As opposed to physical hardware, VirtualBox has a very generic concept
13076 of a storage controller, and for purposes of the Main API, all virtual
13077 storage is attached to virtual machines via instances of this interface.
13078 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13079 and Floppy (see <link to="#bus" />). Depending on which of these four is
13080 used, certain sub-types may be available and can be selected in
13081 <link to="#controllerType" />.
13082
13083 Depending on these settings, the guest operating system might see
13084 significantly different virtual hardware.
13085 </desc>
13086
13087 <attribute name="name" type="wstring" readonly="yes">
13088 <desc>
13089 Name of the storage controller, as originally specified with
13090 <link to="IMachine::addStorageController" />. This then uniquely
13091 identifies this controller with other method calls such as
13092 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13093 </desc>
13094 </attribute>
13095
13096 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13097 <desc>
13098 Maximum number of devices which can be attached to one port.
13099 </desc>
13100 </attribute>
13101
13102 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13103 <desc>
13104 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13105 </desc>
13106 </attribute>
13107
13108 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13109 <desc>
13110 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13111 </desc>
13112 </attribute>
13113
13114 <attribute name="instance" type="unsigned long">
13115 <desc>
13116 The instance number of the device in the running VM.
13117 </desc>
13118 </attribute>
13119
13120 <attribute name="portCount" type="unsigned long">
13121 <desc>
13122 The number of currently usable ports on the controller.
13123 The minimum and maximum number of ports for one controller are
13124 stored in <link to="IStorageController::minPortCount"/>
13125 and <link to="IStorageController::maxPortCount"/>.
13126 </desc>
13127 </attribute>
13128
13129 <attribute name="bus" type="StorageBus" readonly="yes">
13130 <desc>
13131 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13132 </desc>
13133 </attribute>
13134
13135 <attribute name="controllerType" type="StorageControllerType">
13136 <desc>
13137 The exact variant of storage controller hardware presented
13138 to the guest.
13139 Depending on this value, VirtualBox will provide a different
13140 virtual storage controller hardware to the guest.
13141 For SATA and floppy controllers, only one variant is available,
13142 but for IDE and SCSI, there are several.
13143
13144 For SCSI controllers, the default type is LsiLogic.
13145 </desc>
13146 </attribute>
13147
13148 <method name="GetIDEEmulationPort">
13149 <desc>
13150 Gets the corresponding port number which is emulated as an IDE device.
13151 Works only with SATA controllers.
13152
13153 <result name="E_INVALIDARG">
13154 The @a devicePosition is not in the range 0 to 3.
13155 </result>
13156 <result name="E_NOTIMPL">
13157 The storage controller type is not SATAIntelAhci.
13158 </result>
13159
13160 </desc>
13161 <param name="devicePosition" type="long" dir="in"/>
13162 <param name="portNumber" type="long" dir="return"/>
13163 </method>
13164
13165 <method name="SetIDEEmulationPort">
13166 <desc>
13167 Sets the port number which is emulated as an IDE device.
13168 Works only with SATA controllers.
13169
13170 <result name="E_INVALIDARG">
13171 The @a devicePosition is not in the range 0 to 3 or the
13172 @a portNumber is not in the range 0 to 29.
13173 </result>
13174 <result name="E_NOTIMPL">
13175 The storage controller type is not SATAIntelAhci.
13176 </result>
13177
13178 </desc>
13179 <param name="devicePosition" type="long" dir="in"/>
13180 <param name="portNumber" type="long" dir="in"/>
13181 </method>
13182
13183 </interface>
13184
13185<if target="wsdl">
13186
13187 <!--
13188 // IManagedObjectRef
13189 /////////////////////////////////////////////////////////////////////////
13190 -->
13191
13192 <interface
13193 name="IManagedObjectRef" extends="$unknown"
13194 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13195 internal="yes"
13196 wsmap="managed"
13197 wscpp="hardcoded"
13198 >
13199 <desc>
13200 Managed object reference.
13201
13202 Only within the webservice, a managed object reference (which is really
13203 an opaque number) allows a webservice client to address an object
13204 that lives in the address space of the webservice server.
13205
13206 Behind each managed object reference, there is a COM object that lives
13207 in the webservice server's address space. The COM object is not freed
13208 until the managed object reference is released, either by an explicit
13209 call to <link to="IManagedObjectRef::release" /> or by logging off from
13210 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13211 all objects created during the webservice session.
13212
13213 Whenever a method call of the VirtualBox API returns a COM object, the
13214 webservice representation of that method will instead return a
13215 managed object reference, which can then be used to invoke methods
13216 on that object.
13217 </desc>
13218
13219 <method name="getInterfaceName">
13220 <desc>
13221 Returns the name of the interface that this managed object represents,
13222 for example, "IMachine", as a string.
13223 </desc>
13224 <param name="return" type="wstring" dir="return"/>
13225 </method>
13226
13227 <method name="release">
13228 <desc>
13229 Releases this managed object reference and frees the resources that
13230 were allocated for it in the webservice server process. After calling
13231 this method, the identifier of the reference can no longer be used.
13232 </desc>
13233 </method>
13234
13235 </interface>
13236
13237 <!--
13238 // IWebsessionManager
13239 /////////////////////////////////////////////////////////////////////////
13240 -->
13241
13242 <interface
13243 name="IWebsessionManager" extends="$unknown"
13244 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13245 internal="yes"
13246 wsmap="global"
13247 wscpp="hardcoded"
13248 >
13249 <desc>
13250 Websession manager. This provides essential services
13251 to webservice clients.
13252 </desc>
13253 <method name="logon">
13254 <desc>
13255 Logs a new client onto the webservice and returns a managed object reference to
13256 the IVirtualBox instance, which the client can then use as a basis to further
13257 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13258 interface, in one way or the other.
13259 </desc>
13260 <param name="username" type="wstring" dir="in"/>
13261 <param name="password" type="wstring" dir="in"/>
13262 <param name="return" type="IVirtualBox" dir="return"/>
13263 </method>
13264
13265 <method name="getSessionObject">
13266 <desc>
13267 Returns a managed object reference to the internal ISession object that was created
13268 for this web service session when the client logged on.
13269
13270 <see>ISession</see>
13271 </desc>
13272 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13273 <param name="return" type="ISession" dir="return"/>
13274 </method>
13275
13276 <method name="logoff">
13277 <desc>
13278 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13279 and destroys all resources associated with the session (most importantly, all
13280 managed objects created in the server while the session was active).
13281 </desc>
13282 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13283 </method>
13284
13285 </interface>
13286
13287</if>
13288
13289 <!--
13290 // IPerformanceCollector & friends
13291 /////////////////////////////////////////////////////////////////////////
13292 -->
13293
13294 <interface
13295 name="IPerformanceMetric" extends="$unknown"
13296 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13297 >
13298 <desc>
13299 The IPerformanceMetric interface represents parameters of the given
13300 performance metric.
13301 </desc>
13302
13303 <attribute name="metricName" type="wstring" readonly="yes">
13304 <desc>
13305 Name of the metric.
13306 </desc>
13307 </attribute>
13308
13309 <attribute name="object" type="$unknown" readonly="yes">
13310 <desc>
13311 Object this metric belongs to.
13312 </desc>
13313 </attribute>
13314
13315 <attribute name="description" type="wstring" readonly="yes">
13316 <desc>
13317 Textual description of the metric.
13318 </desc>
13319 </attribute>
13320
13321 <attribute name="period" type="unsigned long" readonly="yes">
13322 <desc>
13323 Time interval between samples, measured in seconds.
13324 </desc>
13325 </attribute>
13326
13327 <attribute name="count" type="unsigned long" readonly="yes">
13328 <desc>
13329 Number of recent samples retained by the performance collector for this
13330 metric.
13331
13332 When the collected sample count exceeds this number, older samples
13333 are discarded.
13334 </desc>
13335 </attribute>
13336
13337 <attribute name="unit" type="wstring" readonly="yes">
13338 <desc>
13339 Unit of measurement.
13340 </desc>
13341 </attribute>
13342
13343 <attribute name="minimumValue" type="long" readonly="yes">
13344 <desc>
13345 Minimum possible value of this metric.
13346 </desc>
13347 </attribute>
13348
13349 <attribute name="maximumValue" type="long" readonly="yes">
13350 <desc>
13351 Maximum possible value of this metric.
13352 </desc>
13353 </attribute>
13354 </interface>
13355
13356 <interface
13357 name="IPerformanceCollector" extends="$unknown"
13358 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13359 wsmap="managed"
13360 >
13361 <desc>
13362 The IPerformanceCollector interface represents a service that collects and
13363 stores performance metrics data.
13364
13365 Performance metrics are associated with objects of interfaces like IHost and
13366 IMachine. Each object has a distinct set of performance metrics.
13367 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13368
13369 Metric data is collected at the specified intervals and is retained
13370 internally. The interval and the number of retained samples can be set
13371 with <link to="IPerformanceCollector::setupMetrics" />.
13372
13373 Metrics are organized hierarchically, with each level separated by a
13374 slash (/) character. Generally, the scheme for metric names is like this:
13375
13376 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13377
13378 "Category/Metric" together form the base metric name. A base metric is the
13379 smallest unit for which a sampling interval and the number of retained
13380 samples can be set. Only base metrics can be enabled and disabled. All
13381 sub-metrics are collected when their base metric is collected.
13382 Collected values for any set of sub-metrics can be queried with
13383 <link to="IPerformanceCollector::queryMetricsData" />.
13384
13385 For example "CPU/Load/User:avg"
13386 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13387 "average" aggregate. An aggregate function is computed over all retained
13388 data. Valid aggregate functions are:
13389
13390 <ul>
13391 <li>avg -- average</li>
13392 <li>min -- minimum</li>
13393 <li>max -- maximum</li>
13394 </ul>
13395
13396 When setting up
13397 metric parameters, querying metric data, enabling or disabling metrics
13398 wildcards can be used in metric names to specify a subset of metrics. For
13399 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13400 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13401 values without aggregates <tt>*:</tt> can be used.
13402
13403 The valid names for base metrics are:
13404
13405 <ul>
13406 <li>CPU/Load</li>
13407 <li>CPU/MHz</li>
13408 <li>RAM/Usage</li>
13409 </ul>
13410
13411 The general sequence for collecting and retrieving the metrics is:
13412 <ul>
13413 <li>
13414 Obtain an instance of IPerformanceCollector with
13415 <link to="IVirtualBox::performanceCollector" />
13416 </li>
13417 <li>
13418 Allocate and populate an array with references to objects the metrics
13419 will be collected for. Use references to IHost and IMachine objects.
13420 </li>
13421 <li>
13422 Allocate and populate an array with base metric names the data will be
13423 collected for.
13424 </li>
13425 <li>
13426 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13427 metric data will be collected and stored.
13428 </li>
13429 <li>
13430 Wait for the data to get collected.
13431 </li>
13432 <li>
13433 Allocate and populate an array with references to objects the metric
13434 values will be queried for. You can re-use the object array used for
13435 setting base metrics.
13436 </li>
13437 <li>
13438 Allocate and populate an array with metric names the data will be
13439 collected for. Note that metric names differ from base metric names.
13440 </li>
13441 <li>
13442 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13443 have been collected so far are returned. Note that the values are still
13444 retained internally and data collection continues.
13445 </li>
13446 </ul>
13447
13448 For an example of usage refer to the following files in VirtualBox SDK:
13449 <ul>
13450 <li>
13451 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13452 </li>
13453 <li>
13454 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13455 </li>
13456 </ul>
13457 </desc>
13458
13459 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13460 <desc>
13461 Array of unique names of metrics.
13462
13463 This array represents all metrics supported by the performance
13464 collector. Individual objects do not necessarily support all of them.
13465 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13466 list of supported metrics for a particular object.
13467 </desc>
13468 </attribute>
13469
13470 <method name="getMetrics">
13471 <desc>
13472 Returns parameters of specified metrics for a set of objects.
13473 <note>
13474 @c Null metrics array means all metrics. @c Null object array means
13475 all existing objects.
13476 </note>
13477 </desc>
13478 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13479 <desc>
13480 Metric name filter. Currently, only a comma-separated list of metrics
13481 is supported.
13482 </desc>
13483 </param>
13484 <param name="objects" type="$unknown" dir="in" safearray="yes">
13485 <desc>
13486 Set of objects to return metric parameters for.
13487 </desc>
13488 </param>
13489 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13490 <desc>
13491 Array of returned metric parameters.
13492 </desc>
13493 </param>
13494 </method>
13495
13496 <method name="setupMetrics">
13497 <desc>
13498 Sets parameters of specified base metrics for a set of objects. Returns
13499 an array of <link to="IPerformanceMetric" /> describing the metrics have
13500 been affected.
13501 <note>
13502 @c Null or empty metric name array means all metrics. @c Null or empty
13503 object array means all existing objects. If metric name array contains
13504 a single element and object array contains many, the single metric
13505 name array element is applied to each object array element to form
13506 metric/object pairs.
13507 </note>
13508 </desc>
13509 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13510 <desc>
13511 Metric name filter. Comma-separated list of metrics with wildcard
13512 support.
13513 </desc>
13514 </param>
13515 <param name="objects" type="$unknown" dir="in" safearray="yes">
13516 <desc>
13517 Set of objects to setup metric parameters for.
13518 </desc>
13519 </param>
13520 <param name="period" type="unsigned long" dir="in">
13521 <desc>
13522 Time interval in seconds between two consecutive samples of performance
13523 data.
13524 </desc>
13525 </param>
13526 <param name="count" type="unsigned long" dir="in">
13527 <desc>
13528 Number of samples to retain in performance data history. Older samples
13529 get discarded.
13530 </desc>
13531 </param>
13532 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13533 <desc>
13534 Array of metrics that have been modified by the call to this method.
13535 </desc>
13536 </param>
13537 </method>
13538
13539 <method name="enableMetrics">
13540 <desc>
13541 Turns on collecting specified base metrics. Returns an array of
13542 <link to="IPerformanceMetric" /> describing the metrics have been
13543 affected.
13544 <note>
13545 @c Null or empty metric name array means all metrics. @c Null or empty
13546 object array means all existing objects. If metric name array contains
13547 a single element and object array contains many, the single metric
13548 name array element is applied to each object array element to form
13549 metric/object pairs.
13550 </note>
13551 </desc>
13552 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13553 <desc>
13554 Metric name filter. Comma-separated list of metrics with wildcard
13555 support.
13556 </desc>
13557 </param>
13558 <param name="objects" type="$unknown" dir="in" safearray="yes">
13559 <desc>
13560 Set of objects to enable metrics for.
13561 </desc>
13562 </param>
13563 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13564 <desc>
13565 Array of metrics that have been modified by the call to this method.
13566 </desc>
13567 </param>
13568 </method>
13569
13570 <method name="disableMetrics">
13571 <desc>
13572 Turns off collecting specified base metrics. Returns an array of
13573 <link to="IPerformanceMetric" /> describing the metrics have been
13574 affected.
13575 <note>
13576 @c Null or empty metric name array means all metrics. @c Null or empty
13577 object array means all existing objects. If metric name array contains
13578 a single element and object array contains many, the single metric
13579 name array element is applied to each object array element to form
13580 metric/object pairs.
13581 </note>
13582 </desc>
13583 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13584 <desc>
13585 Metric name filter. Comma-separated list of metrics with wildcard
13586 support.
13587 </desc>
13588 </param>
13589 <param name="objects" type="$unknown" dir="in" safearray="yes">
13590 <desc>
13591 Set of objects to disable metrics for.
13592 </desc>
13593 </param>
13594 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13595 <desc>
13596 Array of metrics that have been modified by the call to this method.
13597 </desc>
13598 </param>
13599 </method>
13600
13601 <method name="queryMetricsData">
13602 <desc>
13603 Queries collected metrics data for a set of objects.
13604
13605 The data itself and related metric information are returned in seven
13606 parallel and one flattened array of arrays. Elements of
13607 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13608 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13609 the same index describe one set of values corresponding to a single
13610 metric.
13611
13612 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13613 start and length of a sub-array is indicated by
13614 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13615 value for metric <tt>metricNames[i]</tt> is at
13616 <tt>returnData[returnIndices[i]]</tt>.
13617
13618 <note>
13619 @c Null or empty metric name array means all metrics. @c Null or empty
13620 object array means all existing objects. If metric name array contains
13621 a single element and object array contains many, the single metric
13622 name array element is applied to each object array element to form
13623 metric/object pairs.
13624 </note>
13625 <note>
13626 Data collection continues behind the scenes after call to
13627 @c queryMetricsData. The return data can be seen as the snapshot of
13628 the current state at the time of @c queryMetricsData call. The
13629 internally kept metric values are not cleared by the call. This makes
13630 possible querying different subsets of metrics or aggregates with
13631 subsequent calls. If periodic querying is needed it is highly
13632 suggested to query the values with @c interval*count period to avoid
13633 confusion. This way a completely new set of data values will be
13634 provided by each query.
13635 </note>
13636 </desc>
13637 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13638 <desc>
13639 Metric name filter. Comma-separated list of metrics with wildcard
13640 support.
13641 </desc>
13642 </param>
13643 <param name="objects" type="$unknown" dir="in" safearray="yes">
13644 <desc>
13645 Set of objects to query metrics for.
13646 </desc>
13647 </param>
13648 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13649 <desc>
13650 Names of metrics returned in @c returnData.
13651 </desc>
13652 </param>
13653 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13654 <desc>
13655 Objects associated with metrics returned in @c returnData.
13656 </desc>
13657 </param>
13658 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13659 <desc>
13660 Units of measurement for each returned metric.
13661 </desc>
13662 </param>
13663 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13664 <desc>
13665 Divisor that should be applied to return values in order to get
13666 floating point values. For example:
13667 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13668 will retrieve the floating point value of i-th sample of the first
13669 metric.
13670 </desc>
13671 </param>
13672 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13673 <desc>
13674 Sequence numbers of the first elements of value sequences of particular metrics
13675 returned in @c returnData. For aggregate metrics it is the sequence number of
13676 the sample the aggregate started calculation from.
13677 </desc>
13678 </param>
13679 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13680 <desc>
13681 Indices of the first elements of value sequences of particular metrics
13682 returned in @c returnData.
13683 </desc>
13684 </param>
13685 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13686 <desc>
13687 Lengths of value sequences of particular metrics.
13688 </desc>
13689 </param>
13690 <param name="returnData" type="long" dir="return" safearray="yes">
13691 <desc>
13692 Flattened array of all metric data containing sequences of values for
13693 each metric.
13694 </desc>
13695 </param>
13696 </method>
13697
13698 </interface>
13699
13700 <module name="VBoxSVC" context="LocalServer">
13701 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13702 namespace="virtualbox.org">
13703 <interface name="IVirtualBox" default="yes"/>
13704 </class>
13705 </module>
13706
13707 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13708 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13709 namespace="virtualbox.org">
13710 <interface name="ISession" default="yes"/>
13711 </class>
13712 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13713 namespace="virtualbox.org">
13714 <interface name="ILocalOwner" default="yes"/>
13715 <interface name="IVirtualBoxCallback"/>
13716 <interface name="IConsoleCallback"/>
13717 </class>
13718 </module>
13719
13720</library>
13721
13722</idl>
13723
13724<!-- 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