VirtualBox

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

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

doc correction.

  • Property svn:eol-style set to native
File size: 512.3 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-2010 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="v1_10" value="12">
457 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
458 <!-- Machine changes: RTC localOrUTC (done)
459 CPU hot-plug support
460 -->
461 </const>
462 <const name="Future" value="13">
463 <desc>Settings version greater than "1.10", written by a future VirtualBox version.</desc>
464 </const>
465 </enum>
466
467 <enum
468 name="AccessMode"
469 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
470 >
471 <desc>
472 Access mode for opening files.
473 </desc>
474
475 <const name="ReadOnly" value="1"/>
476 <const name="ReadWrite" value="2"/>
477 </enum>
478
479 <enum
480 name="MachineState"
481 uuid="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
482 >
483 <desc>
484 Virtual machine execution state.
485
486 This enumeration represents possible values of the <link
487 to="IMachine::state"/> attribute.
488
489 Below is the basic virtual machine state diagram. It shows how the state
490 changes during virtual machine execution. The text in square braces shows
491 a method of the IConsole interface that performs the given state
492 transition.
493
494 <pre>
495 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
496 V |
497 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
498 | | | | V |
499 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
500 | | ^ | ^ |
501 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
502 | ^ | | | |
503 | | +-----------------------------------------+-|-------------------+ +
504 | | | | |
505 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
506 | | | |
507 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
508 | | |
509 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
510 </pre>
511
512 Note that states to the right from PoweredOff, Aborted and Saved in the
513 above diagram are called <i>online VM states</i>. These states
514 represent the virtual machine which is being executed in a dedicated
515 process (usually with a GUI window attached to it where you can see the
516 activity of the virtual machine and interact with it). There are two
517 special pseudo-states, FirstOnline and LastOnline, that can be used in
518 relational expressions to detect if the given machine state is online or
519 not:
520
521 <pre>
522 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
523 machine.GetState() &lt;= MachineState_LastOnline)
524 {
525 ...the machine is being executed...
526 }
527 </pre>
528
529 When the virtual machine is in one of the online VM states (that is, being
530 executed), only a few machine settings can be modified. Methods working
531 with such settings contain an explicit note about that. An attempt to
532 change any oter setting or perform a modifying operation during this time
533 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
534
535 All online states except Running, Paused and Stuck are transitional: they
536 represent temporary conditions of the virtual machine that will last as
537 long as the operation that initiated such a condition.
538
539 The Stuck state is a special case. It means that execution of the machine
540 has reached the "Guru Meditation" condition. This condition indicates an
541 internal VMM (virtual machine manager) failure which may happen as a
542 result of either an unhandled low-level virtual hardware exception or one
543 of the recompiler exceptions (such as the <i>too-many-traps</i>
544 condition).
545
546 Note also that any online VM state may transit to the Aborted state. This
547 happens if the process that is executing the virtual machine terminates
548 unexpectedly (for example, crashes). Other than that, the Aborted state is
549 equivalent to PoweredOff.
550
551 There are also a few additional state diagrams that do not deal with
552 virtual machine execution and therefore are shown separately. The states
553 shown on these diagrams are called <i>offline VM states</i> (this includes
554 PoweredOff, Aborted and Saved too).
555
556 The first diagram shows what happens when a lengthy setup operation is
557 being executed (such as <link to="IMachine::attachDevice"/>).
558
559 <pre>
560 +----------------------------------(same state as before the call)------+
561 | |
562 +-&gt; PoweredOff --+ |
563 | | |
564 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
565 | |
566 +-&gt; Saved -------+
567 </pre>
568
569 The next two diagrams demonstrate the process of taking a snapshot of a
570 powered off virtual machine and performing one of the "discard..."
571 operations, respectively.
572
573 <pre>
574 +----------------------------------(same state as before the call)------+
575 | |
576 +-&gt; PoweredOff --+ |
577 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
578 +-&gt; Aborted -----+
579
580 +-&gt; PoweredOff --+
581 | |
582 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
583 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
584 +-&gt; Saved -------+ |
585 | |
586 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
587 </pre>
588
589 Note that the Saving state is present in both the offline state group and
590 online state group. Currently, the only way to determine what group is
591 assumed in a particular case is to remember the previous machine state: if
592 it was Running or Paused, then Saving is an online state, otherwise it is
593 an offline state. This inconsistency may be removed in one of the future
594 versions of VirtualBox by adding a new state.
595
596 <note internal="yes">
597 For whoever decides to touch this enum: In order to keep the
598 comparisons involving FirstOnline and LastOnline pseudo-states valid,
599 the numeric values of these states must be correspondingly updated if
600 needed: for any online VM state, the condition
601 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
602 @c true. The same relates to transient states for which
603 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
604 @c true.
605 </note>
606 </desc>
607
608 <const name="Null" value="0">
609 <desc>Null value (never used by the API).</desc>
610 </const>
611 <const name="PoweredOff" value="1">
612 <desc>
613 The machine is not running and has no saved execution state; it has
614 either never been started or been shut down successfully.
615 </desc>
616 </const>
617 <const name="Saved" value="2">
618 <desc>
619 The machine is not currently running, but the execution state of the machine
620 has been saved to an external file when it was running, from where
621 it can be resumed.
622 </desc>
623 </const>
624 <const name="Teleported" value="3">
625 <desc>
626 The machine was teleported to a different host (or process) and then
627 powered off. Take care when powering it on again may corrupt resources
628 it shares with the teleportation target (e.g. disk and network).
629 </desc>
630 </const>
631 <const name="Aborted" value="4">
632 <desc>
633 The process running the machine has terminated abnormally. This may
634 indicate a crash of the VM process in host execution context, or
635 the VM process has been terminated externally.
636 </desc>
637 </const>
638 <const name="Running" value="5">
639 <desc>
640 The machine is currently being executed.
641 <note internal="yes">
642 For whoever decides to touch this enum: In order to keep the
643 comparisons in the old source code valid, this state must immediately
644 precede the Paused state.
645 TODO: Lift this spectacularly wonderful restriction.
646 </note>
647 </desc>
648 </const>
649 <const name="Paused" value="6">
650 <desc>
651 Execution of the machine has been paused.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 follow the Running state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Stuck" value="7">
661 <desc>
662 Execution of the machine has reached the "Guru Meditation"
663 condition. This indicates a severe error in the hypervisor itself.
664 <note internal="yes">
665 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
666 "Guru", perhaps? Or are there some other VMM states that are
667 intended to be lumped in here as well?
668 </note>
669 </desc>
670 </const>
671 <const name="Teleporting" value="8">
672 <desc>
673 The machine is about to be teleported to a different host or process.
674 It is possible to pause a machine in this state, but it will go to the
675 <link to="MachineState::PausedTeleporting"/> state and it will not be
676 possible to resume it again unless the teleportation fails.
677 </desc>
678 </const>
679 <const name="LiveSnapshotting" value="9">
680 <desc>
681 A live snapshot is being taken. The machine is running normally, but
682 some of the runtime configuration options are inaccessible. Also, if
683 paused while in this state it will transition to
684 <link to="MachineState::Saving"/> and it will not be resume the
685 execution until the snapshot operation has completed.
686 </desc>
687 </const>
688 <const name="Starting" value="10">
689 <desc>
690 Machine is being started after powering it on from a
691 zero execution state.
692 </desc>
693 </const>
694 <const name="Stopping" value="11">
695 <desc>
696 Machine is being normally stopped powering it off, or after the guest OS
697 has initiated a shutdown sequence.
698 </desc>
699 </const>
700 <const name="Saving" value="12">
701 <desc>
702 Machine is saving its execution state to a file, or an online
703 snapshot of the machine is being taken.
704 </desc>
705 </const>
706 <const name="Restoring" value="13">
707 <desc>
708 Execution state of the machine is being restored from a file
709 after powering it on from the saved execution state.
710 </desc>
711 </const>
712 <const name="TeleportingPausedVM" value="14">
713 <desc>
714 The machine is being teleported to another host or process, but it is
715 not running. This is the paused variant of the
716 <link to="MachineState::Teleporting"/> state.
717 </desc>
718 </const>
719 <const name="TeleportingIn" value="15">
720 <desc>
721 Teleporting the machine state in from another host or process.
722 </desc>
723 </const>
724 <const name="RestoringSnapshot" value="16">
725 <desc>
726 A machine snapshot is being restored; this typically does not take long.
727 </desc>
728 </const>
729 <const name="DeletingSnapshot" value="17">
730 <desc>
731 A machine snapshot is being deleted; this can take a long time since this
732 may require merging differencing media.
733 </desc>
734 </const>
735 <const name="SettingUp" value="18">
736 <desc>
737 Lengthy setup operation is in progress.
738 </desc>
739 </const>
740
741 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
742 <desc>
743 Pseudo-state: first online state (for use in relational expressions).
744 </desc>
745 </const>
746 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
747 <desc>
748 Pseudo-state: last online state (for use in relational expressions).
749 </desc>
750 </const>
751
752 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
753 <desc>
754 Pseudo-state: first transient state (for use in relational expressions).
755 </desc>
756 </const>
757 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
758 <desc>
759 Pseudo-state: last transient state (for use in relational expressions).
760 </desc>
761 </const>
762
763 </enum>
764
765 <enum
766 name="SessionState"
767 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
768 >
769 <desc>
770 Session state. This enumeration represents possible values of
771 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
772 attributes. See individual enumerator descriptions for the meaning for
773 every value.
774 </desc>
775
776 <const name="Null" value="0">
777 <desc>Null value (never used by the API).</desc>
778 </const>
779 <const name="Closed" value="1">
780 <desc>
781 The machine has no open sessions (<link to="IMachine::sessionState"/>);
782 the session is closed (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Open" value="2">
786 <desc>
787 The machine has an open direct session (<link to="IMachine::sessionState"/>);
788 the session is open (<link to="ISession::state"/>)
789 </desc>
790 </const>
791 <const name="Spawning" value="3">
792 <desc>
793 A new (direct) session is being opened for the machine as a result of
794 <link to="IVirtualBox::openRemoteSession"/> call
795 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
796 This state also occurs as a short transient state when a new direct
797 session is opened by calling <link to="IVirtualBox::openSession"/>.
798 </desc>
799 </const>
800 <const name="Closing" value="4">
801 <desc>
802 The direct session is being closed (<link to="IMachine::sessionState"/>);
803 the session is being closed (<link to="ISession::state"/>)
804 </desc>
805 </const>
806 </enum>
807
808 <enum
809 name="CpuPropertyType"
810 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
811 >
812 <desc>
813 Virtual CPU property type. This enumeration represents possible values of the
814 IMachine get- and setCpuProperty methods.
815 </desc>
816 <const name="Null" value="0">
817 <desc>Null value (never used by the API).</desc>
818 </const>
819 <const name="PAE" value="1">
820 <desc>
821 This setting determines whether VirtualBox will expose the Physical Address
822 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
823 is not available, it will not be reported.
824 </desc>
825 </const>
826 <const name="Synthetic" value="2">
827 <desc>
828 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
829 teleporting between host systems that differ significantly.
830 </desc>
831 </const>
832 </enum>
833
834
835 <enum
836 name="HWVirtExPropertyType"
837 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
838 >
839 <desc>
840 Hardware virtualization property type. This enumeration represents possible values
841 for the <link to="IMachine::getHWVirtExProperty"/> and
842 <link to="IMachine::setHWVirtExProperty"/> methods.
843 </desc>
844 <const name="Null" value="0">
845 <desc>Null value (never used by the API).</desc>
846 </const>
847 <const name="Enabled" value="1">
848 <desc>
849 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
850 such extensions are not available, they will not be used.
851 </desc>
852 </const>
853 <const name="Exclusive" value="2">
854 <desc>
855 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
856 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
857 feature of the host. To share these with other hypervisors, you must disable this property.
858 </desc>
859 </const>
860 <const name="VPID" value="3">
861 <desc>
862 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
863 </desc>
864 </const>
865 <const name="NestedPaging" value="4">
866 <desc>
867 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
868 </desc>
869 </const>
870 </enum>
871
872 <enum
873 name="SessionType"
874 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
875 >
876 <desc>
877 Session type. This enumeration represents possible values of the
878 <link to="ISession::type"/> attribute.
879 </desc>
880
881 <const name="Null" value="0">
882 <desc>Null value (never used by the API).</desc>
883 </const>
884 <const name="Direct" value="1">
885 <desc>
886 Direct session
887 (opened by <link to="IVirtualBox::openSession"/>)
888 </desc>
889 </const>
890 <const name="Remote" value="2">
891 <desc>
892 Remote session
893 (opened by <link to="IVirtualBox::openRemoteSession"/>)
894 </desc>
895 </const>
896 <const name="Existing" value="3">
897 <desc>
898 Existing session
899 (opened by <link to="IVirtualBox::openExistingSession"/>)
900 </desc>
901 </const>
902 </enum>
903
904 <enum
905 name="DeviceType"
906 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
907 >
908 <desc>
909 Device type.
910 </desc>
911 <const name="Null" value="0">
912 <desc>
913 Null value, may also mean "no device" (not allowed for
914 <link to="IConsole::getDeviceActivity"/>).
915 </desc>
916 </const>
917 <const name="Floppy" value="1">
918 <desc>Floppy device.</desc>
919 </const>
920 <const name="DVD" value="2">
921 <desc>CD/DVD-ROM device.</desc>
922 </const>
923 <const name="HardDisk" value="3">
924 <desc>Hard disk device.</desc>
925 </const>
926 <const name="Network" value="4">
927 <desc>Network device.</desc>
928 </const>
929 <const name="USB" value="5">
930 <desc>USB device.</desc>
931 </const>
932 <const name="SharedFolder" value="6">
933 <desc>Shared folder device.</desc>
934 </const>
935 </enum>
936
937 <enum
938 name="DeviceActivity"
939 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
940 >
941 <desc>
942 Device activity for <link to="IConsole::getDeviceActivity"/>.
943 </desc>
944
945 <const name="Null" value="0"/>
946 <const name="Idle" value="1"/>
947 <const name="Reading" value="2"/>
948 <const name="Writing" value="3"/>
949 </enum>
950
951 <enum
952 name="ClipboardMode"
953 uuid="33364716-4008-4701-8f14-be0fa3d62950"
954 >
955 <desc>
956 Host-Guest clipboard interchange mode.
957 </desc>
958
959 <const name="Disabled" value="0"/>
960 <const name="HostToGuest" value="1"/>
961 <const name="GuestToHost" value="2"/>
962 <const name="Bidirectional" value="3"/>
963 </enum>
964
965 <enum
966 name="Scope"
967 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
968 >
969 <desc>
970 Scope of the operation.
971
972 A generic enumeration used in various methods to define the action or
973 argument scope.
974 </desc>
975
976 <const name="Global" value="0"/>
977 <const name="Machine" value="1"/>
978 <const name="Session" value="2"/>
979 </enum>
980
981 <enum
982 name="GuestStatisticType"
983 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
984 >
985 <desc>
986 Statistics type for <link to="IGuest::getStatistic"/>.
987 </desc>
988
989 <const name="CPULoad_Idle" value="0">
990 <desc>
991 Idle CPU load (0-100%) for last interval.
992 </desc>
993 </const>
994 <const name="CPULoad_Kernel" value="1">
995 <desc>
996 Kernel CPU load (0-100%) for last interval.
997 </desc>
998 </const>
999 <const name="CPULoad_User" value="2">
1000 <desc>
1001 User CPU load (0-100%) for last interval.
1002 </desc>
1003 </const>
1004 <const name="Threads" value="3">
1005 <desc>
1006 Total number of threads in the system.
1007 </desc>
1008 </const>
1009 <const name="Processes" value="4">
1010 <desc>
1011 Total number of processes in the system.
1012 </desc>
1013 </const>
1014 <const name="Handles" value="5">
1015 <desc>
1016 Total number of handles in the system.
1017 </desc>
1018 </const>
1019 <const name="MemoryLoad" value="6">
1020 <desc>
1021 Memory load (0-100%).
1022 </desc>
1023 </const>
1024 <const name="PhysMemTotal" value="7">
1025 <desc>
1026 Total physical memory in megabytes.
1027 </desc>
1028 </const>
1029 <const name="PhysMemAvailable" value="8">
1030 <desc>
1031 Free physical memory in megabytes.
1032 </desc>
1033 </const>
1034 <const name="PhysMemBalloon" value="9">
1035 <desc>
1036 Ballooned physical memory in megabytes.
1037 </desc>
1038 </const>
1039 <const name="MemCommitTotal" value="10">
1040 <desc>
1041 Total amount of memory in the committed state in megabytes.
1042 </desc>
1043 </const>
1044 <const name="MemKernelTotal" value="11">
1045 <desc>
1046 Total amount of memory used by the guest OS's kernel in megabytes.
1047 </desc>
1048 </const>
1049 <const name="MemKernelPaged" value="12">
1050 <desc>
1051 Total amount of paged memory used by the guest OS's kernel in megabytes.
1052 </desc>
1053 </const>
1054 <const name="MemKernelNonpaged" value="13">
1055 <desc>
1056 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1057 </desc>
1058 </const>
1059 <const name="MemSystemCache" value="14">
1060 <desc>
1061 Total amount of memory used by the guest OS's system cache in megabytes.
1062 </desc>
1063 </const>
1064 <const name="PageFileSize" value="15">
1065 <desc>
1066 Pagefile size in megabytes.
1067 </desc>
1068 </const>
1069 <const name="SampleNumber" value="16">
1070 <desc>
1071 Statistics sample number
1072 </desc>
1073 </const>
1074 <const name="MaxVal" value="17"/>
1075 </enum>
1076
1077 <enum
1078 name="BIOSBootMenuMode"
1079 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1080 >
1081 <desc>
1082 BIOS boot menu mode.
1083 </desc>
1084
1085 <const name="Disabled" value="0"/>
1086 <const name="MenuOnly" value="1"/>
1087 <const name="MessageAndMenu" value="2"/>
1088 </enum>
1089
1090 <enum
1091 name="ProcessorFeature"
1092 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1093 >
1094 <desc>
1095 CPU features.
1096 </desc>
1097
1098 <const name="HWVirtEx" value="0"/>
1099 <const name="PAE" value="1"/>
1100 <const name="LongMode" value="2"/>
1101 <const name="NestedPaging" value="3"/>
1102 </enum>
1103
1104 <enum
1105 name="FirmwareType"
1106 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1107 >
1108 <desc>
1109 Firmware type.
1110 </desc>
1111 <const name="BIOS" value="1">
1112 <desc>BIOS Firmware.</desc>
1113 </const>
1114 <const name="EFI" value="2">
1115 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1116 </const>
1117 <const name="EFI32" value="3">
1118 <desc>Efi firmware, 32-bit.</desc>
1119 </const>
1120 <const name="EFI64" value="4">
1121 <desc>Efi firmware, 64-bit.</desc>
1122 </const>
1123 <const name="EFIDUAL" value="5">
1124 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1125 </const>
1126 </enum>
1127
1128 <enum
1129 name="PointingHidType"
1130 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1131 >
1132 <desc>
1133 Type of pointing device used in a virtual machine.
1134 </desc>
1135 <const name="None" value="1">
1136 <desc>No mouse.</desc>
1137 </const>
1138 <const name="PS2Mouse" value="2">
1139 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1140 </const>
1141 <const name="USBMouse" value="3">
1142 <desc>USB mouse (relative pointer).</desc>
1143 </const>
1144 <const name="USBTablet" value="4">
1145 <desc>USB tablet (absolute pointer).</desc>
1146 </const>
1147 <const name="ComboMouse" value="5">
1148 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1149 Using of such device can have negative performance implications. </desc>
1150 </const>
1151 </enum>
1152
1153 <enum
1154 name="KeyboardHidType"
1155 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1156 >
1157 <desc>
1158 Type of keyboard device used in a virtual machine.
1159 </desc>
1160 <const name="None" value="1">
1161 <desc>No keyboard.</desc>
1162 </const>
1163 <const name="PS2Keyboard" value="2">
1164 <desc>PS/2 keyboard.</desc>
1165 </const>
1166 <const name="USBKeyboard" value="3">
1167 <desc>USB keyboard.</desc>
1168 </const>
1169 <const name="ComboKeyboard" value="4">
1170 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1171 Using of such device can have negative performance implications. </desc>
1172 </const>
1173 </enum>
1174
1175
1176
1177 <!--
1178 // IVirtualBoxErrorInfo
1179 /////////////////////////////////////////////////////////////////////////
1180 -->
1181
1182 <interface
1183 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1184 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1185 supportsErrorInfo="no"
1186 wsmap="managed"
1187 >
1188 <desc>
1189 The IVirtualBoxErrorInfo interface represents extended error information.
1190
1191 Extended error information can be set by VirtualBox components after
1192 unsuccessful or partially successful method invocation. This information
1193 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1194 and then shown to the client in addition to the plain 32-bit result code.
1195
1196 In MS COM, this interface extends the IErrorInfo interface,
1197 in XPCOM, it extends the nsIException interface. In both cases,
1198 it provides a set of common attributes to retrieve error
1199 information.
1200
1201 Sometimes invocation of some component's method may involve methods of
1202 other components that may also fail (independently of this method's
1203 failure), or a series of non-fatal errors may precede a fatal error that
1204 causes method failure. In cases like that, it may be desirable to preserve
1205 information about all errors happened during method invocation and deliver
1206 it to the caller. The <link to="#next"/> attribute is intended
1207 specifically for this purpose and allows to represent a chain of errors
1208 through a single IVirtualBoxErrorInfo object set after method invocation.
1209
1210 Note that errors are stored to a chain in the reverse order, i.e. the
1211 initial error object you query right after method invocation is the last
1212 error set by the callee, the object it points to in the @a next attribute
1213 is the previous error and so on, up to the first error (which is the last
1214 in the chain).
1215 </desc>
1216
1217 <attribute name="resultCode" type="long" readonly="yes">
1218 <desc>
1219 Result code of the error.
1220 Usually, it will be the same as the result code returned
1221 by the method that provided this error information, but not
1222 always. For example, on Win32, CoCreateInstance() will most
1223 likely return E_NOINTERFACE upon unsuccessful component
1224 instantiation attempt, but not the value the component factory
1225 returned. Value is typed 'long', not 'result',
1226 to make interface usable from scripting languages.
1227 <note>
1228 In MS COM, there is no equivalent.
1229 In XPCOM, it is the same as nsIException::result.
1230 </note>
1231 </desc>
1232 </attribute>
1233
1234 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1235 <desc>
1236 UUID of the interface that defined the error.
1237 <note>
1238 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1239 data type.
1240 In XPCOM, there is no equivalent.
1241 </note>
1242 </desc>
1243 </attribute>
1244
1245 <attribute name="component" type="wstring" readonly="yes">
1246 <desc>
1247 Name of the component that generated the error.
1248 <note>
1249 In MS COM, it is the same as IErrorInfo::GetSource.
1250 In XPCOM, there is no equivalent.
1251 </note>
1252 </desc>
1253 </attribute>
1254
1255 <attribute name="text" type="wstring" readonly="yes">
1256 <desc>
1257 Text description of the error.
1258 <note>
1259 In MS COM, it is the same as IErrorInfo::GetDescription.
1260 In XPCOM, it is the same as nsIException::message.
1261 </note>
1262 </desc>
1263 </attribute>
1264
1265 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1266 <desc>
1267 Next error object if there is any, or @c null otherwise.
1268 <note>
1269 In MS COM, there is no equivalent.
1270 In XPCOM, it is the same as nsIException::inner.
1271 </note>
1272 </desc>
1273 </attribute>
1274
1275 </interface>
1276
1277 <interface
1278 name="ILocalOwner" extends="$dispatched"
1279 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1280 >
1281 <desc>
1282 The ILocalOwner interface allows to register local objects
1283 (created without COM calls, but with new()).
1284 Once registered, calls to methods of such objects can be made
1285 from remote COM processes.
1286 The main usecase is the event callback implementation where
1287 API clients provide callback objects.
1288 </desc>
1289 <method name="setLocalObject">
1290 <desc>
1291 Set local object.
1292 </desc>
1293 <param name="object" type="$unknown" dir="in">
1294 <desc>Local object to forward requests to.
1295 If null, clears currently set local object.</desc>
1296 </param>
1297 </method>
1298 </interface>
1299
1300 <!--
1301 // IVirtualBox
1302 /////////////////////////////////////////////////////////////////////////
1303 -->
1304
1305 <interface
1306 name="IVirtualBoxCallback" extends="$unknown"
1307 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1308 wsmap="suppress"
1309 >
1310
1311 <method name="onMachineStateChange">
1312 <desc>
1313 The execution state of the given machine has changed.
1314 <see>IMachine::state</see>
1315 </desc>
1316 <param name="machineId" type="uuid" mod="string" dir="in">
1317 <desc>ID of the machine this event relates to.</desc>
1318 </param>
1319 <param name="state" type="MachineState" dir="in">
1320 <desc>New execution state.</desc>
1321 </param>
1322 </method>
1323
1324 <method name="onMachineDataChange">
1325 <desc>
1326 Any of the settings of the given machine has changed.
1327 </desc>
1328 <param name="machineId" type="uuid" mod="string" dir="in">
1329 <desc>ID of the machine this event relates to.</desc>
1330 </param>
1331 </method>
1332
1333 <method name="onExtraDataCanChange">
1334 <desc>
1335 Notification when someone tries to change extra data for
1336 either the given machine or (if @c null) global extra data.
1337 This gives the chance to veto against changes.
1338 </desc>
1339 <param name="machineId" type="uuid" mod="string" dir="in">
1340 <desc>
1341 ID of the machine this event relates to
1342 (@c null ID for global extra data change requests).
1343 </desc>
1344 </param>
1345 <param name="key" type="wstring" dir="in">
1346 <desc>
1347 Extra data key for the attempted write.
1348 </desc>
1349 </param>
1350 <param name="value" type="wstring" dir="in">
1351 <desc>
1352 Extra data value for the given key.
1353 </desc>
1354 </param>
1355 <param name="error" type="wstring" dir="out">
1356 <desc>
1357 Optional error message describing the reason of the
1358 veto (ignored if this notification returns @c true).
1359 </desc>
1360 </param>
1361 <param name="allowChange" type="boolean" dir="return">
1362 <desc>
1363 Flag to indicate whether the callee agrees (@c true)
1364 or vetoes against the change (@c false).
1365 </desc>
1366 </param>
1367 </method>
1368
1369 <method name="onExtraDataChange">
1370 <desc>
1371 Notification when machine specific or global extra data
1372 has changed.
1373 </desc>
1374 <param name="machineId" type="uuid" mod="string" dir="in">
1375 <desc>
1376 ID of the machine this event relates to.
1377 Null for global extra data changes.
1378 </desc>
1379 </param>
1380 <param name="key" type="wstring" dir="in">
1381 <desc>
1382 Extra data key that has changed.
1383 </desc>
1384 </param>
1385 <param name="value" type="wstring" dir="in">
1386 <desc>
1387 Extra data value for the given key.
1388 </desc>
1389 </param>
1390 </method>
1391
1392 <method name="onMediumRegistered">
1393 <desc>
1394 The given medium was registered or unregistered
1395 within this VirtualBox installation.
1396
1397 The @a mediumType parameter describes what type of
1398 medium the specified @a mediumId refers to. Possible
1399 values are:
1400
1401 <ul>
1402 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1403 that, if registered, can be obtained using the
1404 <link to="IVirtualBox::getHardDisk"/> call.</li>
1405 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1406 that, if registered, can be obtained using the
1407 <link to="IVirtualBox::getDVDImage"/> call.</li>
1408 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1409 that, if registered, can be obtained using the
1410 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1411 </ul>
1412
1413 Note that if this is a deregistration notification,
1414 there is no way to access the object representing the
1415 unregistered medium. It is supposed that the
1416 application will do required cleanup based on the
1417 @a mediumId value.
1418 </desc>
1419 <param name="mediumId" type="uuid" mod="string" dir="in">
1420 <desc>ID of the medium this event relates to.</desc>
1421 </param>
1422 <param name="mediumType" type="DeviceType" dir="in">
1423 <desc>Type of the medium this event relates to.</desc>
1424 </param>
1425 <param name="registered" type="boolean" dir="in">
1426 <desc>
1427 If @c true, the medium was registered, otherwise it was
1428 unregistered.
1429 </desc>
1430 </param>
1431 </method>
1432
1433 <method name="onMachineRegistered">
1434 <desc>
1435 The given machine was registered or unregistered
1436 within this VirtualBox installation.
1437 </desc>
1438 <param name="machineId" type="uuid" mod="string" dir="in">
1439 <desc>ID of the machine this event relates to.</desc>
1440 </param>
1441 <param name="registered" type="boolean" dir="in">
1442 <desc>
1443 If @c true, the machine was registered, otherwise it was
1444 unregistered.
1445 </desc>
1446 </param>
1447 </method>
1448
1449 <method name="onSessionStateChange">
1450 <desc>
1451 The state of the session for the given machine was changed.
1452 <see>IMachine::sessionState</see>
1453 </desc>
1454 <param name="machineId" type="uuid" mod="string" dir="in">
1455 <desc>ID of the machine this event relates to.</desc>
1456 </param>
1457 <param name="state" type="SessionState" dir="in">
1458 <desc>New session state.</desc>
1459 </param>
1460 </method>
1461
1462 <method name="onSnapshotTaken">
1463 <desc>
1464 A new snapshot of the machine has been taken.
1465 <see>ISnapshot</see>
1466 </desc>
1467 <param name="machineId" type="uuid" mod="string" dir="in">
1468 <desc>ID of the machine this event relates to.</desc>
1469 </param>
1470 <param name="snapshotId" type="uuid" mod="string" dir="in">
1471 <desc>ID of the new snapshot.</desc>
1472 </param>
1473 </method>
1474
1475 <method name="onSnapshotDiscarded">
1476 <desc>
1477 Snapshot of the given machine has been discarded.
1478
1479 <note>
1480 This notification is delivered <b>after</b> the snapshot
1481 object has been uninitialized on the server (so that any
1482 attempt to call its methods will return an error).
1483 </note>
1484
1485 <see>ISnapshot</see>
1486 </desc>
1487 <param name="machineId" type="uuid" mod="string" dir="in">
1488 <desc>ID of the machine this event relates to.</desc>
1489 </param>
1490 <param name="snapshotId" type="uuid" mod="string" dir="in">
1491 <desc>
1492 ID of the discarded snapshot. @c null means the current machine
1493 state has been discarded (restored from the current snapshot).
1494 </desc>
1495 </param>
1496 </method>
1497
1498 <method name="onSnapshotChange">
1499 <desc>
1500 Snapshot properties (name and/or description) have been changed.
1501 <see>ISnapshot</see>
1502 </desc>
1503 <param name="machineId" type="uuid" mod="string" dir="in">
1504 <desc>ID of the machine this event relates to.</desc>
1505 </param>
1506 <param name="snapshotId" type="uuid" mod="string" dir="in">
1507 <desc>ID of the changed snapshot.</desc>
1508 </param>
1509 </method>
1510
1511 <method name="onGuestPropertyChange">
1512 <desc>
1513 Notification when a guest property has changed.
1514 </desc>
1515 <param name="machineId" type="uuid" mod="string" dir="in">
1516 <desc>
1517 ID of the machine this event relates to.
1518 </desc>
1519 </param>
1520 <param name="name" type="wstring" dir="in">
1521 <desc>
1522 The name of the property that has changed.
1523 </desc>
1524 </param>
1525 <param name="value" type="wstring" dir="in">
1526 <desc>
1527 The new property value.
1528 </desc>
1529 </param>
1530 <param name="flags" type="wstring" dir="in">
1531 <desc>
1532 The new property flags.
1533 </desc>
1534 </param>
1535 </method>
1536
1537 </interface>
1538
1539 <interface
1540 name="IDHCPServer" extends="$unknown"
1541 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1542 wsmap="managed"
1543 >
1544 <desc>
1545 The IDHCPServer interface represents the vbox dhcp server configuration.
1546
1547 To enumerate all the dhcp servers on the host, use the
1548 <link to="IVirtualBox::DHCPServers"/> attribute.
1549 </desc>
1550
1551 <attribute name="enabled" type="boolean">
1552 <desc>
1553 specifies if the dhcp server is enabled
1554 </desc>
1555 </attribute>
1556
1557 <attribute name="IPAddress" type="wstring" readonly="yes">
1558 <desc>
1559 specifies server IP
1560 </desc>
1561 </attribute>
1562
1563 <attribute name="networkMask" type="wstring" readonly="yes">
1564 <desc>
1565 specifies server network mask
1566 </desc>
1567 </attribute>
1568
1569 <attribute name="networkName" type="wstring" readonly="yes">
1570 <desc>
1571 specifies internal network name the server is used for
1572 </desc>
1573 </attribute>
1574
1575 <attribute name="lowerIP" type="wstring" readonly="yes">
1576 <desc>
1577 specifies from IP adrres in server address range
1578 </desc>
1579 </attribute>
1580
1581 <attribute name="upperIP" type="wstring" readonly="yes">
1582 <desc>
1583 specifies to IP adrres in server address range
1584 </desc>
1585 </attribute>
1586
1587 <method name="setConfiguration">
1588 <desc>
1589 configures the server
1590 <result name="E_INVALIDARG">
1591 invalid configuration supplied
1592 </result>
1593 </desc>
1594 <param name="IPAddress" type="wstring" dir="in">
1595 <desc>
1596 server IP address
1597 </desc>
1598 </param>
1599 <param name="networkMask" type="wstring" dir="in">
1600 <desc>
1601 server network mask
1602 </desc>
1603 </param>
1604 <param name="FromIPAddress" type="wstring" dir="in">
1605 <desc>
1606 server From IP address for address range
1607 </desc>
1608 </param>
1609 <param name="ToIPAddress" type="wstring" dir="in">
1610 <desc>
1611 server To IP address for address range
1612 </desc>
1613 </param>
1614 </method>
1615
1616 <method name="start">
1617 <desc>
1618 Starts DHCP server process.
1619 <result name="E_FAIL">
1620 Failed to start the process.
1621 </result>
1622 </desc>
1623 <param name="networkName" type="wstring" dir="in">
1624 <desc>
1625 Name of internal network DHCP server should attach to.
1626 </desc>
1627 </param>
1628 <param name="trunkName" type="wstring" dir="in">
1629 <desc>
1630 Name of internal network trunk.
1631 </desc>
1632 </param>
1633 <param name="trunkType" type="wstring" dir="in">
1634 <desc>
1635 Type of internal network trunk.
1636 </desc>
1637 </param>
1638 </method>
1639
1640 <method name="stop">
1641 <desc>
1642 Stops DHCP server process.
1643 <result name="E_FAIL">
1644 Failed to stop the process.
1645 </result>
1646 </desc>
1647 </method>
1648 </interface>
1649
1650 <interface
1651 name="IVirtualBox" extends="$dispatched"
1652 uuid="2158464a-f706-414b-a8c4-fb589dfc6b62"
1653 wsmap="managed"
1654 >
1655 <desc>
1656 The IVirtualBox interface represents the main interface exposed by the
1657 product that provides virtual machine management.
1658
1659 An instance of IVirtualBox is required for the product to do anything
1660 useful. Even though the interface does not expose this, internally,
1661 IVirtualBox is implemented as a singleton and actually lives in the
1662 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1663 IVirtualBox can track the state of all virtual machines on a particular
1664 host, regardless of which frontend started them.
1665
1666 To enumerate all the virtual machines on the host, use the
1667 <link to="IVirtualBox::machines"/> attribute.
1668 </desc>
1669
1670 <attribute name="version" type="wstring" readonly="yes">
1671 <desc>
1672 A string representing the version number of the product. The
1673 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1674 last number represents the build number and will frequently change.
1675 </desc>
1676 </attribute>
1677
1678 <attribute name="revision" type="unsigned long" readonly="yes">
1679 <desc>
1680 The internal build revision number of the product.
1681 </desc>
1682 </attribute>
1683
1684 <attribute name="packageType" type="wstring" readonly="yes">
1685 <desc>
1686 A string representing the package type of this product. The
1687 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1688 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1689 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1690 this.
1691 </desc>
1692 </attribute>
1693
1694 <attribute name="homeFolder" type="wstring" readonly="yes">
1695 <desc>
1696 Full path to the directory where the global settings file,
1697 <tt>VirtualBox.xml</tt>, is stored.
1698
1699 In this version of VirtualBox, the value of this property is
1700 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1701 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1702 as determined by the host OS), and cannot be changed.
1703
1704 This path is also used as the base to resolve relative paths in
1705 places where relative paths are allowed (unless otherwise
1706 expressly indicated).
1707 </desc>
1708 </attribute>
1709
1710 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1711 <desc>
1712 Full name of the global settings file.
1713 The value of this property corresponds to the value of
1714 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1715 </desc>
1716 </attribute>
1717
1718 <attribute name="host" type="IHost" readonly="yes">
1719 <desc>Associated host object.</desc>
1720 </attribute>
1721
1722 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1723 <desc>Associated system information object.</desc>
1724 </attribute>
1725
1726 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1727 <desc>
1728 Array of machine objects registered within this VirtualBox instance.
1729 </desc>
1730 </attribute>
1731
1732 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1733 <desc>
1734 Array of medium objects known to this VirtualBox installation.
1735
1736 This array contains only base media. All differencing
1737 media of the given base medium can be enumerated using
1738 <link to="IMedium::children"/>.
1739 </desc>
1740 </attribute>
1741
1742 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1743 <desc>
1744 Array of CD/DVD image objects registered with this VirtualBox instance.
1745 </desc>
1746 </attribute>
1747
1748 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1749 <desc>
1750 Array of floppy image objects registered with this VirtualBox instance.
1751 </desc>
1752 </attribute>
1753
1754 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1755
1756 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1757
1758 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1759 <desc>
1760 Collection of global shared folders. Global shared folders are
1761 available to all virtual machines.
1762
1763 New shared folders are added to the collection using
1764 <link to="#createSharedFolder"/>. Existing shared folders can be
1765 removed using <link to="#removeSharedFolder"/>.
1766
1767 <note>
1768 In the current version of the product, global shared folders are not
1769 implemented and therefore this collection is always empty.
1770 </note>
1771 </desc>
1772 </attribute>
1773
1774 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1775 <desc>
1776 Associated performance collector object.
1777 </desc>
1778 </attribute>
1779
1780 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1781 <desc>
1782 dhcp server settings.
1783 </desc>
1784 </attribute>
1785
1786 <method name="createMachine">
1787 <desc>
1788 Creates a new virtual machine.
1789
1790 The new machine is created unregistered, with the initial configuration
1791 set according to the specified guest OS type. A typical sequence of
1792 actions to create a new virtual machine is as follows:
1793
1794 <ol>
1795 <li>
1796 Call this method to have a new machine created. The returned machine
1797 object will be "mutable" allowing to change any machine property.
1798 </li>
1799
1800 <li>
1801 Configure the machine using the appropriate attributes and methods.
1802 </li>
1803
1804 <li>
1805 Call <link to="IMachine::saveSettings" /> to write the settings
1806 to the machine's XML settings file. The configuration of the newly
1807 created machine will not be saved to disk until this method is
1808 called.
1809 </li>
1810
1811 <li>
1812 Call <link to="#registerMachine" /> to add the machine to the list
1813 of machines known to VirtualBox.
1814 </li>
1815 </ol>
1816
1817 You should specify valid name for the newly created machine when calling
1818 this method. See the <link to="IMachine::name"/> attribute description
1819 for more details about the machine name.
1820
1821 The specified guest OS type identifier must match an ID of one of known
1822 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1823 array.
1824
1825 Every machine has a <i>settings file</i> that is used to store
1826 the machine configuration. This file is stored in a directory called the
1827 <i>machine settings subfolder</i>. Both the settings subfolder and file
1828 will have a name that corresponds to the name of the virtual machine.
1829 You can specify where to create the machine setting subfolder using the
1830 @a baseFolder argument. The base folder can be absolute (full path) or
1831 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1832 directory</link>.
1833
1834 If @a baseFolder is a @c null or empty string (which is recommended), the
1835 <link to="ISystemProperties::defaultMachineFolder">default machine
1836 settings folder</link> will be used as a base folder for the created
1837 machine. Otherwise the given base folder will be used. In either case,
1838 the full path to the resulting settings file has the following
1839 structure:
1840 <pre>
1841 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1842 </pre>
1843
1844 Note that if the resulting settings file already exists, this method
1845 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1846
1847 Optionally, you may specify an UUID of to assign to the created machine.
1848 However, this is not recommended and you should normally pass an empty
1849 (@c null) UUID to this method so that a new UUID will be automatically
1850 generated for every created machine. You can use UUID
1851 00000000-0000-0000-0000-000000000000 as @c null value.
1852
1853 <note>
1854 There is no way to change the name of the settings file or
1855 subfolder of the created machine directly.
1856 </note>
1857
1858 <result name="VBOX_E_OBJECT_NOT_FOUND">
1859 @a osTypeId is invalid.
1860 </result>
1861 <result name="VBOX_E_FILE_ERROR">
1862 Resulting settings file name is invalid or the settings file already
1863 exists or could not be created due to an I/O error.
1864 </result>
1865 <result name="E_INVALIDARG">
1866 @a name is empty or @c null.
1867 </result>
1868 </desc>
1869
1870 <param name="name" type="wstring" dir="in">
1871 <desc>Machine name.</desc>
1872 </param>
1873 <param name="osTypeId" type="wstring" dir="in">
1874 <desc>Guest OS Type ID.</desc>
1875 </param>
1876 <param name="baseFolder" type="wstring" dir="in">
1877 <desc>Base machine folder (optional).</desc>
1878 </param>
1879 <param name="id" type="uuid" mod="string" dir="in">
1880 <desc>Machine UUID (optional).</desc>
1881 </param>
1882 <param name="machine" type="IMachine" dir="return">
1883 <desc>Created machine object.</desc>
1884 </param>
1885 </method>
1886
1887 <method name="createLegacyMachine">
1888 <desc>
1889 Creates a new virtual machine in "legacy" mode, using the specified
1890 settings file to store machine settings.
1891
1892 As opposed to machines created by <link to="#createMachine"/>,
1893 the settings file of the machine created in "legacy" mode is not
1894 automatically renamed when the machine name is changed -- it will always
1895 remain the same as specified in this method call.
1896
1897 The specified settings file name can be absolute (full path) or relative
1898 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1899 directory</link>. If the file name doesn't contain an extension, the
1900 default extension (.xml) will be appended.
1901
1902 Note that the configuration of the newly created machine is not
1903 saved to disk (and therefore no settings file is created)
1904 until <link to="IMachine::saveSettings"/> is called. If the
1905 specified settings file already exists, this method
1906 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1907
1908 See <link to="#createMachine"/> for more information.
1909
1910 @deprecated This method may be removed later. Use <link
1911 to="IVirtualBox::createMachine"/> instead.
1912
1913 <note>
1914 There is no way to change the name of the settings file
1915 of the machine created in "legacy" mode.
1916 </note>
1917
1918 <result name="VBOX_E_OBJECT_NOT_FOUND">
1919 @a osTypeId is invalid.
1920 </result>
1921 <result name="VBOX_E_FILE_ERROR">
1922 @a settingsFile is invalid or the settings file already exists or
1923 could not be created due to an I/O error.
1924 </result>
1925 <result name="E_INVALIDARG">
1926 @a name or @a settingsFile is empty or @c null.
1927 </result>
1928 </desc>
1929
1930 <param name="name" type="wstring" dir="in">
1931 <desc>Machine name.</desc>
1932 </param>
1933 <param name="osTypeId" type="wstring" dir="in">
1934 <desc>Machine OS Type ID.</desc>
1935 </param>
1936 <param name="settingsFile" type="wstring" dir="in">
1937 <desc>Name of the machine settings file.</desc>
1938 </param>
1939 <param name="id" type="uuid" mod="string" dir="in">
1940 <desc>Machine UUID (optional).</desc>
1941 </param>
1942 <param name="machine" type="IMachine" dir="return">
1943 <desc>Created machine object.</desc>
1944 </param>
1945 </method>
1946
1947 <method name="openMachine">
1948 <desc>
1949 Opens a virtual machine from the existing settings file.
1950 The opened machine remains unregistered until you call
1951 <link to="#registerMachine"/>.
1952
1953 The specified settings file name can be absolute
1954 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1955 VirtualBox home directory</link>. This file must exist
1956 and must be a valid machine settings file whose contents
1957 will be used to construct the machine object.
1958
1959 @deprecated Will be removed soon.
1960 <result name="VBOX_E_FILE_ERROR">
1961 Settings file name invalid, not found or sharing violation.
1962 </result>
1963 </desc>
1964 <param name="settingsFile" type="wstring" dir="in">
1965 <desc>
1966 Name of the machine settings file.
1967 </desc>
1968 </param>
1969 <param name="machine" type="IMachine" dir="return">
1970 <desc>Opened machine object.</desc>
1971 </param>
1972 <note>
1973 <link to="IMachine::settingsModified"/> will return
1974 @c false for the created machine, until any of machine settings
1975 are changed.
1976 </note>
1977 </method>
1978
1979 <method name="registerMachine">
1980 <desc>
1981
1982 Registers the machine previously created using
1983 <link to="#createMachine"/> or opened using
1984 <link to="#openMachine"/> within this VirtualBox installation. After
1985 successful method invocation, the
1986 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1987 to all registered callbacks.
1988
1989 <note>
1990 This method implicitly calls <link to="IMachine::saveSettings"/>
1991 to save all current machine settings before registering it.
1992 </note>
1993
1994 <result name="VBOX_E_OBJECT_NOT_FOUND">
1995 No matching virtual machine found.
1996 </result>
1997 <result name="VBOX_E_INVALID_OBJECT_STATE">
1998 Virtual machine was not created within this VirtualBox instance.
1999 </result>
2000
2001 </desc>
2002 <param name="machine" type="IMachine" dir="in"/>
2003 </method>
2004
2005 <method name="getMachine">
2006 <desc>
2007 Attempts to find a virtual machine given its UUID.
2008 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
2009 instead.
2010
2011 <result name="VBOX_E_OBJECT_NOT_FOUND">
2012 Could not find registered machine matching @a id.
2013 </result>
2014
2015 </desc>
2016 <param name="id" type="uuid" mod="string" dir="in"/>
2017 <param name="machine" type="IMachine" dir="return"/>
2018 </method>
2019
2020 <method name="findMachine">
2021 <desc>
2022 Attempts to find a virtual machine given its name.
2023 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
2024 instead.
2025
2026 <result name="VBOX_E_OBJECT_NOT_FOUND">
2027 Could not find registered machine matching @a name.
2028 </result>
2029
2030 </desc>
2031 <param name="name" type="wstring" dir="in"/>
2032 <param name="machine" type="IMachine" dir="return"/>
2033 </method>
2034
2035 <method name="unregisterMachine">
2036 <desc>
2037
2038 Unregisters the machine previously registered using
2039 <link to="#registerMachine"/>. After successful method invocation, the
2040 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
2041 to all registered callbacks.
2042
2043 <note>
2044 The specified machine must not be in the Saved state, have an open
2045 (or a spawning) direct session associated with it, have snapshots or
2046 have any medium attached.
2047 </note>
2048
2049 <note>
2050 This method implicitly calls <link to="IMachine::saveSettings"/> to
2051 save all current machine settings before unregistering it.
2052 </note>
2053
2054 <note>
2055 If the given machine is inaccessible (see
2056 <link to="IMachine::accessible"/>), it will be unregistered and
2057 fully uninitialized right afterwards. As a result, the returned
2058 machine object will be unusable and an attempt to call
2059 <b>any</b> method will return the "Object not ready" error.
2060 </note>
2061
2062 <result name="VBOX_E_OBJECT_NOT_FOUND">
2063 Could not find registered machine matching @a id.
2064 </result>
2065 <result name="VBOX_E_INVALID_VM_STATE">
2066 Machine is in Saved state.
2067 </result>
2068 <result name="VBOX_E_INVALID_OBJECT_STATE">
2069 Machine has snapshot or open session or medium attached.
2070 </result>
2071
2072 </desc>
2073 <param name="id" type="uuid" mod="string" dir="in">
2074 <desc>UUID of the machine to unregister.</desc>
2075 </param>
2076 <param name="machine" type="IMachine" dir="return">
2077 <desc>Unregistered machine object.</desc>
2078 </param>
2079 </method>
2080
2081 <method name="createAppliance">
2082 <desc>
2083 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2084 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2085 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2086 </desc>
2087 <param name="appliance" type="IAppliance" dir="return">
2088 <desc>New appliance.</desc>
2089 </param>
2090 </method>
2091
2092 <method name="createHardDisk">
2093 <desc>
2094 Creates a new base medium object that will use the given storage
2095 format and location for medium data.
2096
2097 Note that the actual storage unit is not created by this method. In
2098 order to do it, and before you are able to attach the created medium
2099 to virtual machines, you must call one of the following methods to
2100 allocate a format-specific storage unit at the specified location:
2101 <ul>
2102 <li><link to="IMedium::createBaseStorage"/></li>
2103 <li><link to="IMedium::createDiffStorage"/></li>
2104 </ul>
2105
2106 Some medium attributes, such as <link to="IMedium::id"/>, may
2107 remain uninitialized until the medium storage unit is successfully
2108 created by one of the above methods.
2109
2110 After the storage unit is successfully created, the medium gets
2111 remembered by this VirtualBox installation and will be accessible
2112 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2113 methods. Remembered base medium are also returned as part of
2114 the <link to="#hardDisks"/> array. See IMedium for more details.
2115
2116 The list of all storage formats supported by this VirtualBox
2117 installation can be obtained using
2118 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2119 attribute is empty or @c null then the default storage format
2120 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2121 be used for creating a storage unit of the medium.
2122
2123 Note that the format of the location string is storage format specific.
2124 See <link to="IMedium::location"/>, IMedium and
2125 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2126
2127 <result name="VBOX_E_OBJECT_NOT_FOUND">
2128 @a format identifier is invalid. See
2129 <link to="ISystemProperties::mediumFormats"/>.
2130 </result>
2131 <result name="VBOX_E_FILE_ERROR">
2132 @a location is a not valid file name (for file-based formats only).
2133 </result>
2134 </desc>
2135 <param name="format" type="wstring" dir="in">
2136 <desc>
2137 Identifier of the storage format to use for the new medium.
2138 </desc>
2139 </param>
2140 <param name="location" type="wstring" dir="in">
2141 <desc>
2142 Location of the storage unit for the new medium.
2143 </desc>
2144 </param>
2145 <param name="medium" type="IMedium" dir="return">
2146 <desc>Created medium object.</desc>
2147 </param>
2148 </method>
2149
2150 <method name="openHardDisk">
2151 <desc>
2152 Opens a medium from an existing location, optionally replacing
2153 the image UUID and/or parent UUID.
2154
2155 After the medium is successfully opened by this method, it gets
2156 remembered by (known to) this VirtualBox installation and will be
2157 accessible through <link to="#getHardDisk"/> and
2158 <link to="#findHardDisk"/> methods. Remembered base media
2159 are also returned as part of the <link to="#hardDisks"/> array and can
2160 be attached to virtual machines. See IMedium for more details.
2161
2162 If a differencing medium is to be opened by this method, the
2163 operation will succeed only if its parent medium and all ancestors,
2164 if any, are already known to this VirtualBox installation (for example,
2165 were opened by this method before).
2166
2167 This method tries to guess the storage format of the specified medium
2168 by reading medium data at the specified location.
2169
2170 If @a accessMode is ReadWrite (which it should be), the image is opened
2171 for read/write access and must have according permissions, as VirtualBox
2172 may actually write status information into the disk's metadata sections.
2173
2174 Note that write access is required for all typical image usage in VirtualBox,
2175 since VirtualBox may need to write metadata such as a UUID into the image.
2176 The only exception is opening a source image temporarily for copying and
2177 cloning when the image will quickly be closed again.
2178
2179 Note that the format of the location string is storage format specific.
2180 See <link to="IMedium::location"/>, IMedium and
2181 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2182
2183 <result name="VBOX_E_FILE_ERROR">
2184 Invalid medium storage file location or could not find the medium
2185 at the specified location.
2186 </result>
2187 <result name="VBOX_E_IPRT_ERROR">
2188 Could not get medium storage format.
2189 </result>
2190 <result name="E_INVALIDARG">
2191 Invalid medium storage format.
2192 </result>
2193
2194 </desc>
2195 <param name="location" type="wstring" dir="in">
2196 <desc>
2197 Location of the storage unit that contains medium data in one of
2198 the supported storage formats.
2199 </desc>
2200 </param>
2201 <param name="accessMode" type="AccessMode" dir="in">
2202 <desc>
2203 Determines whether to open the image in read/write or read-only mode.
2204 </desc>
2205 </param>
2206 <param name="setImageId" type="boolean" dir="in">
2207 <desc>
2208 Select whether a new image UUID is set or not.
2209 </desc>
2210 </param>
2211 <param name="imageId" type="uuid" mod="string" dir="in">
2212 <desc>
2213 New UUID for the image. If an empty string is passed, then a new
2214 UUID is automatically created. Specifying a zero UUIDs is not valid.
2215 </desc>
2216 </param>
2217 <param name="setParentId" type="boolean" dir="in">
2218 <desc>
2219 Select whether a new parent UUID is set or not.
2220 </desc>
2221 </param>
2222 <param name="parentId" type="uuid" mod="string" dir="in">
2223 <desc>
2224 New parent UUID for the image. If an empty string is passed, then a
2225 new UUID is automatically created, provided @a setParentId is
2226 @c true. A zero UUID is valid.
2227 </desc>
2228 </param>
2229 <param name="medium" type="IMedium" dir="return">
2230 <desc>Opened medium object.</desc>
2231 </param>
2232 </method>
2233
2234 <method name="getHardDisk" const="yes">
2235 <desc>
2236 Returns a medium with the given UUID.
2237
2238 The medium with the given UUID must be known to this VirtualBox
2239 installation, i.e. it must be previously created by
2240 <link to="#createHardDisk"/> or opened by <link
2241 to="#openHardDisk"/>, or attached to some known virtual machine.
2242
2243 <result name="VBOX_E_OBJECT_NOT_FOUND">
2244 No medium object matching @a id found.
2245 </result>
2246
2247 </desc>
2248 <param name="id" type="uuid" mod="string" dir="in">
2249 <desc>UUID of the medium to look for.</desc>
2250 </param>
2251 <param name="medium" type="IMedium" dir="return">
2252 <desc>Found medium object.</desc>
2253 </param>
2254 </method>
2255
2256 <method name="findHardDisk">
2257 <desc>
2258 Returns a medium that uses the given location to store medium data.
2259
2260 The given medium must be known to this VirtualBox installation, i.e.
2261 it must be previously created by
2262 <link to="#createHardDisk"/> or opened by <link
2263 to="#openHardDisk"/>, or attached to some known virtual machine.
2264
2265 The search is done by comparing the value of the @a location argument to
2266 the <link to="IMedium::location"/> attribute of each known medium.
2267
2268 For locations represented by file names in the host's file system, the
2269 requested location can be a path relative to the
2270 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2271 only a file name without any path is given, the
2272 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2273 folder</link> will be prepended to the file name before searching. Note
2274 that on case sensitive file systems, a case sensitive comparison is
2275 performed, otherwise the case of symbols in the file path is ignored.
2276
2277 <result name="VBOX_E_OBJECT_NOT_FOUND">
2278 No medium object matching @a location found.
2279 </result>
2280
2281 </desc>
2282 <param name="location" type="wstring" dir="in">
2283 <desc>Location string to search for.</desc>
2284 </param>
2285 <param name="medium" type="IMedium" dir="return">
2286 <desc>Found medium object.</desc>
2287 </param>
2288 </method>
2289
2290 <method name="openDVDImage">
2291 <desc>
2292 Opens a CD/DVD image contained in the specified file of the supported
2293 format and assigns it the given UUID.
2294
2295 After the image is successfully opened by this method, it gets
2296 remembered by (known to) this VirtualBox installation and will be
2297 accessible through <link to="#getDVDImage"/> and
2298 <link to="#findDVDImage"/> methods. Remembered images are also
2299 returned as part of the <link to="#DVDImages"/> array and can be mounted
2300 to virtual machines. See IMedium for more details.
2301
2302 See <link to="IMedium::location"/> to get more details about the format
2303 of the location string.
2304
2305 <note>
2306 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2307 </note>
2308
2309 <result name="VBOX_E_FILE_ERROR">
2310 Invalid CD/DVD image file location or could not find the CD/DVD
2311 image at the specified location.
2312 </result>
2313 <result name="VBOX_E_INVALID_OBJECT_STATE">
2314 CD/DVD image already exists in the media registry.
2315 </result>
2316
2317 </desc>
2318 <param name="location" type="wstring" dir="in">
2319 <desc>
2320 Full path to the file that contains a valid CD/DVD image.
2321 </desc>
2322 </param>
2323 <param name="id" type="uuid" mod="string" dir="in">
2324 <desc>
2325 UUID to assign to the given image within this VirtualBox installation.
2326 If an empty (@c null) UUID is specified, the system will randomly
2327 generate a new UUID.
2328 </desc>
2329 </param>
2330 <param name="image" type="IMedium" dir="return">
2331 <desc>Opened CD/DVD image object.</desc>
2332 </param>
2333 </method>
2334
2335 <method name="getDVDImage">
2336 <desc>
2337 Returns a CD/DVD image with the given UUID.
2338
2339 The image with the given UUID must be known to this VirtualBox
2340 installation, i.e. it must be previously opened by <link
2341 to="#openDVDImage"/>, or mounted to some known virtual machine.
2342
2343 <result name="VBOX_E_OBJECT_NOT_FOUND">
2344 No matching DVD image found in the media registry.
2345 </result>
2346
2347 </desc>
2348 <param name="id" type="uuid" mod="string" dir="in">
2349 <desc>UUID of the image to look for.</desc>
2350 </param>
2351 <param name="image" type="IMedium" dir="return">
2352 <desc>Found CD/DVD image object.</desc>
2353 </param>
2354 </method>
2355
2356 <method name="findDVDImage">
2357 <desc>
2358 Returns a CD/DVD image with the given image location.
2359
2360 The image with the given UUID must be known to this VirtualBox
2361 installation, i.e. it must be previously opened by <link
2362 to="#openDVDImage"/>, or mounted to some known virtual machine.
2363
2364 The search is done by comparing the value of the @a location argument to
2365 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2366
2367 The requested location can be a path relative to the
2368 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2369 only a file name without any path is given, the
2370 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2371 folder</link> will be prepended to the file name before searching. Note
2372 that on case sensitive file systems, a case sensitive comparison is
2373 performed, otherwise the case in the file path is ignored.
2374
2375 <result name="VBOX_E_FILE_ERROR">
2376 Invalid image file location.
2377 </result>
2378 <result name="VBOX_E_OBJECT_NOT_FOUND">
2379 No matching DVD image found in the media registry.
2380 </result>
2381
2382 </desc>
2383 <param name="location" type="wstring" dir="in">
2384 <desc>CD/DVD image file path to look for.</desc>
2385 </param>
2386 <param name="image" type="IMedium" dir="return">
2387 <desc>Found CD/DVD image object.</desc>
2388 </param>
2389 </method>
2390
2391 <method name="openFloppyImage">
2392 <desc>
2393 Opens a floppy image contained in the specified file of the supported
2394 format and assigns it the given UUID.
2395
2396 After the image is successfully opened by this method, it gets
2397 remembered by (known to) this VirtualBox installation and will be
2398 accessible through <link to="#getFloppyImage"/> and
2399 <link to="#findFloppyImage"/> methods. Remembered images are also
2400 returned as part of the <link to="#floppyImages"/> array and can be
2401 mounted to virtual machines. See IMedium for more details.
2402
2403 See <link to="IMedium::location"/> to get more details about the format
2404 of the location string.
2405
2406 <result name="VBOX_E_FILE_ERROR">
2407 Invalid floppy image file location or could not find the floppy
2408 image at the specified location.
2409 </result>
2410 <result name="VBOX_E_INVALID_OBJECT_STATE">
2411 Floppy image already exists in the media registry.
2412 </result>
2413
2414 <note>
2415 Currently, only raw floppy images are supported by VirtualBox.
2416 </note>
2417 </desc>
2418 <param name="location" type="wstring" dir="in">
2419 <desc>
2420 Full path to the file that contains a valid floppy image.
2421 </desc>
2422 </param>
2423 <param name="id" type="uuid" mod="string" dir="in">
2424 <desc>
2425 UUID to assign to the given image file within this VirtualBox
2426 installation. If an empty (@c null) UUID is specified, the system will
2427 randomly generate a new UUID.
2428 </desc>
2429 </param>
2430 <param name="image" type="IMedium" dir="return">
2431 <desc>Opened floppy image object.</desc>
2432 </param>
2433 </method>
2434
2435 <method name="getFloppyImage">
2436 <desc>
2437 Returns a floppy image with the given UUID.
2438
2439 The image with the given UUID must be known to this VirtualBox
2440 installation, i.e. it must be previously opened by <link
2441 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2442
2443 <result name="VBOX_E_OBJECT_NOT_FOUND">
2444 No matching floppy image found in the media registry.
2445 </result>
2446
2447 </desc>
2448 <param name="id" type="uuid" mod="string" dir="in">
2449 <desc>UUID of the image to look for.</desc>
2450 </param>
2451 <param name="image" type="IMedium" dir="return">
2452 <desc>Found floppy image object.</desc>
2453 </param>
2454 </method>
2455
2456 <method name="findFloppyImage">
2457 <desc>
2458 Returns a floppy image with the given image location.
2459
2460 The image with the given UUID must be known to this VirtualBox
2461 installation, i.e. it must be previously opened by <link
2462 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2463
2464 The search is done by comparing the value of the @a location argument to
2465 the <link to="IMedium::location"/> attribute of each known floppy image.
2466
2467 The requested location can be a path relative to the
2468 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2469 only a file name without any path is given, the
2470 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2471 folder</link> will be prepended to the file name before searching. Note
2472 that on case sensitive file systems, a case sensitive comparison is
2473 performed, otherwise the case of symbols in the file path is ignored.
2474
2475 <result name="VBOX_E_FILE_ERROR">
2476 Invalid image file location.
2477 </result>
2478 <result name="VBOX_E_OBJECT_NOT_FOUND">
2479 No matching floppy image found in the media registry.
2480 </result>
2481
2482 </desc>
2483 <param name="location" type="wstring" dir="in">
2484 <desc>Floppy image file path to look for.</desc>
2485 </param>
2486 <param name="image" type="IMedium" dir="return">
2487 <desc>Found floppy image object.</desc>
2488 </param>
2489 </method>
2490
2491 <method name="getGuestOSType">
2492 <desc>
2493 Returns an object describing the specified guest OS type.
2494
2495 The requested guest OS type is specified using a string which is a
2496 mnemonic identifier of the guest operating system, such as
2497 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2498 particular virtual machine can be read or set using the
2499 <link to="IMachine::OSTypeId"/> attribute.
2500
2501 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2502 available guest OS type objects. Each object has an
2503 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2504 the guest OS this object describes.
2505
2506 <result name="E_INVALIDARG">
2507 @a id is not a valid Guest OS type.
2508 </result>
2509
2510 </desc>
2511 <param name="id" type="uuid" mod="string" dir="in">
2512 <desc>Guest OS type ID string.</desc>
2513 </param>
2514 <param name="type" type="IGuestOSType" dir="return">
2515 <desc>Guest OS type object.</desc>
2516 </param>
2517 </method>
2518
2519 <method name="createSharedFolder">
2520 <desc>
2521 Creates a new global shared folder by associating the given logical
2522 name with the given host path, adds it to the collection of shared
2523 folders and starts sharing it. Refer to the description of
2524 <link to="ISharedFolder"/> to read more about logical names.
2525 <note>
2526 In the current implementation, this operation is not
2527 implemented.
2528 </note>
2529 </desc>
2530 <param name="name" type="wstring" dir="in">
2531 <desc>Unique logical name of the shared folder.</desc>
2532 </param>
2533 <param name="hostPath" type="wstring" dir="in">
2534 <desc>Full path to the shared folder in the host file system.</desc>
2535 </param>
2536 <param name="writable" type="boolean" dir="in">
2537 <desc>Whether the share is writable or readonly</desc>
2538 </param>
2539 </method>
2540
2541 <method name="removeSharedFolder">
2542 <desc>
2543 Removes the global shared folder with the given name previously
2544 created by <link to="#createSharedFolder"/> from the collection of
2545 shared folders and stops sharing it.
2546 <note>
2547 In the current implementation, this operation is not
2548 implemented.
2549 </note>
2550 </desc>
2551 <param name="name" type="wstring" dir="in">
2552 <desc>Logical name of the shared folder to remove.</desc>
2553 </param>
2554 </method>
2555
2556 <method name="getExtraDataKeys">
2557 <desc>
2558 Returns an array representing the global extra data keys which currently
2559 have values defined.
2560 </desc>
2561 <param name="value" type="wstring" dir="return" safearray="yes">
2562 <desc>Array of extra data keys.</desc>
2563 </param>
2564 </method>
2565
2566 <method name="getExtraData">
2567 <desc>
2568 Returns associated global extra data.
2569
2570 If the requested data @a key does not exist, this function will
2571 succeed and return an empty string in the @a value argument.
2572
2573 <result name="VBOX_E_FILE_ERROR">
2574 Settings file not accessible.
2575 </result>
2576 <result name="VBOX_E_XML_ERROR">
2577 Could not parse the settings file.
2578 </result>
2579
2580 </desc>
2581 <param name="key" type="wstring" dir="in">
2582 <desc>Name of the data key to get.</desc>
2583 </param>
2584 <param name="value" type="wstring" dir="return">
2585 <desc>Value of the requested data key.</desc>
2586 </param>
2587 </method>
2588
2589 <method name="setExtraData">
2590 <desc>
2591 Sets associated global extra data.
2592
2593 If you pass @c null or empty string as a key @a value, the given @a key
2594 will be deleted.
2595
2596 <note>
2597 Before performing the actual data change, this method will ask all
2598 registered callbacks using the
2599 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2600 notification for a permission. If one of the callbacks refuses the
2601 new value, the change will not be performed.
2602 </note>
2603 <note>
2604 On success, the
2605 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2606 is called to inform all registered callbacks about a successful data
2607 change.
2608 </note>
2609
2610 <result name="VBOX_E_FILE_ERROR">
2611 Settings file not accessible.
2612 </result>
2613 <result name="VBOX_E_XML_ERROR">
2614 Could not parse the settings file.
2615 </result>
2616 <result name="E_ACCESSDENIED">
2617 Modification request refused.
2618 </result>
2619
2620 </desc>
2621 <param name="key" type="wstring" dir="in">
2622 <desc>Name of the data key to set.</desc>
2623 </param>
2624 <param name="value" type="wstring" dir="in">
2625 <desc>Value to assign to the key.</desc>
2626 </param>
2627 </method>
2628
2629 <method name="openSession">
2630 <desc>
2631 Opens a new direct session with the given virtual machine.
2632
2633 A direct session acts as a local lock on the given VM.
2634 There can be only one direct session open at a time for every
2635 virtual machine, protecting the VM from being manipulated by
2636 conflicting actions from different processes. Only after a
2637 direct session has been opened, one can change all VM settings
2638 and execute the VM in the process space of the session object.
2639
2640 Sessions therefore can be compared to mutex semaphores that
2641 lock a given VM for modification and execution.
2642 See <link to="ISession">ISession</link> for details.
2643
2644 <note>Unless you are writing a new VM frontend, you will not
2645 want to execute a VM in the current process. To spawn a new
2646 process that executes a VM, use
2647 <link to="IVirtualBox::openRemoteSession" />
2648 instead.</note>
2649
2650 Upon successful return, the session object can be used to
2651 get access to the machine and to the VM console.
2652
2653 In VirtualBox terminology, the machine becomes "mutable" after
2654 a session has been opened. Note that the "mutable" machine
2655 object, on which you may invoke IMachine methods to change its
2656 settings, will be a different object from the immutable IMachine
2657 objects returned by various IVirtualBox methods. To obtain a
2658 mutable IMachine object (upon which you can invoke settings methods),
2659 use the <link to="ISession::machine" /> attribute.
2660
2661 One must always call <link to="ISession::close" /> to release the
2662 lock on the machine, or the machine's state will eventually be
2663 set to "Aborted".
2664
2665 In other words, to change settings on a machine, the following
2666 sequence is typically performed:
2667
2668 <ol>
2669 <li>Call this method (openSession) to have a machine locked for
2670 the current session.</li>
2671
2672 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2673
2674 <li>Change the settings of the machine.</li>
2675
2676 <li>Call <link to="IMachine::saveSettings" />.</li>
2677
2678 <li>Close the session by calling <link to="ISession::close"/>.</li>
2679 </ol>
2680
2681 <result name="E_UNEXPECTED">
2682 Virtual machine not registered.
2683 </result>
2684 <result name="E_ACCESSDENIED">
2685 Process not started by OpenRemoteSession.
2686 </result>
2687 <result name="VBOX_E_OBJECT_NOT_FOUND">
2688 No matching virtual machine found.
2689 </result>
2690 <result name="VBOX_E_INVALID_OBJECT_STATE">
2691 Session already open or being opened.
2692 </result>
2693 <result name="VBOX_E_VM_ERROR">
2694 Failed to assign machine to session.
2695 </result>
2696
2697 </desc>
2698 <param name="session" type="ISession" dir="in">
2699 <desc>
2700 Session object that will represent the opened session after
2701 successful method invocation. This object must not represent
2702 the already open session.
2703 <note>
2704 This session will be automatically closed if the
2705 VirtualBox server is terminated for some reason.
2706 </note>
2707 </desc>
2708 </param>
2709 <param name="machineId" type="uuid" mod="string" dir="in">
2710 <desc>ID of the virtual machine to open a session with.</desc>
2711 </param>
2712 </method>
2713
2714 <method name="openRemoteSession">
2715 <desc>
2716 Spawns a new process that executes a virtual machine (called a
2717 "remote session").
2718
2719 Opening a remote session causes the VirtualBox server to start a new
2720 process that opens a direct session with the given VM. As a result, the
2721 VM is locked by that direct session in the new process, preventing
2722 conflicting changes from other processes. Since sessions act as locks
2723 that prevent conflicting changes, one cannot open a remote session
2724 for a VM that already has another open session (direct or remote), or
2725 is currently in the process of opening one (see <link
2726 to="IMachine::sessionState"/>).
2727
2728 While the remote session still provides some level of control over the
2729 VM execution to the caller (using the <link to="IConsole" /> interface),
2730 not all VM settings are available for modification within the remote
2731 session context.
2732
2733 This operation can take some time (a new VM is started in a new process,
2734 for which memory and other resources need to be set up). Because of this,
2735 an <link to="IProgress" /> is returned to allow the caller to wait for this
2736 asynchronous operation to be completed. Until then, the remote session
2737 object remains in the closed state, and accessing the machine or its
2738 console through it is invalid. It is recommended to use
2739 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2740 completion. Completion is signalled when the VM is powered on. Error
2741 messages etc. can be queried via the progress object, if available.
2742
2743 As with all <link to="ISession" /> objects, it is recommended to call
2744 <link to="ISession::close" /> on the local session object once openRemoteSession()
2745 has been called. However, the session's state (see <link to="ISession::state" />)
2746 will not return to "Closed" until the remote session has also closed (i.e.
2747 until the VM is no longer running). In that case, however, the state of
2748 the session will automatically change back to "Closed".
2749
2750 Currently supported session types (values of the @a type
2751 argument) are:
2752 <ul>
2753 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2754 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2755 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2756 </ul>
2757
2758 The @a environment argument is a string containing definitions of
2759 environment variables in the following format:
2760 @code
2761 NAME[=VALUE]\n
2762 NAME[=VALUE]\n
2763 ...
2764 @endcode
2765 where <tt>\\n</tt> is the new line character. These environment
2766 variables will be appended to the environment of the VirtualBox server
2767 process. If an environment variable exists both in the server process
2768 and in this list, the value from this list takes precedence over the
2769 server's variable. If the value of the environment variable is
2770 omitted, this variable will be removed from the resulting environment.
2771 If the environment string is @c null or empty, the server environment
2772 is inherited by the started process as is.
2773
2774 <see>openExistingSession</see>
2775
2776 <result name="E_UNEXPECTED">
2777 Virtual machine not registered.
2778 </result>
2779 <result name="E_INVALIDARG">
2780 Invalid session type @a type.
2781 </result>
2782 <result name="VBOX_E_OBJECT_NOT_FOUND">
2783 No machine matching @a machineId found.
2784 </result>
2785 <result name="VBOX_E_INVALID_OBJECT_STATE">
2786 Session already open or being opened.
2787 </result>
2788 <result name="VBOX_E_IPRT_ERROR">
2789 Launching process for machine failed.
2790 </result>
2791 <result name="VBOX_E_VM_ERROR">
2792 Failed to assign machine to session.
2793 </result>
2794
2795 </desc>
2796 <param name="session" type="ISession" dir="in">
2797 <desc>
2798 Session object that will represent the opened remote session
2799 after successful method invocation (this object must not
2800 represent an already open session).
2801 </desc>
2802 </param>
2803 <param name="machineId" type="uuid" mod="string" dir="in">
2804 <desc>ID of the virtual machine to open a session with.</desc>
2805 </param>
2806 <param name="type" type="wstring" dir="in">
2807 <desc>
2808 Type of the remote session (case sensitive).
2809 </desc>
2810 </param>
2811 <param name="environment" type="wstring" dir="in">
2812 <desc>
2813 Environment to pass to the opened session.
2814 </desc>
2815 </param>
2816 <param name="progress" type="IProgress" dir="return">
2817 <desc>Progress object to track the operation completion.</desc>
2818 </param>
2819 </method>
2820
2821 <method name="openExistingSession">
2822 <desc>
2823 Opens a new remote session with the virtual machine for
2824 which a direct session is already open.
2825
2826 The remote session provides some level of control over the VM
2827 execution (using the IConsole interface) to the caller; however,
2828 within the remote session context, not all VM settings are available
2829 for modification.
2830
2831 As opposed to <link to="#openRemoteSession"/>, the number of
2832 remote sessions opened this way is not limited by the API
2833
2834 <note>
2835 It is an error to open a remote session with the machine that
2836 doesn't have an open direct session.
2837 </note>
2838
2839 <result name="E_UNEXPECTED">
2840 Virtual machine not registered.
2841 </result>
2842 <result name="VBOX_E_OBJECT_NOT_FOUND">
2843 No machine matching @a machineId found.
2844 </result>
2845 <result name="VBOX_E_INVALID_OBJECT_STATE">
2846 Session already open or being opened.
2847 </result>
2848 <result name="VBOX_E_INVALID_SESSION_STATE">
2849 Direct session state not Open.
2850 </result>
2851 <result name="VBOX_E_VM_ERROR">
2852 Failed to get console object from direct session or assign
2853 machine to session.
2854 </result>
2855
2856 <see>openRemoteSession</see>
2857 </desc>
2858 <param name="session" type="ISession" dir="in">
2859 <desc>
2860 Session object that will represent the open remote session
2861 after successful method invocation. This object must not
2862 represent an already open session.
2863 <note>
2864 This session will be automatically closed when the peer
2865 (direct) session dies or gets closed.
2866 </note>
2867 </desc>
2868 </param>
2869 <param name="machineId" type="uuid" mod="string" dir="in">
2870 <desc>ID of the virtual machine to open a session with.</desc>
2871 </param>
2872 </method>
2873
2874 <method name="registerCallback">
2875 <desc>
2876 Registers a new global VirtualBox callback. The methods of the given
2877 callback object will be called by VirtualBox when an appropriate
2878 event occurs.
2879
2880 <result name="E_INVALIDARG">
2881 A @c null callback cannot be registered.
2882 </result>
2883
2884 </desc>
2885 <param name="callback" type="IVirtualBoxCallback" dir="in">
2886 <desc>Callback object to register.</desc>
2887 </param>
2888 </method>
2889
2890 <method name="unregisterCallback">
2891 <desc>
2892 Unregisters the previously registered global VirtualBox callback.
2893
2894 <result name="E_INVALIDARG">
2895 Specified @a callback not registered.
2896 </result>
2897
2898 </desc>
2899 <param name="callback" type="IVirtualBoxCallback" dir="in">
2900 <desc>Callback object to unregister.</desc>
2901 </param>
2902 </method>
2903
2904 <method name="waitForPropertyChange">
2905 <desc>
2906 Blocks the caller until any of the properties represented by the
2907 @a what argument changes the value or until the given timeout interval
2908 expires.
2909
2910 The @a what argument is a comma separated list of property masks that
2911 describe properties the caller is interested in. The property mask is
2912 a string in the following format:
2913
2914 <pre>
2915 [[group.]subgroup.]name
2916 </pre>
2917
2918 where @c name is the property name and @c group, @c subgroup are zero
2919 or more property group specifiers. Each element (group or name) in
2920 the property mask may be either a Latin string or an asterisk symbol
2921 (@c "*") which is used to match any string for the given element. A
2922 property mask that doesn't contain asterisk symbols represents a
2923 single fully qualified property name.
2924
2925 Groups in the fully qualified property name go from more generic (the
2926 left-most part) to more specific (the right-most part). The first
2927 element is usually a name of the object the property belongs to. The
2928 second element may be either a property name, or a child object name,
2929 or an index if the preceding element names an object which is one of
2930 many objects of the same type. This way, property names form a
2931 hierarchy of properties. Here are some examples of property names:
2932
2933 <table>
2934 <tr>
2935 <td><tt>VirtualBox.version</tt></td>
2936 <td><link to="IVirtualBox::version"/> property</td>
2937 </tr>
2938 <tr>
2939 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2940 <td><link to="IMachine::name"/> property of the machine with the
2941 given UUID</td>
2942 </tr>
2943 </table>
2944
2945 Most property names directly correspond to the properties of objects
2946 (components) provided by the VirtualBox library and may be used to
2947 track changes to these properties. However, there may be
2948 pseudo-property names that don't correspond to any existing object's
2949 property directly, as well as there may be object properties that
2950 don't have a corresponding property name that is understood by this
2951 method, and therefore changes to such properties cannot be
2952 tracked. See individual object's property descriptions to get a
2953 fully qualified property name that can be used with this method (if
2954 any).
2955
2956 There is a special property mask @c "*" (i.e. a string consisting of a
2957 single asterisk symbol) that can be used to match all properties.
2958 Below are more examples of property masks:
2959
2960 <table>
2961 <tr>
2962 <td><tt>VirtualBox.*</tt></td>
2963 <td>Track all properties of the VirtualBox object</td>
2964 </tr>
2965 <tr>
2966 <td><tt>Machine.*.name</tt></td>
2967 <td>Track changes to the <link to="IMachine::name"/> property of
2968 all registered virtual machines</td>
2969 </tr>
2970 </table>
2971
2972 <note>
2973 This function is not implemented in the current version of the
2974 product.
2975 </note>
2976 </desc>
2977 <param name="what" type="wstring" dir="in">
2978 <desc>Comma separated list of property masks.</desc>
2979 </param>
2980 <param name="timeout" type="unsigned long" dir="in">
2981 <desc>
2982 Wait timeout in milliseconds.
2983 Specify -1 for an indefinite wait.
2984 </desc>
2985 </param>
2986 <param name="changed" type="wstring" dir="out">
2987 <desc>
2988 Comma separated list of properties that have been changed and caused
2989 this method to return to the caller.
2990 </desc>
2991 </param>
2992 <param name="values" type="wstring" dir="out">
2993 <desc>Reserved, not currently used.</desc>
2994 </param>
2995 </method>
2996
2997 <!--method name="createDHCPServerForInterface">
2998 <desc>
2999 Creates a dhcp server settings to be used for the given interface
3000 <result name="E_INVALIDARG">
3001 Host network interface @a name already exists.
3002 </result>
3003 </desc>
3004 <param name="interface" type="IHostNetworkInterface" dir="in">
3005 <desc>Network Interface</desc>
3006 </param>
3007 <param name="server" type="IDHCPServer" dir="out">
3008 <desc>Dhcp server settings</desc>
3009 </param>
3010 </method-->
3011
3012 <method name="createDHCPServer">
3013 <desc>
3014 Creates a dhcp server settings to be used for the given internal network name
3015 <result name="E_INVALIDARG">
3016 Host network interface @a name already exists.
3017 </result>
3018 </desc>
3019 <param name="name" type="wstring" dir="in">
3020 <desc>server name</desc>
3021 </param>
3022 <param name="server" type="IDHCPServer" dir="return">
3023 <desc>Dhcp server settings</desc>
3024 </param>
3025 </method>
3026
3027 <method name="findDHCPServerByNetworkName">
3028 <desc>
3029 Searches a dhcp server settings to be used for the given internal network name
3030 <result name="E_INVALIDARG">
3031 Host network interface @a name already exists.
3032 </result>
3033
3034 </desc>
3035 <param name="name" type="wstring" dir="in">
3036 <desc>server name</desc>
3037 </param>
3038 <param name="server" type="IDHCPServer" dir="return">
3039 <desc>Dhcp server settings</desc>
3040 </param>
3041 </method>
3042
3043 <!--method name="findDHCPServerForInterface">
3044 <desc>
3045 Searches a dhcp server settings to be used for the given interface
3046 <result name="E_INVALIDARG">
3047 Host network interface @a name already exists.
3048 </result>
3049 </desc>
3050 <param name="interface" type="IHostNetworkInterface" dir="in">
3051 <desc>Network Interface</desc>
3052 </param>
3053 <param name="server" type="IDHCPServer" dir="out">
3054 <desc>Dhcp server settings</desc>
3055 </param>
3056 </method-->
3057
3058 <method name="removeDHCPServer">
3059 <desc>
3060 Removes the dhcp server settings
3061 <result name="E_INVALIDARG">
3062 Host network interface @a name already exists.
3063 </result>
3064 </desc>
3065 <param name="server" type="IDHCPServer" dir="in">
3066 <desc>Dhcp server settings to be removed</desc>
3067 </param>
3068 </method>
3069
3070
3071 <method name="checkFirmwarePresent">
3072 <desc>
3073 Check if this VirtualBox installation has a firmware
3074 of the given type available, either system-wide or per-user.
3075 Optionally, this may return a hint where this firmware can be
3076 downloaded from.
3077 </desc>
3078 <param name="firmwareType" type="FirmwareType" dir="in">
3079 <desc>
3080 Type of firmware to check.
3081 </desc>
3082 </param>
3083 <param name="version" type="wstring" dir="in">
3084 <desc>Expected version number, usually empty string (presently ignored).</desc>
3085 </param>
3086
3087 <param name="url" type="wstring" dir="out">
3088 <desc>
3089 Suggested URL to download this firmware from.
3090 </desc>
3091 </param>
3092
3093 <param name="file" type="wstring" dir="out">
3094 <desc>
3095 Filename of firmware, only valid if result == TRUE.
3096 </desc>
3097 </param>
3098
3099 <param name="result" type="boolean" dir="return">
3100 <desc>If firmware of this type and version is available.</desc>
3101 </param>
3102 </method>
3103
3104 </interface>
3105
3106 <!--
3107 // IVFSExplorer
3108 /////////////////////////////////////////////////////////////////////////
3109 -->
3110
3111 <enum
3112 name="VFSType"
3113 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3114 >
3115 <desc>
3116 Virtual file systems supported by VFSExplorer.
3117 </desc>
3118
3119 <const name="File" value="1" />
3120 <const name="Cloud" value="2" />
3121 <const name="S3" value="3" />
3122 <const name="WebDav" value="4" />
3123 </enum>
3124
3125 <enum
3126 name="VFSFileType"
3127 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3128 >
3129 <desc>
3130 File types known by VFSExplorer.
3131 </desc>
3132
3133 <const name="Unknown" value="1" />
3134 <const name="Fifo" value="2" />
3135 <const name="DevChar" value="3" />
3136 <const name="Directory" value="4" />
3137 <const name="DevBlock" value="5" />
3138 <const name="File" value="6" />
3139 <const name="SymLink" value="7" />
3140 <const name="Socket" value="8" />
3141 <const name="WhiteOut" value="9" />
3142 </enum>
3143
3144 <interface
3145 name="IVFSExplorer" extends="$unknown"
3146 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3147 wsmap="managed"
3148 >
3149 <desc>
3150 The VFSExplorer interface unifies access to different file system
3151 types. This includes local file systems as well remote file systems like
3152 S3. For a list of supported types see <link to="VFSType" />.
3153 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3154 </desc>
3155
3156 <attribute name="path" type="wstring" readonly="yes">
3157 <desc>Returns the current path in the virtual file system.</desc>
3158 </attribute>
3159
3160 <attribute name="type" type="VFSType" readonly="yes">
3161 <desc>Returns the file system type which is currently in use.</desc>
3162 </attribute>
3163
3164 <method name="update">
3165 <desc>Updates the internal list of files/directories from the
3166 current directory level. Use <link to="#entryList" /> to get the full list
3167 after a call to this method.</desc>
3168
3169 <param name="aProgress" type="IProgress" dir="return">
3170 <desc>Progress object to track the operation completion.</desc>
3171 </param>
3172 </method>
3173
3174 <method name="cd">
3175 <desc>Change the current directory level.</desc>
3176
3177 <param name="aDir" type="wstring" dir="in">
3178 <desc>The name of the directory to go in.</desc>
3179 </param>
3180
3181 <param name="aProgress" type="IProgress" dir="return">
3182 <desc>Progress object to track the operation completion.</desc>
3183 </param>
3184 </method>
3185
3186 <method name="cdUp">
3187 <desc>Go one directory upwards from the current directory level.</desc>
3188
3189 <param name="aProgress" type="IProgress" dir="return">
3190 <desc>Progress object to track the operation completion.</desc>
3191 </param>
3192 </method>
3193
3194 <method name="entryList">
3195 <desc>Returns a list of files/directories after a call to <link
3196 to="#update" />. The user is responsible for keeping this internal
3197 list up do date.</desc>
3198
3199 <param name="aNames" type="wstring" safearray="yes" dir="out">
3200 <desc>The list of names for the entries.</desc>
3201 </param>
3202
3203 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3204 <desc>The list of types for the entries.</desc>
3205 </param>
3206 </method>
3207
3208 <method name="exists">
3209 <desc>Checks if the given file list exists in the current directory
3210 level.</desc>
3211
3212 <param name="aNames" type="wstring" safearray="yes" dir="in">
3213 <desc>The names to check.</desc>
3214 </param>
3215
3216 <param name="aExists" type="wstring" safearray="yes" dir="return">
3217 <desc>The names which exist.</desc>
3218 </param>
3219 </method>
3220
3221 <method name="remove">
3222 <desc>Deletes the given files in the current directory level.</desc>
3223
3224 <param name="aNames" type="wstring" safearray="yes" dir="in">
3225 <desc>The names to remove.</desc>
3226 </param>
3227
3228 <param name="aProgress" type="IProgress" dir="return">
3229 <desc>Progress object to track the operation completion.</desc>
3230 </param>
3231 </method>
3232
3233 </interface>
3234
3235 <!--
3236 // IAppliance
3237 /////////////////////////////////////////////////////////////////////////
3238 -->
3239
3240 <interface
3241 name="IAppliance" extends="$unknown"
3242 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3243 wsmap="managed"
3244 >
3245 <desc>
3246 Represents a platform-independent appliance in OVF format. An instance of this is returned
3247 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3248 appliances with VirtualBox.
3249
3250 The OVF standard suggests two different physical file formats:
3251
3252 <ol>
3253 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3254 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3255 this descriptor file references other files, as OVF appliances distributed as a set of
3256 files most likely do, those files must be in the same directory as the descriptor file.</li>
3257
3258 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3259 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3260 files and optionally other files.
3261
3262 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3263 be added with a later version.</li>
3264 </ol>
3265
3266 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3267 <link to="IMachine" /> involves the following sequence of API calls:
3268
3269 <ol>
3270 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3271 </li>
3272
3273 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3274 would like to import. So long as this file is syntactically valid, this will succeed
3275 and return an instance of IAppliance that contains the parsed data from the OVF file.
3276 </li>
3277
3278 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3279 contents of the IAppliance attributes accordingly. These can be inspected by a
3280 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3281 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3282 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3283 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3284 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3285 The GUI can then give the user the option to confirm and/or change these suggestions.
3286 </li>
3287
3288 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3289 virtual system to override the suggestions made by the interpret() routine.
3290 </li>
3291
3292 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3293 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3294 virtual system descriptions.
3295 </li>
3296 </ol>
3297
3298 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3299
3300 <ol>
3301 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3302 an empty IAppliance object.
3303 </li>
3304
3305 <li>For each machine you would like to export, call <link to="IMachine::export" />
3306 with the IAppliance object you just created. This creates an instance of
3307 <link to="IVirtualSystemDescription" /> inside the appliance.
3308 </li>
3309
3310 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3311 virtual system to override the suggestions made by the export() routine.
3312 </li>
3313
3314 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3315 file written.</li>
3316 </ol>
3317
3318 </desc>
3319
3320 <attribute name="path" type="wstring" readonly="yes">
3321 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3322 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3323 <link to="#write" /> (for export).
3324 This attribute is empty until one of these methods has been called.
3325 </desc>
3326 </attribute>
3327
3328 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3329 <desc>
3330 Array of virtual disk definitions. One such description exists for each
3331 disk definition in the OVF; each string array item represents one such piece of
3332 disk information, with the information fields separated by tab (\\t) characters.
3333
3334 The caller should be prepared for additional fields being appended to
3335 this string in future versions of VirtualBox and therefore check for
3336 the number of tabs in the strings returned.
3337
3338 In the current version, the following eight fields are returned per string
3339 in the array:
3340
3341 <ol>
3342 <li>Disk ID (unique string identifier given to disk)</li>
3343
3344 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3345
3346 <li>Populated size (optional unsigned integer indicating the current size of the
3347 disk; can be approximate; -1 if unspecified)</li>
3348
3349 <li>Format (string identifying the disk format, typically
3350 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3351
3352 <li>Reference (where to find the disk image, typically a file name; if empty,
3353 then the disk should be created on import)</li>
3354
3355 <li>Image size (optional unsigned integer indicating the size of the image,
3356 which need not necessarily be the same as the values specified above, since
3357 the image may be compressed or sparse; -1 if not specified)</li>
3358
3359 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3360 presently unsupported and always -1)</li>
3361
3362 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3363 </ol>
3364 </desc>
3365 </attribute>
3366
3367 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3368 <desc> Array of virtual system descriptions. One such description is created
3369 for each virtual system found in the OVF.
3370 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3371 (for export) has been called.
3372 </desc>
3373 </attribute>
3374
3375 <method name="read">
3376 <desc>
3377 Reads an OVF file into the appliance object.
3378
3379 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3380 mere fact that this method returns successfully does not mean that VirtualBox supports all
3381 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3382 </desc>
3383 <param name="file" type="wstring" dir="in">
3384 <desc>
3385 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3386 on whether the appliance is distributed as a set of files or as a single file, respectively).
3387 </desc>
3388 </param>
3389 <param name="aProgress" type="IProgress" dir="return">
3390 <desc></desc>
3391 </param>
3392 </method>
3393
3394 <method name="interpret">
3395 <desc>
3396 Interprets the OVF data that was read when the appliance was constructed. After
3397 calling this method, one can inspect the
3398 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3399 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3400 the appliance.
3401
3402 Calling this method is the second step of importing an appliance into VirtualBox;
3403 see <link to="IAppliance" /> for an overview.
3404
3405 After calling this method, one should call <link to="#getWarnings" /> to find out
3406 if problems were encountered during the processing which might later lead to
3407 errors.
3408 </desc>
3409 </method>
3410
3411 <method name="importMachines">
3412 <desc>
3413 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3414 and other interfaces that match the information contained in the appliance as
3415 closely as possible, as represented by the import instructions in the
3416 <link to="#virtualSystemDescriptions" /> array.
3417
3418 Calling this method is the final step of importing an appliance into VirtualBox;
3419 see <link to="IAppliance" /> for an overview.
3420
3421 Since importing the appliance will most probably involve copying and converting
3422 disk images, which can take a long time, this method operates asynchronously and
3423 returns an IProgress object to allow the caller to monitor the progress.
3424 </desc>
3425
3426 <param name="aProgress" type="IProgress" dir="return">
3427 <desc></desc>
3428 </param>
3429 </method>
3430
3431 <method name="createVFSExplorer">
3432 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3433
3434 <param name="aUri" type="wstring" dir="in">
3435 <desc>The URI describing the file system to use.</desc>
3436 </param>
3437
3438 <param name="aExplorer" type="IVFSExplorer" dir="return">
3439 <desc></desc>
3440 </param>
3441 </method>
3442
3443 <method name="write">
3444 <desc>
3445 Writes the contents of the appliance exports into a new OVF file.
3446
3447 Calling this method is the final step of exporting an appliance from VirtualBox;
3448 see <link to="IAppliance" /> for an overview.
3449
3450 Since exporting the appliance will most probably involve copying and converting
3451 disk images, which can take a long time, this method operates asynchronously and
3452 returns an IProgress object to allow the caller to monitor the progress.
3453 </desc>
3454 <param name="format" type="wstring" dir="in">
3455 <desc>
3456 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3457 future versions of VirtualBox may support additional formats.
3458 </desc>
3459 </param>
3460 <param name="path" type="wstring" dir="in">
3461 <desc>
3462 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3463 on whether the appliance is distributed as a set of files or as a single file, respectively).
3464 </desc>
3465 </param>
3466 <param name="aProgress" type="IProgress" dir="return">
3467 <desc>Progress object to track the operation completion.</desc>
3468 </param>
3469 </method>
3470
3471 <method name="getWarnings">
3472 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3473
3474 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3475 <desc></desc>
3476 </param>
3477 </method>
3478
3479 </interface>
3480
3481 <enum
3482 name="VirtualSystemDescriptionType"
3483 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3484 >
3485 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3486 a configuration value.</desc>
3487
3488 <const name="Ignore" value="1" />
3489 <const name="OS" value="2" />
3490 <const name="Name" value="3" />
3491 <const name="Product" value="4" />
3492 <const name="Vendor" value="5" />
3493 <const name="Version" value="6" />
3494 <const name="ProductUrl" value="7" />
3495 <const name="VendorUrl" value="8" />
3496 <const name="Description" value="9" />
3497 <const name="License" value="10" />
3498 <const name="Miscellaneous" value="11" />
3499 <const name="CPU" value="12" />
3500 <const name="Memory" value="13" />
3501 <const name="HardDiskControllerIDE" value="14" />
3502 <const name="HardDiskControllerSATA" value="15" />
3503 <const name="HardDiskControllerSCSI" value="16" />
3504 <const name="HardDiskImage" value="17" />
3505 <const name="Floppy" value="18" />
3506 <const name="CDROM" value="19" />
3507 <const name="NetworkAdapter" value="20" />
3508 <const name="USBController" value="21" />
3509 <const name="SoundCard" value="22" />
3510
3511 </enum>
3512
3513 <enum
3514 name="VirtualSystemDescriptionValueType"
3515 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3516 >
3517 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3518 type to fetch.</desc>
3519
3520 <const name="Reference" value="1" />
3521 <const name="Original" value="2" />
3522 <const name="Auto" value="3" />
3523 <const name="ExtraConfig" value="4" />
3524
3525 </enum>
3526
3527 <interface
3528 name="IVirtualSystemDescription" extends="$unknown"
3529 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3530 wsmap="managed"
3531 >
3532
3533 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3534 After <link to="IAppliance::interpret" /> has been called, that array contains
3535 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3536 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3537 into VirtualBox.
3538 </desc>
3539
3540 <attribute name="count" type="unsigned long" readonly="yes">
3541 <desc>Return the number of virtual system description entries.</desc>
3542 </attribute>
3543
3544 <method name="getDescription">
3545 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3546 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3547
3548 The list below identifies the value sets that are possible depending on the
3549 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3550 the array item with the same index in aOvfValues[] will contain the original value as contained
3551 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3552 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3553 the aExtraConfigValues[] array item may also be used.
3554
3555 <ul>
3556 <li>
3557 "OS": the guest operating system type. There must be exactly one such array item on import. The
3558 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3559 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3560 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3561 </li>
3562 <li>
3563 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3564 if none is present on import, then an automatic name will be created from the operating system
3565 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3566 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3567 <link to="IMachine" /> name that does not exist yet.
3568 </li>
3569 <li>
3570 "Description": an arbitrary description.
3571 </li>
3572 <li>
3573 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3574 code to display such a license for agreement; the Main API does not enforce any such policy.
3575 </li>
3576 <li>
3577 Miscellaneous: reserved for future use.
3578 </li>
3579 <li>
3580 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3581 </li>
3582 <li>
3583 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3584 is present on import, then VirtualBox will set a meaningful default based on the operating system
3585 type.
3586 </li>
3587 <li>
3588 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3589 has no value in aOvfValues[] or aVBoxValues[].
3590 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3591 type can use to specify which hard disk controller a virtual disk should be connected to.
3592 </li>
3593 <li>
3594 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3595 has no value in aOvfValues[] or aVBoxValues[].
3596 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3597 </li>
3598 <li>
3599 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3600 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3601 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3602 </li>
3603 <li>
3604 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3605 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3606
3607 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3608 a path since the image file should be in the same location as the OVF file itself), whereas the
3609 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3610 hard disk image. This means that on import the image will be copied and converted from the
3611 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3612 On import, the target image will also be registered with VirtualBox.
3613
3614 The matching item in the aExtraConfigValues[] array must contain a string of the following
3615 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3616 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3617 the image to. That number must be the index of an array item with one of the hard disk controller
3618 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3619 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3620 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3621 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3622 </li>
3623 <li>
3624 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3625 attachment information as with "HardDiskImage" items.
3626 </li>
3627 <li>
3628 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3629 attachment information as with "HardDiskImage" items.
3630 </li>
3631 <li>
3632 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3633 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3634 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3635 </li>
3636 <li>
3637 "USBController": a USB controller. There can be at most one such item. If and only if such an
3638 item ispresent, USB support will be enabled for the new virtual machine.
3639 </li>
3640 <li>
3641 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3642 present, sound support will be enabled for the new virtual machine. Note that the virtual
3643 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3644 may be different from the virtual soundcard expected by the appliance.
3645 </li>
3646 </ul>
3647
3648 </desc>
3649
3650 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3651 <desc></desc>
3652 </param>
3653
3654 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3655 <desc></desc>
3656 </param>
3657
3658 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3659 <desc></desc>
3660 </param>
3661
3662 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3663 <desc></desc>
3664 </param>
3665
3666 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3667 <desc></desc>
3668 </param>
3669
3670 </method>
3671
3672 <method name="getDescriptionByType">
3673 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3674 should be returned.</desc>
3675
3676 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3677 <desc></desc>
3678 </param>
3679
3680 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3681 <desc></desc>
3682 </param>
3683
3684 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3685 <desc></desc>
3686 </param>
3687
3688 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3689 <desc></desc>
3690 </param>
3691
3692 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3693 <desc></desc>
3694 </param>
3695
3696 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3697 <desc></desc>
3698 </param>
3699
3700 </method>
3701
3702 <method name="getValuesByType">
3703 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3704 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3705 values.</desc>
3706
3707 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3708 <desc></desc>
3709 </param>
3710
3711 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3712 <desc></desc>
3713 </param>
3714
3715 <param name="aValues" type="wstring" dir="return" safearray="yes">
3716 <desc></desc>
3717 </param>
3718
3719 </method>
3720
3721 <method name="setFinalValues">
3722 <desc>
3723 This method allows the appliance's user to change the configuration for the virtual
3724 system descriptions. For each array item returned from <link to="#getDescription" />,
3725 you must pass in one boolean value and one configuration value.
3726
3727 Each item in the boolean array determines whether the particular configuration item
3728 should be enabled.
3729 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3730 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3731 and SoundCard.
3732
3733 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3734 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3735 the configuration remains unchanged. Please see the documentation for getDescription()
3736 for valid configuration values for the individual array item types. If the
3737 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3738 </desc>
3739
3740 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3741 <desc></desc>
3742 </param>
3743
3744 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3745 <desc></desc>
3746 </param>
3747
3748 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3749 <desc></desc>
3750 </param>
3751 </method>
3752
3753 <method name="addDescription">
3754 <desc>
3755 This method adds an additional description entry to the stack of already
3756 available descriptions for this virtual system. This is handy for writing
3757 values which aren't directly supported by VirtualBox. One example would
3758 be the License type of <link to="VirtualSystemDescriptionType" />.
3759 </desc>
3760
3761 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3762 <desc></desc>
3763 </param>
3764
3765 <param name="aVBoxValue" type="wstring" dir="in">
3766 <desc></desc>
3767 </param>
3768
3769 <param name="aExtraConfigValue" type="wstring" dir="in">
3770 <desc></desc>
3771 </param>
3772 </method>
3773 </interface>
3774
3775
3776 <!--
3777 // IMachine
3778 /////////////////////////////////////////////////////////////////////////
3779 -->
3780
3781 <interface
3782 name="IInternalMachineControl" extends="$unknown"
3783 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3784 internal="yes"
3785 wsmap="suppress"
3786 >
3787 <method name="setRemoveSavedState">
3788 <desc>
3789 Updates the flag whether saved state is removed on a machine state
3790 change from Saved to PoweredOff.
3791 </desc>
3792 <param name="aRemove" type="boolean" dir="in"/>
3793 </method>
3794
3795 <method name="updateState">
3796 <desc>
3797 Updates the VM state.
3798 <note>
3799 This operation will also update the settings file with
3800 the correct information about the saved state file
3801 and delete this file from disk when appropriate.
3802 </note>
3803 </desc>
3804 <param name="state" type="MachineState" dir="in"/>
3805 </method>
3806
3807 <method name="getIPCId">
3808 <param name="id" type="wstring" dir="return"/>
3809 </method>
3810
3811 <method name="setPowerUpInfo">
3812 <desc>
3813 Transfers success (@c null) or error information for this session.
3814 This method updates the progress object to signal completion of the
3815 <link to="IVirtualBox::openRemoteSession"/> method if appropriate,
3816 which means that the progress object returned by
3817 <link to="IConsole::powerUp"/>.
3818 </desc>
3819 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
3820 </method>
3821
3822 <method name="runUSBDeviceFilters">
3823 <desc>
3824 Asks the server to run USB devices filters of the associated
3825 machine against the given USB device and tell if there is
3826 a match.
3827 <note>
3828 Intended to be used only for remote USB devices. Local
3829 ones don't require to call this method (this is done
3830 implicitly by the Host and USBProxyService).
3831 </note>
3832 </desc>
3833 <param name="device" type="IUSBDevice" dir="in"/>
3834 <param name="matched" type="boolean" dir="out"/>
3835 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3836 </method>
3837
3838 <method name="captureUSBDevice">
3839 <desc>
3840 Requests a capture of the given host USB device.
3841 When the request is completed, the VM process will
3842 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3843 notification.
3844 </desc>
3845 <param name="id" type="uuid" mod="string" dir="in"/>
3846 </method>
3847
3848 <method name="detachUSBDevice">
3849 <desc>
3850 Notification that a VM is going to detach (@a done = @c false) or has
3851 already detached (@a done = @c true) the given USB device.
3852 When the @a done = @c true request is completed, the VM process will
3853 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3854 notification.
3855 <note>
3856 In the @a done = @c true case, the server must run its own filters
3857 and filters of all VMs but this one on the detached device
3858 as if it were just attached to the host computer.
3859 </note>
3860 </desc>
3861 <param name="id" type="uuid" mod="string" dir="in"/>
3862 <param name="done" type="boolean" dir="in"/>
3863 </method>
3864
3865 <method name="autoCaptureUSBDevices">
3866 <desc>
3867 Requests a capture all matching USB devices attached to the host.
3868 When the request is completed, the VM process will
3869 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3870 notification per every captured device.
3871 </desc>
3872 </method>
3873
3874 <method name="detachAllUSBDevices">
3875 <desc>
3876 Notification that a VM that is being powered down. The done
3877 parameter indicates whether which stage of the power down
3878 we're at. When @a done = @c false the VM is announcing its
3879 intentions, while when @a done = @c true the VM is reporting
3880 what it has done.
3881 <note>
3882 In the @a done = @c true case, the server must run its own filters
3883 and filters of all VMs but this one on all detach devices as
3884 if they were just attached to the host computer.
3885 </note>
3886 </desc>
3887 <param name="done" type="boolean" dir="in"/>
3888 </method>
3889
3890 <method name="onSessionEnd">
3891 <desc>
3892 Triggered by the given session object when the session is about
3893 to close normally.
3894 </desc>
3895 <param name="session" type="ISession" dir="in">
3896 <desc>Session that is being closed</desc>
3897 </param>
3898 <param name="progress" type="IProgress" dir="return">
3899 <desc>
3900 Used to wait until the corresponding machine is actually
3901 dissociated from the given session on the server.
3902 Returned only when this session is a direct one.
3903 </desc>
3904 </param>
3905 </method>
3906
3907 <method name="beginSavingState">
3908 <desc>
3909 Called by the VM process to inform the server it wants to
3910 save the current state and stop the VM execution.
3911 </desc>
3912 <param name="progress" type="IProgress" dir="in">
3913 <desc>
3914 Progress object created by the VM process to wait until
3915 the state is saved.
3916 </desc>
3917 </param>
3918 <param name="stateFilePath" type="wstring" dir="out">
3919 <desc>
3920 File path the VM process must save the execution state to.
3921 </desc>
3922 </param>
3923 </method>
3924
3925 <method name="endSavingState">
3926 <desc>
3927 Called by the VM process to inform the server that saving
3928 the state previously requested by #beginSavingState is either
3929 successfully finished or there was a failure.
3930
3931 <result name="VBOX_E_FILE_ERROR">
3932 Settings file not accessible.
3933 </result>
3934 <result name="VBOX_E_XML_ERROR">
3935 Could not parse the settings file.
3936 </result>
3937
3938 </desc>
3939
3940 <param name="success" type="boolean" dir="in">
3941 <desc>@c true to indicate success and @c false otherwise.
3942 </desc>
3943 </param>
3944 </method>
3945
3946 <method name="adoptSavedState">
3947 <desc>
3948 Gets called by IConsole::adoptSavedState.
3949 <result name="VBOX_E_FILE_ERROR">
3950 Invalid saved state file path.
3951 </result>
3952 </desc>
3953 <param name="savedStateFile" type="wstring" dir="in">
3954 <desc>Path to the saved state file to adopt.</desc>
3955 </param>
3956 </method>
3957
3958 <method name="beginTakingSnapshot">
3959 <desc>
3960 Called from the VM process to request from the server to perform the
3961 server-side actions of creating a snapshot (creating differencing images
3962 and the snapshot object).
3963
3964 <result name="VBOX_E_FILE_ERROR">
3965 Settings file not accessible.
3966 </result>
3967 <result name="VBOX_E_XML_ERROR">
3968 Could not parse the settings file.
3969 </result>
3970 </desc>
3971 <param name="initiator" type="IConsole" dir="in">
3972 <desc>The console object that initiated this call.</desc>
3973 </param>
3974 <param name="name" type="wstring" dir="in">
3975 <desc>Snapshot name.</desc>
3976 </param>
3977 <param name="description" type="wstring" dir="in">
3978 <desc>Snapshot description.</desc>
3979 </param>
3980 <param name="consoleProgress" type="IProgress" dir="in">
3981 <desc>
3982 Progress object created by the VM process tracking the
3983 snapshot's progress. This has the following sub-operations:
3984 <ul>
3985 <li>setting up (weight 1);</li>
3986 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3987 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3988 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3989 <li>finishing up (weight 1)</li>
3990 </ul>
3991 </desc>
3992 </param>
3993 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3994 <desc>
3995 Whether this is an online snapshot (i.e. the machine is running).
3996 </desc>
3997 </param>
3998 <param name="stateFilePath" type="wstring" dir="out">
3999 <desc>
4000 File path the VM process must save the execution state to.
4001 </desc>
4002 </param>
4003 </method>
4004
4005 <method name="endTakingSnapshot">
4006 <desc>
4007 Called by the VM process to inform the server that the snapshot
4008 previously requested by #beginTakingSnapshot is either
4009 successfully taken or there was a failure.
4010 </desc>
4011
4012 <param name="success" type="boolean" dir="in">
4013 <desc>@c true to indicate success and @c false otherwise</desc>
4014 </param>
4015 </method>
4016
4017 <method name="deleteSnapshot">
4018 <desc>
4019 Gets called by IConsole::deleteSnapshot.
4020 <result name="VBOX_E_INVALID_OBJECT_STATE">
4021 Snapshot has more than one child snapshot.
4022 </result>
4023 </desc>
4024 <param name="initiator" type="IConsole" dir="in">
4025 <desc>The console object that initiated this call.</desc>
4026 </param>
4027 <param name="id" type="uuid" mod="string" dir="in">
4028 <desc>UUID of the snapshot to discard.</desc>
4029 </param>
4030 <param name="machineState" type="MachineState" dir="out">
4031 <desc>New machine state after this operation is started.</desc>
4032 </param>
4033 <param name="progress" type="IProgress" dir="return">
4034 <desc>Progress object to track the operation completion.</desc>
4035 </param>
4036 </method>
4037
4038 <method name="restoreSnapshot">
4039 <desc>
4040 Gets called by IConsole::RestoreSnapshot.
4041 </desc>
4042 <param name="initiator" type="IConsole" dir="in">
4043 <desc>The console object that initiated this call.</desc>
4044 </param>
4045 <param name="snapshot" type="ISnapshot" dir="in">
4046 <desc>The snapshot to restore the VM state from.</desc>
4047 </param>
4048 <param name="machineState" type="MachineState" dir="out">
4049 <desc>New machine state after this operation is started.</desc>
4050 </param>
4051 <param name="progress" type="IProgress" dir="return">
4052 <desc>Progress object to track the operation completion.</desc>
4053 </param>
4054 </method>
4055
4056 <method name="pullGuestProperties">
4057 <desc>
4058 Get the list of the guest properties matching a set of patterns along
4059 with their values, time stamps and flags and give responsibility for
4060 managing properties to the console.
4061 </desc>
4062 <param name="name" type="wstring" dir="out" safearray="yes">
4063 <desc>
4064 The names of the properties returned.
4065 </desc>
4066 </param>
4067 <param name="value" type="wstring" dir="out" safearray="yes">
4068 <desc>
4069 The values of the properties returned. The array entries match the
4070 corresponding entries in the @a name array.
4071 </desc>
4072 </param>
4073 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4074 <desc>
4075 The time stamps of the properties returned. The array entries match
4076 the corresponding entries in the @a name array.
4077 </desc>
4078 </param>
4079 <param name="flags" type="wstring" dir="out" safearray="yes">
4080 <desc>
4081 The flags of the properties returned. The array entries match the
4082 corresponding entries in the @a name array.
4083 </desc>
4084 </param>
4085 </method>
4086
4087 <method name="pushGuestProperties">
4088 <desc>
4089 Set the list of the guest properties matching a set of patterns along
4090 with their values, time stamps and flags and return responsibility for
4091 managing properties to IMachine.
4092 </desc>
4093 <param name="name" type="wstring" dir="in" safearray="yes">
4094 <desc>
4095 The names of the properties.
4096 </desc>
4097 </param>
4098 <param name="value" type="wstring" dir="in" safearray="yes">
4099 <desc>
4100 The values of the properties. The array entries match the
4101 corresponding entries in the @a name array.
4102 </desc>
4103 </param>
4104 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
4105 <desc>
4106 The time stamps of the properties. The array entries match
4107 the corresponding entries in the @a name array.
4108 </desc>
4109 </param>
4110 <param name="flags" type="wstring" dir="in" safearray="yes">
4111 <desc>
4112 The flags of the properties. The array entries match the
4113 corresponding entries in the @a name array.
4114 </desc>
4115 </param>
4116 </method>
4117 <method name="pushGuestProperty">
4118 <desc>
4119 Update a single guest property in IMachine.
4120 </desc>
4121 <param name="name" type="wstring" dir="in">
4122 <desc>
4123 The name of the property to be updated.
4124 </desc>
4125 </param>
4126 <param name="value" type="wstring" dir="in">
4127 <desc>
4128 The value of the property.
4129 </desc>
4130 </param>
4131 <param name="timestamp" type="unsigned long long" dir="in">
4132 <desc>
4133 The timestamp of the property.
4134 </desc>
4135 </param>
4136 <param name="flags" type="wstring" dir="in">
4137 <desc>
4138 The flags of the property.
4139 </desc>
4140 </param>
4141 </method>
4142
4143 <method name="lockMedia">
4144 <desc>
4145 Locks all media attached to the machine for writing and parents of
4146 attached differencing media (if any) for reading. This operation is
4147 atomic so that if it fails no media is actually locked.
4148
4149 This method is intended to be called when the machine is in Starting or
4150 Restoring state. The locked media will be automatically unlocked when
4151 the machine is powered off or crashed.
4152 </desc>
4153 </method>
4154 <method name="unlockMedia">
4155 <desc>
4156 Unlocks all media previously locked using
4157 <link to="IInternalMachineControl::lockMedia"/>.
4158
4159 This method is intended to be used with teleportation so that it is
4160 possible to teleport between processes on the same machine.
4161 </desc>
4162 </method>
4163 </interface>
4164
4165 <interface
4166 name="IBIOSSettings" extends="$unknown"
4167 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4168 wsmap="managed"
4169 >
4170 <desc>
4171 The IBIOSSettings interface represents BIOS settings of the virtual
4172 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4173 </desc>
4174 <attribute name="logoFadeIn" type="boolean">
4175 <desc>Fade in flag for BIOS logo animation.</desc>
4176 </attribute>
4177
4178 <attribute name="logoFadeOut" type="boolean">
4179 <desc>Fade out flag for BIOS logo animation.</desc>
4180 </attribute>
4181
4182 <attribute name="logoDisplayTime" type="unsigned long">
4183 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4184 </attribute>
4185
4186 <attribute name="logoImagePath" type="wstring">
4187 <desc>
4188 Local file system path for external BIOS splash image. Empty string
4189 means the default image is shown on boot.
4190 </desc>
4191 </attribute>
4192
4193 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4194 <desc>Mode of the BIOS boot device menu.</desc>
4195 </attribute>
4196
4197 <attribute name="ACPIEnabled" type="boolean">
4198 <desc>ACPI support flag.</desc>
4199 </attribute>
4200
4201 <attribute name="IOAPICEnabled" type="boolean">
4202 <desc>
4203 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4204 and support IRQs above 15.
4205 </desc>
4206 </attribute>
4207
4208 <attribute name="timeOffset" type="long long">
4209 <desc>
4210 Offset in milliseconds from the host system time. This allows for
4211 guests running with a different system date/time than the host.
4212 It is equivalent to setting the system date/time in the BIOS except
4213 it is not an absolute value but a relative one. Guest Additions
4214 time synchronization honors this offset.
4215 </desc>
4216 </attribute>
4217
4218 <attribute name="PXEDebugEnabled" type="boolean">
4219 <desc>
4220 PXE debug logging flag. If set, VirtualBox will write extensive
4221 PXE trace information to the release log.
4222 </desc>
4223 </attribute>
4224
4225 </interface>
4226
4227 <interface
4228 name="IMachine" extends="$unknown"
4229 uuid="f2816298-7408-4c44-a117-0ed8ea09b9bc"
4230 wsmap="managed"
4231 >
4232 <desc>
4233 The IMachine interface represents a virtual machine, or guest, created
4234 in VirtualBox.
4235
4236 This interface is used in two contexts. First of all, a collection of
4237 objects implementing this interface is stored in the
4238 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4239 machines that are currently registered with this VirtualBox
4240 installation. Also, once a session has been opened for the given virtual
4241 machine (e.g. the virtual machine is running), the machine object
4242 associated with the open session can be queried from the session object;
4243 see <link to="ISession"/> for details.
4244
4245 The main role of this interface is to expose the settings of the virtual
4246 machine and provide methods to change various aspects of the virtual
4247 machine's configuration. For machine objects stored in the
4248 <link to="IVirtualBox::machines"/> collection, all attributes are
4249 read-only unless explicitly stated otherwise in individual attribute
4250 and method descriptions. In order to change a machine setting, a session
4251 for this machine must be opened using one of
4252 <link to="IVirtualBox::openSession"/>,
4253 <link to="IVirtualBox::openRemoteSession"/> or
4254 <link to="IVirtualBox::openExistingSession"/> methods. After the
4255 session has been successfully opened, a mutable machine object needs to
4256 be queried from the session object and then the desired settings changes
4257 can be applied to the returned object using IMachine attributes and
4258 methods. See the <link to="ISession"/> interface description for more
4259 information about sessions.
4260
4261 Note that IMachine does not provide methods to control virtual machine
4262 execution (such as start the machine, or power it down) -- these methods
4263 are grouped in a separate interface called <link to="IConsole" />.
4264
4265 <see>ISession, IConsole</see>
4266 </desc>
4267
4268 <attribute name="parent" type="IVirtualBox" readonly="yes">
4269 <desc>Associated parent object.</desc>
4270 </attribute>
4271
4272 <attribute name="accessible" type="boolean" readonly="yes">
4273 <desc>
4274 Whether this virtual machine is currently accessible or not.
4275
4276 A machine is always deemed accessible unless it is registered <i>and</i>
4277 its settings file cannot be read or parsed (either because the file itself
4278 is unavailable or has invalid XML contents).
4279
4280 Every time this property is read, the accessibility state of
4281 this machine is re-evaluated. If the returned value is @c false,
4282 the <link to="#accessError"/> property may be used to get the
4283 detailed error information describing the reason of
4284 inaccessibility, including XML error messages.
4285
4286 When the machine is inaccessible, only the following properties
4287 can be used on it:
4288 <ul>
4289 <li><link to="#parent"/></li>
4290 <li><link to="#id"/></li>
4291 <li><link to="#settingsFilePath"/></li>
4292 <li><link to="#accessible"/></li>
4293 <li><link to="#accessError"/></li>
4294 </ul>
4295
4296 An attempt to access any other property or method will return
4297 an error.
4298
4299 The only possible action you can perform on an inaccessible
4300 machine is to unregister it using the
4301 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4302 for the accessibility state once more by querying this
4303 property).
4304
4305 <note>
4306 In the current implementation, once this property returns
4307 @c true, the machine will never become inaccessible
4308 later, even if its settings file cannot be successfully
4309 read/written any more (at least, until the VirtualBox
4310 server is restarted). This limitation may be removed in
4311 future releases.
4312 </note>
4313 </desc>
4314 </attribute>
4315
4316 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4317 <desc>
4318 Error information describing the reason of machine
4319 inaccessibility.
4320
4321 Reading this property is only valid after the last call to
4322 <link to="#accessible"/> returned @c false (i.e. the
4323 machine is currently unaccessible). Otherwise, a @c null
4324 IVirtualBoxErrorInfo object will be returned.
4325 </desc>
4326 </attribute>
4327
4328 <attribute name="name" type="wstring">
4329 <desc>
4330 Name of the virtual machine.
4331
4332 Besides being used for human-readable identification purposes
4333 everywhere in VirtualBox, the virtual machine name is also used
4334 as a name of the machine's settings file and as a name of the
4335 subdirectory this settings file resides in. Thus, every time you
4336 change the value of this property, the settings file will be
4337 renamed once you call <link to="#saveSettings"/> to confirm the
4338 change. The containing subdirectory will be also renamed, but
4339 only if it has exactly the same name as the settings file
4340 itself prior to changing this property (for backward compatibility
4341 with previous API releases). The above implies the following
4342 limitations:
4343 <ul>
4344 <li>The machine name cannot be empty.</li>
4345 <li>The machine name can contain only characters that are valid
4346 file name characters according to the rules of the file
4347 system used to store VirtualBox configuration.</li>
4348 <li>You cannot have two or more machines with the same name
4349 if they use the same subdirectory for storing the machine
4350 settings files.</li>
4351 <li>You cannot change the name of the machine if it is running,
4352 or if any file in the directory containing the settings file
4353 is being used by another running machine or by any other
4354 process in the host operating system at a time when
4355 <link to="#saveSettings"/> is called.
4356 </li>
4357 </ul>
4358 If any of the above limitations are hit, <link to="#saveSettings"/>
4359 will return an appropriate error message explaining the exact
4360 reason and the changes you made to this machine will not be
4361 saved.
4362 <note>
4363 For "legacy" machines created using the
4364 <link to="IVirtualBox::createLegacyMachine"/> call,
4365 the above naming limitations do not apply because the
4366 machine name does not affect the settings file name.
4367 The settings file name remains the same as it was specified
4368 during machine creation and never changes.
4369 </note>
4370 </desc>
4371 </attribute>
4372
4373 <attribute name="description" type="wstring">
4374 <desc>
4375 Description of the virtual machine.
4376
4377 The description attribute can contain any text and is
4378 typically used to describe the hardware and software
4379 configuration of the virtual machine in detail (i.e. network
4380 settings, versions of the installed software and so on).
4381 </desc>
4382 </attribute>
4383
4384 <attribute name="id" type="uuid" mod="string" readonly="yes">
4385 <desc>UUID of the virtual machine.</desc>
4386 </attribute>
4387
4388 <attribute name="OSTypeId" type="wstring">
4389 <desc>
4390 User-defined identifier of the Guest OS type.
4391 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4392 an IGuestOSType object representing details about the given
4393 Guest OS type.
4394 <note>
4395 This value may differ from the value returned by
4396 <link to="IGuest::OSTypeId"/> if Guest Additions are
4397 installed to the guest OS.
4398 </note>
4399 </desc>
4400 </attribute>
4401
4402 <attribute name="HardwareVersion" type="wstring">
4403 <desc>Hardware version identifier. Internal use only for now.</desc>
4404 </attribute>
4405
4406 <attribute name="hardwareUUID" type="uuid" mod="string">
4407 <desc>
4408 The UUID presented to the guest via memory tables, hardware and guest
4409 properties. For most VMs this is the same as the @a id, but for VMs
4410 which have been cloned or teleported it may be the same as the source
4411 VM. This latter is because the guest shouldn't notice that it was
4412 cloned or teleported.
4413 </desc>
4414 </attribute>
4415
4416 <attribute name="CPUCount" type="unsigned long">
4417 <desc>Number of virtual CPUs in the VM.</desc>
4418 </attribute>
4419
4420 <attribute name="CPUHotPlugEnabled" type="boolean">
4421 <desc>
4422 This setting determines whether VirtualBox allows CPU
4423 hotplugging for this machine.</desc>
4424 </attribute>
4425
4426 <attribute name="memorySize" type="unsigned long">
4427 <desc>System memory size in megabytes.</desc>
4428 </attribute>
4429
4430 <attribute name="memoryBalloonSize" type="unsigned long">
4431 <desc>Initial memory balloon size in megabytes.</desc>
4432 </attribute>
4433
4434 <attribute name="statisticsUpdateInterval" type="unsigned long">
4435 <desc>Initial interval to update guest statistics in seconds.</desc>
4436 </attribute>
4437
4438 <attribute name="VRAMSize" type="unsigned long">
4439 <desc>Video memory size in megabytes.</desc>
4440 </attribute>
4441
4442 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4443 <desc>
4444 This setting determines whether VirtualBox allows this machine to make
4445 use of the 3D graphics support available on the host.</desc>
4446 </attribute>
4447
4448 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4449 <desc>
4450 This setting determines whether VirtualBox allows this machine to make
4451 use of the 2D video acceleration support available on the host.</desc>
4452 </attribute>
4453
4454 <attribute name="monitorCount" type="unsigned long">
4455 <desc>
4456 Number of virtual monitors.
4457 <note>
4458 Only effective on Windows XP and later guests with
4459 Guest Additions installed.
4460 </note>
4461 </desc>
4462 </attribute>
4463
4464 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4465 <desc>Object containing all BIOS settings.</desc>
4466 </attribute>
4467
4468 <attribute name="firmwareType" type="FirmwareType">
4469 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4470 bootstrap in this VM.</desc>
4471 </attribute>
4472
4473 <attribute name="pointingHidType" type="PointingHidType">
4474 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
4475 The default is typically "PS2Mouse" but can vary depending on the
4476 requirements of the guest operating system.</desc>
4477 </attribute>
4478
4479 <attribute name="keyboardHidType" type="KeyboardHidType">
4480 <desc>Type of keyboard HID used in this VM.
4481 The default is typically "PS2Keyboard" but can vary depending on the
4482 requirements of the guest operating system.</desc>
4483 </attribute>
4484
4485 <attribute name="hpetEnabled" type="boolean">
4486 <desc>This attribute controls if High Precision Event Timer (HPET) is
4487 enabled in this VM. Use this property if you want to provide guests
4488 with additional time source, or if guest requires HPET to function correctly.
4489 Default is false.</desc>
4490 </attribute>
4491
4492 <attribute name="snapshotFolder" type="wstring">
4493 <desc>
4494 Full path to the directory used to store snapshot data
4495 (differencing media and saved state files) of this machine.
4496
4497 The initial value of this property is
4498 <tt>&lt;</tt><link to="#settingsFilePath">
4499 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4500 <link to="#id">machine_uuid</link>
4501 <tt>&gt;</tt>.
4502
4503 Currently, it is an error to try to change this property on
4504 a machine that has snapshots (because this would require to
4505 move possibly large files to a different location).
4506 A separate method will be available for this purpose later.
4507
4508 <note>
4509 Setting this property to @c null or to an empty string will restore
4510 the initial value.
4511 </note>
4512 <note>
4513 When setting this property, the specified path can be
4514 absolute (full path) or relative to the directory where the
4515 <link to="#settingsFilePath">machine settings file</link>
4516 is located. When reading this property, a full path is
4517 always returned.
4518 </note>
4519 <note>
4520 The specified path may not exist, it will be created
4521 when necessary.
4522 </note>
4523 </desc>
4524 </attribute>
4525
4526 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4527 <desc>VRDP server object.</desc>
4528 </attribute>
4529
4530 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4531 <desc>Array of media attached to this machine.</desc>
4532 </attribute>
4533
4534 <attribute name="USBController" type="IUSBController" readonly="yes">
4535 <desc>
4536 Associated USB controller object.
4537
4538 <note>
4539 If USB functionality is not available in the given edition of
4540 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4541 </note>
4542 </desc>
4543 </attribute>
4544
4545 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4546 <desc>Associated audio adapter, always present.</desc>
4547 </attribute>
4548
4549 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4550 <desc>Array of storage controllers attached to this machine.</desc>
4551 </attribute>
4552
4553 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4554 <desc>
4555 Full name of the file containing machine settings data.
4556 </desc>
4557 </attribute>
4558
4559 <attribute name="settingsModified" type="boolean" readonly="yes">
4560 <desc>
4561 Whether the settings of this machine have been modified
4562 (but neither yet saved nor discarded).
4563 <note>
4564 Reading this property is only valid on instances returned
4565 by <link to="ISession::machine"/> and on new machines
4566 created by <link to="IVirtualBox::createMachine"/> or opened
4567 by <link to="IVirtualBox::openMachine"/> but not
4568 yet registered, or on unregistered machines after calling
4569 <link to="IVirtualBox::unregisterMachine"/>. For all other
4570 cases, the settings can never be modified.
4571 </note>
4572 <note>
4573 For newly created unregistered machines, the value of this
4574 property is always @c true until <link to="#saveSettings"/>
4575 is called (no matter if any machine settings have been
4576 changed after the creation or not). For opened machines
4577 the value is set to @c false (and then follows to normal rules).
4578 </note>
4579 </desc>
4580 </attribute>
4581
4582 <attribute name="sessionState" type="SessionState" readonly="yes">
4583 <desc>Current session state for this machine.</desc>
4584 </attribute>
4585
4586 <attribute name="sessionType" type="wstring" readonly="yes">
4587 <desc>
4588 Type of the session. If <link to="#sessionState"/> is
4589 SessionSpawning or SessionOpen, this attribute contains the
4590 same value as passed to the
4591 <link to="IVirtualBox::openRemoteSession"/> method in the
4592 @a type parameter. If the session was opened directly using
4593 <link to="IVirtualBox::openSession"/>, or if
4594 <link to="#sessionState"/> is SessionClosed, the value of this
4595 attribute is an empty string.
4596 </desc>
4597 </attribute>
4598
4599 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4600 <desc>
4601 Identifier of the session process. This attribute contains the
4602 platform-dependent identifier of the process that has opened a
4603 direct session for this machine using the
4604 <link to="IVirtualBox::openSession"/> call. The returned value
4605 is only valid if <link to="#sessionState"/> is SessionOpen or
4606 SessionClosing (i.e. a session is currently open or being
4607 closed) by the time this property is read.
4608 </desc>
4609 </attribute>
4610
4611 <attribute name="state" type="MachineState" readonly="yes">
4612 <desc>Current execution state of this machine.</desc>
4613 </attribute>
4614
4615 <attribute name="lastStateChange" type="long long" readonly="yes">
4616 <desc>
4617 Time stamp of the last execution state change,
4618 in milliseconds since 1970-01-01 UTC.
4619 </desc>
4620 </attribute>
4621
4622 <attribute name="stateFilePath" type="wstring" readonly="yes">
4623 <desc>
4624 Full path to the file that stores the execution state of
4625 the machine when it is in the <link to="MachineState_Saved"/> state.
4626 <note>
4627 When the machine is not in the Saved state, this attribute is
4628 an empty string.
4629 </note>
4630 </desc>
4631 </attribute>
4632
4633 <attribute name="logFolder" type="wstring" readonly="yes">
4634 <desc>
4635 Full path to the folder that stores a set of rotated log files
4636 recorded during machine execution. The most recent log file is
4637 named <tt>VBox.log</tt>, the previous log file is
4638 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4639 in the current version).
4640 </desc>
4641 </attribute>
4642
4643 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4644 <desc>
4645 Current snapshot of this machine. This is @c null if the machine
4646 currently has no snapshots. If it is not @c null, then it was
4647 set by one of <link to="Console::takeSnapshot" />,
4648 <link to="Console::deleteSnapshot" />
4649 or <link to="Console::restoreSnapshot" />, depending on which
4650 was called last. See <link to="ISnapshot"/> for details.
4651 </desc>
4652 </attribute>
4653
4654 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4655 <desc>
4656 Number of snapshots taken on this machine. Zero means the
4657 machine doesn't have any snapshots.
4658 </desc>
4659 </attribute>
4660
4661 <attribute name="currentStateModified" type="boolean" readonly="yes">
4662 <desc>
4663 Returns @c true if the current state of the machine is not
4664 identical to the state stored in the current snapshot.
4665
4666 The current state is identical to the current snapshot only
4667 directly after one of the following calls are made:
4668
4669 <ul>
4670 <li><link to="IConsole::restoreSnapshot"/>
4671 </li>
4672 <li><link to="IConsole::takeSnapshot"/> (issued on a
4673 "powered off" or "saved" machine, for which
4674 <link to="#settingsModified"/> returns @c false)
4675 </li>
4676 <li><link to="IMachine::setCurrentSnapshot"/>
4677 </li>
4678 </ul>
4679
4680 The current state remains identical until one of the following
4681 happens:
4682 <ul>
4683 <li>settings of the machine are changed</li>
4684 <li>the saved state is discarded</li>
4685 <li>the current snapshot is discarded</li>
4686 <li>an attempt to execute the machine is made</li>
4687 </ul>
4688
4689 <note>
4690 For machines that don't have snapshots, this property is
4691 always @c false.
4692 </note>
4693 </desc>
4694 </attribute>
4695
4696 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4697 <desc>
4698 Collection of shared folders for this machine (permanent shared
4699 folders). These folders are shared automatically at machine startup
4700 and available only to the guest OS installed within this machine.
4701
4702 New shared folders are added to the collection using
4703 <link to="#createSharedFolder"/>. Existing shared folders can be
4704 removed using <link to="#removeSharedFolder"/>.
4705 </desc>
4706 </attribute>
4707
4708 <attribute name="clipboardMode" type="ClipboardMode">
4709 <desc>
4710 Synchronization mode between the host OS clipboard
4711 and the guest OS clipboard.
4712 </desc>
4713 </attribute>
4714
4715 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4716 <desc>
4717 A comma-separated list of simple glob patterns. Changes to guest
4718 properties whose name matches one of the patterns will generate an
4719 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4720 </desc>
4721 </attribute>
4722
4723 <attribute name="teleporterEnabled" type="boolean">
4724 <desc>
4725 When set to @a true, the virtual machine becomes a target teleporter
4726 the next time it is powered on. This can only set to @a true when the
4727 VM is in the @a PoweredOff or @a Aborted state.
4728
4729 <!-- This property is automatically set to @a false when the VM is powered
4730 on. (bird: This doesn't work yet ) -->
4731 </desc>
4732 </attribute>
4733
4734 <attribute name="teleporterPort" type="unsigned long">
4735 <desc>
4736 The TCP port the target teleporter will listen for incoming
4737 teleportations on.
4738
4739 0 means the port is automatically selected upon power on. The actual
4740 value can be read from this property while the machine is waiting for
4741 incoming teleportations.
4742 </desc>
4743 </attribute>
4744
4745 <attribute name="teleporterAddress" type="wstring">
4746 <desc>
4747 The address the target teleporter will listen on. If set to an empty
4748 string, it will listen on all addresses.
4749 </desc>
4750 </attribute>
4751
4752 <attribute name="teleporterPassword" type="wstring">
4753 <desc>
4754 The password the to check for on the target teleporter. This is just a
4755 very basic measure to prevent simple hacks and operators accidentally
4756 beaming a virtual machine to the wrong place.
4757 </desc>
4758 </attribute>
4759
4760 <attribute name="RTCUseUTC" type="boolean">
4761 <desc>
4762 When set to @a true, the RTC device of the virtual machine will run
4763 in UTC time, otherwise in local time. Especially Unix guests prefer
4764 the time in UTC.
4765 </desc>
4766 </attribute>
4767
4768 <method name="setBootOrder">
4769 <desc>
4770 Puts the given device to the specified position in
4771 the boot order.
4772
4773 To indicate that no device is associated with the given position,
4774 <link to="DeviceType_Null"/> should be used.
4775
4776 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4777
4778 <result name="E_INVALIDARG">
4779 Boot @a position out of range.
4780 </result>
4781 <result name="E_NOTIMPL">
4782 Booting from USB @a device currently not supported.
4783 </result>
4784
4785 </desc>
4786 <param name="position" type="unsigned long" dir="in">
4787 <desc>
4788 Position in the boot order (@c 1 to the total number of
4789 devices the machine can boot from, as returned by
4790 <link to="ISystemProperties::maxBootPosition"/>).
4791 </desc>
4792 </param>
4793 <param name="device" type="DeviceType" dir="in">
4794 <desc>
4795 The type of the device used to boot at the given position.
4796 </desc>
4797 </param>
4798 </method>
4799
4800 <method name="getBootOrder" const="yes">
4801 <desc>
4802 Returns the device type that occupies the specified
4803 position in the boot order.
4804
4805 @todo [remove?]
4806 If the machine can have more than one device of the returned type
4807 (such as hard disks), then a separate method should be used to
4808 retrieve the individual device that occupies the given position.
4809
4810 If here are no devices at the given position, then
4811 <link to="DeviceType_Null"/> is returned.
4812
4813 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4814
4815 <result name="E_INVALIDARG">
4816 Boot @a position out of range.
4817 </result>
4818
4819 </desc>
4820 <param name="position" type="unsigned long" dir="in">
4821 <desc>
4822 Position in the boot order (@c 1 to the total number of
4823 devices the machine can boot from, as returned by
4824 <link to="ISystemProperties::maxBootPosition"/>).
4825 </desc>
4826 </param>
4827 <param name="device" type="DeviceType" dir="return">
4828 <desc>
4829 Device at the given position.
4830 </desc>
4831 </param>
4832 </method>
4833
4834 <method name="attachDevice">
4835 <desc>
4836 Attaches a device and optionally mounts a medium to the given storage
4837 controller (<link to="IStorageController" />, identified by @a name),
4838 at the indicated port and device.
4839
4840 This method is intended for managing storage devices in general (it works
4841 for both fixed and removable media). For storage devices supporting removable
4842 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4843 for changing the media while the machine is running.
4844
4845 For the IDE bus, the @a controllerPort parameter can be either
4846 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4847 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4848 to specify the master or the slave device, respectively. (In the
4849 default configuration of virtual machines, the secondary master is
4850 used for a CD/DVD drive.)
4851
4852 For an SATA controller, @a controllerPort must be a number ranging
4853 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4854 be a number ranging from @c 0 to @c 15.
4855
4856 For both SCSI and SATA, the @a device parameter is unused and must
4857 be @c 0.
4858
4859 For fixed media such as hard disks, the given medium identifier cannot
4860 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4861 and floppies.
4862
4863 After calling this returns successfully, a new instance of
4864 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4865 attachments (<link to="IMachine::mediumAttachments"/>).
4866
4867 The specified device slot must not have a device attached to it,
4868 or this method will fail.
4869
4870 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4871 information about attaching media.
4872
4873 <note>
4874 You cannot attach a device to a running machine. Also, you cannot
4875 attach a device to a newly created machine until this machine's
4876 settings are saved to disk using <link to="#saveSettings"/>.
4877 </note>
4878 <note>
4879 If the medium is being attached indirectly, a new differencing medium
4880 will implicitly be created for it and attached instead. If the
4881 changes made to the machine settings (including this indirect
4882 attachment) are later cancelled using <link to="#discardSettings"/>,
4883 this implicitly created differencing medium will implicitly
4884 be deleted.
4885 </note>
4886
4887 <result name="E_INVALIDARG">
4888 SATA device, SATA port, IDE port or IDE slot out of range.
4889 </result>
4890 <result name="VBOX_E_INVALID_OBJECT_STATE">
4891 Attempt to attach medium to an unregistered virtual machine.
4892 </result>
4893 <result name="VBOX_E_INVALID_VM_STATE">
4894 Invalid machine state.
4895 </result>
4896 <result name="VBOX_E_OBJECT_IN_USE">
4897 Hard disk already attached to this or another virtual machine.
4898 </result>
4899
4900 </desc>
4901 <param name="name" type="wstring" dir="in">
4902 <desc>Name of the storage controller to attach the device to.</desc>
4903 </param>
4904 <param name="controllerPort" type="long" dir="in">
4905 <desc>Port to attach the device to.</desc>
4906 </param>
4907 <param name="device" type="long" dir="in">
4908 <desc>Device slot in the given port to attach the device to.</desc>
4909 </param>
4910 <param name="type" type="DeviceType" dir="in">
4911 <desc>Device type of the attached device.</desc>
4912 </param>
4913 <param name="id" type="uuid" mod="string" dir="in">
4914 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4915 medium.</desc>
4916 </param>
4917 </method>
4918
4919 <method name="detachDevice">
4920 <desc>
4921 Detaches the device attached to a device slot of the specified bus.
4922
4923 Detaching the device from the virtual machine is deferred. This means
4924 that the medium remains associated with the machine when this method
4925 returns and gets actually de-associated only after a successful
4926 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4927 for more detailed information about attaching media.
4928
4929 <note>
4930 You cannot detach a device from a running machine.
4931 </note>
4932 <note>
4933 Detaching differencing media implicitly created by <link
4934 to="#attachDevice"/> for the indirect attachment using this
4935 method will <b>not</b> implicitly delete them. The
4936 <link to="IMedium::deleteStorage"/> operation should be
4937 explicitly performed by the caller after the medium is successfully
4938 detached and the settings are saved with
4939 <link to="#saveSettings"/>, if it is the desired action.
4940 </note>
4941
4942 <result name="VBOX_E_INVALID_VM_STATE">
4943 Attempt to detach medium from a running virtual machine.
4944 </result>
4945 <result name="VBOX_E_OBJECT_NOT_FOUND">
4946 No medium attached to given slot/bus.
4947 </result>
4948 <result name="VBOX_E_NOT_SUPPORTED">
4949 Medium format does not support storage deletion.
4950 </result>
4951
4952 </desc>
4953 <param name="name" type="wstring" dir="in">
4954 <desc>Name of the storage controller to detach the medium from.</desc>
4955 </param>
4956 <param name="controllerPort" type="long" dir="in">
4957 <desc>Port number to detach the medium from.</desc>
4958 </param>
4959 <param name="device" type="long" dir="in">
4960 <desc>Device slot number to detach the medium from.</desc>
4961 </param>
4962 </method>
4963
4964 <method name="passthroughDevice">
4965 <desc>
4966 Sets the passthrough mode of an existing DVD device. Changing the
4967 setting while the VM is running is forbidden. The setting is only used
4968 if at VM start the device is configured as a host DVD drive, in all
4969 other cases it is ignored. The device must already exist; see
4970 <link to="IMachine::attachDevice"/> for how to attach a new device.
4971
4972 The @a controllerPort and @a device parameters specify the device slot and
4973 have have the same meaning as with <link to="IMachine::attachDevice" />.
4974
4975 <result name="E_INVALIDARG">
4976 SATA device, SATA port, IDE port or IDE slot out of range.
4977 </result>
4978 <result name="VBOX_E_INVALID_OBJECT_STATE">
4979 Attempt to modify an unregistered virtual machine.
4980 </result>
4981 <result name="VBOX_E_INVALID_VM_STATE">
4982 Invalid machine state.
4983 </result>
4984
4985 </desc>
4986 <param name="name" type="wstring" dir="in">
4987 <desc>Name of the storage controller.</desc>
4988 </param>
4989 <param name="controllerPort" type="long" dir="in">
4990 <desc>Storage controller port.</desc>
4991 </param>
4992 <param name="device" type="long" dir="in">
4993 <desc>Device slot in the given port.</desc>
4994 </param>
4995 <param name="passthrough" type="boolean" dir="in">
4996 <desc>New value for the passthrough setting.</desc>
4997 </param>
4998 </method>
4999
5000 <method name="mountMedium">
5001 <desc>
5002 Mounts a medium (<link to="IMedium" />, identified
5003 by the given UUID @a id) to the given storage controller
5004 (<link to="IStorageController" />, identified by @a name),
5005 at the indicated port and device. The device must already exist;
5006 see <link to="IMachine::attachDevice"/> for how to attach a new device.
5007
5008 This method is intended only for managing removable media, where the
5009 device is fixed but media is changeable at runtime (such as DVDs
5010 and floppies). It cannot be used for fixed media such as hard disks.
5011
5012 The @a controllerPort and @a device parameters specify the device slot and
5013 have have the same meaning as with <link to="IMachine::attachDevice" />.
5014
5015 The specified device slot can have a medium mounted, which will be
5016 unmounted first. Specifying a zero UUID (or an empty string) for
5017 @a medium does just an unmount.
5018
5019 See <link to="IMedium"/> for more detailed information about
5020 attaching media.
5021
5022 <result name="E_INVALIDARG">
5023 SATA device, SATA port, IDE port or IDE slot out of range.
5024 </result>
5025 <result name="VBOX_E_INVALID_OBJECT_STATE">
5026 Attempt to attach medium to an unregistered virtual machine.
5027 </result>
5028 <result name="VBOX_E_INVALID_VM_STATE">
5029 Invalid machine state.
5030 </result>
5031 <result name="VBOX_E_OBJECT_IN_USE">
5032 Medium already attached to this or another virtual machine.
5033 </result>
5034
5035 </desc>
5036 <param name="name" type="wstring" dir="in">
5037 <desc>Name of the storage controller to attach the medium to.</desc>
5038 </param>
5039 <param name="controllerPort" type="long" dir="in">
5040 <desc>Port to attach the medium to.</desc>
5041 </param>
5042 <param name="device" type="long" dir="in">
5043 <desc>Device slot in the given port to attach the medium to.</desc>
5044 </param>
5045 <param name="medium" type="uuid" mod="string" dir="in">
5046 <desc>UUID of the medium to attach. A zero UUID means unmount the
5047 currently mounted medium.</desc>
5048 </param>
5049 <param name="force" type="boolean" dir="in">
5050 <desc>Allows to force unmount/mount of a medium which is locked by
5051 theDevice slot in the given port to attach the medium to.</desc>
5052 </param>
5053 </method>
5054
5055 <method name="getMedium" const="yes">
5056 <desc>
5057 Returns the virtual medium attached to a device slot of the specified
5058 bus.
5059
5060 Note that if the medium was indirectly attached by
5061 <link to="#mountMedium"/> to the given device slot then this
5062 method will return not the same object as passed to the
5063 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
5064 more detailed information about mounting a medium.
5065
5066 <result name="VBOX_E_OBJECT_NOT_FOUND">
5067 No medium attached to given slot/bus.
5068 </result>
5069
5070 </desc>
5071 <param name="name" type="wstring" dir="in">
5072 <desc>Name of the storage controller the medium is attached to.</desc>
5073 </param>
5074 <param name="controllerPort" type="long" dir="in">
5075 <desc>Port to query.</desc>
5076 </param>
5077 <param name="device" type="long" dir="in">
5078 <desc>Device slot in the given port to query.</desc>
5079 </param>
5080 <param name="medium" type="IMedium" dir="return">
5081 <desc>Attached medium object.</desc>
5082 </param>
5083 </method>
5084
5085 <method name="getMediumAttachmentsOfController" const="yes">
5086 <desc>
5087 Returns an array of medium attachments which are attached to the
5088 the controller with the given name.
5089
5090 <result name="VBOX_E_OBJECT_NOT_FOUND">
5091 A storage controller with given name doesn't exist.
5092 </result>
5093 </desc>
5094 <param name="name" type="wstring" dir="in"/>
5095 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
5096 </method>
5097
5098 <method name="getMediumAttachment" const="yes">
5099 <desc>
5100 Returns a medium attachment which corresponds to the controller with
5101 the given name, on the given port and device slot.
5102
5103 <result name="VBOX_E_OBJECT_NOT_FOUND">
5104 No attachment exists for the given controller/port/device combination.
5105 </result>
5106 </desc>
5107 <param name="name" type="wstring" dir="in"/>
5108 <param name="controllerPort" type="long" dir="in"/>
5109 <param name="device" type="long" dir="in"/>
5110 <param name="attachment" type="IMediumAttachment" dir="return"/>
5111 </method>
5112
5113 <method name="getNetworkAdapter" const="yes">
5114 <desc>
5115 Returns the network adapter associated with the given slot.
5116 Slots are numbered sequentially, starting with zero. The total
5117 number of adapters per machine is defined by the
5118 <link to="ISystemProperties::networkAdapterCount"/> property,
5119 so the maximum slot number is one less than that property's value.
5120
5121 <result name="E_INVALIDARG">
5122 Invalid @a slot number.
5123 </result>
5124
5125 </desc>
5126 <param name="slot" type="unsigned long" dir="in"/>
5127 <param name="adapter" type="INetworkAdapter" dir="return"/>
5128 </method>
5129
5130 <method name="addStorageController">
5131 <desc>
5132 Adds a new storage controller (SCSI or SATA controller) to the
5133 machine and returns it as an instance of
5134 <link to="IStorageController" />.
5135
5136 @a name identifies the controller for subsequent calls such as
5137 <link to="#getStorageControllerByName" />,
5138 <link to="#getStorageControllerByInstance" />,
5139 <link to="#removeStorageController" />,
5140 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5141
5142 After the controller has been added, you can set its exact
5143 type by setting the <link to="IStorageController::controllerType" />.
5144
5145 <result name="VBOX_E_OBJECT_IN_USE">
5146 A storage controller with given name exists already.
5147 </result>
5148 <result name="E_INVALIDARG">
5149 Invalid @a controllerType.
5150 </result>
5151 </desc>
5152 <param name="name" type="wstring" dir="in"/>
5153 <param name="connectionType" type="StorageBus" dir="in"/>
5154 <param name="controller" type="IStorageController" dir="return"/>
5155 </method>
5156
5157 <method name="getStorageControllerByName" const="yes">
5158 <desc>
5159 Returns a storage controller with the given name.
5160
5161 <result name="VBOX_E_OBJECT_NOT_FOUND">
5162 A storage controller with given name doesn't exist.
5163 </result>
5164 </desc>
5165 <param name="name" type="wstring" dir="in"/>
5166 <param name="storageController" type="IStorageController" dir="return"/>
5167 </method>
5168
5169 <method name="getStorageControllerByInstance" const="yes">
5170 <desc>
5171 Returns a storage controller with the given instance number.
5172
5173 <result name="VBOX_E_OBJECT_NOT_FOUND">
5174 A storage controller with given instance number doesn't exist.
5175 </result>
5176 </desc>
5177 <param name="instance" type="unsigned long" dir="in"/>
5178 <param name="storageController" type="IStorageController" dir="return"/>
5179 </method>
5180
5181 <method name="removeStorageController">
5182 <desc>
5183 Removes a storage controller from the machine.
5184
5185 <result name="VBOX_E_OBJECT_NOT_FOUND">
5186 A storage controller with given name doesn't exist.
5187 </result>
5188 </desc>
5189 <param name="name" type="wstring" dir="in"/>
5190 </method>
5191
5192 <method name="getSerialPort" const="yes">
5193 <desc>
5194 Returns the serial port associated with the given slot.
5195 Slots are numbered sequentially, starting with zero. The total
5196 number of serial ports per machine is defined by the
5197 <link to="ISystemProperties::serialPortCount"/> property,
5198 so the maximum slot number is one less than that property's value.
5199
5200 <result name="E_INVALIDARG">
5201 Invalid @a slot number.
5202 </result>
5203
5204 </desc>
5205 <param name="slot" type="unsigned long" dir="in"/>
5206 <param name="port" type="ISerialPort" dir="return"/>
5207 </method>
5208
5209 <method name="getParallelPort" const="yes">
5210 <desc>
5211 Returns the parallel port associated with the given slot.
5212 Slots are numbered sequentially, starting with zero. The total
5213 number of parallel ports per machine is defined by the
5214 <link to="ISystemProperties::parallelPortCount"/> property,
5215 so the maximum slot number is one less than that property's value.
5216
5217 <result name="E_INVALIDARG">
5218 Invalid @a slot number.
5219 </result>
5220
5221 </desc>
5222 <param name="slot" type="unsigned long" dir="in"/>
5223 <param name="port" type="IParallelPort" dir="return"/>
5224 </method>
5225
5226 <method name="getExtraDataKeys">
5227 <desc>
5228 Returns an array representing the machine-specific extra data keys
5229 which currently have values defined.
5230 </desc>
5231 <param name="value" type="wstring" dir="return" safearray="yes">
5232 <desc>Array of extra data keys.</desc>
5233 </param>
5234 </method>
5235
5236 <method name="getExtraData">
5237 <desc>
5238 Returns associated machine-specific extra data.
5239
5240 If the requested data @a key does not exist, this function will
5241 succeed and return an empty string in the @a value argument.
5242
5243 <result name="VBOX_E_FILE_ERROR">
5244 Settings file not accessible.
5245 </result>
5246 <result name="VBOX_E_XML_ERROR">
5247 Could not parse the settings file.
5248 </result>
5249
5250 </desc>
5251 <param name="key" type="wstring" dir="in">
5252 <desc>Name of the data key to get.</desc>
5253 </param>
5254 <param name="value" type="wstring" dir="return">
5255 <desc>Value of the requested data key.</desc>
5256 </param>
5257 </method>
5258
5259 <method name="setExtraData">
5260 <desc>
5261 Sets associated machine-specific extra data.
5262
5263 If you pass @c null or an empty string as a key @a value, the given
5264 @a key will be deleted.
5265
5266 <note>
5267 Before performing the actual data change, this method will ask all
5268 registered callbacks using the
5269 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5270 notification for a permission. If one of the callbacks refuses the
5271 new value, the change will not be performed.
5272 </note>
5273 <note>
5274 On success, the
5275 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5276 is called to inform all registered callbacks about a successful data
5277 change.
5278 </note>
5279 <note>
5280 This method can be called outside the machine session and therefore
5281 it's a caller's responsibility to handle possible race conditions
5282 when several clients change the same key at the same time.
5283 </note>
5284
5285 <result name="VBOX_E_FILE_ERROR">
5286 Settings file not accessible.
5287 </result>
5288 <result name="VBOX_E_XML_ERROR">
5289 Could not parse the settings file.
5290 </result>
5291
5292 </desc>
5293 <param name="key" type="wstring" dir="in">
5294 <desc>Name of the data key to set.</desc>
5295 </param>
5296 <param name="value" type="wstring" dir="in">
5297 <desc>Value to assign to the key.</desc>
5298 </param>
5299 </method>
5300
5301 <method name="getCpuProperty" const="yes">
5302 <desc>
5303 Returns the virtual CPU boolean value of the specified property.
5304
5305 <result name="E_INVALIDARG">
5306 Invalid property.
5307 </result>
5308
5309 </desc>
5310 <param name="property" type="CpuPropertyType" dir="in">
5311 <desc>
5312 Property type to query.
5313 </desc>
5314 </param>
5315 <param name="value" type="boolean" dir="return">
5316 <desc>
5317 Property value.
5318 </desc>
5319 </param>
5320 </method>
5321
5322 <method name="setCpuProperty">
5323 <desc>
5324 Sets the virtual CPU boolean value of the specified property.
5325
5326 <result name="E_INVALIDARG">
5327 Invalid property.
5328 </result>
5329
5330 </desc>
5331 <param name="property" type="CpuPropertyType" dir="in">
5332 <desc>
5333 Property type to query.
5334 </desc>
5335 </param>
5336 <param name="value" type="boolean" dir="in">
5337 <desc>
5338 Property value.
5339 </desc>
5340 </param>
5341 </method>
5342
5343 <method name="getCpuIdLeaf" const="yes">
5344 <desc>
5345 Returns the virtual CPU cpuid information for the specified leaf.
5346
5347 Currently supported index values for cpuid:
5348 Standard CPUID leafs: 0 - 0xA
5349 Extended CPUID leafs: 0x80000000 - 0x8000000A
5350
5351 See the Intel and AMD programmer's manuals for detailed information
5352 about the cpuid instruction and its leafs.
5353 <result name="E_INVALIDARG">
5354 Invalid id.
5355 </result>
5356
5357 </desc>
5358 <param name="id" type="unsigned long" dir="in">
5359 <desc>
5360 Cpuid leaf index.
5361 </desc>
5362 </param>
5363 <param name="valEax" type="unsigned long" dir="out">
5364 <desc>
5365 Cpuid leaf value for register eax.
5366 </desc>
5367 </param>
5368 <param name="valEbx" type="unsigned long" dir="out">
5369 <desc>
5370 Cpuid leaf value for register ebx.
5371 </desc>
5372 </param>
5373 <param name="valEcx" type="unsigned long" dir="out">
5374 <desc>
5375 Cpuid leaf value for register ecx.
5376 </desc>
5377 </param>
5378 <param name="valEdx" type="unsigned long" dir="out">
5379 <desc>
5380 Cpuid leaf value for register edx.
5381 </desc>
5382 </param>
5383 </method>
5384
5385 <method name="setCpuIdLeaf" const="yes">
5386 <desc>
5387 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5388 are not passed unmodified. VirtualBox clears features that it doesn't support.
5389
5390 Currently supported index values for cpuid:
5391 Standard CPUID leafs: 0 - 0xA
5392 Extended CPUID leafs: 0x80000000 - 0x8000000A
5393
5394 See the Intel and AMD programmer's manuals for detailed information
5395 about the cpuid instruction and its leafs.
5396
5397 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5398 random crashes inside VMs.
5399 <result name="E_INVALIDARG">
5400 Invalid id.
5401 </result>
5402
5403 </desc>
5404 <param name="id" type="unsigned long" dir="in">
5405 <desc>
5406 Cpuid leaf index.
5407 </desc>
5408 </param>
5409 <param name="valEax" type="unsigned long" dir="in">
5410 <desc>
5411 Cpuid leaf value for register eax.
5412 </desc>
5413 </param>
5414 <param name="valEbx" type="unsigned long" dir="in">
5415 <desc>
5416 Cpuid leaf value for register ebx.
5417 </desc>
5418 </param>
5419 <param name="valEcx" type="unsigned long" dir="in">
5420 <desc>
5421 Cpuid leaf value for register ecx.
5422 </desc>
5423 </param>
5424 <param name="valEdx" type="unsigned long" dir="in">
5425 <desc>
5426 Cpuid leaf value for register edx.
5427 </desc>
5428 </param>
5429 </method>
5430
5431 <method name="removeCpuIdLeaf" const="yes">
5432 <desc>
5433 Removes the virtual CPU cpuid leaf for the specified index
5434
5435 <result name="E_INVALIDARG">
5436 Invalid id.
5437 </result>
5438
5439 </desc>
5440 <param name="id" type="unsigned long" dir="in">
5441 <desc>
5442 Cpuid leaf index.
5443 </desc>
5444 </param>
5445 </method>
5446
5447 <method name="removeAllCpuIdLeafs" const="yes">
5448 <desc>
5449 Removes all the virtual CPU cpuid leafs
5450 </desc>
5451 </method>
5452
5453 <method name="getHWVirtExProperty" const="yes">
5454 <desc>
5455 Returns the value of the specified hardware virtualization boolean property.
5456
5457 <result name="E_INVALIDARG">
5458 Invalid property.
5459 </result>
5460
5461 </desc>
5462 <param name="property" type="HWVirtExPropertyType" dir="in">
5463 <desc>
5464 Property type to query.
5465 </desc>
5466 </param>
5467 <param name="value" type="boolean" dir="return">
5468 <desc>
5469 Property value.
5470 </desc>
5471 </param>
5472 </method>
5473
5474 <method name="setHWVirtExProperty">
5475 <desc>
5476 Sets a new value for the specified hardware virtualization boolean property.
5477
5478 <result name="E_INVALIDARG">
5479 Invalid property.
5480 </result>
5481
5482 </desc>
5483 <param name="property" type="HWVirtExPropertyType" dir="in">
5484 <desc>
5485 Property type to set.
5486 </desc>
5487 </param>
5488 <param name="value" type="boolean" dir="in">
5489 <desc>
5490 New property value.
5491 </desc>
5492 </param>
5493 </method>
5494
5495 <method name="saveSettings">
5496 <desc>
5497 Saves any changes to machine settings made since the session
5498 has been opened or a new machine has been created, or since the
5499 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5500 For registered machines, new settings become visible to all
5501 other VirtualBox clients after successful invocation of this
5502 method.
5503 <note>
5504 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5505 notification event after the configuration has been successfully
5506 saved (only for registered machines).
5507 </note>
5508 <note>
5509 Calling this method is only valid on instances returned
5510 by <link to="ISession::machine"/> and on new machines
5511 created by <link to="IVirtualBox::createMachine"/> but not
5512 yet registered, or on unregistered machines after calling
5513 <link to="IVirtualBox::unregisterMachine"/>.
5514 </note>
5515
5516 <result name="VBOX_E_FILE_ERROR">
5517 Settings file not accessible.
5518 </result>
5519 <result name="VBOX_E_XML_ERROR">
5520 Could not parse the settings file.
5521 </result>
5522 <result name="E_ACCESSDENIED">
5523 Modification request refused.
5524 </result>
5525
5526 </desc>
5527 </method>
5528
5529 <method name="discardSettings">
5530 <desc>
5531 Discards any changes to the machine settings made since the session
5532 has been opened or since the last call to <link to="#saveSettings"/>
5533 or <link to="#discardSettings"/>.
5534 <note>
5535 Calling this method is only valid on instances returned
5536 by <link to="ISession::machine"/> and on new machines
5537 created by <link to="IVirtualBox::createMachine"/> or
5538 opened by <link to="IVirtualBox::openMachine"/> but not
5539 yet registered, or on unregistered machines after calling
5540 <link to="IVirtualBox::unregisterMachine"/>.
5541 </note>
5542
5543 <result name="VBOX_E_INVALID_VM_STATE">
5544 Virtual machine is not mutable.
5545 </result>
5546
5547 </desc>
5548 </method>
5549
5550 <method name="deleteSettings">
5551 <desc>
5552 Deletes the settings file of this machine from disk.
5553 The machine must not be registered in order for this operation
5554 to succeed.
5555 <note>
5556 <link to="#settingsModified"/> will return @c true after this
5557 method successfully returns.
5558 </note>
5559 <note>
5560 Calling this method is only valid on instances returned
5561 by <link to="ISession::machine"/> and on new machines
5562 created by <link to="IVirtualBox::createMachine"/> or
5563 opened by <link to="IVirtualBox::openMachine"/> but not
5564 yet registered, or on unregistered machines after calling
5565 <link to="IVirtualBox::unregisterMachine"/>.
5566 </note>
5567 <note>
5568 The deleted machine settings file can be restored (saved again)
5569 by calling <link to="#saveSettings"/>.
5570 </note>
5571
5572 <result name="VBOX_E_INVALID_VM_STATE">
5573 Cannot delete settings of a registered machine or
5574 machine not mutable.
5575 </result>
5576 <result name="VBOX_E_IPRT_ERROR">
5577 Could not delete the settings file.
5578 </result>
5579
5580 </desc>
5581 </method>
5582
5583 <method name="export">
5584 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5585 steps required to export VirtualBox machines to OVF.
5586 </desc>
5587
5588 <param name="aAppliance" type="IAppliance" dir="in">
5589 <desc>Appliance to export this machine to.</desc>
5590 </param>
5591 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5592 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5593 </param>
5594 </method >
5595
5596 <method name="getSnapshot">
5597 <desc>
5598 Returns a snapshot of this machine with the given UUID.
5599 A @c null UUID can be used to obtain the first snapshot
5600 taken on this machine. This is useful if you want to traverse
5601 the whole tree of snapshots starting from the root.
5602
5603 <result name="VBOX_E_OBJECT_NOT_FOUND">
5604 Virtual machine has no snapshots or snapshot not found.
5605 </result>
5606
5607 </desc>
5608 <param name="id" type="uuid" mod="string" dir="in">
5609 <desc>UUID of the snapshot to get</desc>
5610 </param>
5611 <param name="snapshot" type="ISnapshot" dir="return">
5612 <desc>Snapshot object with the given UUID.</desc>
5613 </param>
5614 </method>
5615
5616 <method name="findSnapshot">
5617 <desc>
5618 Returns a snapshot of this machine with the given name.
5619
5620 <result name="VBOX_E_OBJECT_NOT_FOUND">
5621 Virtual machine has no snapshots or snapshot not found.
5622 </result>
5623
5624 </desc>
5625 <param name="name" type="wstring" dir="in">
5626 <desc>Name of the snapshot to find</desc>
5627 </param>
5628 <param name="snapshot" type="ISnapshot" dir="return">
5629 <desc>Snapshot object with the given name.</desc>
5630 </param>
5631 </method>
5632
5633 <method name="setCurrentSnapshot">
5634 <desc>
5635 Sets the current snapshot of this machine.
5636 <note>
5637 In the current implementation, this operation is not
5638 implemented.
5639 </note>
5640 </desc>
5641 <param name="id" type="uuid" mod="string" dir="in">
5642 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5643 </param>
5644 </method>
5645
5646 <method name="createSharedFolder">
5647 <desc>
5648 Creates a new permanent shared folder by associating the given logical
5649 name with the given host path, adds it to the collection of shared
5650 folders and starts sharing it. Refer to the description of
5651 <link to="ISharedFolder"/> to read more about logical names.
5652
5653 <result name="VBOX_E_OBJECT_IN_USE">
5654 Shared folder already exists.
5655 </result>
5656 <result name="VBOX_E_FILE_ERROR">
5657 Shared folder @a hostPath not accessible.
5658 </result>
5659
5660 </desc>
5661 <param name="name" type="wstring" dir="in">
5662 <desc>Unique logical name of the shared folder.</desc>
5663 </param>
5664 <param name="hostPath" type="wstring" dir="in">
5665 <desc>Full path to the shared folder in the host file system.</desc>
5666 </param>
5667 <param name="writable" type="boolean" dir="in">
5668 <desc>Whether the share is writable or readonly</desc>
5669 </param>
5670 </method>
5671
5672 <method name="removeSharedFolder">
5673 <desc>
5674 Removes the permanent shared folder with the given name previously
5675 created by <link to="#createSharedFolder"/> from the collection of
5676 shared folders and stops sharing it.
5677
5678 <result name="VBOX_E_INVALID_VM_STATE">
5679 Virtual machine is not mutable.
5680 </result>
5681 <result name="VBOX_E_OBJECT_NOT_FOUND">
5682 Shared folder @a name does not exist.
5683 </result>
5684
5685 </desc>
5686 <param name="name" type="wstring" dir="in">
5687 <desc>Logical name of the shared folder to remove.</desc>
5688 </param>
5689 </method>
5690
5691 <method name="canShowConsoleWindow">
5692 <desc>
5693 Returns @c true if the VM console process can activate the
5694 console window and bring it to foreground on the desktop of
5695 the host PC.
5696 <note>
5697 This method will fail if a session for this machine is not
5698 currently open.
5699 </note>
5700
5701 <result name="VBOX_E_INVALID_VM_STATE">
5702 Machine session is not open.
5703 </result>
5704
5705 </desc>
5706 <param name="canShow" type="boolean" dir="return">
5707 <desc>
5708 @c true if the console window can be shown and @c false otherwise.
5709 </desc>
5710 </param>
5711 </method>
5712
5713 <method name="showConsoleWindow">
5714 <desc>
5715 Activates the console window and brings it to foreground on
5716 the desktop of the host PC. Many modern window managers on
5717 many platforms implement some sort of focus stealing
5718 prevention logic, so that it may be impossible to activate
5719 a window without the help of the currently active
5720 application. In this case, this method will return a non-zero
5721 identifier that represents the top-level window of the VM
5722 console process. The caller, if it represents a currently
5723 active process, is responsible to use this identifier (in a
5724 platform-dependent manner) to perform actual window
5725 activation.
5726 <note>
5727 This method will fail if a session for this machine is not
5728 currently open.
5729 </note>
5730
5731 <result name="VBOX_E_INVALID_VM_STATE">
5732 Machine session is not open.
5733 </result>
5734
5735 </desc>
5736 <param name="winId" type="unsigned long long" dir="return">
5737 <desc>
5738 Platform-dependent identifier of the top-level VM console
5739 window, or zero if this method has performed all actions
5740 necessary to implement the <i>show window</i> semantics for
5741 the given platform and/or VirtualBox front-end.
5742 </desc>
5743 </param>
5744 </method>
5745
5746 <method name="getGuestProperty">
5747 <desc>
5748 Reads an entry from the machine's guest property store.
5749
5750 <result name="VBOX_E_INVALID_VM_STATE">
5751 Machine session is not open.
5752 </result>
5753
5754 </desc>
5755 <param name="name" type="wstring" dir="in">
5756 <desc>
5757 The name of the property to read.
5758 </desc>
5759 </param>
5760 <param name="value" type="wstring" dir="out">
5761 <desc>
5762 The value of the property. If the property does not exist then this
5763 will be empty.
5764 </desc>
5765 </param>
5766 <param name="timestamp" type="unsigned long long" dir="out">
5767 <desc>
5768 The time at which the property was last modified, as seen by the
5769 server process.
5770 </desc>
5771 </param>
5772 <param name="flags" type="wstring" dir="out">
5773 <desc>
5774 Additional property parameters, passed as a comma-separated list of
5775 "name=value" type entries.
5776 </desc>
5777 </param>
5778 </method>
5779
5780 <method name="getGuestPropertyValue">
5781 <desc>
5782 Reads a value from the machine's guest property store.
5783
5784 <result name="VBOX_E_INVALID_VM_STATE">
5785 Machine session is not open.
5786 </result>
5787
5788 </desc>
5789 <param name="property" type="wstring" dir="in">
5790 <desc>
5791 The name of the property to read.
5792 </desc>
5793 </param>
5794 <param name="value" type="wstring" dir="return">
5795 <desc>
5796 The value of the property. If the property does not exist then this
5797 will be empty.
5798 </desc>
5799 </param>
5800 </method>
5801
5802 <method name="getGuestPropertyTimestamp">
5803 <desc>
5804 Reads a property timestamp from the machine's guest property store.
5805
5806 <result name="VBOX_E_INVALID_VM_STATE">
5807 Machine session is not open.
5808 </result>
5809
5810 </desc>
5811 <param name="property" type="wstring" dir="in">
5812 <desc>
5813 The name of the property to read.
5814 </desc>
5815 </param>
5816 <param name="value" type="unsigned long long" dir="return">
5817 <desc>
5818 The timestamp. If the property does not exist then this will be
5819 empty.
5820 </desc>
5821 </param>
5822 </method>
5823
5824 <method name="setGuestProperty">
5825 <desc>
5826 Sets, changes or deletes an entry in the machine's guest property
5827 store.
5828
5829 <result name="E_ACCESSDENIED">
5830 Property cannot be changed.
5831 </result>
5832 <result name="E_INVALIDARG">
5833 Invalid @a flags.
5834 </result>
5835 <result name="VBOX_E_INVALID_VM_STATE">
5836 Virtual machine is not mutable or session not open.
5837 </result>
5838 <result name="VBOX_E_INVALID_OBJECT_STATE">
5839 Cannot set transient property when machine not running.
5840 </result>
5841
5842 </desc>
5843 <param name="property" type="wstring" dir="in">
5844 <desc>
5845 The name of the property to set, change or delete.
5846 </desc>
5847 </param>
5848 <param name="value" type="wstring" dir="in">
5849 <desc>
5850 The new value of the property to set, change or delete. If the
5851 property does not yet exist and value is non-empty, it will be
5852 created. If the value is @c null or empty, the property will be
5853 deleted if it exists.
5854 </desc>
5855 </param>
5856 <param name="flags" type="wstring" dir="in">
5857 <desc>
5858 Additional property parameters, passed as a comma-separated list of
5859 "name=value" type entries.
5860 </desc>
5861 </param>
5862 </method>
5863
5864 <method name="setGuestPropertyValue">
5865 <desc>
5866 Sets, changes or deletes a value in the machine's guest property
5867 store. The flags field will be left unchanged or created empty for a
5868 new property.
5869
5870 <result name="E_ACCESSDENIED">
5871 Property cannot be changed.
5872 </result>
5873 <result name="VBOX_E_INVALID_VM_STATE">
5874 Virtual machine is not mutable or session not open.
5875 </result>
5876 <result name="VBOX_E_INVALID_OBJECT_STATE">
5877 Cannot set transient property when machine not running.
5878 </result>
5879 </desc>
5880
5881 <param name="property" type="wstring" dir="in">
5882 <desc>
5883 The name of the property to set, change or delete.
5884 </desc>
5885 </param>
5886 <param name="value" type="wstring" dir="in">
5887 <desc>
5888 The new value of the property to set, change or delete. If the
5889 property does not yet exist and value is non-empty, it will be
5890 created. If the value is @c null or empty, the property will be
5891 deleted if it exists.
5892 </desc>
5893 </param>
5894 </method>
5895
5896 <method name="enumerateGuestProperties">
5897 <desc>
5898 Return a list of the guest properties matching a set of patterns along
5899 with their values, time stamps and flags.
5900 </desc>
5901 <param name="patterns" type="wstring" dir="in">
5902 <desc>
5903 The patterns to match the properties against, separated by '|'
5904 characters. If this is empty or @c null, all properties will match.
5905 </desc>
5906 </param>
5907 <param name="name" type="wstring" dir="out" safearray="yes">
5908 <desc>
5909 The names of the properties returned.
5910 </desc>
5911 </param>
5912 <param name="value" type="wstring" dir="out" safearray="yes">
5913 <desc>
5914 The values of the properties returned. The array entries match the
5915 corresponding entries in the @a name array.
5916 </desc>
5917 </param>
5918 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5919 <desc>
5920 The time stamps of the properties returned. The array entries match
5921 the corresponding entries in the @a name array.
5922 </desc>
5923 </param>
5924 <param name="flags" type="wstring" dir="out" safearray="yes">
5925 <desc>
5926 The flags of the properties returned. The array entries match the
5927 corresponding entries in the @a name array.
5928 </desc>
5929 </param>
5930 </method>
5931
5932 <method name="querySavedThumbnailSize">
5933 <desc>
5934 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5935 </desc>
5936 <param name="size" type="unsigned long" dir="out">
5937 <desc>
5938 Size of buffer required to store the bitmap.
5939 </desc>
5940 </param>
5941 <param name="width" type="unsigned long" dir="out">
5942 <desc>
5943 Bitmap width.
5944 </desc>
5945 </param>
5946 <param name="height" type="unsigned long" dir="out">
5947 <desc>
5948 Bitmap height.
5949 </desc>
5950 </param>
5951 </method>
5952
5953 <method name="readSavedThumbnailToArray">
5954 <desc>
5955 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5956 </desc>
5957 <param name="BGR" type="boolean" dir="in">
5958 <desc>
5959 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5960 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5961 </desc>
5962 </param>
5963 <param name="width" type="unsigned long" dir="out">
5964 <desc>
5965 Bitmap width.
5966 </desc>
5967 </param>
5968 <param name="height" type="unsigned long" dir="out">
5969 <desc>
5970 Bitmap height.
5971 </desc>
5972 </param>
5973 <param name="data" type="octet" dir="return" safearray="yes">
5974 <desc>
5975 Array with resulting bitmap data.
5976 </desc>
5977 </param>
5978 </method>
5979
5980 <method name="querySavedScreenshotPNGSize">
5981 <desc>
5982 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5983 </desc>
5984 <param name="size" type="unsigned long" dir="out">
5985 <desc>
5986 Size of buffer required to store the PNG binary data.
5987 </desc>
5988 </param>
5989 <param name="width" type="unsigned long" dir="out">
5990 <desc>
5991 Image width.
5992 </desc>
5993 </param>
5994 <param name="height" type="unsigned long" dir="out">
5995 <desc>
5996 Image height.
5997 </desc>
5998 </param>
5999 </method>
6000
6001 <method name="readSavedScreenshotPNGToArray">
6002 <desc>
6003 Screenshot in PNG format is retrieved to an array of bytes.
6004 </desc>
6005 <param name="width" type="unsigned long" dir="out">
6006 <desc>
6007 Image width.
6008 </desc>
6009 </param>
6010 <param name="height" type="unsigned long" dir="out">
6011 <desc>
6012 Image height.
6013 </desc>
6014 </param>
6015 <param name="data" type="octet" dir="return" safearray="yes">
6016 <desc>
6017 Array with resulting PNG data.
6018 </desc>
6019 </param>
6020 </method>
6021
6022 <method name="HotPlugCPU">
6023 <desc>
6024 Plugs a CPU into the machine.
6025 </desc>
6026 <param name="cpu" type="unsigned long" dir="in">
6027 <desc>
6028 The CPU id to insert.
6029 </desc>
6030 </param>
6031 </method>
6032
6033 <method name="HotUnplugCPU">
6034 <desc>
6035 Removes a CPU from the machine.
6036 </desc>
6037 <param name="cpu" type="unsigned long" dir="in">
6038 <desc>
6039 The CPU id to remove.
6040 </desc>
6041 </param>
6042 </method>
6043
6044 <method name="GetCPUStatus">
6045 <desc>
6046 Plugs a CPU into the machine.
6047 </desc>
6048 <param name="cpu" type="unsigned long" dir="in">
6049 <desc>
6050 The CPU id to check for.
6051 </desc>
6052 </param>
6053 <param name="attached" type="boolean" dir="return">
6054 <desc>
6055 Status of the CPU.
6056 </desc>
6057 </param>
6058 </method>
6059</interface>
6060
6061 <!--
6062 // IConsole
6063 /////////////////////////////////////////////////////////////////////////
6064 -->
6065
6066 <interface
6067 name="IConsoleCallback" extends="$unknown"
6068 uuid="60703f8d-81e4-4b45-a147-dcfd07692b19"
6069 wsmap="suppress"
6070 >
6071
6072 <desc>
6073 This interface is used by a client of the Main API that need to
6074 be notified of events. For example, a graphical user interface
6075 can use this to learn about machine state changes so they can
6076 update the list of virtual machines without having to rely
6077 on polling.
6078
6079 Whenever relevant events occur in VirtualBox, the callbacks in
6080 objects of this interface are called. In order for this to be
6081 useful, a client needs to create its own subclass that implements
6082 this interface in which the methods for the relevant callbacks
6083 are overridden. An instance of this subclass interface can then
6084 be passed to <link to="IConsole::registerCallback" />.
6085 </desc>
6086
6087 <method name="onMousePointerShapeChange">
6088 <desc>
6089 Notification when the guest mouse pointer shape has
6090 changed. The new shape data is given.
6091 </desc>
6092 <param name="visible" type="boolean" dir="in">
6093 <desc>
6094 Flag whether the pointer is visible.
6095 </desc>
6096 </param>
6097 <param name="alpha" type="boolean" dir="in">
6098 <desc>
6099 Flag whether the pointer has an alpha channel.
6100 </desc>
6101 </param>
6102 <param name="xHot" type="unsigned long" dir="in">
6103 <desc>
6104 The pointer hot spot x coordinate.
6105 </desc>
6106 </param>
6107 <param name="yHot" type="unsigned long" dir="in">
6108 <desc>
6109 The pointer hot spot y coordinate.
6110 </desc>
6111 </param>
6112 <param name="width" type="unsigned long" dir="in">
6113 <desc>
6114 Width of the pointer shape in pixels.
6115 </desc>
6116 </param>
6117 <param name="height" type="unsigned long" dir="in">
6118 <desc>
6119 Height of the pointer shape in pixels.
6120 </desc>
6121 </param>
6122 <param name="shape" type="octet" mod="ptr" dir="in">
6123 <desc>
6124 Address of the shape buffer.
6125
6126 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
6127 followed by a 32-bpp XOR (color) mask.
6128
6129 For pointers without alpha channel the XOR mask pixels are 32
6130 bit values: (lsb)BGR0(msb). For pointers with alpha channel
6131 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
6132
6133 An AND mask is used for pointers with alpha channel, so if the
6134 callback does not support alpha, the pointer could be
6135 displayed as a normal color pointer.
6136
6137 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
6138 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
6139 height</tt>. The padding bits at the end of each scanline are
6140 undefined.
6141
6142 The XOR mask follows the AND mask on the next 4-byte aligned
6143 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
6144 Bytes in the gap between the AND and the XOR mask are undefined.
6145 The XOR mask scanlines have no gap between them and the size of
6146 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
6147
6148 <note>
6149 If @a shape is 0, only the pointer visibility is changed.
6150 </note>
6151 </desc>
6152 </param>
6153 </method>
6154
6155 <method name="onMouseCapabilityChange">
6156 <desc>
6157 Notification when the mouse capabilities reported by the
6158 guest have changed. The new capabilities are passed.
6159 </desc>
6160 <param name="supportsAbsolute" type="boolean" dir="in"/>
6161 <param name="supportsRelative" type="boolean" dir="in"/>
6162 <param name="needsHostCursor" type="boolean" dir="in"/>
6163 </method>
6164
6165 <method name="onKeyboardLedsChange">
6166 <desc>
6167 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6168 to alter the state of the keyboard LEDs.
6169 </desc>
6170 <param name="numLock" type="boolean" dir="in"/>
6171 <param name="capsLock" type="boolean" dir="in"/>
6172 <param name="scrollLock" type="boolean" dir="in"/>
6173 </method>
6174
6175 <method name="onStateChange">
6176 <desc>
6177 Notification when the execution state of the machine has changed.
6178 The new state will be given.
6179 </desc>
6180 <param name="state" type="MachineState" dir="in"/>
6181 </method>
6182
6183 <method name="onAdditionsStateChange">
6184 <desc>
6185 Notification when a Guest Additions property changes.
6186 Interested callees should query IGuest attributes to
6187 find out what has changed.
6188 </desc>
6189 </method>
6190
6191 <method name="onNetworkAdapterChange">
6192 <desc>
6193 Notification when a property of one of the
6194 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6195 changes. Interested callees should use INetworkAdapter methods and
6196 attributes to find out what has changed.
6197 </desc>
6198 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6199 <desc>Network adapter that is subject to change.</desc>
6200 </param>
6201 </method>
6202
6203 <method name="onSerialPortChange">
6204 <desc>
6205 Notification when a property of one of the
6206 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6207 Interested callees should use ISerialPort methods and attributes
6208 to find out what has changed.
6209 </desc>
6210 <param name="serialPort" type="ISerialPort" dir="in">
6211 <desc>Serial port that is subject to change.</desc>
6212 </param>
6213 </method>
6214
6215 <method name="onParallelPortChange">
6216 <desc>
6217 Notification when a property of one of the
6218 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6219 changes. Interested callees should use ISerialPort methods and
6220 attributes to find out what has changed.
6221 </desc>
6222 <param name="parallelPort" type="IParallelPort" dir="in">
6223 <desc>Parallel port that is subject to change.</desc>
6224 </param>
6225 </method>
6226
6227 <method name="onStorageControllerChange">
6228 <desc>
6229 Notification when a property of one of the
6230 virtual <link to="IMachine::storageControllers">storage controllers</link>
6231 changes. Interested callees should query the corresponding collections
6232 to find out what has changed.
6233 </desc>
6234 </method>
6235
6236 <method name="onMediumChange">
6237 <desc>
6238 Notification when a
6239 <link to="IMachine::mediumAttachments">medium attachment</link>
6240 changes.
6241 </desc>
6242 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6243 <desc>Medium attachment that is subject to change.</desc>
6244 </param>
6245 </method>
6246
6247 <method name="onCPUChange">
6248 <desc>
6249 Notification when a CPU changes.
6250 </desc>
6251 <param name="cpu" type="unsigned long" dir="in">
6252 <desc>The CPU which changed</desc>
6253 </param>
6254 <param name="add" type="boolean" dir="in">
6255 <desc>Flag whether the CPU was added or removed</desc>
6256 </param>
6257 </method>
6258
6259 <method name="onVRDPServerChange">
6260 <desc>
6261 Notification when a property of the
6262 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6263 Interested callees should use IVRDPServer methods and attributes to
6264 find out what has changed.
6265 </desc>
6266 </method>
6267
6268 <method name="onRemoteDisplayInfoChange">
6269 <desc>
6270 Notification when the status of the VRDP server changes. Interested callees
6271 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6272 attributes to find out what is the current status.
6273 </desc>
6274 </method>
6275
6276 <method name="onUSBControllerChange">
6277 <desc>
6278 Notification when a property of the virtual
6279 <link to="IMachine::USBController">USB controller</link> changes.
6280 Interested callees should use IUSBController methods and attributes to
6281 find out what has changed.
6282 </desc>
6283 </method>
6284
6285 <method name="onUSBDeviceStateChange">
6286 <desc>
6287 Notification when a USB device is attached to or detached from
6288 the virtual USB controller.
6289
6290 This notification is sent as a result of the indirect
6291 request to attach the device because it matches one of the
6292 machine USB filters, or as a result of the direct request
6293 issued by <link to="IConsole::attachUSBDevice"/> or
6294 <link to="IConsole::detachUSBDevice"/>.
6295
6296 This notification is sent in case of both a succeeded and a
6297 failed request completion. When the request succeeds, the
6298 @a error parameter is @c null, and the given device has been
6299 already added to (when @a attached is @c true) or removed from
6300 (when @a attached is @c false) the collection represented by
6301 <link to="IConsole::USBDevices"/>. On failure, the collection
6302 doesn't change and the @a error parameter represents the error
6303 message describing the failure.
6304
6305 </desc>
6306 <param name="device" type="IUSBDevice" dir="in">
6307 <desc>Device that is subject to state change.</desc>
6308 </param>
6309 <param name="attached" type="boolean" dir="in">
6310 <desc>
6311 @c true if the device was attached and @c false otherwise.
6312 </desc>
6313 </param>
6314 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6315 <desc>
6316 @c null on success or an error message object on failure.
6317 </desc>
6318 </param>
6319 </method>
6320
6321 <method name="onSharedFolderChange">
6322 <desc>
6323 Notification when a shared folder is added or removed.
6324 The @a scope argument defines one of three scopes:
6325 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6326 (<link to="Scope_Global">Global</link>),
6327 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6328 the machine (<link to="Scope_Machine">Machine</link>) or <link
6329 to="IConsole::sharedFolders">transient shared folders</link> of the
6330 machine (<link to="Scope_Session">Session</link>). Interested callees
6331 should use query the corresponding collections to find out what has
6332 changed.
6333 </desc>
6334 <param name="scope" type="Scope" dir="in">
6335 <desc>Scope of the notification.</desc>
6336 </param>
6337 </method>
6338
6339 <method name="onRuntimeError">
6340 <desc>
6341 Notification when an error happens during the virtual
6342 machine execution.
6343
6344 There are three kinds of runtime errors:
6345 <ul>
6346 <li><i>fatal</i></li>
6347 <li><i>non-fatal with retry</i></li>
6348 <li><i>non-fatal warnings</i></li>
6349 </ul>
6350
6351 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6352 to @c true. In case of fatal errors, the virtual machine
6353 execution is always paused before calling this notification, and
6354 the notification handler is supposed either to immediately save
6355 the virtual machine state using <link to="IConsole::saveState"/>
6356 or power it off using <link to="IConsole::powerDown"/>.
6357 Resuming the execution can lead to unpredictable results.
6358
6359 <b>Non-fatal</b> errors and warnings are indicated by the
6360 @a fatal parameter set to @c false. If the virtual machine
6361 is in the Paused state by the time the error notification is
6362 received, it means that the user can <i>try to resume</i> the machine
6363 execution after attempting to solve the problem that caused the
6364 error. In this case, the notification handler is supposed
6365 to show an appropriate message to the user (depending on the
6366 value of the @a id parameter) that offers several actions such
6367 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6368 wants to retry, the notification handler should continue
6369 the machine execution using the <link to="IConsole::resume"/>
6370 call. If the machine execution is not Paused during this
6371 notification, then it means this notification is a <i>warning</i>
6372 (for example, about a fatal condition that can happen very soon);
6373 no immediate action is required from the user, the machine
6374 continues its normal execution.
6375
6376 Note that in either case the notification handler
6377 <b>must not</b> perform any action directly on a thread
6378 where this notification is called. Everything it is allowed to
6379 do is to post a message to another thread that will then talk
6380 to the user and take the corresponding action.
6381
6382 Currently, the following error identifiers are known:
6383 <ul>
6384 <li><tt>"HostMemoryLow"</tt></li>
6385 <li><tt>"HostAudioNotResponding"</tt></li>
6386 <li><tt>"VDIStorageFull"</tt></li>
6387 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6388 </ul>
6389
6390 <note>
6391 This notification is not designed to be implemented by
6392 more than one callback at a time. If you have multiple
6393 IConsoleCallback instances registered on the given
6394 IConsole object, make sure you simply do nothing but
6395 return @c S_OK from all but one of them that does actual
6396 user notification and performs necessary actions.
6397 </note>
6398
6399 </desc>
6400 <param name="fatal" type="boolean" dir="in">
6401 <desc>Whether the error is fatal or not</desc>
6402 </param>
6403 <param name="id" type="wstring" dir="in">
6404 <desc>Error identifier</desc>
6405 </param>
6406 <param name="message" type="wstring" dir="in">
6407 <desc>Optional error message</desc>
6408 </param>
6409 </method>
6410
6411 <method name="onCanShowWindow">
6412 <desc>
6413 Notification when a call to
6414 <link to="IMachine::canShowConsoleWindow"/> is made by a
6415 front-end to check if a subsequent call to
6416 <link to="IMachine::showConsoleWindow"/> can succeed.
6417
6418 The callee should give an answer appropriate to the current
6419 machine state in the @a canShow argument. This answer must
6420 remain valid at least until the next
6421 <link to="IConsole::state">machine state</link> change.
6422
6423 <note>
6424 This notification is not designed to be implemented by
6425 more than one callback at a time. If you have multiple
6426 IConsoleCallback instances registered on the given
6427 IConsole object, make sure you simply do nothing but
6428 return @c true and @c S_OK from all but one of them that
6429 actually manages console window activation.
6430 </note>
6431 </desc>
6432 <param name="canShow" type="boolean" dir="return">
6433 <desc>
6434 @c true if the console window can be shown and @c false otherwise.
6435 </desc>
6436 </param>
6437 </method>
6438
6439 <method name="onShowWindow">
6440 <desc>
6441 Notification when a call to
6442 <link to="IMachine::showConsoleWindow"/>
6443 requests the console window to be activated and brought to
6444 foreground on the desktop of the host PC.
6445
6446 This notification should cause the VM console process to
6447 perform the requested action as described above. If it is
6448 impossible to do it at a time of this notification, this
6449 method should return a failure.
6450
6451 Note that many modern window managers on many platforms
6452 implement some sort of focus stealing prevention logic, so
6453 that it may be impossible to activate a window without the
6454 help of the currently active application (which is supposedly
6455 an initiator of this notification). In this case, this method
6456 must return a non-zero identifier that represents the
6457 top-level window of the VM console process. The caller, if it
6458 represents a currently active process, is responsible to use
6459 this identifier (in a platform-dependent manner) to perform
6460 actual window activation.
6461
6462 This method must set @a winId to zero if it has performed all
6463 actions necessary to complete the request and the console
6464 window is now active and in foreground, to indicate that no
6465 further action is required on the caller's side.
6466
6467 <note>
6468 This notification is not designed to be implemented by
6469 more than one callback at a time. If you have multiple
6470 IConsoleCallback instances registered on the given
6471 IConsole object, make sure you simply do nothing but
6472 return @c S_OK from all but one of them that actually
6473 manages console window activation.
6474 </note>
6475 </desc>
6476 <param name="winId" type="unsigned long long" dir="return">
6477 <desc>
6478 Platform-dependent identifier of the top-level VM console
6479 window, or zero if this method has performed all actions
6480 necessary to implement the <i>show window</i> semantics for
6481 the given platform and/or this VirtualBox front-end.
6482 </desc>
6483 </param>
6484 </method>
6485
6486 </interface>
6487
6488 <interface
6489 name="IRemoteDisplayInfo" extends="$unknown"
6490 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6491 wsmap="struct"
6492 >
6493 <desc>
6494 Contains information about the remote display (VRDP) capabilities and status.
6495 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6496 </desc>
6497
6498 <attribute name="active" type="boolean" readonly="yes">
6499 <desc>
6500 Whether the remote display connection is active.
6501 </desc>
6502 </attribute>
6503
6504 <attribute name="port" type="long" readonly="yes">
6505 <desc>
6506 VRDP server port number. If this property is equal to <tt>0</tt>, then
6507 the VRDP server failed to start, usually because there are no free TCP
6508 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6509 server has not yet been started.
6510 </desc>
6511 </attribute>
6512
6513 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6514 <desc>
6515 How many times a client connected.
6516 </desc>
6517 </attribute>
6518
6519 <attribute name="beginTime" type="long long" readonly="yes">
6520 <desc>
6521 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6522 </desc>
6523 </attribute>
6524
6525 <attribute name="endTime" type="long long" readonly="yes">
6526 <desc>
6527 When the last connection was terminated or the current time, if
6528 connection is still active, in milliseconds since 1970-01-01 UTC.
6529 </desc>
6530 </attribute>
6531
6532 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6533 <desc>
6534 How many bytes were sent in last or current, if still active, connection.
6535 </desc>
6536 </attribute>
6537
6538 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6539 <desc>
6540 How many bytes were sent in all connections.
6541 </desc>
6542 </attribute>
6543
6544 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6545 <desc>
6546 How many bytes were received in last or current, if still active, connection.
6547 </desc>
6548 </attribute>
6549
6550 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6551 <desc>
6552 How many bytes were received in all connections.
6553 </desc>
6554 </attribute>
6555
6556 <attribute name="user" type="wstring" readonly="yes">
6557 <desc>
6558 Login user name supplied by the client.
6559 </desc>
6560 </attribute>
6561
6562 <attribute name="domain" type="wstring" readonly="yes">
6563 <desc>
6564 Login domain name supplied by the client.
6565 </desc>
6566 </attribute>
6567
6568 <attribute name="clientName" type="wstring" readonly="yes">
6569 <desc>
6570 The client name supplied by the client.
6571 </desc>
6572 </attribute>
6573
6574 <attribute name="clientIP" type="wstring" readonly="yes">
6575 <desc>
6576 The IP address of the client.
6577 </desc>
6578 </attribute>
6579
6580 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6581 <desc>
6582 The client software version number.
6583 </desc>
6584 </attribute>
6585
6586 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6587 <desc>
6588 Public key exchange method used when connection was established.
6589 Values: 0 - RDP4 public key exchange scheme.
6590 1 - X509 certificates were sent to client.
6591 </desc>
6592 </attribute>
6593
6594 </interface>
6595
6596 <interface
6597 name="IConsole" extends="$unknown"
6598 uuid="6375231a-c17c-464b-92cb-ae9e128d71c3"
6599 wsmap="managed"
6600 >
6601 <desc>
6602 The IConsole interface represents an interface to control virtual
6603 machine execution.
6604
6605 The console object that implements the IConsole interface is obtained
6606 from a session object after the session for the given machine has been
6607 opened using one of <link to="IVirtualBox::openSession"/>,
6608 <link to="IVirtualBox::openRemoteSession"/> or
6609 <link to="IVirtualBox::openExistingSession"/> methods.
6610
6611 Methods of the IConsole interface allow the caller to query the current
6612 virtual machine execution state, pause the machine or power it down, save
6613 the machine state or take a snapshot, attach and detach removable media
6614 and so on.
6615
6616 <see>ISession</see>
6617 </desc>
6618
6619 <attribute name="machine" type="IMachine" readonly="yes">
6620 <desc>
6621 Machine object this console is sessioned with.
6622 <note>
6623 This is a convenience property, it has the same value as
6624 <link to="ISession::machine"/> of the corresponding session
6625 object.
6626 </note>
6627 </desc>
6628 </attribute>
6629
6630 <attribute name="state" type="MachineState" readonly="yes">
6631 <desc>
6632 Current execution state of the machine.
6633 <note>
6634 This property always returns the same value as the corresponding
6635 property of the IMachine object this console is sessioned with.
6636 For the process that owns (executes) the VM, this is the
6637 preferable way of querying the VM state, because no IPC
6638 calls are made.
6639 </note>
6640 </desc>
6641 </attribute>
6642
6643 <attribute name="guest" type="IGuest" readonly="yes">
6644 <desc>Guest object.</desc>
6645 </attribute>
6646
6647 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6648 <desc>
6649 Virtual keyboard object.
6650 <note>
6651 If the machine is not running, any attempt to use
6652 the returned object will result in an error.
6653 </note>
6654 </desc>
6655 </attribute>
6656
6657 <attribute name="mouse" type="IMouse" readonly="yes">
6658 <desc>
6659 Virtual mouse object.
6660 <note>
6661 If the machine is not running, any attempt to use
6662 the returned object will result in an error.
6663 </note>
6664 </desc>
6665 </attribute>
6666
6667 <attribute name="display" type="IDisplay" readonly="yes">
6668 <desc>Virtual display object.
6669 <note>
6670 If the machine is not running, any attempt to use
6671 the returned object will result in an error.
6672 </note>
6673 </desc>
6674 </attribute>
6675
6676 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6677 <desc>Debugging interface.</desc>
6678 </attribute>
6679
6680 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6681 <desc>
6682 Collection of USB devices currently attached to the virtual
6683 USB controller.
6684 <note>
6685 The collection is empty if the machine is not running.
6686 </note>
6687 </desc>
6688 </attribute>
6689
6690 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6691 <desc>
6692 List of USB devices currently attached to the remote VRDP client.
6693 Once a new device is physically attached to the remote host computer,
6694 it appears in this list and remains there until detached.
6695 </desc>
6696 </attribute>
6697
6698 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6699 <desc>
6700 Collection of shared folders for the current session. These folders
6701 are called transient shared folders because they are available to the
6702 guest OS running inside the associated virtual machine only for the
6703 duration of the session (as opposed to
6704 <link to="IMachine::sharedFolders"/> which represent permanent shared
6705 folders). When the session is closed (e.g. the machine is powered down),
6706 these folders are automatically discarded.
6707
6708 New shared folders are added to the collection using
6709 <link to="#createSharedFolder"/>. Existing shared folders can be
6710 removed using <link to="#removeSharedFolder"/>.
6711 </desc>
6712 </attribute>
6713
6714 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6715 <desc>
6716 Interface that provides information on Remote Display (VRDP) connection.
6717 </desc>
6718 </attribute>
6719
6720 <method name="powerUp">
6721 <desc>
6722 Starts the virtual machine execution using the current machine
6723 state (that is, its current execution state, current settings and
6724 current storage devices).
6725
6726 If the machine is powered off or aborted, the execution will
6727 start from the beginning (as if the real hardware were just
6728 powered on).
6729
6730 If the machine is in the <link to="MachineState_Saved"/> state,
6731 it will continue its execution the point where the state has
6732 been saved.
6733
6734 <note>
6735 Unless you are trying to write a new VirtualBox front-end that
6736 performs direct machine execution (like the VirtualBox or VBoxSDL
6737 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6738 session opened by <link to="IVirtualBox::openSession"/> and use this
6739 session only to change virtual machine settings. If you simply want to
6740 start virtual machine execution using one of the existing front-ends
6741 (for example the VirtualBox GUI or headless server), simply use
6742 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6743 power up the machine automatically for you.
6744 </note>
6745
6746 <see>#saveState</see>
6747 <result name="VBOX_E_INVALID_VM_STATE">
6748 Virtual machine already running.
6749 </result>
6750 <result name="VBOX_E_HOST_ERROR">
6751 Host interface does not exist or name not set.
6752 </result>
6753 <result name="VBOX_E_FILE_ERROR">
6754 Invalid saved state file.
6755 </result>
6756 </desc>
6757 <param name="progress" type="IProgress" dir="return">
6758 <desc>Progress object to track the operation completion.</desc>
6759 </param>
6760 </method>
6761
6762 <method name="powerUpPaused">
6763 <desc>
6764 Identical to powerUp except that the VM will enter the
6765 <link to="MachineState_Paused"/> state, instead of
6766 <link to="MachineState_Running"/>.
6767
6768 <see>#powerUp</see>
6769 <result name="VBOX_E_INVALID_VM_STATE">
6770 Virtual machine already running.
6771 </result>
6772 <result name="VBOX_E_HOST_ERROR">
6773 Host interface does not exist or name not set.
6774 </result>
6775 <result name="VBOX_E_FILE_ERROR">
6776 Invalid saved state file.
6777 </result>
6778 </desc>
6779 <param name="progress" type="IProgress" dir="return">
6780 <desc>Progress object to track the operation completion.</desc>
6781 </param>
6782 </method>
6783
6784 <method name="powerDown">
6785 <desc>
6786 Initiates the power down procedure to stop the virtual machine
6787 execution.
6788
6789 The completion of the power down procedure is tracked using the returned
6790 IProgress object. After the operation is complete, the machine will go
6791 to the PoweredOff state.
6792 <result name="VBOX_E_INVALID_VM_STATE">
6793 Virtual machine must be Running, Paused or Stuck to be powered down.
6794 </result>
6795 </desc>
6796 <param name="progress" type="IProgress" dir="return">
6797 <desc>Progress object to track the operation completion.</desc>
6798 </param>
6799 </method>
6800
6801 <method name="reset">
6802 <desc>Resets the virtual machine.
6803 <result name="VBOX_E_INVALID_VM_STATE">
6804 Virtual machine not in Running state.
6805 </result>
6806 <result name="VBOX_E_VM_ERROR">
6807 Virtual machine error in reset operation.
6808 </result>
6809 </desc>
6810 </method>
6811
6812 <method name="pause">
6813 <desc>Pauses the virtual machine execution.
6814 <result name="VBOX_E_INVALID_VM_STATE">
6815 Virtual machine not in Running state.
6816 </result>
6817 <result name="VBOX_E_VM_ERROR">
6818 Virtual machine error in suspend operation.
6819 </result>
6820 </desc>
6821 </method>
6822
6823 <method name="resume">
6824 <desc>Resumes the virtual machine execution.
6825 <result name="VBOX_E_INVALID_VM_STATE">
6826 Virtual machine not in Paused state.
6827 </result>
6828 <result name="VBOX_E_VM_ERROR">
6829 Virtual machine error in resume operation.
6830 </result>
6831 </desc>
6832 </method>
6833
6834 <method name="powerButton">
6835 <desc>Sends the ACPI power button event to the guest.
6836 <result name="VBOX_E_INVALID_VM_STATE">
6837 Virtual machine not in Running state.
6838 </result>
6839 <result name="VBOX_E_PDM_ERROR">
6840 Controlled power off failed.
6841 </result>
6842 </desc>
6843 </method>
6844
6845 <method name="sleepButton">
6846 <desc>Sends the ACPI sleep button event to the guest.
6847 <result name="VBOX_E_INVALID_VM_STATE">
6848 Virtual machine not in Running state.
6849 </result>
6850 <result name="VBOX_E_PDM_ERROR">
6851 Sending sleep button event failed.
6852 </result>
6853 </desc>
6854 </method>
6855
6856 <method name="getPowerButtonHandled">
6857 <desc>Checks if the last power button event was handled by guest.
6858 <result name="VBOX_E_PDM_ERROR">
6859 Checking if the event was handled by the guest OS failed.
6860 </result>
6861 </desc>
6862 <param name="handled" type="boolean" dir="return"/>
6863 </method>
6864
6865 <method name="getGuestEnteredACPIMode">
6866 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6867 G1 (sleeping). If this method returns @c false, the guest will
6868 most likely not respond to external ACPI events.
6869 <result name="VBOX_E_INVALID_VM_STATE">
6870 Virtual machine not in Running state.
6871 </result>
6872 </desc>
6873 <param name="entered" type="boolean" dir="return"/>
6874 </method>
6875
6876 <method name="saveState">
6877 <desc>
6878 Saves the current execution state of a running virtual machine
6879 and stops its execution.
6880
6881 After this operation completes, the machine will go to the
6882 Saved state. Next time it is powered up, this state will
6883 be restored and the machine will continue its execution from
6884 the place where it was saved.
6885
6886 This operation differs from taking a snapshot to the effect
6887 that it doesn't create new differencing media. Also, once
6888 the machine is powered up from the state saved using this method,
6889 the saved state is deleted, so it will be impossible to return
6890 to this state later.
6891
6892 <note>
6893 On success, this method implicitly calls
6894 <link to="IMachine::saveSettings"/> to save all current machine
6895 settings (including runtime changes to the DVD medium, etc.).
6896 Together with the impossibility to change any VM settings when it is
6897 in the Saved state, this guarantees adequate hardware
6898 configuration of the machine when it is restored from the saved
6899 state file.
6900 </note>
6901
6902 <note>
6903 The machine must be in the Running or Paused state, otherwise
6904 the operation will fail.
6905 </note>
6906 <result name="VBOX_E_INVALID_VM_STATE">
6907 Virtual machine state neither Running nor Paused.
6908 </result>
6909 <result name="VBOX_E_FILE_ERROR">
6910 Failed to create directory for saved state file.
6911 </result>
6912
6913 <see><link to="#takeSnapshot"/></see>
6914 </desc>
6915 <param name="progress" type="IProgress" dir="return">
6916 <desc>Progress object to track the operation completion.</desc>
6917 </param>
6918 </method>
6919
6920 <method name="adoptSavedState">
6921 <desc>
6922 Associates the given saved state file to the virtual machine.
6923
6924 On success, the machine will go to the Saved state. Next time it is
6925 powered up, it will be restored from the adopted saved state and
6926 continue execution from the place where the saved state file was
6927 created.
6928
6929 The specified saved state file path may be absolute or relative to the
6930 folder the VM normally saves the state to (usually,
6931 <link to="IMachine::snapshotFolder"/>).
6932
6933 <note>
6934 It's a caller's responsibility to make sure the given saved state
6935 file is compatible with the settings of this virtual machine that
6936 represent its virtual hardware (memory size, storage disk configuration
6937 etc.). If there is a mismatch, the behavior of the virtual machine
6938 is undefined.
6939 </note>
6940 <result name="VBOX_E_INVALID_VM_STATE">
6941 Virtual machine state neither PoweredOff nor Aborted.
6942 </result>
6943 </desc>
6944 <param name="savedStateFile" type="wstring" dir="in">
6945 <desc>Path to the saved state file to adopt.</desc>
6946 </param>
6947 </method>
6948
6949 <method name="forgetSavedState">
6950 <desc>
6951 Forgets the saved state of the virtual machine previously created
6952 by <link to="#saveState"/>. Next time the machine is powered up, a
6953 clean boot will occur. If @a remove is @c true the saved state file
6954 is deleted.
6955 <note>
6956 This operation is equivalent to resetting or powering off
6957 the machine without doing a proper shutdown in the guest OS.
6958 </note>
6959 <result name="VBOX_E_INVALID_VM_STATE">
6960 Virtual machine not in state Saved.
6961 </result>
6962 </desc>
6963 <param name="remove" type="boolean" dir="in">
6964 <desc>If @c true remove the saved state file.</desc>
6965 </param>
6966 </method>
6967
6968 <method name="getDeviceActivity">
6969 <desc>
6970 Gets the current activity type of a given device or device group.
6971 <result name="E_INVALIDARG">
6972 Invalid device type.
6973 </result>
6974 </desc>
6975 <param name="type" type="DeviceType" dir="in"/>
6976 <param name="activity" type="DeviceActivity" dir="return"/>
6977 </method>
6978
6979 <method name="attachUSBDevice">
6980 <desc>
6981 Attaches a host USB device with the given UUID to the
6982 USB controller of the virtual machine.
6983
6984 The device needs to be in one of the following states:
6985 <link to="USBDeviceState_Busy"/>,
6986 <link to="USBDeviceState_Available"/> or
6987 <link to="USBDeviceState_Held"/>,
6988 otherwise an error is immediately returned.
6989
6990 When the device state is
6991 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6992 be returned if the host computer refuses to release it for some reason.
6993
6994 <see>IUSBController::deviceFilters, USBDeviceState</see>
6995 <result name="VBOX_E_INVALID_VM_STATE">
6996 Virtual machine state neither Running nor Paused.
6997 </result>
6998 <result name="VBOX_E_PDM_ERROR">
6999 Virtual machine does not have a USB controller.
7000 </result>
7001 </desc>
7002 <param name="id" type="uuid" mod="string" dir="in">
7003 <desc>UUID of the host USB device to attach.</desc>
7004 </param>
7005 </method>
7006
7007 <method name="detachUSBDevice">
7008 <desc>
7009 Detaches an USB device with the given UUID from the USB controller
7010 of the virtual machine.
7011
7012 After this method succeeds, the VirtualBox server re-initiates
7013 all USB filters as if the device were just physically attached
7014 to the host, but filters of this machine are ignored to avoid
7015 a possible automatic re-attachment.
7016
7017 <see>IUSBController::deviceFilters, USBDeviceState</see>
7018
7019 <result name="VBOX_E_PDM_ERROR">
7020 Virtual machine does not have a USB controller.
7021 </result>
7022 <result name="E_INVALIDARG">
7023 USB device not attached to this virtual machine.
7024 </result>
7025 </desc>
7026 <param name="id" type="uuid" mod="string" dir="in">
7027 <desc>UUID of the USB device to detach.</desc>
7028 </param>
7029 <param name="device" type="IUSBDevice" dir="return">
7030 <desc>Detached USB device.</desc>
7031 </param>
7032 </method>
7033
7034 <method name="findUSBDeviceByAddress">
7035 <desc>
7036 Searches for a USB device with the given host address.
7037
7038 <result name="VBOX_E_OBJECT_NOT_FOUND">
7039 Given @c name does not correspond to any USB device.
7040 </result>
7041
7042 <see>IUSBDevice::address</see>
7043 </desc>
7044 <param name="name" type="wstring" dir="in">
7045 <desc>
7046 Address of the USB device (as assigned by the host) to
7047 search for.
7048 </desc>
7049 </param>
7050 <param name="device" type="IUSBDevice" dir="return">
7051 <desc>Found USB device object.</desc>
7052 </param>
7053 </method>
7054
7055 <method name="findUSBDeviceById">
7056 <desc>
7057 Searches for a USB device with the given UUID.
7058
7059 <result name="VBOX_E_OBJECT_NOT_FOUND">
7060 Given @c id does not correspond to any USB device.
7061 </result>
7062
7063 <see>IUSBDevice::id</see>
7064 </desc>
7065 <param name="id" type="uuid" mod="string" dir="in">
7066 <desc>UUID of the USB device to search for.</desc>
7067 </param>
7068 <param name="device" type="IUSBDevice" dir="return">
7069 <desc>Found USB device object.</desc>
7070 </param>
7071 </method>
7072
7073 <method name="createSharedFolder">
7074 <desc>
7075 Creates a transient new shared folder by associating the given logical
7076 name with the given host path, adds it to the collection of shared
7077 folders and starts sharing it. Refer to the description of
7078 <link to="ISharedFolder"/> to read more about logical names.
7079
7080 <result name="VBOX_E_INVALID_VM_STATE">
7081 Virtual machine in Saved state or currently changing state.
7082 </result>
7083 <result name="VBOX_E_FILE_ERROR">
7084 Shared folder already exists or not accessible.
7085 </result>
7086 </desc>
7087 <param name="name" type="wstring" dir="in">
7088 <desc>Unique logical name of the shared folder.</desc>
7089 </param>
7090 <param name="hostPath" type="wstring" dir="in">
7091 <desc>Full path to the shared folder in the host file system.</desc>
7092 </param>
7093 <param name="writable" type="boolean" dir="in">
7094 <desc>Whether the share is writable or readonly</desc>
7095 </param>
7096 </method>
7097
7098 <method name="removeSharedFolder">
7099 <desc>
7100 Removes a transient shared folder with the given name previously
7101 created by <link to="#createSharedFolder"/> from the collection of
7102 shared folders and stops sharing it.
7103 <result name="VBOX_E_INVALID_VM_STATE">
7104 Virtual machine in Saved state or currently changing state.
7105 </result>
7106 <result name="VBOX_E_FILE_ERROR">
7107 Shared folder does not exists.
7108 </result>
7109 </desc>
7110 <param name="name" type="wstring" dir="in">
7111 <desc>Logical name of the shared folder to remove.</desc>
7112 </param>
7113 </method>
7114
7115 <method name="takeSnapshot">
7116 <desc>
7117 Saves the current execution state
7118 and all settings of the machine and creates differencing images
7119 for all normal (non-independent) media.
7120 See <link to="ISnapshot" /> for an introduction to snapshots.
7121
7122 This method can be called for a PoweredOff, Saved (see
7123 <link to="#saveState"/>), Running or
7124 Paused virtual machine. When the machine is PoweredOff, an
7125 offline snapshot is created. When the machine is Running a live
7126 snapshot is created, and an online snapshot is is created when Paused.
7127
7128 The taken snapshot is always based on the
7129 <link to="IMachine::currentSnapshot">current snapshot</link>
7130 of the associated virtual machine and becomes a new current snapshot.
7131
7132 <note>
7133 This method implicitly calls <link to="IMachine::saveSettings"/> to
7134 save all current machine settings before taking an offline snapshot.
7135 </note>
7136
7137 <result name="VBOX_E_INVALID_VM_STATE">
7138 Virtual machine currently changing state.
7139 </result>
7140 </desc>
7141 <param name="name" type="wstring" dir="in">
7142 <desc>Short name for the snapshot.</desc>
7143 </param>
7144 <param name="description" type="wstring" dir="in">
7145 <desc>Optional description of the snapshot.</desc>
7146 </param>
7147 <param name="progress" type="IProgress" dir="return">
7148 <desc>Progress object to track the operation completion.</desc>
7149 </param>
7150 </method>
7151
7152 <method name="deleteSnapshot">
7153 <desc>
7154 Starts deleting the specified snapshot asynchronously.
7155 See <link to="ISnapshot" /> for an introduction to snapshots.
7156
7157 The execution state and settings of the associated machine stored in
7158 the snapshot will be deleted. The contents of all differencing media of
7159 this snapshot will be merged with the contents of their dependent child
7160 media to keep the medium chain valid (in other words, all changes
7161 represented by media being discarded will be propagated to their child
7162 medium). After that, this snapshot's differencing medium will be
7163 deleted. The parent of this snapshot will become a new parent for all
7164 its child snapshots.
7165
7166 If the deleted snapshot is the current one, its parent snapshot will
7167 become a new current snapshot. The current machine state is not directly
7168 affected in this case, except that currently attached differencing
7169 media based on media of the discarded snapshot will be also merged as
7170 described above.
7171
7172 If the deleted snapshot is the first or current snapshot, then the
7173 respective IMachine attributes will be adjusted. Deleting the current
7174 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
7175 to make all current machine settings permanent.
7176
7177 Deleting a snapshot has the following preconditions:
7178
7179 <ul>
7180 <li>Child media of all normal media of the discarded snapshot
7181 must be accessible (see <link to="IMedium::state"/>) for this
7182 operation to succeed. In particular, this means that all virtual
7183 machines, whose media are directly or indirectly based on the
7184 media of discarded snapshot, must be powered off.</li>
7185
7186 <li>You cannot delete the snapshot if a medium attached to it has
7187 more than once child medium (differencing images) because otherwise
7188 merging would be impossible. This might be the case if there is
7189 more than one child snapshot or differencing images were created
7190 for other reason (e.g. implicitly because of multiple machine
7191 attachments).</li>
7192 </ul>
7193
7194
7195 The virtual machine's <link to="IMachine::state">state</link> is changed to "DeletingSnapshot"
7196 while this operation is in progress.
7197
7198 <note>
7199 Merging medium contents can be very time and disk space
7200 consuming, if these media are big in size and have many
7201 children. However, if the snapshot being discarded is the last
7202 (head) snapshot on the branch, the operation will be rather
7203 quick.
7204 </note>
7205 <result name="VBOX_E_INVALID_VM_STATE">
7206 Virtual machine is running.
7207 </result>
7208 </desc>
7209 <param name="id" type="uuid" mod="string" dir="in">
7210 <desc>UUID of the snapshot to discard.</desc>
7211 </param>
7212 <param name="progress" type="IProgress" dir="return">
7213 <desc>Progress object to track the operation completion.</desc>
7214 </param>
7215 </method>
7216
7217 <method name="restoreSnapshot">
7218 <desc>
7219 Starts resetting the machine's current state to the state contained
7220 in the given snapshot, asynchronously. All current settings of the
7221 machine will be reset and changes stored in differencing media
7222 will be lost.
7223 See <link to="ISnapshot" /> for an introduction to snapshots.
7224
7225 After this operation is successfully completed, new empty differencing
7226 media are created for all normal media of the machine.
7227
7228 If the given snapshot is an online snapshot, the machine will go to
7229 the <link to="MachineState_Saved"> saved state</link>, so that the
7230 next time it is powered on, the execution state will be restored
7231 from the state of the snapshot.
7232
7233 <note>
7234 The machine must not be running, otherwise the operation will fail.
7235 </note>
7236
7237 <note>
7238 If the machine state is <link to="MachineState_Saved">Saved</link>
7239 prior to this operation, the saved state file will be implicitly
7240 discarded (as if <link to="IConsole::forgetSavedState"/> were
7241 called).
7242 </note>
7243
7244 <result name="VBOX_E_INVALID_VM_STATE">
7245 Virtual machine is running.
7246 </result>
7247 </desc>
7248 <param name="snapshot" type="ISnapshot" dir="in">
7249 <desc>The snapshot to restore the VM state from.</desc>
7250 </param>
7251 <param name="progress" type="IProgress" dir="return">
7252 <desc>Progress object to track the operation completion.</desc>
7253 </param>
7254 </method>
7255
7256 <method name="teleport">
7257 <desc>
7258 Teleport the VM to a different host machine or process.
7259
7260 TODO explain the details.
7261
7262 <result name="VBOX_E_INVALID_VM_STATE">
7263 Virtual machine not running or paused.
7264 </result>
7265 </desc>
7266 <param name="hostname" type="wstring" dir="in">
7267 <desc>The name or IP of the host to teleport to.</desc>
7268 </param>
7269 <param name="tcpport" type="unsigned long" dir="in">
7270 <desc>The TCP port to connect to (1..65535).</desc>
7271 </param>
7272 <param name="password" type="wstring" dir="in">
7273 <desc>The password.</desc>
7274 </param>
7275 <param name="maxDowntime" type="unsigned long" dir="in">
7276 <desc>
7277 The maximum allowed downtime given as milliseconds. 0 is not a valid
7278 value. Recommended value: 250 ms.
7279
7280 The higher the value is, the greater the chance for a successful
7281 teleportation. A small value may easily result in the teleportation
7282 process taking hours and eventually fail.
7283
7284 <note>
7285 The current implementation treats this a guideline, not as an
7286 absolute rule.
7287 </note>
7288 </desc>
7289 </param>
7290 <param name="progress" type="IProgress" dir="return">
7291 <desc>Progress object to track the operation completion.</desc>
7292 </param>
7293 </method>
7294
7295 <method name="registerCallback">
7296 <desc>
7297 Registers a new console callback on this instance. The methods of the
7298 callback interface will be called by this instance when the appropriate
7299 event occurs.
7300 </desc>
7301 <param name="callback" type="IConsoleCallback" dir="in"/>
7302 </method>
7303
7304 <method name="unregisterCallback">
7305 <desc>
7306 Unregisters the console callback previously registered using
7307 <link to="#registerCallback"/>.
7308 <result name="E_INVALIDARG">
7309 Given @a callback handler is not registered.
7310 </result>
7311 </desc>
7312 <param name="callback" type="IConsoleCallback" dir="in"/>
7313 </method>
7314 </interface>
7315
7316 <!--
7317 // IHost
7318 /////////////////////////////////////////////////////////////////////////
7319 -->
7320
7321 <enum
7322 name="HostNetworkInterfaceMediumType"
7323 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7324 >
7325 <desc>
7326 Type of encapsulation. Ethernet encapsulation includes both wired and
7327 wireless Ethernet connections.
7328 <see>IHostNetworkInterface</see>
7329 </desc>
7330
7331 <const name="Unknown" value="0">
7332 <desc>
7333 The type of interface cannot be determined.
7334 </desc>
7335 </const>
7336 <const name="Ethernet" value="1">
7337 <desc>
7338 Ethernet frame encapsulation.
7339 </desc>
7340 </const>
7341 <const name="PPP" value="2">
7342 <desc>
7343 Point-to-point protocol encapsulation.
7344 </desc>
7345 </const>
7346 <const name="SLIP" value="3">
7347 <desc>
7348 Serial line IP encapsulation.
7349 </desc>
7350 </const>
7351 </enum>
7352
7353 <enum
7354 name="HostNetworkInterfaceStatus"
7355 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7356 >
7357 <desc>
7358 Current status of the interface.
7359 <see>IHostNetworkInterface</see>
7360 </desc>
7361
7362 <const name="Unknown" value="0">
7363 <desc>
7364 The state of interface cannot be determined.
7365 </desc>
7366 </const>
7367 <const name="Up" value="1">
7368 <desc>
7369 The interface is fully operational.
7370 </desc>
7371 </const>
7372 <const name="Down" value="2">
7373 <desc>
7374 The interface is not functioning.
7375 </desc>
7376 </const>
7377 </enum>
7378
7379 <enum
7380 name="HostNetworkInterfaceType"
7381 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7382 >
7383 <desc>
7384 Network interface type.
7385 </desc>
7386 <const name="Bridged" value="1"/>
7387 <const name="HostOnly" value="2"/>
7388 </enum>
7389
7390 <interface
7391 name="IHostNetworkInterface" extends="$unknown"
7392 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7393 wsmap="managed"
7394 >
7395 <desc>
7396 Represents one of host's network interfaces. IP V6 address and network
7397 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7398 separated by colons.
7399 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7400 </desc>
7401 <attribute name="name" type="wstring" readonly="yes">
7402 <desc>Returns the host network interface name.</desc>
7403 </attribute>
7404
7405 <attribute name="id" type="uuid" mod="string" readonly="yes">
7406 <desc>Returns the interface UUID.</desc>
7407 </attribute>
7408
7409 <attribute name="networkName" type="wstring" readonly="yes">
7410 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7411 </attribute>
7412
7413 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7414 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7415 </attribute>
7416
7417 <attribute name="IPAddress" type="wstring" readonly="yes">
7418 <desc>Returns the IP V4 address of the interface.</desc>
7419 </attribute>
7420
7421 <attribute name="networkMask" type="wstring" readonly="yes">
7422 <desc>Returns the network mask of the interface.</desc>
7423 </attribute>
7424
7425 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7426 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7427 </attribute>
7428
7429 <attribute name="IPV6Address" type="wstring" readonly="yes">
7430 <desc>Returns the IP V6 address of the interface.</desc>
7431 </attribute>
7432
7433 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7434 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7435 </attribute>
7436
7437 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7438 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7439 </attribute>
7440
7441 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7442 <desc>Type of protocol encapsulation used.</desc>
7443 </attribute>
7444
7445 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7446 <desc>Status of the interface.</desc>
7447 </attribute>
7448
7449 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7450 <desc>specifies the host interface type.</desc>
7451 </attribute>
7452
7453 <method name="enableStaticIpConfig">
7454 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7455 <param name="IPAddress" type="wstring" dir="in">
7456 <desc>
7457 IP address.
7458 </desc>
7459 </param>
7460 <param name="networkMask" type="wstring" dir="in">
7461 <desc>
7462 network mask.
7463 </desc>
7464 </param>
7465 </method>
7466
7467 <method name="enableStaticIpConfigV6">
7468 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7469 <param name="IPV6Address" type="wstring" dir="in">
7470 <desc>
7471 IP address.
7472 </desc>
7473 </param>
7474 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7475 <desc>
7476 network mask.
7477 </desc>
7478 </param>
7479 </method>
7480
7481 <method name="enableDynamicIpConfig">
7482 <desc>enables the dynamic IP configuration.</desc>
7483 </method>
7484
7485 <method name="dhcpRediscover">
7486 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7487 </method>
7488
7489 </interface>
7490
7491 <interface
7492 name="IHost" extends="$unknown"
7493 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7494 wsmap="managed"
7495 >
7496 <desc>
7497 The IHost interface represents the physical machine that this VirtualBox
7498 installation runs on.
7499
7500 An object implementing this interface is returned by the
7501 <link to="IVirtualBox::host" /> attribute. This interface contains
7502 read-only information about the host's physical hardware (such as what
7503 processors and disks are available, what the host operating system is,
7504 and so on) and also allows for manipulating some of the host's hardware,
7505 such as global USB device filters and host interface networking.
7506
7507 </desc>
7508 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7509 <desc>List of DVD drives available on the host.</desc>
7510 </attribute>
7511
7512 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7513 <desc>List of floppy drives available on the host.</desc>
7514 </attribute>
7515
7516 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7517 <desc>
7518 List of USB devices currently attached to the host.
7519 Once a new device is physically attached to the host computer,
7520 it appears in this list and remains there until detached.
7521
7522 <note>
7523 If USB functionality is not available in the given edition of
7524 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7525 </note>
7526 </desc>
7527 </attribute>
7528
7529 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7530 <desc>
7531 List of USB device filters in action.
7532 When a new device is physically attached to the host computer,
7533 filters from this list are applied to it (in order they are stored
7534 in the list). The first matched filter will determine the
7535 <link to="IHostUSBDeviceFilter::action">action</link>
7536 performed on the device.
7537
7538 Unless the device is ignored by these filters, filters of all
7539 currently running virtual machines
7540 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7541
7542 <note>
7543 If USB functionality is not available in the given edition of
7544 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7545 </note>
7546
7547 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7548 </desc>
7549 </attribute>
7550
7551 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7552 <desc>List of host network interfaces currently defined on the host.</desc>
7553 </attribute>
7554
7555 <attribute name="processorCount" type="unsigned long" readonly="yes">
7556 <desc>Number of (logical) CPUs installed in the host system.</desc>
7557 </attribute>
7558
7559 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7560 <desc>Number of (logical) CPUs online in the host system.</desc>
7561 </attribute>
7562
7563 <method name="getProcessorSpeed">
7564 <desc>Query the (approximate) maximum speed of a specified host CPU in
7565 Megahertz.
7566 </desc>
7567 <param name="cpuId" type="unsigned long" dir="in">
7568 <desc>
7569 Identifier of the CPU.
7570 </desc>
7571 </param>
7572 <param name="speed" type="unsigned long" dir="return">
7573 <desc>
7574 Speed value. 0 is returned if value is not known or @a cpuId is
7575 invalid.
7576 </desc>
7577 </param>
7578 </method>
7579
7580 <method name="getProcessorFeature">
7581 <desc>Query whether a CPU feature is supported or not.</desc>
7582 <param name="feature" type="ProcessorFeature" dir="in">
7583 <desc>
7584 CPU Feature identifier.
7585 </desc>
7586 </param>
7587 <param name="supported" type="boolean" dir="return">
7588 <desc>
7589 Feature is supported or not.
7590 </desc>
7591 </param>
7592 </method>
7593
7594 <method name="getProcessorDescription">
7595 <desc>Query the model string of a specified host CPU.
7596 </desc>
7597 <param name="cpuId" type="unsigned long" dir="in">
7598 <desc>
7599 Identifier of the CPU.
7600 <note>
7601 The current implementation might not necessarily return the
7602 description for this exact CPU.
7603 </note>
7604 </desc>
7605 </param>
7606 <param name="description" type="wstring" dir="return">
7607 <desc>
7608 Model string. An empty string is returned if value is not known or
7609 @a cpuId is invalid.
7610 </desc>
7611 </param>
7612 </method>
7613
7614 <method name="getProcessorCpuIdLeaf">
7615 <desc>
7616 Returns the CPU cpuid information for the specified leaf.
7617 </desc>
7618 <param name="cpuId" type="unsigned long" dir="in">
7619 <desc>
7620 Identifier of the CPU. The CPU most be online.
7621 <note>
7622 The current implementation might not necessarily return the
7623 description for this exact CPU.
7624 </note>
7625 </desc>
7626 </param>
7627 <param name="leaf" type="unsigned long" dir="in">
7628 <desc>
7629 Cpuid leaf index (eax).
7630 </desc>
7631 </param>
7632 <param name="subLeaf" type="unsigned long" dir="in">
7633 <desc>
7634 Cpuid leaf sub index (ecx). This currently only applies to cache
7635 information on Intel CPUs. Use 0 if retriving values for
7636 <link to="IMachine::setCpuIdLeaf"/>.
7637 </desc>
7638 </param>
7639 <param name="valEax" type="unsigned long" dir="out">
7640 <desc>
7641 Cpuid leaf value for register eax.
7642 </desc>
7643 </param>
7644 <param name="valEbx" type="unsigned long" dir="out">
7645 <desc>
7646 Cpuid leaf value for register ebx.
7647 </desc>
7648 </param>
7649 <param name="valEcx" type="unsigned long" dir="out">
7650 <desc>
7651 Cpuid leaf value for register ecx.
7652 </desc>
7653 </param>
7654 <param name="valEdx" type="unsigned long" dir="out">
7655 <desc>
7656 Cpuid leaf value for register edx.
7657 </desc>
7658 </param>
7659 </method>
7660
7661 <attribute name="memorySize" type="unsigned long" readonly="yes">
7662 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7663 </attribute>
7664
7665 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7666 <desc>Available system memory in the host system.</desc>
7667 </attribute>
7668
7669 <attribute name="operatingSystem" type="wstring" readonly="yes">
7670 <desc>Name of the host system's operating system.</desc>
7671 </attribute>
7672
7673 <attribute name="OSVersion" type="wstring" readonly="yes">
7674 <desc>Host operating system's version string.</desc>
7675 </attribute>
7676
7677 <attribute name="UTCTime" type="long long" readonly="yes">
7678 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7679 </attribute>
7680
7681 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7682 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7683 </attribute>
7684
7685 <method name="createHostOnlyNetworkInterface">
7686 <desc>
7687 Creates a new adapter for Host Only Networking.
7688 <result name="E_INVALIDARG">
7689 Host network interface @a name already exists.
7690 </result>
7691 </desc>
7692 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7693 <desc>
7694 Created host interface object.
7695 </desc>
7696 </param>
7697 <param name="progress" type="IProgress" dir="return">
7698 <desc>
7699 Progress object to track the operation completion.
7700 </desc>
7701 </param>
7702 </method>
7703
7704 <method name="removeHostOnlyNetworkInterface">
7705 <desc>
7706 Removes the given Host Only Networking interface.
7707 <result name="VBOX_E_OBJECT_NOT_FOUND">
7708 No host network interface matching @a id found.
7709 </result>
7710 </desc>
7711 <param name="id" type="uuid" mod="string" dir="in">
7712 <desc>
7713 Adapter GUID.
7714 </desc>
7715 </param>
7716 <param name="progress" type="IProgress" dir="return">
7717 <desc>
7718 Progress object to track the operation completion.
7719 </desc>
7720 </param>
7721 </method>
7722
7723 <method name="createUSBDeviceFilter">
7724 <desc>
7725 Creates a new USB device filter. All attributes except
7726 the filter name are set to empty (any match),
7727 <i>active</i> is @c false (the filter is not active).
7728
7729 The created filter can be added to the list of filters using
7730 <link to="#insertUSBDeviceFilter"/>.
7731
7732 <see>#USBDeviceFilters</see>
7733 </desc>
7734 <param name="name" type="wstring" dir="in">
7735 <desc>
7736 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7737 for more info.
7738 </desc>
7739 </param>
7740 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7741 <desc>Created filter object.</desc>
7742 </param>
7743 </method>
7744
7745 <method name="insertUSBDeviceFilter">
7746 <desc>
7747 Inserts the given USB device to the specified position
7748 in the list of filters.
7749
7750 Positions are numbered starting from @c 0. If the specified
7751 position is equal to or greater than the number of elements in
7752 the list, the filter is added at the end of the collection.
7753
7754 <note>
7755 Duplicates are not allowed, so an attempt to insert a
7756 filter already in the list is an error.
7757 </note>
7758 <note>
7759 If USB functionality is not available in the given edition of
7760 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7761 </note>
7762
7763 <see>#USBDeviceFilters</see>
7764
7765 <result name="VBOX_E_INVALID_OBJECT_STATE">
7766 USB device filter is not created within this VirtualBox instance.
7767 </result>
7768 <result name="E_INVALIDARG">
7769 USB device filter already in list.
7770 </result>
7771
7772 </desc>
7773 <param name="position" type="unsigned long" dir="in">
7774 <desc>Position to insert the filter to.</desc>
7775 </param>
7776 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7777 <desc>USB device filter to insert.</desc>
7778 </param>
7779 </method>
7780
7781 <method name="removeUSBDeviceFilter">
7782 <desc>
7783 Removes a USB device filter from the specified position in the
7784 list of filters.
7785
7786 Positions are numbered starting from @c 0. Specifying a
7787 position equal to or greater than the number of elements in
7788 the list will produce an error.
7789
7790 <note>
7791 If USB functionality is not available in the given edition of
7792 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7793 </note>
7794
7795 <see>#USBDeviceFilters</see>
7796
7797 <result name="E_INVALIDARG">
7798 USB device filter list empty or invalid @a position.
7799 </result>
7800
7801 </desc>
7802 <param name="position" type="unsigned long" dir="in">
7803 <desc>Position to remove the filter from.</desc>
7804 </param>
7805 </method>
7806
7807 <method name="findHostDVDDrive">
7808 <desc>
7809 Searches for a host DVD drive with the given @c name.
7810
7811 <result name="VBOX_E_OBJECT_NOT_FOUND">
7812 Given @c name does not correspond to any host drive.
7813 </result>
7814
7815 </desc>
7816 <param name="name" type="wstring" dir="in">
7817 <desc>Name of the host drive to search for</desc>
7818 </param>
7819 <param name="drive" type="IMedium" dir="return">
7820 <desc>Found host drive object</desc>
7821 </param>
7822 </method>
7823
7824 <method name="findHostFloppyDrive">
7825 <desc>
7826 Searches for a host floppy drive with the given @c name.
7827
7828 <result name="VBOX_E_OBJECT_NOT_FOUND">
7829 Given @c name does not correspond to any host floppy drive.
7830 </result>
7831
7832 </desc>
7833 <param name="name" type="wstring" dir="in">
7834 <desc>Name of the host floppy drive to search for</desc>
7835 </param>
7836 <param name="drive" type="IMedium" dir="return">
7837 <desc>Found host floppy drive object</desc>
7838 </param>
7839 </method>
7840
7841 <method name="findHostNetworkInterfaceByName">
7842 <desc>
7843 Searches through all host network interfaces for an interface with
7844 the given @c name.
7845 <note>
7846 The method returns an error if the given @c name does not
7847 correspond to any host network interface.
7848 </note>
7849 </desc>
7850 <param name="name" type="wstring" dir="in">
7851 <desc>Name of the host network interface to search for.</desc>
7852 </param>
7853 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7854 <desc>Found host network interface object.</desc>
7855 </param>
7856 </method>
7857 <method name="findHostNetworkInterfaceById">
7858 <desc>
7859 Searches through all host network interfaces for an interface with
7860 the given GUID.
7861 <note>
7862 The method returns an error if the given GUID does not
7863 correspond to any host network interface.
7864 </note>
7865 </desc>
7866 <param name="id" type="uuid" mod="string" dir="in">
7867 <desc>GUID of the host network interface to search for.</desc>
7868 </param>
7869 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7870 <desc>Found host network interface object.</desc>
7871 </param>
7872 </method>
7873 <method name="findHostNetworkInterfacesOfType">
7874 <desc>
7875 Searches through all host network interfaces and returns a list of interfaces of the specified type
7876 </desc>
7877 <param name="type" type="HostNetworkInterfaceType" dir="in">
7878 <desc>type of the host network interfaces to search for.</desc>
7879 </param>
7880 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7881 <desc>Found host network interface objects.</desc>
7882 </param>
7883 </method>
7884
7885 <method name="findUSBDeviceById">
7886 <desc>
7887 Searches for a USB device with the given UUID.
7888
7889 <result name="VBOX_E_OBJECT_NOT_FOUND">
7890 Given @c id does not correspond to any USB device.
7891 </result>
7892
7893 <see>IHostUSBDevice::id</see>
7894 </desc>
7895 <param name="id" type="uuid" mod="string" dir="in">
7896 <desc>UUID of the USB device to search for.</desc>
7897 </param>
7898 <param name="device" type="IHostUSBDevice" dir="return">
7899 <desc>Found USB device object.</desc>
7900 </param>
7901 </method>
7902
7903 <method name="findUSBDeviceByAddress">
7904 <desc>
7905 Searches for a USB device with the given host address.
7906
7907 <result name="VBOX_E_OBJECT_NOT_FOUND">
7908 Given @c name does not correspond to any USB device.
7909 </result>
7910
7911 <see>IHostUSBDevice::address</see>
7912 </desc>
7913 <param name="name" type="wstring" dir="in">
7914 <desc>
7915 Address of the USB device (as assigned by the host) to
7916 search for.
7917 </desc>
7918 </param>
7919 <param name="device" type="IHostUSBDevice" dir="return">
7920 <desc>Found USB device object.</desc>
7921 </param>
7922 </method>
7923
7924 </interface>
7925
7926 <!--
7927 // ISystemProperties
7928 /////////////////////////////////////////////////////////////////////////
7929 -->
7930
7931 <interface
7932 name="ISystemProperties"
7933 extends="$unknown"
7934 uuid="fca0d89c-d2ce-45c1-a7b9-e6e7d8501eb1"
7935 wsmap="managed"
7936 >
7937 <desc>
7938 The ISystemProperties interface represents global properties of the given
7939 VirtualBox installation.
7940
7941 These properties define limits and default values for various attributes
7942 and parameters. Most of the properties are read-only, but some can be
7943 changed by a user.
7944 </desc>
7945
7946 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7947 <desc>Minimum guest system memory in Megabytes.</desc>
7948 </attribute>
7949
7950 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7951 <desc>Maximum guest system memory in Megabytes.</desc>
7952 </attribute>
7953
7954 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7955 <desc>Minimum guest video memory in Megabytes.</desc>
7956 </attribute>
7957
7958 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7959 <desc>Maximum guest video memory in Megabytes.</desc>
7960 </attribute>
7961
7962 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7963 <desc>Minimum CPU count.</desc>
7964 </attribute>
7965
7966 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7967 <desc>Maximum CPU count.</desc>
7968 </attribute>
7969
7970 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7971 <desc>Maximum of monitors which could be connected.</desc>
7972 </attribute>
7973
7974 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7975 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7976 </attribute>
7977
7978 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7979 <desc>
7980 Number of network adapters associated with every
7981 <link to="IMachine"/> instance.
7982 </desc>
7983 </attribute>
7984
7985 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7986 <desc>
7987 Number of serial ports associated with every
7988 <link to="IMachine"/> instance.
7989 </desc>
7990 </attribute>
7991
7992 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7993 <desc>
7994 Number of parallel ports associated with every
7995 <link to="IMachine"/> instance.
7996 </desc>
7997 </attribute>
7998
7999 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
8000 <desc>
8001 Maximum device position in the boot order. This value corresponds
8002 to the total number of devices a machine can boot from, to make it
8003 possible to include all possible devices to the boot list.
8004 <see><link to="IMachine::setBootOrder"/></see>
8005 </desc>
8006 </attribute>
8007
8008 <attribute name="defaultMachineFolder" type="wstring">
8009 <desc>
8010 Full path to the default directory used to create new or open
8011 existing machines when a settings file name contains no
8012 path.
8013
8014 The initial value of this property is
8015 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
8016 VirtualBox_home</link><tt>&gt;/Machines</tt>.
8017
8018 <note>
8019 Setting this property to @c null or an empty string will restore the
8020 initial value.
8021 </note>
8022 <note>
8023 When settings this property, the specified path can be
8024 absolute (full path) or relative
8025 to the <link to="IVirtualBox::homeFolder">
8026 VirtualBox home directory</link>.
8027 When reading this property, a full path is
8028 always returned.
8029 </note>
8030 <note>
8031 The specified path may not exist, it will be created
8032 when necessary.
8033 </note>
8034
8035 <see>
8036 <link to="IVirtualBox::createMachine"/>,
8037 <link to="IVirtualBox::openMachine"/>
8038 </see>
8039 </desc>
8040 </attribute>
8041
8042 <attribute name="defaultHardDiskFolder" type="wstring">
8043 <desc>
8044 Full path to the default directory used to create new or open existing
8045 virtual disks.
8046
8047 This path is used when the storage unit of a hard disk is a regular file
8048 in the host's file system and only a file name that contains no path is
8049 given.
8050
8051 The initial value of this property is
8052 <tt>&lt;</tt>
8053 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
8054 <tt>&gt;/HardDisks</tt>.
8055
8056 <note>
8057 Setting this property to @c null or empty string will restore the
8058 initial value.
8059 </note>
8060 <note>
8061 When settings this property, the specified path can be relative
8062 to the
8063 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
8064 absolute. When reading this property, a full path is
8065 always returned.
8066 </note>
8067 <note>
8068 The specified path may not exist, it will be created
8069 when necessary.
8070 </note>
8071
8072 <see>
8073 IMedium,
8074 <link to="IVirtualBox::createHardDisk"/>,
8075 <link to="IVirtualBox::openHardDisk"/>,
8076 <link to="IMedium::location"/>
8077 </see>
8078 </desc>
8079 </attribute>
8080
8081 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
8082 <desc>
8083 List of all medium storage formats supported by this VirtualBox
8084 installation.
8085
8086 Keep in mind that the medium format identifier
8087 (<link to="IMediumFormat::id"/>) used in other API calls like
8088 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
8089 medium format is a case-insensitive string. This means that, for
8090 example, all of the following strings:
8091 <pre>
8092 "VDI"
8093 "vdi"
8094 "VdI"</pre>
8095 refer to the same medium format.
8096
8097 Note that the virtual medium framework is backend-based, therefore
8098 the list of supported formats depends on what backends are currently
8099 installed.
8100
8101 <see>
8102 <link to="IMediumFormat"/>,
8103 </see>
8104 </desc>
8105 </attribute>
8106
8107 <attribute name="defaultHardDiskFormat" type="wstring">
8108 <desc>
8109 Identifier of the default medium format used by VirtualBox.
8110
8111 The medium format set by this attribute is used by VirtualBox
8112 when the medium format was not specified explicitly. One example is
8113 <link to="IVirtualBox::createHardDisk"/> with the empty
8114 format argument. A more complex example is implicit creation of
8115 differencing media when taking a snapshot of a virtual machine:
8116 this operation will try to use a format of the parent medium first
8117 and if this format does not support differencing media the default
8118 format specified by this argument will be used.
8119
8120 The list of supported medium formats may be obtained by the
8121 <link to="#mediaFormats"/> call. Note that the default medium
8122 format must have a capability to create differencing media;
8123 otherwise operations that create media implicitly may fail
8124 unexpectedly.
8125
8126 The initial value of this property is <tt>"VDI"</tt> in the current
8127 version of the VirtualBox product, but may change in the future.
8128
8129 <note>
8130 Setting this property to @c null or empty string will restore the
8131 initial value.
8132 </note>
8133
8134 <see>
8135 <link to="#mediaFormats"/>,
8136 <link to="IMediumFormat::id"/>,
8137 <link to="IVirtualBox::createHardDisk"/>
8138 </see>
8139 </desc>
8140 </attribute>
8141
8142 <attribute name="remoteDisplayAuthLibrary" type="wstring">
8143 <desc>
8144 Library that provides authentication for VRDP clients. The library
8145 is used if a virtual machine's authentication type is set to "external"
8146 in the VM RemoteDisplay configuration.
8147
8148 The system library extension (".DLL" or ".so") must be omitted.
8149 A full path can be specified; if not, then the library must reside on the
8150 system's default library path.
8151
8152 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
8153 of that name in one of the default VirtualBox library directories.
8154
8155 For details about VirtualBox authentication libraries and how to implement
8156 them, please refer to the VirtualBox manual.
8157
8158 <note>
8159 Setting this property to @c null or empty string will restore the
8160 initial value.
8161 </note>
8162 </desc>
8163 </attribute>
8164
8165 <attribute name="webServiceAuthLibrary" type="wstring">
8166 <desc>
8167 Library that provides authentication for webservice clients. The library
8168 is used if a virtual machine's authentication type is set to "external"
8169 in the VM RemoteDisplay configuration and will be called from
8170 within the <link to="IWebsessionManager::logon" /> implementation.
8171
8172 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8173 there is no per-VM setting for this, as the webservice is a global
8174 resource (if it is running). Only for this setting (for the webservice),
8175 setting this value to a literal <tt>"null"</tt> string disables authentication,
8176 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8177 no matter what user name and password are supplied.
8178
8179 The initial value of this property is <tt>"VRDPAuth"</tt>,
8180 meaning that the webservice will use the same authentication
8181 library that is used by default for VBoxVRDP (again, see
8182 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8183 The format and calling convention of authentication libraries
8184 is the same for the webservice as it is for VBoxVRDP.
8185
8186 <note>
8187 Setting this property to @c null or empty string will restore the
8188 initial value.
8189 </note>
8190 </desc>
8191 </attribute>
8192
8193 <attribute name="LogHistoryCount" type="unsigned long">
8194 <desc>
8195 This value specifies how many old release log files are kept.
8196 </desc>
8197 </attribute>
8198
8199 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8200 <desc>This value hold the default audio driver for the current
8201 system.</desc>
8202 </attribute>
8203
8204 <method name="getMaxDevicesPerPortForStorageBus">
8205 <desc>Returns the maximum number of devices which can be attached to a port
8206 for the given storage bus.</desc>
8207
8208 <param name="bus" type="StorageBus" dir="in">
8209 <desc>The storage bus type to get the value for.</desc>
8210 </param>
8211
8212 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8213 <desc>The maximum number of devices which can eb attached to the port for the given
8214 storage bus.</desc>
8215 </param>
8216 </method>
8217
8218 <method name="getMinPortCountForStorageBus">
8219 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8220
8221 <param name="bus" type="StorageBus" dir="in">
8222 <desc>The storage bus type to get the value for.</desc>
8223 </param>
8224
8225 <param name="minPortCount" type="unsigned long" dir="return">
8226 <desc>The minimum number of ports for the given storage bus.</desc>
8227 </param>
8228 </method>
8229
8230 <method name="getMaxPortCountForStorageBus">
8231 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8232
8233 <param name="bus" type="StorageBus" dir="in">
8234 <desc>The storage bus type to get the value for.</desc>
8235 </param>
8236
8237 <param name="maxPortCount" type="unsigned long" dir="return">
8238 <desc>The maximum number of ports for the given storage bus.</desc>
8239 </param>
8240 </method>
8241
8242 <method name="getMaxInstancesOfStorageBus">
8243 <desc>Returns the maximum number of storage bus instances which
8244 can be configured for each VM. This corresponds to the number of
8245 storage controllers one can have.</desc>
8246
8247 <param name="bus" type="StorageBus" dir="in">
8248 <desc>The storage bus type to get the value for.</desc>
8249 </param>
8250
8251 <param name="maxInstances" type="unsigned long" dir="return">
8252 <desc>The maximum number of instances for the given storage bus.</desc>
8253 </param>
8254 </method>
8255
8256 <method name="getDeviceTypesForStorageBus">
8257 <desc>Returns list of all the supported device types
8258 (<link to="DeviceType"/>) for the given type of storage
8259 bus.</desc>
8260
8261 <param name="bus" type="StorageBus" dir="in">
8262 <desc>The storage bus type to get the value for.</desc>
8263 </param>
8264
8265 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8266 <desc>The list of all supported device types for the given storage bus.</desc>
8267 </param>
8268 </method>
8269 </interface>
8270
8271 <!--
8272 // IGuest
8273 /////////////////////////////////////////////////////////////////////////
8274 -->
8275
8276 <interface
8277 name="IGuestOSType" extends="$unknown"
8278 uuid="5e02d197-dfa2-474d-bd1d-3243a1f24afb"
8279 wsmap="struct"
8280 >
8281 <desc>
8282 </desc>
8283
8284 <attribute name="familyId" type="wstring" readonly="yes">
8285 <desc>Guest OS family identifier string.</desc>
8286 </attribute>
8287
8288 <attribute name="familyDescription" type="wstring" readonly="yes">
8289 <desc>Human readable description of the guest OS family.</desc>
8290 </attribute>
8291
8292 <attribute name="id" type="wstring" readonly="yes">
8293 <desc>Guest OS identifier string.</desc>
8294 </attribute>
8295
8296 <attribute name="description" type="wstring" readonly="yes">
8297 <desc>Human readable description of the guest OS.</desc>
8298 </attribute>
8299
8300 <attribute name="is64Bit" type="boolean" readonly="yes">
8301 <desc>Returns @c true if the given OS is 64-bit</desc>
8302 </attribute>
8303
8304 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8305 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8306 </attribute>
8307
8308 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8309 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8310 </attribute>
8311
8312 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8313 <desc>Recommended RAM size in Megabytes.</desc>
8314 </attribute>
8315
8316 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8317 <desc>Recommended video RAM size in Megabytes.</desc>
8318 </attribute>
8319
8320 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8321 <desc>Recommended hard disk size in Megabytes.</desc>
8322 </attribute>
8323
8324 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8325 <desc>Returns recommended network adapter for this OS type.</desc>
8326 </attribute>
8327
8328 <attribute name="recommendedPae" type="boolean" readonly="yes">
8329 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
8330 </attribute>
8331
8332 <attribute name="recommendedStorageController" type="StorageControllerType" readonly="yes">
8333 <desc>Recommended storage controller type.</desc>
8334 </attribute>
8335
8336 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
8337 <desc>Recommended firmware type.</desc>
8338 </attribute>
8339
8340 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
8341 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
8342 </attribute>
8343
8344 <attribute name="recommendedHpet" type="boolean" readonly="yes">
8345 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
8346 </attribute>
8347
8348 </interface>
8349
8350 <interface
8351 name="IGuest" extends="$unknown"
8352 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
8353 wsmap="managed"
8354 >
8355 <desc>
8356 The IGuest interface represents information about the operating system
8357 running inside the virtual machine. Used in
8358 <link to="IConsole::guest"/>.
8359
8360 IGuest provides information about the guest operating system, whether
8361 Guest Additions are installed and other OS-specific virtual machine
8362 properties.
8363 </desc>
8364
8365 <attribute name="OSTypeId" type="wstring" readonly="yes">
8366 <desc>
8367 Identifier of the Guest OS type as reported by the Guest
8368 Additions.
8369 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8370 an IGuestOSType object representing details about the given
8371 Guest OS type.
8372 <note>
8373 If Guest Additions are not installed, this value will be
8374 the same as <link to="IMachine::OSTypeId"/>.
8375 </note>
8376 </desc>
8377 </attribute>
8378
8379 <attribute name="additionsActive" type="boolean" readonly="yes">
8380 <desc>
8381 Flag whether the Guest Additions are installed and active
8382 in which case their version will be returned by the
8383 <link to="#additionsVersion"/> property.
8384 </desc>
8385 </attribute>
8386
8387 <attribute name="additionsVersion" type="wstring" readonly="yes">
8388 <desc>
8389 Version of the Guest Additions (3 decimal numbers separated
8390 by dots) or empty when the Additions are not installed. The
8391 Additions may also report a version but yet not be active as
8392 the version might be refused by VirtualBox (incompatible) or
8393 other failures occurred.
8394 </desc>
8395 </attribute>
8396
8397 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8398 <desc>
8399 Flag whether seamless guest display rendering (seamless desktop
8400 integration) is supported.
8401 </desc>
8402 </attribute>
8403
8404 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8405 <desc>
8406 Flag whether the guest is in graphics mode. If it is not, then
8407 seamless rendering will not work, resize hints are not immediately
8408 acted on and guest display resizes are probably not initiated by
8409 the guest additions.
8410 </desc>
8411 </attribute>
8412
8413 <attribute name="memoryBalloonSize" type="unsigned long">
8414 <desc>Guest system memory balloon size in megabytes.</desc>
8415 </attribute>
8416
8417 <attribute name="statisticsUpdateInterval" type="unsigned long">
8418 <desc>Interval to update guest statistics in seconds.</desc>
8419 </attribute>
8420
8421 <method name="setCredentials">
8422 <desc>
8423 Store login credentials that can be queried by guest operating
8424 systems with Additions installed. The credentials are transient
8425 to the session and the guest may also choose to erase them. Note
8426 that the caller cannot determine whether the guest operating system
8427 has queried or made use of the credentials.
8428
8429 <result name="VBOX_E_VM_ERROR">
8430 VMM device is not available.
8431 </result>
8432
8433 </desc>
8434 <param name="userName" type="wstring" dir="in">
8435 <desc>User name string, can be empty</desc>
8436 </param>
8437 <param name="password" type="wstring" dir="in">
8438 <desc>Password string, can be empty</desc>
8439 </param>
8440 <param name="domain" type="wstring" dir="in">
8441 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8442 </param>
8443 <param name="allowInteractiveLogon" type="boolean" dir="in">
8444 <desc>
8445 Flag whether the guest should alternatively allow the user to
8446 interactively specify different credentials. This flag might
8447 not be supported by all versions of the Additions.
8448 </desc>
8449 </param>
8450 </method>
8451
8452 <method name="getStatistic">
8453 <desc>
8454 Query specified guest statistics as reported by the VirtualBox Additions.
8455 </desc>
8456 <param name="cpuId" type="unsigned long" dir="in">
8457 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8458 </param>
8459 <param name="statistic" type="GuestStatisticType" dir="in">
8460 <desc>Statistic type.</desc>
8461 </param>
8462 <param name="statVal" type="unsigned long" dir="return">
8463 <desc>Statistics value</desc>
8464 </param>
8465 </method>
8466
8467 </interface>
8468
8469
8470 <!--
8471 // IProgress
8472 /////////////////////////////////////////////////////////////////////////
8473 -->
8474
8475 <interface
8476 name="IProgress" extends="$unknown"
8477 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8478 wsmap="managed"
8479 >
8480 <desc>
8481 The IProgress interface is used to track and control
8482 asynchronous tasks within VirtualBox.
8483
8484 An instance of this is returned every time VirtualBox starts
8485 an asynchronous task (in other words, a separate thread) which
8486 continues to run after a method call returns. For example,
8487 <link to="IConsole::saveState" />, which saves the state of
8488 a running virtual machine, can take a long time to complete.
8489 To be able to display a progress bar, a user interface such as
8490 the VirtualBox graphical user interface can use the IProgress
8491 object returned by that method.
8492
8493 Note that IProgress is a "read-only" interface in the sense
8494 that only the VirtualBox internals behind the Main API can
8495 create and manipulate progress objects, whereas client code
8496 can only use the IProgress object to monitor a task's
8497 progress and, if <link to="#cancelable" /> is @c true,
8498 cancel the task by calling <link to="#cancel" />.
8499
8500 A task represented by IProgress consists of either one or
8501 several sub-operations that run sequentially, one by one (see
8502 <link to="#operation" /> and <link to="#operationCount" />).
8503 Every operation is identified by a number (starting from 0)
8504 and has a separate description.
8505
8506 You can find the individual percentage of completion of the current
8507 operation in <link to="#operationPercent" /> and the
8508 percentage of completion of the task as a whole
8509 in <link to="#percent" />.
8510
8511 Similarly, you can wait for the completion of a particular
8512 operation via <link to="#waitForOperationCompletion" /> or
8513 for the completion of the whole task via
8514 <link to="#waitForCompletion" />.
8515 </desc>
8516
8517 <attribute name="id" type="uuid" mod="string" readonly="yes">
8518 <desc>ID of the task.</desc>
8519 </attribute>
8520
8521 <attribute name="description" type="wstring" readonly="yes">
8522 <desc>Description of the task.</desc>
8523 </attribute>
8524
8525 <attribute name="initiator" type="$unknown" readonly="yes">
8526 <desc>Initiator of the task.</desc>
8527 </attribute>
8528
8529 <attribute name="cancelable" type="boolean" readonly="yes">
8530 <desc>Whether the task can be interrupted.</desc>
8531 </attribute>
8532
8533 <attribute name="percent" type="unsigned long" readonly="yes">
8534 <desc>
8535 Current progress value of the task as a whole, in percent.
8536 This value depends on how many operations are already complete.
8537 Returns 100 if <link to="#completed" /> is @c true.
8538 </desc>
8539 </attribute>
8540
8541 <attribute name="timeRemaining" type="long" readonly="yes">
8542 <desc>
8543 Estimated remaining time until the task completes, in
8544 seconds. Returns 0 once the task has completed; returns -1
8545 if the remaining time cannot be computed, in particular if
8546 the current progress is 0.
8547
8548 Even if a value is returned, the estimate will be unreliable
8549 for low progress values. It will become more reliable as the
8550 task progresses; it is not recommended to display an ETA
8551 before at least 20% of a task have completed.
8552 </desc>
8553 </attribute>
8554
8555 <attribute name="completed" type="boolean" readonly="yes">
8556 <desc>Whether the task has been completed.</desc>
8557 </attribute>
8558
8559 <attribute name="canceled" type="boolean" readonly="yes">
8560 <desc>Whether the task has been canceled.</desc>
8561 </attribute>
8562
8563 <attribute name="resultCode" type="long" readonly="yes">
8564 <desc>
8565 Result code of the progress task.
8566 Valid only if <link to="#completed"/> is @c true.
8567 </desc>
8568 </attribute>
8569
8570 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8571 <desc>
8572 Extended information about the unsuccessful result of the
8573 progress operation. May be @c null if no extended information
8574 is available.
8575 Valid only if <link to="#completed"/> is @c true and
8576 <link to="#resultCode"/> indicates a failure.
8577 </desc>
8578 </attribute>
8579
8580 <attribute name="operationCount" type="unsigned long" readonly="yes">
8581 <desc>
8582 Number of sub-operations this task is divided into.
8583 Every task consists of at least one suboperation.
8584 </desc>
8585 </attribute>
8586
8587 <attribute name="operation" type="unsigned long" readonly="yes">
8588 <desc>Number of the sub-operation being currently executed.</desc>
8589 </attribute>
8590
8591 <attribute name="operationDescription" type="wstring" readonly="yes">
8592 <desc>
8593 Description of the sub-operation being currently executed.
8594 </desc>
8595 </attribute>
8596
8597 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8598 <desc>Progress value of the current sub-operation only, in percent.</desc>
8599 </attribute>
8600
8601 <attribute name="timeout" type="unsigned long">
8602 <desc>
8603 When non-zero, this specifies the number of milliseconds after which
8604 the operation will automatically be canceled. This can only be set on
8605 cancelable objects.
8606 </desc>
8607 </attribute>
8608
8609 <method name="setCurrentOperationProgress">
8610 <desc>Internal method, not to be called externally.</desc>
8611 <param name="percent" type="unsigned long" dir="in" />
8612 </method>
8613 <method name="setNextOperation">
8614 <desc>Internal method, not to be called externally.</desc>
8615 <param name="nextOperationDescription" type="wstring" dir="in" />
8616 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8617 </method>
8618
8619 <method name="waitForCompletion">
8620 <desc>
8621 Waits until the task is done (including all sub-operations)
8622 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8623
8624 <result name="VBOX_E_IPRT_ERROR">
8625 Failed to wait for task completion.
8626 </result>
8627 </desc>
8628
8629 <param name="timeout" type="long" dir="in">
8630 <desc>
8631 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8632 </desc>
8633 </param>
8634 </method>
8635
8636 <method name="waitForOperationCompletion">
8637 <desc>
8638 Waits until the given operation is done with a given timeout in
8639 milliseconds; specify -1 for an indefinite wait.
8640
8641 <result name="VBOX_E_IPRT_ERROR">
8642 Failed to wait for operation completion.
8643 </result>
8644
8645 </desc>
8646 <param name="operation" type="unsigned long" dir="in">
8647 <desc>
8648 Number of the operation to wait for.
8649 Must be less than <link to="#operationCount"/>.
8650 </desc>
8651 </param>
8652 <param name="timeout" type="long" dir="in">
8653 <desc>
8654 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8655 </desc>
8656 </param>
8657 </method>
8658
8659 <method name="cancel">
8660 <desc>
8661 Cancels the task.
8662 <note>
8663 If <link to="#cancelable"/> is @c false, then this method will fail.
8664 </note>
8665
8666 <result name="VBOX_E_INVALID_OBJECT_STATE">
8667 Operation cannot be canceled.
8668 </result>
8669
8670 </desc>
8671 </method>
8672
8673 </interface>
8674
8675
8676 <!--
8677 // ISnapshot
8678 /////////////////////////////////////////////////////////////////////////
8679 -->
8680
8681 <interface
8682 name="ISnapshot" extends="$unknown"
8683 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8684 wsmap="managed"
8685 >
8686 <desc>
8687 The ISnapshot interface represents a snapshot of the virtual
8688 machine.
8689
8690 Together with the differencing media that are created
8691 when a snapshot is taken, a machine can be brought back to
8692 the exact state it was in when the snapshot was taken.
8693
8694 The ISnapshot interface has no methods, only attributes; snapshots
8695 are controlled through methods of the <link to="IConsole" /> interface
8696 which also manage the media associated with the snapshot.
8697 The following operations exist:
8698
8699 <ul>
8700 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8701 by creating new, empty differencing images for the machine's
8702 media and saving the VM settings and (if the VM is running)
8703 the current VM state in the snapshot.
8704
8705 The differencing images will then receive all data written to
8706 the machine's media, while their parent (base) images
8707 remain unmodified after the snapshot has been taken (see
8708 <link to="IMedium" /> for details about differencing images).
8709 This simplifies restoring a machine to the state of a snapshot:
8710 only the differencing images need to be deleted.
8711
8712 The current machine state is not changed by taking a snapshot.
8713 If the machine is running, it will resume execution after the
8714 snapshot has been taken.
8715 </li>
8716
8717 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8718 a previous snapshot. This resets the machine's state to that of
8719 the previous snapshot by deleting the differencing image of each
8720 of the machine's media and setting the machine's settings
8721 and state to the state that was saved in the snapshot (if any).
8722
8723 This destroys the machine's current state.
8724 </li>
8725
8726 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8727 without affecting the current machine state.
8728
8729 This does not change the machine, but instead frees the resources
8730 allocated when the snapshot was taken: the settings and machine state
8731 is deleted (if any), and the snapshot's differencing image for each
8732 of the machine's media gets merged with its parent image.
8733
8734 Neither the current machine state nor other snapshots are affected
8735 by this operation, except that parent media will be modified
8736 to contain the disk data associated with the snapshot being deleted.
8737 </li>
8738 </ul>
8739
8740 Each snapshot contains the settings of the virtual machine (hardware
8741 configuration etc.). In addition, if the machine was running when the
8742 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8743 the current VM state is saved in the snapshot (similarly to what happens
8744 when a VM's state is saved). The snapshot is then said to
8745 be <i>online</i> because when restoring it, the VM will be running.
8746
8747 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8748 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8749
8750 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8751 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8752 it then contains a so-called "zero execution state", representing a
8753 machine that is powered off.
8754
8755 <h3>Snapshot branches and the "current" snapshot</h3>
8756
8757 Snapshots can be chained, whereby every next snapshot is based on the
8758 previous one. This chaining is related to medium branching
8759 (see the <link to="IMedium"/> description) in that every time
8760 a new snapshot is created, a new differencing medium is implicitly
8761 created for all normal media attached to the machine.
8762
8763 Each virtual machine has a "current snapshot", identified by
8764 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8765 to the last snapshot in the chain. In a future version of VirtualBox,
8766 it will be possible to reset a machine's current state to that of an
8767 earlier snapshot without discarding the current state so that it will be
8768 possible to create alternative snapshot paths in a snapshot tree.
8769
8770 In the current implementation, multiple snapshot branches within one
8771 virtual machine are not allowed. Every machine has a single branch,
8772 and <link to="IConsole::takeSnapshot"/> operation adds a new
8773 snapshot to the top of that branch.
8774 </desc>
8775
8776 <attribute name="id" type="uuid" mod="string" readonly="yes">
8777 <desc>UUID of the snapshot.</desc>
8778 </attribute>
8779
8780 <attribute name="name" type="wstring">
8781 <desc>Short name of the snapshot.</desc>
8782 </attribute>
8783
8784 <attribute name="description" type="wstring">
8785 <desc>Optional description of the snapshot.</desc>
8786 </attribute>
8787
8788 <attribute name="timeStamp" type="long long" readonly="yes">
8789 <desc>
8790 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8791 </desc>
8792 </attribute>
8793
8794 <attribute name="online" type="boolean" readonly="yes">
8795 <desc>
8796 @c true if this snapshot is an online snapshot and @c false otherwise.
8797
8798 When this attribute is @c true, the
8799 <link to="IMachine::stateFilePath"/> attribute of the
8800 <link to="#machine"/> object associated with this snapshot
8801 will point to the saved state file. Otherwise, it will be
8802 an empty string.
8803 </desc>
8804 </attribute>
8805
8806 <attribute name="machine" type="IMachine" readonly="yes">
8807 <desc>
8808 Virtual machine this snapshot is taken on. This object
8809 stores all settings the machine had when taking this snapshot.
8810 <note>
8811 The returned machine object is immutable, i.e. no
8812 any settings can be changed.
8813 </note>
8814 </desc>
8815 </attribute>
8816
8817 <attribute name="parent" type="ISnapshot" readonly="yes">
8818 <desc>
8819 Parent snapshot (a snapshot this one is based on), or
8820 @c null if the snapshot has no parent (i.e. is the first snapshot).
8821 </desc>
8822 </attribute>
8823
8824 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8825 <desc>
8826 Child snapshots (all snapshots having this one as a parent).
8827 </desc>
8828 </attribute>
8829
8830 </interface>
8831
8832
8833 <!--
8834 // IMedium
8835 /////////////////////////////////////////////////////////////////////////
8836 -->
8837
8838 <enum
8839 name="MediumState"
8840 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8841 >
8842 <desc>
8843 Virtual medium state.
8844 <see>IMedium</see>
8845 </desc>
8846
8847 <const name="NotCreated" value="0">
8848 <desc>
8849 Associated medium storage does not exist (either was not created yet or
8850 was deleted).
8851 </desc>
8852 </const>
8853 <const name="Created" value="1">
8854 <desc>
8855 Associated storage exists and accessible; this gets set if the
8856 accessibility check performed by <link to="IMedium::refreshState" />
8857 was successful.
8858 </desc>
8859 </const>
8860 <const name="LockedRead" value="2">
8861 <desc>
8862 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8863 no data modification is possible.
8864 </desc>
8865 </const>
8866 <const name="LockedWrite" value="3">
8867 <desc>
8868 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8869 no concurrent data reading or modification is possible.
8870 </desc>
8871 </const>
8872 <const name="Inaccessible" value="4">
8873 <desc>
8874 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8875 not yet been performed, or else, associated medium storage is not
8876 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8877 is empty, in the second case, it describes the error that occured.
8878 </desc>
8879 </const>
8880 <const name="Creating" value="5">
8881 <desc>
8882 Associated medium storage is being created.
8883 </desc>
8884 </const>
8885 <const name="Deleting" value="6">
8886 <desc>
8887 Associated medium storage is being deleted.
8888 </desc>
8889 </const>
8890 </enum>
8891
8892 <enum
8893 name="MediumType"
8894 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8895 >
8896 <desc>
8897 Virtual medium type.
8898 <see>IMedium</see>
8899 </desc>
8900
8901 <const name="Normal" value="0">
8902 <desc>
8903 Normal medium (attached directly or indirectly, preserved
8904 when taking snapshots).
8905 </desc>
8906 </const>
8907 <const name="Immutable" value="1">
8908 <desc>
8909 Immutable medium (attached indirectly, changes are wiped out
8910 the next time the virtual machine is started).
8911 </desc>
8912 </const>
8913 <const name="Writethrough" value="2">
8914 <desc>
8915 Write through medium (attached directly, ignored when
8916 taking snapshots).
8917 </desc>
8918 </const>
8919 </enum>
8920
8921 <enum
8922 name="MediumVariant"
8923 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8924 >
8925 <desc>
8926 Virtual medium image variant. More than one flag may be set.
8927 <see>IMedium</see>
8928 </desc>
8929
8930 <const name="Standard" value="0">
8931 <desc>
8932 No particular variant requested, results in using the backend default.
8933 </desc>
8934 </const>
8935 <const name="VmdkSplit2G" value="0x01">
8936 <desc>
8937 VMDK image split in chunks of less than 2GByte.
8938 </desc>
8939 </const>
8940 <const name="VmdkStreamOptimized" value="0x04">
8941 <desc>
8942 VMDK streamOptimized image. Special import/export format which is
8943 read-only/append-only.
8944 </desc>
8945 </const>
8946 <const name="VmdkESX" value="0x08">
8947 <desc>
8948 VMDK format variant used on ESX products.
8949 </desc>
8950 </const>
8951 <const name="Fixed" value="0x10000">
8952 <desc>
8953 Fixed image. Only allowed for base images.
8954 </desc>
8955 </const>
8956 <const name="Diff" value="0x20000">
8957 <desc>
8958 Fixed image. Only allowed for base images.
8959 </desc>
8960 </const>
8961 </enum>
8962
8963 <interface
8964 name="IMediumAttachment" extends="$unknown"
8965 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
8966 wsmap="struct"
8967 >
8968 <desc>
8969 The IMediumAttachment interface represents the attachment
8970 of a storage medium to a virtual machine. Each machine contains
8971 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8972
8973 Each medium attachment specifies a storage controller as well as a port
8974 and device number. Fixed media (hard disks) will always also specify
8975 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8976 medium. For removeable media, the IMedia instance is optional; it can be
8977 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8978 </desc>
8979
8980 <attribute name="medium" type="IMedium" readonly="yes">
8981 <desc>Medium object associated with this attachment; it
8982 can be @c null for removable devices.</desc>
8983 </attribute>
8984
8985 <attribute name="controller" type="wstring" readonly="yes">
8986 <desc>Name of the storage controller of this attachment; this
8987 refers to one of the controllers in <link to="IMachine::storageControllers" />
8988 by name.</desc>
8989 </attribute>
8990
8991 <attribute name="port" type="long" readonly="yes">
8992 <desc>Port number of this attachment.</desc>
8993 </attribute>
8994
8995 <attribute name="device" type="long" readonly="yes">
8996 <desc>Device slot number of this attachment.</desc>
8997 </attribute>
8998
8999 <attribute name="type" type="DeviceType" readonly="yes">
9000 <desc>Device type of this attachment.</desc>
9001 </attribute>
9002
9003 <attribute name="passthrough" type="boolean" readonly="yes">
9004 <desc>Pass I/O requests through to a device on the host.</desc>
9005 </attribute>
9006
9007 </interface>
9008
9009 <interface
9010 name="IMedium" extends="$unknown"
9011 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
9012 wsmap="managed"
9013 >
9014 <desc>
9015 The IMedium interface represents virtual storage for a machine's
9016 hard disks, CD/DVD or floppy drives. It will typically represent
9017 a disk image on the host, for example a VDI or VMDK file representing
9018 a virtual hard disk, or an ISO or RAW file representing virtual
9019 removable media, but can also point to a network location (e.g.
9020 for iSCSI targets).
9021
9022 Instances of IMedium are connected to virtual machines by way of
9023 medium attachments (see <link to="IMediumAttachment" />), which link
9024 the storage medium to a particular device slot of a storage controller
9025 of the virtual machine.
9026 In the VirtualBox API, virtual storage is therefore always represented
9027 by the following chain of object links:
9028
9029 <ul>
9030 <li><link to="IMachine::storageControllers"/> contains an array of
9031 storage controllers (IDE, SATA, SCSI or a floppy controller;
9032 these are instances of <link to="IStorageController"/>).</li>
9033 <li><link to="IMachine::mediumAttachments"/> contains an array of
9034 medium attachments (instances of <link to="IMediumAttachment"/>),
9035 each containing a storage controller from the above array, a
9036 port/device specification, and an instance of IMedium representing
9037 the medium storage (image file).
9038
9039 For removable media, the storage medium is optional; a medium
9040 attachment with no medium represents a CD/DVD or floppy drive
9041 with no medium inserted. By contrast, hard disk attachments
9042 will always have an IMedium object attached.</li>
9043 <li>Each IMedium in turn points to a storage unit (such as a file
9044 on the host computer or a network resource) that holds actual
9045 data. This location is represented by the <link to="#location"/>
9046 attribute.</li>
9047 </ul>
9048
9049 Existing media are opened using the following methods, depending on the
9050 media type:
9051 <ul>
9052 <li><link to="IVirtualBox::openHardDisk"/></li>
9053 <li><link to="IVirtualBox::openDVDImage"/></li>
9054 <li><link to="IVirtualBox::openFloppyImage"/></li>
9055 </ul>
9056
9057 New hard disk media can be created with the VirtualBox API using the
9058 <link to="IVirtualBox::createHardDisk"/> method.
9059
9060 CD/DVD and floppy images (ISO and RAW files) are usually created outside
9061 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
9062 type in a regular file.
9063
9064 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
9065 drive; in that case the <link to="#id" /> attribute contains the UUID of
9066 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
9067
9068 <h3>Known media</h3>
9069
9070 When an existing medium is opened for the first time, it is automatically
9071 remembered by the given VirtualBox installation or, in other words, becomes
9072 a <i>known medium</i>. Known media are stored in the media
9073 registry transparently maintained by VirtualBox and stored in settings
9074 files so that this registry is preserved when VirtualBox is not running.
9075
9076 Newly created virtual media are remembered only when the associated
9077 storage unit is actually created.
9078
9079 All known media can be enumerated using
9080 <link to="IVirtualBox::hardDisks"/>,
9081 <link to="IVirtualBox::DVDImages"/> and
9082 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
9083 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
9084 and similar methods or by location using
9085 <link to="IVirtualBox::findHardDisk"/> and similar methods.
9086
9087 Only known media can be attached to virtual machines.
9088
9089 Removing known media from the media registry is performed when the given
9090 medium is closed using the <link to="#close"/> method or when its
9091 associated storage unit is deleted.
9092
9093 <h3>Accessibility checks</h3>
9094
9095 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
9096 method is called explicitly on a medium. This is done to make the VirtualBox object
9097 ready for serving requests as fast as possible and let the end-user
9098 application decide if it needs to check media accessibility right away or not.
9099
9100 As a result, when VirtualBox starts up (e.g. the VirtualBox
9101 object gets created for the first time), all known media are in the
9102 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
9103 attribute is an empty string because no actual accessibility check has
9104 been made yet.
9105
9106 After calling <link to="#refreshState" />, a medium is considered
9107 <i>accessible</i> if its storage unit can be read. In that case, the
9108 <link to="#state"/> attribute has a value of "Created". If the storage
9109 unit cannot be read (for example, because it is located on a disconnected
9110 network resource, or was accidentally deleted outside VirtualBox),
9111 the medium is considered <i>inaccessible</i>, which is indicated by the
9112 "Inaccessible" state. The exact reason why the medium is inaccessible can be
9113 obtained by reading the <link to="#lastAccessError"/> attribute.
9114
9115 <h3>Medium types</h3>
9116
9117 There are three types of medium behavior (see <link to="MediumType" />):
9118 "normal", "immutable" and "writethrough", represented by the
9119 <link to="#type"/> attribute. The type of the medium defines how the
9120 medium is attached to a virtual machine and what happens when a
9121 <link to="ISnapshot">snapshot</link> of the virtual machine with the
9122 attached medium is taken. At the moment DVD and floppy media are always
9123 of type "writethrough".
9124
9125 All media can be also divided in two groups: <i>base</i> media and
9126 <i>differencing</i> media. A base medium contains all sectors of the
9127 medium data in its own storage and therefore can be used independently.
9128 In contrast, a differencing mediun is a "delta" to some other medium and
9129 contains only those sectors which differ from that other medium, which is
9130 then called a <i>parent</i>. The differencing medium is said to be
9131 <i>linked to</i> that parent. The parent may be itself a differencing
9132 medium, thus forming a chain of linked media. The last element in that
9133 chain must always be a base medium. Note that several differencing
9134 media may be linked to the same parent medium.
9135
9136 Differencing media can be distinguished from base media by querying the
9137 <link to="#parent"/> attribute: base media do not have parents they would
9138 depend on, so the value of this attribute is always @c null for them.
9139 Using this attribute, it is possible to walk up the medium tree (from the
9140 child medium to its parent). It is also possible to walk down the tree
9141 using the <link to="#children"/> attribute.
9142
9143 Note that the type of all differencing media is "Normal"; all other
9144 values are meaningless for them. Base media may be of any type.
9145
9146 <h3>Creating hard disks</h3>
9147
9148 New base hard disks are created using
9149 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
9150 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
9151 disks are usually implicitly created by VirtualBox when needed but may
9152 also be created explicitly using <link to="#createDiffStorage"/>.
9153
9154 After the hard disk is successfully created (including the storage unit)
9155 or opened, it becomes a known hard disk (remembered in the internal media
9156 registry). Known hard disks can be attached to a virtual machine, accessed
9157 through <link to="IVirtualBox::getHardDisk"/> and
9158 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
9159 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
9160
9161 The following methods, besides <link to="IMedium::close"/>,
9162 automatically remove the hard disk from the media registry:
9163 <ul>
9164 <li><link to="#deleteStorage"/></li>
9165 <li><link to="#mergeTo"/></li>
9166 </ul>
9167
9168 If the storage unit of the hard disk is a regular file in the host's
9169 file system then the rules stated in the description of the
9170 <link to="IMedium::location"/> attribute apply when setting its value. In
9171 addition, a plain file name without any path may be given, in which case
9172 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
9173 folder</link> will be prepended to it.
9174
9175 <h4>Automatic composition of the file name part</h4>
9176
9177 Another extension to the <link to="IMedium::location"/> attribute is that
9178 there is a possibility to cause VirtualBox to compose a unique value for
9179 the file name part of the location using the UUID of the hard disk. This
9180 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9181 e.g. before the storage unit is created, and works as follows. You set the
9182 value of the <link to="IMedium::location"/> attribute to a location
9183 specification which only contains the path specification but not the file
9184 name part and ends with either a forward slash or a backslash character.
9185 In response, VirtualBox will generate a new UUID for the hard disk and
9186 compose the file name using the following pattern:
9187 <pre>
9188 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9189 </pre>
9190 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9191 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9192 is the default extension for the storage format of this hard disk. After
9193 that, you may call any of the methods that create a new hard disk storage
9194 unit and they will use the generated UUID and file name.
9195
9196 <h3>Attaching Hard Disks</h3>
9197
9198 Hard disks are attached to virtual machines using the
9199 <link to="IMachine::attachDevice"/> method and detached using the
9200 <link to="IMachine::detachDevice"/> method. Depending on their
9201 <link to="#type"/>, hard disks are attached either
9202 <i>directly</i> or <i>indirectly</i>.
9203
9204 When a hard disk is being attached directly, it is associated with the
9205 virtual machine and used for hard disk operations when the machine is
9206 running. When a hard disk is being attached indirectly, a new differencing
9207 hard disk linked to it is implicitly created and this differencing hard
9208 disk is associated with the machine and used for hard disk operations.
9209 This also means that if <link to="IMachine::attachDevice"/> performs
9210 a direct attachment then the same hard disk will be returned in response
9211 to the subsequent <link to="IMachine::getMedium"/> call; however if
9212 an indirect attachment is performed then
9213 <link to="IMachine::getMedium"/> will return the implicitly created
9214 differencing hard disk, not the original one passed to <link
9215 to="IMachine::attachDevice"/>. In detail:
9216
9217 <ul>
9218 <li><b>Normal base</b> hard disks that do not have children (i.e.
9219 differencing hard disks linked to them) and that are not already
9220 attached to virtual machines in snapshots are attached <b>directly</b>.
9221 Otherwise, they are attached <b>indirectly</b> because having
9222 dependent children or being part of the snapshot makes it impossible
9223 to modify hard disk contents without breaking the integrity of the
9224 dependent party. The <link to="#readOnly"/> attribute allows to
9225 quickly determine the kind of the attachment for the given hard
9226 disk. Note that if a normal base hard disk is to be indirectly
9227 attached to a virtual machine with snapshots then a special
9228 procedure called <i>smart attachment</i> is performed (see below).</li>
9229 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9230 they are attached <b>directly</b> if they do not have children and are
9231 not attached to virtual machines in snapshots, and <b>indirectly</b>
9232 otherwise. Note that the smart attachment procedure is never performed
9233 for differencing hard disks.</li>
9234 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9235 they are designed to be non-writable. If an immutable hard disk is
9236 attached to a virtual machine with snapshots then a special
9237 procedure called smart attachment is performed (see below).</li>
9238 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9239 also as designed. This also means that writethrough hard disks cannot
9240 have other hard disks linked to them at all.</li>
9241 </ul>
9242
9243 Note that the same hard disk, regardless of its type, may be attached to
9244 more than one virtual machine at a time. In this case, the machine that is
9245 started first gains exclusive access to the hard disk and attempts to
9246 start other machines having this hard disk attached will fail until the
9247 first machine is powered down.
9248
9249 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9250 that the given hard disk remains associated with the given machine after a
9251 successful <link to="IMachine::detachDevice"/> call until
9252 <link to="IMachine::saveSettings"/> is called to save all changes to
9253 machine settings to disk. This deferring is necessary to guarantee that
9254 the hard disk configuration may be restored at any time by a call to
9255 <link to="IMachine::discardSettings"/> before the settings
9256 are saved (committed).
9257
9258 Note that if <link to="IMachine::discardSettings"/> is called after
9259 indirectly attaching some hard disks to the machine but before a call to
9260 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9261 all differencing hard disks implicitly created by
9262 <link to="IMachine::attachDevice"/> for these indirect attachments.
9263 Such implicitly created hard disks will also be immediately deleted when
9264 detached explicitly using the <link to="IMachine::detachDevice"/>
9265 call if it is made before <link to="IMachine::saveSettings"/>. This
9266 implicit deletion is safe because newly created differencing hard
9267 disks do not contain any user data.
9268
9269 However, keep in mind that detaching differencing hard disks that were
9270 implicitly created by <link to="IMachine::attachDevice"/>
9271 before the last <link to="IMachine::saveSettings"/> call will
9272 <b>not</b> implicitly delete them as they may already contain some data
9273 (for example, as a result of virtual machine execution). If these hard
9274 disks are no more necessary, the caller can always delete them explicitly
9275 using <link to="#deleteStorage"/> after they are actually de-associated
9276 from this machine by the <link to="IMachine::saveSettings"/> call.
9277
9278 <h3>Smart Attachment</h3>
9279
9280 When normal base or immutable hard disks are indirectly attached to a
9281 virtual machine then some additional steps are performed to make sure the
9282 virtual machine will have the most recent "view" of the hard disk being
9283 attached. These steps include walking through the machine's snapshots
9284 starting from the current one and going through ancestors up to the first
9285 snapshot. Hard disks attached to the virtual machine in all
9286 of the encountered snapshots are checked whether they are descendants of
9287 the given normal base or immutable hard disk. The first found child (which
9288 is the differencing hard disk) will be used instead of the normal base or
9289 immutable hard disk as a parent for creating a new differencing hard disk
9290 that will be actually attached to the machine. And only if no descendants
9291 are found or if the virtual machine does not have any snapshots then the
9292 normal base or immutable hard disk will be used itself as a parent for
9293 this differencing hard disk.
9294
9295 It is easier to explain what smart attachment does using the
9296 following example:
9297 <pre>
9298BEFORE attaching B.vdi: AFTER attaching B.vdi:
9299
9300Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9301 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9302 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9303 Snapshot 4 (none) Snapshot 4 (none)
9304 CurState (none) CurState (D3->D2.vdi)
9305
9306 NOT
9307 ...
9308 CurState (D3->B.vdi)
9309 </pre>
9310 The first column is the virtual machine configuration before the base hard
9311 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9312 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9313 mean that the hard disk that is actually attached to the machine is a
9314 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9315 another hard disk, <tt>B.vdi</tt>.
9316
9317 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9318 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9319 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9320 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9321 it cannot be attached directly and needs an indirect attachment (i.e.
9322 implicit creation of a new differencing hard disk). Due to the smart
9323 attachment procedure, the new differencing hard disk
9324 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9325 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9326 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9327 machine.
9328
9329 Note that if there is more than one descendant hard disk of the given base
9330 hard disk found in a snapshot, and there is an exact device, channel and
9331 bus match, then this exact match will be used. Otherwise, the youngest
9332 descendant will be picked up.
9333
9334 There is one more important aspect of the smart attachment procedure which
9335 is not related to snapshots at all. Before walking through the snapshots
9336 as described above, the backup copy of the current list of hard disk
9337 attachment is searched for descendants. This backup copy is created when
9338 the hard disk configuration is changed for the first time after the last
9339 <link to="IMachine::saveSettings"/> call and used by
9340 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9341 changes. When such a descendant is found in this backup copy, it will be
9342 simply re-attached back, without creating a new differencing hard disk for
9343 it. This optimization is necessary to make it possible to re-attach the
9344 base or immutable hard disk to a different bus, channel or device slot
9345 without losing the contents of the differencing hard disk actually
9346 attached to the machine in place of it.
9347 </desc>
9348
9349 <attribute name="id" type="uuid" mod="string" readonly="yes">
9350 <desc>
9351 UUID of the medium. For a newly created medium, this value is a randomly
9352 generated UUID.
9353
9354 <note>
9355 For media in one of MediumState_NotCreated, MediumState_Creating or
9356 MediumState_Deleting states, the value of this property is undefined
9357 and will most likely be an empty UUID.
9358 </note>
9359 </desc>
9360 </attribute>
9361
9362 <attribute name="description" type="wstring">
9363 <desc>
9364 Optional description of the medium. For a newly created medium the value
9365 of this attribute is an empty string.
9366
9367 Medium types that don't support this attribute will return E_NOTIMPL in
9368 attempt to get or set this attribute's value.
9369
9370 <note>
9371 For some storage types, reading this attribute may return an outdated
9372 (last known) value when <link to="#state"/> is <link
9373 to="MediumState_Inaccessible"/> or <link
9374 to="MediumState_LockedWrite"/> because the value of this attribute is
9375 stored within the storage unit itself. Also note that changing the
9376 attribute value is not possible in such case, as well as when the
9377 medium is the <link to="MediumState_LockedRead"/> state.
9378 </note>
9379 </desc>
9380 </attribute>
9381
9382 <attribute name="state" type="MediumState" readonly="yes">
9383 <desc>
9384 Returns the current medium state, which is the last state set by
9385 the accessibility check performed by <link to="#refreshState"/>.
9386 If that method has not yet been called on the medium, the state
9387 is "Inaccessible"; as opposed to truly inaccessible media, the
9388 value of <link to="#lastAccessError"/> will be an empty string in
9389 that case.
9390
9391 <note>As of version 3.1, this no longer performs an accessibility check
9392 automatically; call <link to="#refreshState"/> for that.
9393 </note>
9394 </desc>
9395 </attribute>
9396
9397 <attribute name="location" type="wstring">
9398 <desc>
9399 Location of the storage unit holding medium data.
9400
9401 The format of the location string is medium type specific. For medium
9402 types using regular files in a host's file system, the location
9403 string is the full file name.
9404
9405 Some medium types may support changing the storage unit location by
9406 simply changing the value of this property. If this operation is not
9407 supported, the implementation will return E_NOTIMPL in attempt to set
9408 this attribute's value.
9409
9410 When setting a value of the location attribute which is a regular file
9411 in the host's file system, the given file name may be either relative to
9412 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9413 absolute. Note that if the given location specification does not contain
9414 the file extension part then a proper default extension will be
9415 automatically appended by the implementation depending on the medium type.
9416 </desc>
9417 </attribute>
9418
9419 <attribute name="name" type="wstring" readonly="yes">
9420 <desc>
9421 Name of the storage unit holding medium data.
9422
9423 The returned string is a short version of the <link to="#location"/>
9424 attribute that is suitable for representing the medium in situations
9425 where the full location specification is too long (such as lists
9426 and comboboxes in GUI frontends). This string is also used by frontends
9427 to sort the media list alphabetically when needed.
9428
9429 For example, for locations that are regular files in the host's file
9430 system, the value of this attribute is just the file name (+ extension),
9431 without the path specification.
9432
9433 Note that as opposed to the <link to="#location"/> attribute, the name
9434 attribute will not necessary be unique for a list of media of the
9435 given type and format.
9436 </desc>
9437 </attribute>
9438
9439 <attribute name="deviceType" type="DeviceType" readonly="yes">
9440 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9441 medium.</desc>
9442 </attribute>
9443
9444 <attribute name="hostDrive" type="boolean" readonly="yes">
9445 <desc>True if this corresponds to a drive on the host.</desc>
9446 </attribute>
9447
9448 <attribute name="size" type="unsigned long long" readonly="yes">
9449 <desc>
9450 Physical size of the storage unit used to hold medium data (in bytes).
9451
9452 <note>
9453 For media whose <link to="#state"/> is <link
9454 to="MediumState_Inaccessible"/>, the value of this property is the
9455 last known size. For <link to="MediumState_NotCreated"/> media,
9456 the returned value is zero.
9457 </note>
9458 </desc>
9459 </attribute>
9460
9461 <attribute name="format" type="wstring" readonly="yes">
9462 <desc>
9463 Storage format of this medium.
9464
9465 The value of this attribute is a string that specifies a backend used
9466 to store medium data. The storage format is defined when you create a
9467 new medium or automatically detected when you open an existing medium,
9468 and cannot be changed later.
9469
9470 The list of all storage formats supported by this VirtualBox
9471 installation can be obtained using
9472 <link to="ISystemProperties::mediumFormats"/>.
9473 </desc>
9474 </attribute>
9475
9476 <attribute name="type" type="MediumType">
9477 <desc>
9478 Type (role) of this medium.
9479
9480 The following constraints apply when changing the value of this
9481 attribute:
9482 <ul>
9483 <li>If a medium is attached to a virtual machine (either in the
9484 current state or in one of the snapshots), its type cannot be
9485 changed.
9486 </li>
9487 <li>As long as the medium has children, its type cannot be set
9488 to <link to="MediumType_Writethrough"/>.
9489 </li>
9490 <li>The type of all differencing media is
9491 <link to="MediumType_Normal"/> and cannot be changed.
9492 </li>
9493 </ul>
9494
9495 The type of a newly created or opened medium is set to
9496 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9497 which have a type of <link to="MediumType_Writethrough"/>.
9498 </desc>
9499 </attribute>
9500
9501 <attribute name="parent" type="IMedium" readonly="yes">
9502 <desc>
9503 Parent of this medium (the medium this medium is directly based
9504 on).
9505
9506 Only differencing media have parents. For base (non-differencing)
9507 media, @c null is returned.
9508 </desc>
9509 </attribute>
9510
9511 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9512 <desc>
9513 Children of this medium (all differencing media directly based
9514 on this medium). A @c null array is returned if this medium
9515 does not have any children.
9516 </desc>
9517 </attribute>
9518
9519 <attribute name="base" type="IMedium" readonly="yes">
9520 <desc>
9521 Base medium of this medium.
9522
9523 If this is a differencing medium, its base medium is the medium
9524 the given medium branch starts from. For all other types of media, this
9525 property returns the medium object itself (i.e. the same object this
9526 property is read on).
9527 </desc>
9528 </attribute>
9529
9530 <attribute name="readOnly" type="boolean" readonly="yes">
9531 <desc>
9532 Returns @c true if this medium is read-only and @c false otherwise.
9533
9534 A medium is considered to be read-only when its contents cannot be
9535 modified without breaking the integrity of other parties that depend on
9536 this medium such as its child media or snapshots of virtual machines
9537 where this medium is attached to these machines. If there are no
9538 children and no such snapshots then there is no dependency and the
9539 medium is not read-only.
9540
9541 The value of this attribute can be used to determine the kind of the
9542 attachment that will take place when attaching this medium to a
9543 virtual machine. If the value is @c false then the medium will
9544 be attached directly. If the value is @c true then the medium
9545 will be attached indirectly by creating a new differencing child
9546 medium for that. See the interface description for more information.
9547
9548 Note that all <link to="MediumType_Immutable">Immutable</link> media
9549 are always read-only while all
9550 <link to="MediumType_Writethrough">Writethrough</link> media are
9551 always not.
9552
9553 <note>
9554 The read-only condition represented by this attribute is related to
9555 the medium type and usage, not to the current
9556 <link to="IMedium::state">medium state</link> and not to the read-only
9557 state of the storage unit.
9558 </note>
9559 </desc>
9560 </attribute>
9561
9562 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9563 <desc>
9564 Logical size of this medium (in megabytes), as reported to the
9565 guest OS running inside the virtual machine this medium is
9566 attached to. The logical size is defined when the medium is created
9567 and cannot be changed later.
9568
9569 <note>
9570 Reading this property on a differencing medium will return the size
9571 of its <link to="#base"/> medium.
9572 </note>
9573 <note>
9574 For media whose state is <link to="#state"/> is <link
9575 to="MediumState_Inaccessible"/>, the value of this property is the
9576 last known logical size. For <link to="MediumaState_NotCreated"/>
9577 media, the returned value is zero.
9578 </note>
9579 </desc>
9580 </attribute>
9581
9582 <attribute name="autoReset" type="boolean">
9583 <desc>
9584 Whether this differencing medium will be automatically reset each
9585 time a virtual machine it is attached to is powered up. This
9586 attribute is automatically set to @c true for the last
9587 differencing image of an "immutable" medium (see
9588 <link to="MediumType" />).
9589
9590 See <link to="#reset"/> for more information about resetting
9591 differencing media.
9592
9593 <note>
9594 Reading this property on a base (non-differencing) medium will
9595 always @c false. Changing the value of this property in this
9596 case is not supported.
9597 </note>
9598
9599 <result name="VBOX_E_NOT_SUPPORTED">
9600 This is not a differencing medium (when changing the attribute
9601 value).
9602 </result>
9603 </desc>
9604 </attribute>
9605
9606 <attribute name="lastAccessError" type="wstring" readonly="yes">
9607 <desc>
9608 Text message that represents the result of the last accessibility
9609 check performed by <link to="#refreshState"/>.
9610
9611 An empty string is returned if the last accessibility check
9612 was successful or has not yet been called. As a result, if
9613 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9614 then <link to="#refreshState"/> has yet to be called; this is the
9615 default value of media after VirtualBox initialization.
9616 A non-empty string indicates a failure and should normally describe
9617 a reason of the failure (for example, a file read error).
9618 </desc>
9619 </attribute>
9620
9621 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9622 <desc>
9623 Array of UUIDs of all machines this medium is attached to.
9624
9625 A @c null array is returned if this medium is not attached to any
9626 machine or to any machine's snapshot.
9627
9628 <note>
9629 The returned array will include a machine even if this medium is not
9630 attached to that machine in the current state but attached to it in
9631 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9632 details.
9633 </note>
9634 </desc>
9635 </attribute>
9636
9637 <method name="refreshState">
9638 <desc>
9639 If the current medium state (see <link to="MediumState"/>) is one of
9640 "Created", "Inaccessible" or "LockedRead", then this performs an
9641 accessibility check on the medium and sets the value of the <link to="#state"/>
9642 attribute accordingly; that value is also returned for convenience.
9643
9644 For all other state values, this does not perform a refresh but returns
9645 the state only.
9646
9647 The refresh, if performed, may take a long time (several seconds or even
9648 minutes, depending on the storage unit location and format) because it performs an
9649 accessibility check of the storage unit. This check may cause a significant
9650 delay if the storage unit of the given medium is, for example, a file located
9651 on a network share which is not currently accessible due to connectivity
9652 problems. In that case, the call will not return until a timeout
9653 interval defined by the host OS for this operation expires. For this reason,
9654 it is recommended to never read this attribute on the main UI thread to avoid
9655 making the UI unresponsive.
9656
9657 If the last known state of the medium is "Created" and the accessibility
9658 check fails, then the state would be set to "Inaccessible", and
9659 <link to="#lastAccessError"/> may be used to get more details about the
9660 failure. If the state of the medium is "LockedRead", then it remains the
9661 same, and a non-empty value of <link to="#lastAccessError"/> will
9662 indicate a failed accessibility check in this case.
9663
9664 Note that not all medium states are applicable to all medium types.
9665 </desc>
9666 <param name="state" type="MediumState" dir="return">
9667 <desc>
9668 New medium state.
9669 </desc>
9670 </param>
9671 </method>
9672
9673 <method name="getSnapshotIds">
9674 <desc>
9675 Returns an array of UUIDs of all snapshots of the given machine where
9676 this medium is attached to.
9677
9678 If the medium is attached to the machine in the current state, then the
9679 first element in the array will always be the ID of the queried machine
9680 (i.e. the value equal to the @c machineId argument), followed by
9681 snapshot IDs (if any).
9682
9683 If the medium is not attached to the machine in the current state, then
9684 the array will contain only snapshot IDs.
9685
9686 The returned array may be @c null if this medium is not attached
9687 to the given machine at all, neither in the current state nor in one of
9688 the snapshots.
9689 </desc>
9690 <param name="machineId" type="uuid" mod="string" dir="in">
9691 <desc>
9692 UUID of the machine to query.
9693 </desc>
9694 </param>
9695 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9696 <desc>
9697 Array of snapshot UUIDs of the given machine using this medium.
9698 </desc>
9699 </param>
9700 </method>
9701
9702 <method name="lockRead">
9703 <desc>
9704 Locks this medium for reading.
9705
9706 A read lock is shared: many clients can simultaneously lock the
9707 same medium for reading unless it is already locked for writing (see
9708 <link to="#lockWrite"/>) in which case an error is returned.
9709
9710 When the medium is locked for reading, it cannot be modified
9711 from within VirtualBox. This means that any method that changes
9712 the properties of this medium or contents of the storage unit
9713 will return an error (unless explicitly stated otherwise). That
9714 includes an attempt to start a virtual machine that wants to
9715 write to the the medium.
9716
9717 When the virtual machine is started up, it locks for reading all
9718 media it uses in read-only mode. If some medium cannot be locked
9719 for reading, the startup procedure will fail.
9720 A medium is typically locked for reading while it is used by a running
9721 virtual machine but has a depending differencing image that receives
9722 the actual write operations. This way one base medium can have
9723 multiple child differencing images which can be written to
9724 simultaneously. Read-only media such as DVD and floppy images are
9725 also locked for reading only (so they can be in use by multiple
9726 machines simultaneously).
9727
9728 A medium is also locked for reading when it is the source of a
9729 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9730
9731 The medium locked for reading must be unlocked using the <link
9732 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9733 can be nested and must be followed by the same number of paired
9734 <link to="#unlockRead"/> calls.
9735
9736 This method sets the medium state (see <link to="#state"/>) to
9737 "LockedRead" on success. The medium's previous state must be
9738 one of "Created", "Inaccessible" or "LockedRead".
9739
9740 Locking an inaccessible medium is not an error; this method performs
9741 a logical lock that prevents modifications of this medium through
9742 the VirtualBox API, not a physical file-system lock of the underlying
9743 storage unit.
9744
9745 This method returns the current state of the medium
9746 <i>before</i> the operation.
9747
9748 <result name="VBOX_E_INVALID_OBJECT_STATE">
9749 Invalid medium state (e.g. not created, locked, inaccessible,
9750 creating, deleting).
9751 </result>
9752
9753 </desc>
9754 <param name="state" type="MediumState" dir="return">
9755 <desc>
9756 State of the medium after the operation.
9757 </desc>
9758 </param>
9759 </method>
9760
9761 <method name="unlockRead">
9762 <desc>
9763 Cancels the read lock previously set by <link to="#lockRead"/>.
9764
9765 For both success and failure, this method returns the current state
9766 of the medium <i>after</i> the operation.
9767
9768 See <link to="#lockRead"/> for more details.
9769
9770 <result name="VBOX_E_INVALID_OBJECT_STATE">
9771 Medium not locked for reading.
9772 </result>
9773
9774 </desc>
9775 <param name="state" type="MediumState" dir="return">
9776 <desc>
9777 State of the medium after the operation.
9778 </desc>
9779 </param>
9780 </method>
9781
9782 <method name="lockWrite">
9783 <desc>
9784 Locks this medium for writing.
9785
9786 A write lock, as opposed to <link to="#lockRead"/>, is
9787 exclusive: there may be only one client holding a write lock,
9788 and there may be no read locks while the write lock is held.
9789 As a result, read-locking fails if a write lock is held, and
9790 write-locking fails if either a read or another write lock is held.
9791
9792 When a medium is locked for writing, it cannot be modified
9793 from within VirtualBox, and it is not guaranteed that the values
9794 of its properties are up-to-date. Any method that changes the
9795 properties of this medium or contents of the storage unit will
9796 return an error (unless explicitly stated otherwise).
9797
9798 When a virtual machine is started up, it locks for writing all
9799 media it uses to write data to. If any medium could not be locked
9800 for writing, the startup procedure will fail. If a medium has
9801 differencing images, then while the machine is running, only
9802 the last ("leaf") differencing image is locked for writing,
9803 whereas its parents are locked for reading only.
9804
9805 A medium is also locked for writing when it is the target of a
9806 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9807
9808 The medium locked for writing must be unlocked using the <link
9809 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9810
9811 This method sets the medium state (see <link to="#state"/>) to
9812 "LockedWrite" on success. The medium's previous state must be
9813 either "Created" or "Inaccessible".
9814
9815 Locking an inaccessible medium is not an error; this method performs
9816 a logical lock that prevents modifications of this medium through
9817 the VirtualBox API, not a physical file-system lock of the underlying
9818 storage unit.
9819
9820 For both, success and failure, this method returns the current
9821 state of the medium <i>before</i> the operation.
9822
9823 <result name="VBOX_E_INVALID_OBJECT_STATE">
9824 Invalid medium state (e.g. not created, locked, inaccessible,
9825 creating, deleting).
9826 </result>
9827
9828 </desc>
9829 <param name="state" type="MediumState" dir="return">
9830 <desc>
9831 State of the medium after the operation.
9832 </desc>
9833 </param>
9834 </method>
9835
9836 <method name="unlockWrite">
9837 <desc>
9838 Cancels the write lock previously set by <link to="#lockWrite"/>.
9839
9840 For both success and failure, this method returns the current
9841 state of the medium <i>after</i> the operation.
9842
9843 See <link to="#lockWrite"/> for more details.
9844
9845 <result name="VBOX_E_INVALID_OBJECT_STATE">
9846 Medium not locked for writing.
9847 </result>
9848
9849 </desc>
9850 <param name="state" type="MediumState" dir="return">
9851 <desc>
9852 State of the medium after the operation.
9853 </desc>
9854 </param>
9855 </method>
9856
9857 <method name="close">
9858 <desc>
9859 Closes this medium.
9860
9861 The medium must not be attached to any known virtual machine
9862 and must not have any known child media, otherwise the
9863 operation will fail.
9864
9865 When the medium is successfully closed, it gets removed from
9866 the list of remembered media, but its storage unit is not
9867 deleted. In particular, this means that this medium can be
9868 later opened again using the <link
9869 to="IVirtualBox::openHardDisk"/> call.
9870
9871 Note that after this method successfully returns, the given medium
9872 object becomes uninitialized. This means that any attempt
9873 to call any of its methods or attributes will fail with the
9874 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9875
9876 <result name="VBOX_E_INVALID_OBJECT_STATE">
9877 Invalid medium state (other than not created, created or
9878 inaccessible).
9879 </result>
9880 <result name="VBOX_E_OBJECT_IN_USE">
9881 Medium attached to virtual machine.
9882 </result>
9883 <result name="VBOX_E_FILE_ERROR">
9884 Settings file not accessible.
9885 </result>
9886 <result name="VBOX_E_XML_ERROR">
9887 Could not parse the settings file.
9888 </result>
9889
9890 </desc>
9891 </method>
9892
9893 <!-- storage methods -->
9894
9895 <method name="getProperty">
9896 <desc>
9897 Returns the value of the custom medium property with the given name.
9898
9899 The list of all properties supported by the given medium format can
9900 be obtained with <link to="IMediumFormat::describeProperties"/>.
9901
9902 Note that if this method returns an empty string in @a value, the
9903 requested property is supported but currently not assigned any value.
9904
9905 <result name="VBOX_E_OBJECT_NOT_FOUND">
9906 Requested property does not exist (not supported by the format).
9907 </result>
9908 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9909 </desc>
9910 <param name="name" type="wstring" dir="in">
9911 <desc>Name of the property to get.</desc>
9912 </param>
9913 <param name="value" type="wstring" dir="return">
9914 <desc>Current property value.</desc>
9915 </param>
9916 </method>
9917
9918 <method name="setProperty">
9919 <desc>
9920 Sets the value of the custom medium property with the given name.
9921
9922 The list of all properties supported by the given medium format can
9923 be obtained with <link to="IMediumFormat::describeProperties"/>.
9924
9925 Note that setting the property value to @c null or an empty string is
9926 equivalent to deleting the existing value. A default value (if it is
9927 defined for this property) will be used by the format backend in this
9928 case.
9929
9930 <result name="VBOX_E_OBJECT_NOT_FOUND">
9931 Requested property does not exist (not supported by the format).
9932 </result>
9933 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9934 </desc>
9935 <param name="name" type="wstring" dir="in">
9936 <desc>Name of the property to set.</desc>
9937 </param>
9938 <param name="value" type="wstring" dir="in">
9939 <desc>Property value to set.</desc>
9940 </param>
9941 </method>
9942
9943 <method name="getProperties">
9944 <desc>
9945 Returns values for a group of properties in one call.
9946
9947 The names of the properties to get are specified using the @a names
9948 argument which is a list of comma-separated property names or
9949 an empty string if all properties are to be returned. Note that currently
9950 the value of this argument is ignored and the method always returns all
9951 existing properties.
9952
9953 The list of all properties supported by the given medium format can
9954 be obtained with <link to="IMediumFormat::describeProperties"/>.
9955
9956 The method returns two arrays, the array of property names corresponding
9957 to the @a names argument and the current values of these properties.
9958 Both arrays have the same number of elements with each elemend at the
9959 given index in the first array corresponds to an element at the same
9960 index in the second array.
9961
9962 Note that for properties that do not have assigned values,
9963 an empty string is returned at the appropriate index in the
9964 @a returnValues array.
9965
9966 </desc>
9967 <param name="names" type="wstring" dir="in">
9968 <desc>
9969 Names of properties to get.
9970 </desc>
9971 </param>
9972 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9973 <desc>Names of returned properties.</desc>
9974 </param>
9975 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9976 <desc>Values of returned properties.</desc>
9977 </param>
9978 </method>
9979
9980 <method name="setProperties">
9981 <desc>
9982 Sets values for a group of properties in one call.
9983
9984 The names of the properties to set are passed in the @a names
9985 array along with the new values for them in the @a values array. Both
9986 arrays have the same number of elements with each elemend at the given
9987 index in the first array corresponding to an element at the same index
9988 in the second array.
9989
9990 If there is at least one property name in @a names that is not valid,
9991 the method will fail before changing the values of any other properties
9992 from the @a names array.
9993
9994 Using this method over <link to="#setProperty"/> is preferred if you
9995 need to set several properties at once since it will result into less
9996 IPC calls.
9997
9998 The list of all properties supported by the given medium format can
9999 be obtained with <link to="IMediumFormat::describeProperties"/>.
10000
10001 Note that setting the property value to @c null or an empty string is
10002 equivalent to deleting the existing value. A default value (if it is
10003 defined for this property) will be used by the format backend in this
10004 case.
10005 </desc>
10006 <param name="names" type="wstring" safearray="yes" dir="in">
10007 <desc>Names of properties to set.</desc>
10008 </param>
10009 <param name="values" type="wstring" safearray="yes" dir="in">
10010 <desc>Values of properties to set.</desc>
10011 </param>
10012 </method>
10013
10014 <!-- storage methods -->
10015
10016 <method name="createBaseStorage">
10017 <desc>
10018 Starts creating a hard disk storage unit (fixed/dynamic, according
10019 to the variant flags) in in the background. The previous storage unit
10020 created for this object, if any, must first be deleted using
10021 <link to="#deleteStorage"/>, otherwise the operation will fail.
10022
10023 Before the operation starts, the medium is placed in
10024 <link to="MediumState_Creating"/> state. If the create operation
10025 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
10026 state.
10027
10028 After the returned progress object reports that the operation has
10029 successfully completed, the medium state will be set to <link
10030 to="MediumState_Created"/>, the medium will be remembered by this
10031 VirtualBox installation and may be attached to virtual machines.
10032
10033 <result name="VBOX_E_NOT_SUPPORTED">
10034 The variant of storage creation operation is not supported. See <link
10035 to="IMediumFormat::capabilities"/>.
10036 </result>
10037 </desc>
10038 <param name="logicalSize" type="unsigned long long" dir="in">
10039 <desc>Maximum logical size of the medium in megabytes.</desc>
10040 </param>
10041 <param name="variant" type="MediumVariant" dir="in">
10042 <desc>Exact image variant which should be created.</desc>
10043 </param>
10044 <param name="progress" type="IProgress" dir="return">
10045 <desc>Progress object to track the operation completion.</desc>
10046 </param>
10047 </method>
10048
10049 <method name="deleteStorage">
10050 <desc>
10051 Starts deleting the storage unit of this medium.
10052
10053 The medium must not be attached to any known virtual machine and must
10054 not have any known child media, otherwise the operation will fail.
10055 It will also fail if there is no storage unit to delete or if deletion
10056 is already in progress, or if the medium is being in use (locked for
10057 read or for write) or inaccessible. Therefore, the only valid state for
10058 this operation to succeed is <link to="MediumState_Created"/>.
10059
10060 Before the operation starts, the medium is placed in
10061 <link to="MediumState_Deleting"/> state and gets removed from the list
10062 of remembered hard disks (media registry). If the delete operation
10063 fails, the medium will be remembered again and placed back to
10064 <link to="MediumState_Created"/> state.
10065
10066 After the returned progress object reports that the operation is
10067 complete, the medium state will be set to
10068 <link to="MediumState_NotCreated"/> and you will be able to use one of
10069 the storage creation methods to create it again.
10070
10071 <see>#close()</see>
10072
10073 <result name="VBOX_E_OBJECT_IN_USE">
10074 Medium is attached to a virtual machine.
10075 </result>
10076 <result name="VBOX_E_NOT_SUPPORTED">
10077 Storage deletion is not allowed because neither of storage creation
10078 operations are supported. See
10079 <link to="IMediumFormat::capabilities"/>.
10080 </result>
10081
10082 <note>
10083 If the deletion operation fails, it is not guaranteed that the storage
10084 unit still exists. You may check the <link to="IMedium::state"/> value
10085 to answer this question.
10086 </note>
10087 </desc>
10088 <param name="progress" type="IProgress" dir="return">
10089 <desc>Progress object to track the operation completion.</desc>
10090 </param>
10091 </method>
10092
10093 <!-- diff methods -->
10094
10095 <method name="createDiffStorage">
10096 <desc>
10097 Starts creating an empty differencing storage unit based on this
10098 medium in the format and at the location defined by the @a target
10099 argument.
10100
10101 The target medium must be in <link to="MediumState_NotCreated"/>
10102 state (i.e. must not have an existing storage unit). Upon successful
10103 completion, this operation will set the type of the target medium to
10104 <link to="MediumType_Normal"/> and create a storage unit necessary to
10105 represent the differencing medium data in the given format (according
10106 to the storage format of the target object).
10107
10108 After the returned progress object reports that the operation is
10109 successfully complete, the target medium gets remembered by this
10110 VirtualBox installation and may be attached to virtual machines.
10111
10112 <note>
10113 The medium will be set to <link to="MediumState_LockedRead"/>
10114 state for the duration of this operation.
10115 </note>
10116 <result name="VBOX_E_OBJECT_IN_USE">
10117 Medium not in @c NotCreated state.
10118 </result>
10119 </desc>
10120 <param name="target" type="IMedium" dir="in">
10121 <desc>Target medium.</desc>
10122 </param>
10123 <param name="variant" type="MediumVariant" dir="in">
10124 <desc>Exact image variant which should be created.</desc>
10125 </param>
10126 <param name="progress" type="IProgress" dir="return">
10127 <desc>Progress object to track the operation completion.</desc>
10128 </param>
10129 </method>
10130
10131 <method name="mergeTo">
10132 <desc>
10133 Starts merging the contents of this medium and all intermediate
10134 differencing media in the chain to the given target medium.
10135
10136 The target medium must be either a descendant of this medium or
10137 its ancestor (otherwise this method will immediately return a failure).
10138 It follows that there are two logical directions of the merge operation:
10139 from ancestor to descendant (<i>forward merge</i>) and from descendant to
10140 ancestor (<i>backward merge</i>). Let us consider the following medium
10141 chain:
10142
10143 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
10144
10145 Here, calling this method on the <tt>Base</tt> medium object with
10146 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
10147 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
10148 merge. Note that in both cases the contents of the resulting medium
10149 will be the same, the only difference is the medium object that takes
10150 the result of the merge operation. In case of the forward merge in the
10151 above example, the result will be written to <tt>Diff_2</tt>; in case of
10152 the backward merge, the result will be written to <tt>Base</tt>. In
10153 other words, the result of the operation is always stored in the target
10154 medium.
10155
10156 Upon successful operation completion, the storage units of all media in
10157 the chain between this (source) medium and the target medium, including
10158 the source medium itself, will be automatically deleted and the
10159 relevant medium objects (including this medium) will become
10160 uninitialized. This means that any attempt to call any of
10161 their methods or attributes will fail with the
10162 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
10163 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
10164 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
10165 Note that <tt>Diff_2</tt> in this case will become a base medium
10166 itself since it will no longer be based on any other medium.
10167
10168 Considering the above, all of the following conditions must be met in
10169 order for the merge operation to succeed:
10170 <ul>
10171 <li>
10172 Neither this (source) medium nor any intermediate
10173 differencing medium in the chain between it and the target
10174 medium is attached to any virtual machine.
10175 </li>
10176 <li>
10177 Neither the source medium nor the target medium is an
10178 <link to="MediumType_Immutable"/> medium.
10179 </li>
10180 <li>
10181 The part of the medium tree from the source medium to the
10182 target medium is a linear chain, i.e. all medium in this
10183 chain have exactly one child which is the next medium in this
10184 chain. The only exception from this rule is the target medium in
10185 the forward merge operation; it is allowed to have any number of
10186 child media because the merge operation will not change its
10187 logical contents (as it is seen by the guest OS or by children).
10188 </li>
10189 <li>
10190 None of the involved media are in
10191 <link to="MediumState_LockedRead"/> or
10192 <link to="MediumState_LockedWrite"/> state.
10193 </li>
10194 </ul>
10195
10196 <note>
10197 This (source) medium and all intermediates will be placed to <link
10198 to="MediumState_Deleting"/> state and the target medium will be
10199 placed to <link to="MediumState_LockedWrite"/> state and for the
10200 duration of this operation.
10201 </note>
10202 </desc>
10203 <param name="targetId" type="uuid" mod="string" dir="in">
10204 <desc>UUID of the target ancestor or descendant medium.</desc>
10205 </param>
10206 <param name="progress" type="IProgress" dir="return">
10207 <desc>Progress object to track the operation completion.</desc>
10208 </param>
10209 </method>
10210
10211 <!-- clone method -->
10212
10213 <method name="cloneTo">
10214 <desc>
10215 Starts creating a clone of this medium in the format and at the
10216 location defined by the @a target argument.
10217
10218 The target medium must be either in <link to="MediumState_NotCreated"/>
10219 state (i.e. must not have an existing storage unit) or in
10220 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10221 big enough to hold the data or else the copy will be partial). Upon
10222 successful completion, the cloned medium will contain exactly the
10223 same sector data as the medium being cloned, except that in the
10224 first case a new UUID for the clone will be randomly generated, and in
10225 the second case the UUID will remain unchanged.
10226
10227 The @a parent argument defines which medium will be the parent
10228 of the clone. Passing a @c null reference indicates that the clone will
10229 be a base image, i.e. completely independent. It is possible to specify
10230 an arbitrary medium for this parameter, including the parent of the
10231 medium which is being cloned. Even cloning to a child of the source
10232 medium is possible. Note that when cloning to an existing image, the
10233 @a parent irgument is ignored.
10234
10235 After the returned progress object reports that the operation is
10236 successfully complete, the target medium gets remembered by this
10237 VirtualBox installation and may be attached to virtual machines.
10238
10239 <note>
10240 This medium will be placed to <link to="MediumState_LockedRead"/>
10241 state for the duration of this operation.
10242 </note>
10243 <result name="E_NOTIMPL">
10244 The specified cloning variant is not supported at the moment.
10245 </result>
10246 </desc>
10247 <param name="target" type="IMedium" dir="in">
10248 <desc>Target medium.</desc>
10249 </param>
10250 <param name="variant" type="MediumVariant" dir="in">
10251 <desc>Exact image variant which should be created.</desc>
10252 </param>
10253 <param name="parent" type="IMedium" dir="in">
10254 <desc>Parent of the cloned medium.</desc>
10255 </param>
10256 <param name="progress" type="IProgress" dir="return">
10257 <desc>Progress object to track the operation completion.</desc>
10258 </param>
10259 </method>
10260
10261 <!-- other methods -->
10262
10263 <method name="compact">
10264 <desc>
10265 Starts compacting of this medium. This means that the medium is
10266 transformed into a possibly more compact storage representation.
10267 This potentially creates temporary images, which can require a
10268 substantial amount of additional disk space.
10269
10270 This medium will be placed to <link to="MediumState_LockedWrite"/>
10271 state and all its parent media (if any) will be placed to
10272 <link to="MediumState_LockedRead"/> state for the duration of this
10273 operation.
10274
10275 Please note that the results can be either returned straight away,
10276 or later as the result of the background operation via the object
10277 returned via the @a progress parameter.
10278
10279 <result name="VBOX_E_NOT_SUPPORTED">
10280 Medium format does not support compacting (but potentially
10281 needs it).
10282 </result>
10283 </desc>
10284 <param name="progress" type="IProgress" dir="return">
10285 <desc>Progress object to track the operation completion.</desc>
10286 </param>
10287 </method>
10288
10289 <method name="resize">
10290 <desc>
10291 Starts resizing this medium. This means that the nominal size of the
10292 medium is set to the new value. Both increasing and decreasing the
10293 size is possible, and there are no safety checks, since VirtualBox
10294 does not make any assumptions about the medium contents.
10295
10296 Resizing usually needs additional disk space, and possibly also
10297 some temporary disk space. Note that resize does not create a full
10298 temporary copy of the medium, so the additional disk space requirement
10299 is usually much lower than using the clone operation.
10300
10301 This medium will be placed to <link to="MediumState_LockedWrite"/>
10302 state for the duration of this operation.
10303
10304 Please note that the results can be either returned straight away,
10305 or later as the result of the background operation via the object
10306 returned via the @a progress parameter.
10307
10308 <result name="VBOX_E_NOT_SUPPORTED">
10309 Medium format does not support resizing.
10310 </result>
10311 </desc>
10312 <param name="logicalSize" type="unsigned long long" dir="in">
10313 <desc>New nominal capacity of the medium in megabytes.</desc>
10314 </param>
10315 <param name="progress" type="IProgress" dir="return">
10316 <desc>Progress object to track the operation completion.</desc>
10317 </param>
10318 </method>
10319
10320 <method name="reset">
10321 <desc>
10322 Starts erasing the contents of this differencing medium.
10323
10324 This operation will reset the differencing medium to its initial
10325 state when it does not contain any sector data and any read operation is
10326 redirected to its parent medium. This automatically gets called
10327 during VM power-up for every medium whose <link to="#autoReset" />
10328 attribute is @c true.
10329
10330 The medium will be write-locked for the duration of this operation (see
10331 <link to="#lockWrite" />).
10332
10333 <result name="VBOX_E_NOT_SUPPORTED">
10334 This is not a differencing medium.
10335 </result>
10336 <result name="VBOX_E_INVALID_OBJECT_STATE">
10337 Medium is not in <link to="MediumState_Created"/> or
10338 <link to="MediumState_Inaccessible"/> state.
10339 </result>
10340 </desc>
10341 <param name="progress" type="IProgress" dir="return">
10342 <desc>Progress object to track the operation completion.</desc>
10343 </param>
10344 </method>
10345
10346 </interface>
10347
10348
10349 <!--
10350 // IMediumFormat
10351 /////////////////////////////////////////////////////////////////////////
10352 -->
10353
10354 <enum
10355 name="DataType"
10356 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10357 >
10358 <const name="Int32" value="0"/>
10359 <const name="Int8" value="1"/>
10360 <const name="String" value="2"/>
10361 </enum>
10362
10363 <enum
10364 name="DataFlags"
10365 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10366 >
10367 <const name="None" value="0x00"/>
10368 <const name="Mandatory" value="0x01"/>
10369 <const name="Expert" value="0x02"/>
10370 <const name="Array" value="0x04"/>
10371 <const name="FlagMask" value="0x07"/>
10372 </enum>
10373
10374 <enum
10375 name="MediumFormatCapabilities"
10376 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10377 >
10378 <desc>
10379 Medium format capability flags.
10380 </desc>
10381
10382 <const name="Uuid" value="0x01">
10383 <desc>
10384 Supports UUIDs as expected by VirtualBox code.
10385 </desc>
10386 </const>
10387
10388 <const name="CreateFixed" value="0x02">
10389 <desc>
10390 Supports creating fixed size images, allocating all space instantly.
10391 </desc>
10392 </const>
10393
10394 <const name="CreateDynamic" value="0x04">
10395 <desc>
10396 Supports creating dynamically growing images, allocating space on
10397 demand.
10398 </desc>
10399 </const>
10400
10401 <const name="CreateSplit2G" value="0x08">
10402 <desc>
10403 Supports creating images split in chunks of a bit less than 2 GBytes.
10404 </desc>
10405 </const>
10406
10407 <const name="Differencing" value="0x10">
10408 <desc>
10409 Supports being used as a format for differencing media (see <link
10410 to="IMedium::createDiffStorage"/>).
10411 </desc>
10412 </const>
10413
10414 <const name="Asynchronous" value="0x20">
10415 <desc>
10416 Supports asynchronous I/O operations for at least some configurations.
10417 </desc>
10418 </const>
10419
10420 <const name="File" value="0x40">
10421 <desc>
10422 The format backend operates on files (the <link to="IMedium::location"/>
10423 attribute of the medium specifies a file used to store medium
10424 data; for a list of supported file extensions see
10425 <link to="IMediumFormat::fileExtensions"/>).
10426 </desc>
10427 </const>
10428
10429 <const name="Properties" value="0x80">
10430 <desc>
10431 The format backend uses the property interface to configure the storage
10432 location and properties (the <link to="IMediumFormat::describeProperties"/>
10433 method is used to get access to properties supported by the given medium format).
10434 </desc>
10435 </const>
10436
10437 <const name="CapabilityMask" value="0xFF"/>
10438 </enum>
10439
10440 <interface
10441 name="IMediumFormat" extends="$unknown"
10442 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10443 wsmap="managed"
10444 >
10445 <desc>
10446 The IMediumFormat interface represents a medium format.
10447
10448 Each medium format has an associated backend which is used to handle
10449 media stored in this format. This interface provides information
10450 about the properties of the associated backend.
10451
10452 Each medium format is identified by a string represented by the
10453 <link to="#id"/> attribute. This string is used in calls like
10454 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10455 format.
10456
10457 The list of all supported medium formats can be obtained using
10458 <link to="ISystemProperties::mediaFormats"/>.
10459
10460 <see>IMedium</see>
10461 </desc>
10462
10463 <attribute name="id" type="wstring" readonly="yes">
10464 <desc>
10465 Identifier of this format.
10466
10467 The format identifier is a non-@c null non-empty ASCII string. Note that
10468 this string is case-insensitive. This means that, for example, all of
10469 the following strings:
10470 <pre>
10471 "VDI"
10472 "vdi"
10473 "VdI"</pre>
10474 refer to the same medium format.
10475
10476 This string is used in methods of other interfaces where it is necessary
10477 to specify a medium format, such as
10478 <link to="IVirtualBox::createHardDisk"/>.
10479 </desc>
10480 </attribute>
10481
10482 <attribute name="name" type="wstring" readonly="yes">
10483 <desc>
10484 Human readable description of this format.
10485
10486 Mainly for use in file open dialogs.
10487 </desc>
10488 </attribute>
10489
10490 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10491 <desc>
10492 Array of strings containing the supported file extensions.
10493
10494 The first extension in the array is the extension preferred by the
10495 backend. It is recommended to use this extension when specifying a
10496 location of the storage unit for a new medium.
10497
10498 Note that some backends do not work on files, so this array may be
10499 empty.
10500
10501 <see>IMediumFormat::capabilities</see>
10502 </desc>
10503 </attribute>
10504
10505 <attribute name="capabilities" type="unsigned long" readonly="yes">
10506 <desc>
10507 Capabilities of the format as a set of bit flags.
10508
10509 For the meaning of individual capability flags see
10510 <link to="MediumFormatCapabilities"/>.
10511 </desc>
10512 </attribute>
10513
10514 <method name="describeProperties">
10515 <desc>
10516 Returns several arrays describing the properties supported by this
10517 format.
10518
10519 An element with the given index in each array describes one
10520 property. Thus, the number of elements in each returned array is the
10521 same and corresponds to the number of supported properties.
10522
10523 The returned arrays are filled in only if the
10524 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10525 All arguments must be non-@c null.
10526
10527 <see>DataType</see>
10528 <see>DataFlags</see>
10529 </desc>
10530
10531 <param name="names" type="wstring" safearray="yes" dir="out">
10532 <desc>Array of property names.</desc>
10533 </param>
10534 <param name="description" type="wstring" safearray="yes" dir="out">
10535 <desc>Array of property descriptions.</desc>
10536 </param>
10537 <param name="types" type="DataType" safearray="yes" dir="out">
10538 <desc>Array of property types.</desc>
10539 </param>
10540 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10541 <desc>Array of property flags.</desc>
10542 </param>
10543 <param name="defaults" type="wstring" safearray="yes" dir="out">
10544 <desc>Array of default property values.</desc>
10545 </param>
10546 </method>
10547
10548 </interface>
10549
10550
10551 <!--
10552 // IKeyboard
10553 /////////////////////////////////////////////////////////////////////////
10554 -->
10555
10556 <interface
10557 name="IKeyboard" extends="$unknown"
10558 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10559 wsmap="managed"
10560 >
10561 <desc>
10562 The IKeyboard interface represents the virtual machine's keyboard. Used
10563 in <link to="IConsole::keyboard"/>.
10564
10565 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10566 to the virtual machine.
10567
10568 </desc>
10569 <method name="putScancode">
10570 <desc>Sends a scancode to the keyboard.
10571
10572 <result name="VBOX_E_IPRT_ERROR">
10573 Could not send scan code to virtual keyboard.
10574 </result>
10575
10576 </desc>
10577 <param name="scancode" type="long" dir="in"/>
10578 </method>
10579
10580 <method name="putScancodes">
10581 <desc>Sends an array of scancodes to the keyboard.
10582
10583 <result name="VBOX_E_IPRT_ERROR">
10584 Could not send all scan codes to virtual keyboard.
10585 </result>
10586
10587 </desc>
10588 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10589 <param name="codesStored" type="unsigned long" dir="return"/>
10590 </method>
10591
10592 <method name="putCAD">
10593 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10594 function is nothing special, it is just a convenience function
10595 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10596
10597 <result name="VBOX_E_IPRT_ERROR">
10598 Could not send all scan codes to virtual keyboard.
10599 </result>
10600
10601 </desc>
10602 </method>
10603
10604 </interface>
10605
10606
10607 <!--
10608 // IMouse
10609 /////////////////////////////////////////////////////////////////////////
10610 -->
10611
10612 <enum
10613 name="MouseButtonState"
10614 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10615 >
10616 <desc>
10617 Mouse button state.
10618 </desc>
10619
10620 <const name="LeftButton" value="0x01"/>
10621 <const name="RightButton" value="0x02"/>
10622 <const name="MiddleButton" value="0x04"/>
10623 <const name="WheelUp" value="0x08"/>
10624 <const name="WheelDown" value="0x10"/>
10625 <const name="XButton1" value="0x20"/>
10626 <const name="XButton2" value="0x40"/>
10627 <const name="MouseStateMask" value="0x7F"/>
10628 </enum>
10629
10630 <interface
10631 name="IMouse" extends="$unknown"
10632 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10633 wsmap="managed"
10634 >
10635 <desc>
10636 The IMouse interface represents the virtual machine's mouse. Used in
10637 <link to="IConsole::mouse"/>.
10638
10639 Through this interface, the virtual machine's virtual mouse can be
10640 controlled.
10641 </desc>
10642
10643 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10644 <desc>
10645 Whether the guest OS supports absolute mouse pointer positioning
10646 or not.
10647 <note>
10648 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10649 callback to be instantly informed about changes of this attribute
10650 during virtual machine execution.
10651 </note>
10652 <see><link to="#putMouseEventAbsolute"/></see>
10653 </desc>
10654 </attribute>
10655
10656 <attribute name="relativeSupported" type="boolean" readonly="yes">
10657 <desc>
10658 Whether the guest OS supports relative mouse pointer positioning
10659 or not.
10660 <note>
10661 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10662 callback to be instantly informed about changes of this attribute
10663 during virtual machine execution.
10664 </note>
10665 <see><link to="#putMouseEvent"/></see>
10666 </desc>
10667 </attribute>
10668
10669 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10670 <desc>
10671 Whether the guest OS can currently switch to drawing it's own mouse
10672 cursor on demand.
10673 <note>
10674 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10675 callback to be instantly informed about changes of this attribute
10676 during virtual machine execution.
10677 </note>
10678 <see><link to="#putMouseEvent"/></see>
10679 </desc>
10680 </attribute>
10681
10682 <method name="putMouseEvent">
10683 <desc>
10684 Initiates a mouse event using relative pointer movements
10685 along x and y axis.
10686
10687 <result name="E_ACCESSDENIED">
10688 Console not powered up.
10689 </result>
10690 <result name="VBOX_E_IPRT_ERROR">
10691 Could not send mouse event to virtual mouse.
10692 </result>
10693
10694 </desc>
10695
10696 <param name="dx" type="long" dir="in">
10697 <desc>
10698 Amount of pixels the mouse should move to the right.
10699 Negative values move the mouse to the left.
10700 </desc>
10701 </param>
10702 <param name="dy" type="long" dir="in">
10703 <desc>
10704 Amount of pixels the mouse should move downwards.
10705 Negative values move the mouse upwards.
10706 </desc>
10707 </param>
10708 <param name="dz" type="long" dir="in">
10709 <desc>
10710 Amount of mouse wheel moves.
10711 Positive values describe clockwise wheel rotations,
10712 negative values describe counterclockwise rotations.
10713 </desc>
10714 </param>
10715 <param name="dw" type="long" dir="in">
10716 <desc>
10717 Amount of horizontal mouse wheel moves.
10718 Positive values describe a movement to the left,
10719 negative values describe a movement to the right.
10720 </desc>
10721 </param>
10722 <param name="buttonState" type="long" dir="in">
10723 <desc>
10724 The current state of mouse buttons. Every bit represents
10725 a mouse button as follows:
10726 <table>
10727 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10728 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10729 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10730 </table>
10731 A value of <tt>1</tt> means the corresponding button is pressed.
10732 otherwise it is released.
10733 </desc>
10734 </param>
10735 </method>
10736
10737 <method name="putMouseEventAbsolute">
10738 <desc>
10739 Positions the mouse pointer using absolute x and y coordinates.
10740 These coordinates are expressed in pixels and
10741 start from <tt>[1,1]</tt> which corresponds to the top left
10742 corner of the virtual display.
10743
10744 <result name="E_ACCESSDENIED">
10745 Console not powered up.
10746 </result>
10747 <result name="VBOX_E_IPRT_ERROR">
10748 Could not send mouse event to virtual mouse.
10749 </result>
10750
10751 <note>
10752 This method will have effect only if absolute mouse
10753 positioning is supported by the guest OS.
10754 </note>
10755
10756 <see><link to="#absoluteSupported"/></see>
10757 </desc>
10758
10759 <param name="x" type="long" dir="in">
10760 <desc>
10761 X coordinate of the pointer in pixels, starting from @c 1.
10762 </desc>
10763 </param>
10764 <param name="y" type="long" dir="in">
10765 <desc>
10766 Y coordinate of the pointer in pixels, starting from @c 1.
10767 </desc>
10768 </param>
10769 <param name="dz" type="long" dir="in">
10770 <desc>
10771 Amount of mouse wheel moves.
10772 Positive values describe clockwise wheel rotations,
10773 negative values describe counterclockwise rotations.
10774 </desc>
10775 </param>
10776 <param name="dw" type="long" dir="in">
10777 <desc>
10778 Amount of horizontal mouse wheel moves.
10779 Positive values describe a movement to the left,
10780 negative values describe a movement to the right.
10781 </desc>
10782 </param>
10783 <param name="buttonState" type="long" dir="in">
10784 <desc>
10785 The current state of mouse buttons. Every bit represents
10786 a mouse button as follows:
10787 <table>
10788 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10789 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10790 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10791 </table>
10792 A value of @c 1 means the corresponding button is pressed.
10793 otherwise it is released.
10794 </desc>
10795 </param>
10796 </method>
10797
10798 </interface>
10799
10800 <!--
10801 // IDisplay
10802 /////////////////////////////////////////////////////////////////////////
10803 -->
10804
10805 <enum
10806 name="FramebufferPixelFormat"
10807 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10808 >
10809 <desc>
10810 Format of the video memory buffer. Constants represented by this enum can
10811 be used to test for particular values of <link
10812 to="IFramebuffer::pixelFormat"/>. See also <link
10813 to="IFramebuffer::requestResize"/>.
10814
10815 See also www.fourcc.org for more information about FOURCC pixel formats.
10816 </desc>
10817
10818 <const name="Opaque" value="0">
10819 <desc>
10820 Unknown buffer format (the user may not assume any particular format of
10821 the buffer).
10822 </desc>
10823 </const>
10824 <const name="FOURCC_RGB" value="0x32424752">
10825 <desc>
10826 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10827 bit layout).
10828 </desc>
10829 </const>
10830 </enum>
10831
10832 <interface
10833 name="IFramebuffer" extends="$unknown"
10834 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10835 wsmap="suppress"
10836 >
10837 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10838 <desc>Address of the start byte of the frame buffer.</desc>
10839 </attribute>
10840
10841 <attribute name="width" type="unsigned long" readonly="yes">
10842 <desc>Frame buffer width, in pixels.</desc>
10843 </attribute>
10844
10845 <attribute name="height" type="unsigned long" readonly="yes">
10846 <desc>Frame buffer height, in pixels.</desc>
10847 </attribute>
10848
10849 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10850 <desc>
10851 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10852 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10853 are: 8, 15, 16, 24 and 32.
10854 </desc>
10855 </attribute>
10856
10857 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10858 <desc>
10859 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10860 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10861 size of the scan line must be aligned to 32 bits.
10862 </desc>
10863 </attribute>
10864
10865 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10866 <desc>
10867 Frame buffer pixel format. It's either one of the values defined by <link
10868 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10869 <note>
10870 This attribute must never return <link
10871 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10872 <link to="#address"/> points to must be always known.
10873 </note>
10874 </desc>
10875 </attribute>
10876
10877 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10878 <desc>
10879 Defines whether this frame buffer uses the virtual video card's memory
10880 buffer (guest VRAM) directly or not. See <link
10881 to="IFramebuffer::requestResize"/> for more information.
10882 </desc>
10883 </attribute>
10884
10885 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10886 <desc>
10887 Hint from the frame buffer about how much of the standard
10888 screen height it wants to use for itself. This information is
10889 exposed to the guest through the VESA BIOS and VMMDev interface
10890 so that it can use it for determining its video mode table. It
10891 is not guaranteed that the guest respects the value.
10892 </desc>
10893 </attribute>
10894
10895 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10896 <desc>
10897 An alpha-blended overlay which is superposed over the frame buffer.
10898 The initial purpose is to allow the display of icons providing
10899 information about the VM state, including disk activity, in front
10900 ends which do not have other means of doing that. The overlay is
10901 designed to controlled exclusively by IDisplay. It has no locking
10902 of its own, and any changes made to it are not guaranteed to be
10903 visible until the affected portion of IFramebuffer is updated. The
10904 overlay can be created lazily the first time it is requested. This
10905 attribute can also return @c null to signal that the overlay is not
10906 implemented.
10907 </desc>
10908 </attribute>
10909
10910 <attribute name="winId" type="unsigned long long" readonly="yes">
10911 <desc>
10912 Platform-dependent identifier of the window where context of this
10913 frame buffer is drawn, or zero if there's no such window.
10914 </desc>
10915 </attribute>
10916
10917 <method name="lock">
10918 <desc>
10919 Locks the frame buffer.
10920 Gets called by the IDisplay object where this frame buffer is
10921 bound to.
10922 </desc>
10923 </method>
10924
10925 <method name="unlock">
10926 <desc>
10927 Unlocks the frame buffer.
10928 Gets called by the IDisplay object where this frame buffer is
10929 bound to.
10930 </desc>
10931 </method>
10932
10933 <method name="notifyUpdate">
10934 <desc>
10935 Informs about an update.
10936 Gets called by the display object where this buffer is
10937 registered.
10938 </desc>
10939 <param name="x" type="unsigned long" dir="in"/>
10940 <param name="y" type="unsigned long" dir="in"/>
10941 <param name="width" type="unsigned long" dir="in"/>
10942 <param name="height" type="unsigned long" dir="in"/>
10943 </method>
10944
10945 <method name="requestResize">
10946 <desc>
10947 Requests a size and pixel format change.
10948
10949 There are two modes of working with the video buffer of the virtual
10950 machine. The <i>indirect</i> mode implies that the IFramebuffer
10951 implementation allocates a memory buffer for the requested display mode
10952 and provides it to the virtual machine. In <i>direct</i> mode, the
10953 IFramebuffer implementation uses the memory buffer allocated and owned
10954 by the virtual machine. This buffer represents the video memory of the
10955 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10956 usually faster because the implementation gets a raw pointer to the
10957 guest VRAM buffer which it can directly use for visualizing the contents
10958 of the virtual display, as opposed to the indirect mode where the
10959 contents of guest VRAM are copied to the memory buffer provided by
10960 the implementation every time a display update occurs.
10961
10962 It is important to note that the direct mode is really fast only when
10963 the implementation uses the given guest VRAM buffer directly, for
10964 example, by blitting it to the window representing the virtual machine's
10965 display, which saves at least one copy operation comparing to the
10966 indirect mode. However, using the guest VRAM buffer directly is not
10967 always possible: the format and the color depth of this buffer may be
10968 not supported by the target window, or it may be unknown (opaque) as in
10969 case of text or non-linear multi-plane VGA video modes. In this case,
10970 the indirect mode (that is always available) should be used as a
10971 fallback: when the guest VRAM contents are copied to the
10972 implementation-provided memory buffer, color and format conversion is
10973 done automatically by the underlying code.
10974
10975 The @a pixelFormat parameter defines whether the direct mode is
10976 available or not. If @a pixelFormat is <link
10977 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10978 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10979 @a bytesPerLine parameters must be ignored and the implementation must use
10980 the indirect mode (where it provides its own buffer in one of the
10981 supported formats). In all other cases, @a pixelFormat together with
10982 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10983 buffer pointed to by the @a VRAM parameter and the implementation is
10984 free to choose which mode to use. To indicate that this frame buffer uses
10985 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10986 attribute must return @c true and <link to="#address"/> must
10987 return exactly the same address that is passed in the @a VRAM parameter
10988 of this method; otherwise it is assumed that the indirect strategy is
10989 chosen.
10990
10991 The @a width and @a height parameters represent the size of the
10992 requested display mode in both modes. In case of indirect mode, the
10993 provided memory buffer should be big enough to store data of the given
10994 display mode. In case of direct mode, it is guaranteed that the given
10995 @a VRAM buffer contains enough space to represent the display mode of the
10996 given size. Note that this frame buffer's <link to="#width"/> and <link
10997 to="#height"/> attributes must return exactly the same values as
10998 passed to this method after the resize is completed (see below).
10999
11000 The @a finished output parameter determines if the implementation has
11001 finished resizing the frame buffer or not. If, for some reason, the
11002 resize cannot be finished immediately during this call, @a finished
11003 must be set to @c false, and the implementation must call
11004 <link to="IDisplay::resizeCompleted"/> after it has returned from
11005 this method as soon as possible. If @a finished is @c false, the
11006 machine will not call any frame buffer methods until
11007 <link to="IDisplay::resizeCompleted"/> is called.
11008
11009 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
11010 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
11011 this frame buffer must return exactly the same values as specified in the
11012 parameters of this method, after the resize is completed. If the
11013 indirect mode is chosen, these attributes must return values describing
11014 the format of the implementation's own memory buffer <link
11015 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
11016 value must always correlate with <link to="#pixelFormat"/>. Note that
11017 the <link to="#pixelFormat"/> attribute must never return <link
11018 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
11019
11020 <note>
11021 This method is called by the IDisplay object under the
11022 <link to="#lock"/> provided by this IFramebuffer
11023 implementation. If this method returns @c false in @a finished, then
11024 this lock is not released until
11025 <link to="IDisplay::resizeCompleted"/> is called.
11026 </note>
11027 </desc>
11028 <param name="screenId" type="unsigned long" dir="in">
11029 <desc>
11030 Logical screen number. Must be used in the corresponding call to
11031 <link to="IDisplay::resizeCompleted"/> if this call is made.
11032 </desc>
11033 </param>
11034 <param name="pixelFormat" type="unsigned long" dir="in">
11035 <desc>
11036 Pixel format of the memory buffer pointed to by @a VRAM.
11037 See also <link to="FramebufferPixelFormat"/>.
11038 </desc>
11039 </param>
11040 <param name="VRAM" type="octet" mod="ptr" dir="in">
11041 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
11042 </param>
11043 <param name="bitsPerPixel" type="unsigned long" dir="in">
11044 <desc>Color depth, bits per pixel.</desc>
11045 </param>
11046 <param name="bytesPerLine" type="unsigned long" dir="in">
11047 <desc>Size of one scan line, in bytes.</desc>
11048 </param>
11049 <param name="width" type="unsigned long" dir="in">
11050 <desc>Width of the guest display, in pixels.</desc>
11051 </param>
11052 <param name="height" type="unsigned long" dir="in">
11053 <desc>Height of the guest display, in pixels.</desc>
11054 </param>
11055 <param name="finished" type="boolean" dir="return">
11056 <desc>
11057 Can the VM start using the new frame buffer immediately
11058 after this method returns or it should wait for
11059 <link to="IDisplay::resizeCompleted"/>.
11060 </desc>
11061 </param>
11062 </method>
11063
11064 <method name="videoModeSupported">
11065 <desc>
11066 Returns whether the frame buffer implementation is willing to
11067 support a given video mode. In case it is not able to render
11068 the video mode (or for some reason not willing), it should
11069 return @c false. Usually this method is called when the guest
11070 asks the VMM device whether a given video mode is supported
11071 so the information returned is directly exposed to the guest.
11072 It is important that this method returns very quickly.
11073 </desc>
11074 <param name="width" type="unsigned long" dir="in"/>
11075 <param name="height" type="unsigned long" dir="in"/>
11076 <param name="bpp" type="unsigned long" dir="in"/>
11077 <param name="supported" type="boolean" dir="return"/>
11078 </method>
11079
11080 <method name="getVisibleRegion">
11081 <desc>
11082 Returns the visible region of this frame buffer.
11083
11084 If the @a rectangles parameter is @c null then the value of the
11085 @a count parameter is ignored and the number of elements necessary to
11086 describe the current visible region is returned in @a countCopied.
11087
11088 If @a rectangles is not @c null but @a count is less
11089 than the required number of elements to store region data, the method
11090 will report a failure. If @a count is equal or greater than the
11091 required number of elements, then the actual number of elements copied
11092 to the provided array will be returned in @a countCopied.
11093
11094 <note>
11095 The address of the provided array must be in the process space of
11096 this IFramebuffer object.
11097 </note>
11098 <note>
11099 Method not yet implemented.
11100 </note>
11101 </desc>
11102 <param name="rectangles" type="octet" mod="ptr" dir="in">
11103 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
11104 </param>
11105 <param name="count" type="unsigned long" dir="in">
11106 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11107 </param>
11108 <param name="countCopied" type="unsigned long" dir="return">
11109 <desc>Number of elements copied to the @a rectangles array.</desc>
11110 </param>
11111 </method>
11112
11113 <method name="setVisibleRegion">
11114 <desc>
11115 Suggests a new visible region to this frame buffer. This region
11116 represents the area of the VM display which is a union of regions of
11117 all top-level windows of the guest operating system running inside the
11118 VM (if the Guest Additions for this system support this
11119 functionality). This information may be used by the frontends to
11120 implement the seamless desktop integration feature.
11121
11122 <note>
11123 The address of the provided array must be in the process space of
11124 this IFramebuffer object.
11125 </note>
11126 <note>
11127 The IFramebuffer implementation must make a copy of the provided
11128 array of rectangles.
11129 </note>
11130 <note>
11131 Method not yet implemented.
11132 </note>
11133 </desc>
11134 <param name="rectangles" type="octet" mod="ptr" dir="in">
11135 <desc>Pointer to the @c RTRECT array.</desc>
11136 </param>
11137 <param name="count" type="unsigned long" dir="in">
11138 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11139 </param>
11140 </method>
11141
11142 <method name="processVHWACommand">
11143 <desc>
11144 Posts a Video HW Acceleration Command to the frame buffer for processing.
11145 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
11146 are posted from quest to the host to be processed by the host hardware.
11147
11148 <note>
11149 The address of the provided command must be in the process space of
11150 this IFramebuffer object.
11151 </note>
11152 </desc>
11153
11154 <param name="command" type="octet" mod="ptr" dir="in">
11155 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
11156 </param>
11157 </method>
11158
11159 </interface>
11160
11161 <interface
11162 name="IFramebufferOverlay" extends="IFramebuffer"
11163 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
11164 wsmap="suppress"
11165 >
11166 <desc>
11167 The IFramebufferOverlay interface represents an alpha blended overlay
11168 for displaying status icons above an IFramebuffer. It is always created
11169 not visible, so that it must be explicitly shown. It only covers a
11170 portion of the IFramebuffer, determined by its width, height and
11171 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
11172 that order) format, and may be written to directly. Do re-read the
11173 width though, after setting it, as it may be adjusted (increased) to
11174 make it more suitable for the front end.
11175 </desc>
11176 <attribute name="x" type="unsigned long" readonly="yes">
11177 <desc>X position of the overlay, relative to the frame buffer.</desc>
11178 </attribute>
11179
11180 <attribute name="y" type="unsigned long" readonly="yes">
11181 <desc>Y position of the overlay, relative to the frame buffer.</desc>
11182 </attribute>
11183
11184 <attribute name="visible" type="boolean" readonly="no">
11185 <desc>
11186 Whether the overlay is currently visible.
11187 </desc>
11188 </attribute>
11189
11190 <attribute name="alpha" type="unsigned long" readonly="no">
11191 <desc>
11192 The global alpha value for the overlay. This may or may not be
11193 supported by a given front end.
11194 </desc>
11195 </attribute>
11196
11197 <method name="move">
11198 <desc>
11199 Changes the overlay's position relative to the IFramebuffer.
11200 </desc>
11201 <param name="x" type="unsigned long" dir="in"/>
11202 <param name="y" type="unsigned long" dir="in"/>
11203 </method>
11204
11205 </interface>
11206
11207 <interface
11208 name="IDisplay" extends="$unknown"
11209 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
11210 wsmap="managed"
11211 >
11212 <desc>
11213 The IDisplay interface represents the virtual machine's display.
11214
11215 The object implementing this interface is contained in each
11216 <link to="IConsole::display"/> attribute and represents the visual
11217 output of the virtual machine.
11218
11219 The virtual display supports pluggable output targets represented by the
11220 IFramebuffer interface. Examples of the output target are a window on
11221 the host computer or an RDP session's display on a remote computer.
11222 </desc>
11223 <attribute name="width" type="unsigned long" readonly="yes">
11224 <desc>Current display width.</desc>
11225 </attribute>
11226
11227 <attribute name="height" type="unsigned long" readonly="yes">
11228 <desc>Current display height.</desc>
11229 </attribute>
11230
11231 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11232 <desc>
11233 Current guest display color depth. Note that this may differ
11234 from <link to="IFramebuffer::bitsPerPixel"/>.
11235 </desc>
11236 </attribute>
11237
11238 <method name="setFramebuffer">
11239 <desc>
11240 Sets the framebuffer for given screen.
11241 </desc>
11242 <param name="screenId" type="unsigned long" dir="in"/>
11243 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11244 </method>
11245
11246 <method name="getFramebuffer">
11247 <desc>
11248 Queries the framebuffer for given screen.
11249 </desc>
11250 <param name="screenId" type="unsigned long" dir="in"/>
11251 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11252 <param name="xOrigin" type="long" dir="out"/>
11253 <param name="yOrigin" type="long" dir="out"/>
11254 </method>
11255
11256 <method name="setVideoModeHint">
11257 <desc>
11258 Asks VirtualBox to request the given video mode from
11259 the guest. This is just a hint and it cannot be guaranteed
11260 that the requested resolution will be used. Guest Additions
11261 are required for the request to be seen by guests. The caller
11262 should issue the request and wait for a resolution change and
11263 after a timeout retry.
11264
11265 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11266 parameters means that the corresponding values should be taken from the
11267 current video mode (i.e. left unchanged).
11268
11269 If the guest OS supports multi-monitor configuration then the @a display
11270 parameter specifies the number of the guest display to send the hint to:
11271 @c 0 is the primary display, @c 1 is the first secondary and
11272 so on. If the multi-monitor configuration is not supported, @a display
11273 must be @c 0.
11274
11275 <result name="E_INVALIDARG">
11276 The @a display is not associated with any monitor.
11277 </result>
11278
11279 </desc>
11280 <param name="width" type="unsigned long" dir="in"/>
11281 <param name="height" type="unsigned long" dir="in"/>
11282 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11283 <param name="display" type="unsigned long" dir="in"/>
11284 </method>
11285
11286 <method name="setSeamlessMode">
11287 <desc>
11288 Enables or disables seamless guest display rendering (seamless desktop
11289 integration) mode.
11290 <note>
11291 Calling this method has no effect if <link
11292 to="IGuest::supportsSeamless"/> returns @c false.
11293 </note>
11294 </desc>
11295 <param name="enabled" type="boolean" dir="in"/>
11296 </method>
11297
11298 <method name="takeScreenShot">
11299 <desc>
11300 Takes a screen shot of the requested size and copies it to the
11301 32-bpp buffer allocated by the caller and pointed to by @a address.
11302 A pixel consists of 4 bytes in order: B, G, R, 0.
11303
11304 <note>This API can be used only by the COM/XPCOM C++ API as it
11305 requires pointer support. Use <link to="#takeScreenShotSlow" />
11306 with other language bindings.
11307 </note>
11308
11309 <result name="E_NOTIMPL">
11310 Feature not implemented.
11311 </result>
11312 <result name="VBOX_E_IPRT_ERROR">
11313 Could not take a screenshot.
11314 </result>
11315
11316 </desc>
11317 <param name="address" type="octet" mod="ptr" dir="in"/>
11318 <param name="width" type="unsigned long" dir="in"/>
11319 <param name="height" type="unsigned long" dir="in"/>
11320 </method>
11321
11322 <method name="takeScreenShotSlow">
11323 <desc>
11324 Takes a guest screen shot of the requested size and returns it as
11325 an array of bytes in uncompressed 32-bit RGBA format.
11326 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11327
11328 This API is slow, but could be the only option to get guest screenshot
11329 for scriptable languages not allowed to manipulate with addresses
11330 directly.
11331
11332 <result name="E_NOTIMPL">
11333 Feature not implemented.
11334 </result>
11335 <result name="VBOX_E_IPRT_ERROR">
11336 Could not take a screenshot.
11337 </result>
11338 </desc>
11339 <param name="width" type="unsigned long" dir="in">
11340 <desc>
11341 Desired image width.
11342 </desc>
11343 </param>
11344 <param name="height" type="unsigned long" dir="in">
11345 <desc>
11346 Desired image height.
11347 </desc>
11348 </param>
11349 <param name="screenData" type="octet" dir="return" safearray="yes">
11350 <desc>
11351 Array with resulting screen data.
11352 </desc>
11353 </param>
11354 </method>
11355
11356 <method name="drawToScreen">
11357 <desc>
11358 Draws a 32-bpp image of the specified size from the given buffer
11359 to the given point on the VM display.
11360
11361 <result name="E_NOTIMPL">
11362 Feature not implemented.
11363 </result>
11364 <result name="VBOX_E_IPRT_ERROR">
11365 Could not draw to screen.
11366 </result>
11367
11368 </desc>
11369 <param name="address" type="octet" mod="ptr" dir="in"/>
11370 <param name="x" type="unsigned long" dir="in"/>
11371 <param name="y" type="unsigned long" dir="in"/>
11372 <param name="width" type="unsigned long" dir="in"/>
11373 <param name="height" type="unsigned long" dir="in"/>
11374 </method>
11375
11376 <method name="invalidateAndUpdate">
11377 <desc>
11378 Does a full invalidation of the VM display and instructs the VM
11379 to update it.
11380
11381 <result name="VBOX_E_IPRT_ERROR">
11382 Could not invalidate and update screen.
11383 </result>
11384
11385 </desc>
11386 </method>
11387
11388 <method name="resizeCompleted">
11389 <desc>
11390 Signals that a framebuffer has completed the resize operation.
11391
11392 <result name="VBOX_E_NOT_SUPPORTED">
11393 Operation only valid for external frame buffers.
11394 </result>
11395
11396 </desc>
11397 <param name="screenId" type="unsigned long" dir="in"/>
11398 </method>
11399
11400 <method name="updateCompleted">
11401 <desc>
11402 Signals that a framebuffer has completed the update operation.
11403
11404 <result name="VBOX_E_NOT_SUPPORTED">
11405 Operation only valid for external frame buffers.
11406 </result>
11407
11408 </desc>
11409 </method>
11410
11411 <method name="completeVHWACommand">
11412 <desc>
11413 Signals that the Video HW Acceleration command has completed.
11414 </desc>
11415
11416 <param name="command" type="octet" mod="ptr" dir="in">
11417 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11418 </param>
11419 </method>
11420
11421 </interface>
11422
11423 <!--
11424 // INetworkAdapter
11425 /////////////////////////////////////////////////////////////////////////
11426 -->
11427
11428 <enum
11429 name="NetworkAttachmentType"
11430 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11431 >
11432 <desc>
11433 Network attachment type.
11434 </desc>
11435
11436 <const name="Null" value="0">
11437 <desc>Null value, also means "not attached".</desc>
11438 </const>
11439 <const name="NAT" value="1"/>
11440 <const name="Bridged" value="2"/>
11441 <const name="Internal" value="3"/>
11442 <const name="HostOnly" value="4"/>
11443 </enum>
11444
11445 <enum
11446 name="NetworkAdapterType"
11447 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11448 >
11449 <desc>
11450 Network adapter type.
11451 </desc>
11452
11453 <const name="Null" value="0">
11454 <desc>Null value (never used by the API).</desc>
11455 </const>
11456 <const name="Am79C970A" value="1">
11457 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11458 </const>
11459 <const name="Am79C973" value="2">
11460 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11461 </const>
11462 <const name="I82540EM" value="3">
11463 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11464 </const>
11465 <const name="I82543GC" value="4">
11466 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11467 </const>
11468 <const name="I82545EM" value="5">
11469 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11470 </const>
11471 <const name="Virtio" value="6">
11472 <desc>Virtio network device.</desc>
11473 </const>
11474 </enum>
11475
11476 <interface
11477 name="INetworkAdapter" extends="$unknown"
11478 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11479 wsmap="managed"
11480 >
11481 <desc>
11482 Represents a virtual network adapter that is attached to a virtual machine.
11483 Each virtual machine has a fixed number of network adapter slots with one
11484 instance of this attached to each of them. Call
11485 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11486 is attached to a given slot in a given machine.
11487
11488 Each network adapter can be in one of five attachment modes, which are
11489 represented by the <link to="NetworkAttachmentType" /> enumeration;
11490 see the <link to="#attachmentType" /> attribute.
11491 </desc>
11492
11493 <attribute name="adapterType" type="NetworkAdapterType">
11494 <desc>
11495 Type of the virtual network adapter. Depending on this value,
11496 VirtualBox will provide a different virtual network hardware
11497 to the guest.
11498 </desc>
11499 </attribute>
11500
11501 <attribute name="slot" type="unsigned long" readonly="yes">
11502 <desc>
11503 Slot number this adapter is plugged into. Corresponds to
11504 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11505 to obtain this instance.
11506 </desc>
11507 </attribute>
11508
11509 <attribute name="enabled" type="boolean">
11510 <desc>
11511 Flag whether the network adapter is present in the
11512 guest system. If disabled, the virtual guest hardware will
11513 not contain this network adapter. Can only be changed when
11514 the VM is not running.
11515 </desc>
11516 </attribute>
11517
11518 <attribute name="MACAddress" type="wstring">
11519 <desc>
11520 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11521 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11522 </desc>
11523 </attribute>
11524
11525 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11526
11527 <attribute name="hostInterface" type="wstring">
11528 <desc>
11529 Name of the host network interface the VM is attached to.
11530 </desc>
11531 </attribute>
11532
11533 <attribute name="internalNetwork" type="wstring">
11534 <desc>
11535 Name of the internal network the VM is attached to.
11536 </desc>
11537 </attribute>
11538
11539 <attribute name="NATNetwork" type="wstring">
11540 <desc>
11541 Name of the NAT network the VM is attached to.
11542 </desc>
11543 </attribute>
11544
11545 <attribute name="cableConnected" type="boolean">
11546 <desc>
11547 Flag whether the adapter reports the cable as connected or not.
11548 It can be used to report offline situations to a VM.
11549 </desc>
11550 </attribute>
11551
11552 <attribute name="lineSpeed" type="unsigned long">
11553 <desc>
11554 Line speed reported by custom drivers, in units of 1 kbps.
11555 </desc>
11556 </attribute>
11557
11558 <attribute name="traceEnabled" type="boolean">
11559 <desc>
11560 Flag whether network traffic from/to the network card should be traced.
11561 Can only be toggled when the VM is turned off.
11562 </desc>
11563 </attribute>
11564
11565 <attribute name="traceFile" type="wstring">
11566 <desc>
11567 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11568 will be used.
11569 </desc>
11570 </attribute>
11571
11572 <method name="attachToNAT">
11573 <desc>
11574 Attach the network adapter to the Network Address Translation (NAT) interface.
11575 </desc>
11576 </method>
11577
11578 <method name="attachToBridgedInterface">
11579 <desc>
11580 Attach the network adapter to a bridged host interface.
11581 </desc>
11582 </method>
11583
11584 <method name="attachToInternalNetwork">
11585 <desc>
11586 Attach the network adapter to an internal network.
11587 </desc>
11588 </method>
11589
11590 <method name="attachToHostOnlyInterface">
11591 <desc>
11592 Attach the network adapter to the host-only network.
11593 </desc>
11594 </method>
11595
11596 <method name="detach">
11597 <desc>
11598 Detach the network adapter
11599 </desc>
11600 </method>
11601 </interface>
11602
11603
11604 <!--
11605 // ISerialPort
11606 /////////////////////////////////////////////////////////////////////////
11607 -->
11608
11609 <enum
11610 name="PortMode"
11611 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11612 >
11613 <desc>
11614 The PortMode enumeration represents possible communication modes for
11615 the virtual serial port device.
11616 </desc>
11617
11618 <const name="Disconnected" value="0">
11619 <desc>Virtual device is not attached to any real host device.</desc>
11620 </const>
11621 <const name="HostPipe" value="1">
11622 <desc>Virtual device is attached to a host pipe.</desc>
11623 </const>
11624 <const name="HostDevice" value="2">
11625 <desc>Virtual device is attached to a host device.</desc>
11626 </const>
11627 <const name="RawFile" value="3">
11628 <desc>Virtual device is attached to a raw file.</desc>
11629 </const>
11630 </enum>
11631
11632 <interface
11633 name="ISerialPort" extends="$unknown"
11634 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11635 wsmap="managed"
11636 >
11637
11638 <desc>
11639 The ISerialPort interface represents the virtual serial port device.
11640
11641 The virtual serial port device acts like an ordinary serial port
11642 inside the virtual machine. This device communicates to the real
11643 serial port hardware in one of two modes: host pipe or host device.
11644
11645 In host pipe mode, the #path attribute specifies the path to the pipe on
11646 the host computer that represents a serial port. The #server attribute
11647 determines if this pipe is created by the virtual machine process at
11648 machine startup or it must already exist before starting machine
11649 execution.
11650
11651 In host device mode, the #path attribute specifies the name of the
11652 serial port device on the host computer.
11653
11654 There is also a third communication mode: the disconnected mode. In this
11655 mode, the guest OS running inside the virtual machine will be able to
11656 detect the serial port, but all port write operations will be discarded
11657 and all port read operations will return no data.
11658
11659 <see>IMachine::getSerialPort</see>
11660 </desc>
11661
11662 <attribute name="slot" type="unsigned long" readonly="yes">
11663 <desc>
11664 Slot number this serial port is plugged into. Corresponds to
11665 the value you pass to <link to="IMachine::getSerialPort"/>
11666 to obtain this instance.
11667 </desc>
11668 </attribute>
11669
11670 <attribute name="enabled" type="boolean">
11671 <desc>
11672 Flag whether the serial port is enabled. If disabled,
11673 the serial port will not be reported to the guest OS.
11674 </desc>
11675 </attribute>
11676
11677 <attribute name="IOBase" type="unsigned long">
11678 <desc>Base I/O address of the serial port.</desc>
11679 </attribute>
11680
11681 <attribute name="IRQ" type="unsigned long">
11682 <desc>IRQ number of the serial port.</desc>
11683 </attribute>
11684
11685 <attribute name="hostMode" type="PortMode">
11686 <desc>
11687 How is this port connected to the host.
11688 <note>
11689 Changing this attribute may fail if the conditions for
11690 <link to="#path"/> are not met.
11691 </note>
11692 </desc>
11693 </attribute>
11694
11695 <attribute name="server" type="boolean">
11696 <desc>
11697 Flag whether this serial port acts as a server (creates a new pipe on
11698 the host) or as a client (uses the existing pipe). This attribute is
11699 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11700 </desc>
11701 </attribute>
11702
11703 <attribute name="path" type="wstring">
11704 <desc>
11705 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11706 PortMode_HostPipe, or the host serial device name when
11707 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11708 cases, setting a @c null or empty string as the attribute's value
11709 is an error. Otherwise, the value of this property is ignored.
11710 </desc>
11711 </attribute>
11712
11713 </interface>
11714
11715 <!--
11716 // IParallelPort
11717 /////////////////////////////////////////////////////////////////////////
11718 -->
11719
11720 <interface
11721 name="IParallelPort" extends="$unknown"
11722 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11723 wsmap="managed"
11724 >
11725
11726 <desc>
11727 The IParallelPort interface represents the virtual parallel port device.
11728
11729 The virtual parallel port device acts like an ordinary parallel port
11730 inside the virtual machine. This device communicates to the real
11731 parallel port hardware using the name of the parallel device on the host
11732 computer specified in the #path attribute.
11733
11734 Each virtual parallel port device is assigned a base I/O address and an
11735 IRQ number that will be reported to the guest operating system and used
11736 to operate the given parallel port from within the virtual machine.
11737
11738 <see>IMachine::getParallelPort</see>
11739 </desc>
11740
11741 <attribute name="slot" type="unsigned long" readonly="yes">
11742 <desc>
11743 Slot number this parallel port is plugged into. Corresponds to
11744 the value you pass to <link to="IMachine::getParallelPort"/>
11745 to obtain this instance.
11746 </desc>
11747 </attribute>
11748
11749 <attribute name="enabled" type="boolean">
11750 <desc>
11751 Flag whether the parallel port is enabled. If disabled,
11752 the parallel port will not be reported to the guest OS.
11753 </desc>
11754 </attribute>
11755
11756 <attribute name="IOBase" type="unsigned long">
11757 <desc>Base I/O address of the parallel port.</desc>
11758 </attribute>
11759
11760 <attribute name="IRQ" type="unsigned long">
11761 <desc>IRQ number of the parallel port.</desc>
11762 </attribute>
11763
11764 <attribute name="path" type="wstring">
11765 <desc>
11766 Host parallel device name. If this parallel port is enabled, setting a
11767 @c null or an empty string as this attribute's value will result into
11768 an error.
11769 </desc>
11770 </attribute>
11771
11772 </interface>
11773
11774
11775 <!--
11776 // IMachineDebugger
11777 /////////////////////////////////////////////////////////////////////////
11778 -->
11779
11780 <interface
11781 name="IMachineDebugger" extends="$unknown"
11782 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11783 wsmap="suppress"
11784 >
11785 <method name="resetStats">
11786 <desc>
11787 Reset VM statistics.
11788 </desc>
11789 <param name="pattern" type="wstring" dir="in">
11790 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11791 </param>
11792 </method>
11793
11794 <method name="dumpStats">
11795 <desc>
11796 Dumps VM statistics.
11797 </desc>
11798 <param name="pattern" type="wstring" dir="in">
11799 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11800 </param>
11801 </method>
11802
11803 <method name="getStats">
11804 <desc>
11805 Get the VM statistics in a XMLish format.
11806 </desc>
11807 <param name="pattern" type="wstring" dir="in">
11808 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11809 </param>
11810 <param name="withDescriptions" type="boolean" dir="in">
11811 <desc>Whether to include the descriptions.</desc>
11812 </param>
11813 <param name="stats" type="wstring" dir="out">
11814 <desc>The XML document containing the statistics.</desc>
11815 </param>
11816 </method>
11817
11818 <method name="injectNMI">
11819 <desc>
11820 Inject an NMI into a running VT-x/AMD-V VM.
11821 </desc>
11822 </method>
11823
11824 <attribute name="singlestep" type="boolean">
11825 <desc>Switch for enabling singlestepping.</desc>
11826 </attribute>
11827
11828 <attribute name="recompileUser" type="boolean">
11829 <desc>Switch for forcing code recompilation for user mode code.</desc>
11830 </attribute>
11831
11832 <attribute name="recompileSupervisor" type="boolean">
11833 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11834 </attribute>
11835
11836 <attribute name="PATMEnabled" type="boolean">
11837 <desc>Switch for enabling and disabling the PATM component.</desc>
11838 </attribute>
11839
11840 <attribute name="CSAMEnabled" type="boolean">
11841 <desc>Switch for enabling and disabling the CSAM component.</desc>
11842 </attribute>
11843
11844 <attribute name="logEnabled" type="boolean">
11845 <desc>Switch for enabling and disabling logging.</desc>
11846 </attribute>
11847
11848 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11849 <desc>
11850 Flag indicating whether the VM is currently making use of CPU hardware
11851 virtualization extensions.
11852 </desc>
11853 </attribute>
11854
11855 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11856 <desc>
11857 Flag indicating whether the VM is currently making use of the nested paging
11858 CPU hardware virtualization extension.
11859 </desc>
11860 </attribute>
11861
11862 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11863 <desc>
11864 Flag indicating whether the VM is currently making use of the VPID
11865 VT-x extension.
11866 </desc>
11867 </attribute>
11868
11869 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11870 <desc>
11871 Flag indicating whether the VM is currently making use of the Physical
11872 Address Extension CPU feature.
11873 </desc>
11874 </attribute>
11875
11876 <attribute name="virtualTimeRate" type="unsigned long">
11877 <desc>
11878 The rate at which the virtual time runs expressed as a percentage.
11879 The accepted range is 2% to 20000%.
11880 </desc>
11881 </attribute>
11882
11883 <!-- @todo method for setting log flags, groups and destination! -->
11884
11885 <attribute name="VM" type="unsigned long long" readonly="yes">
11886 <desc>
11887 Gets the VM handle. This is only for internal use while
11888 we carve the details of this interface.
11889 </desc>
11890 </attribute>
11891
11892 </interface>
11893
11894 <!--
11895 // IUSBController
11896 /////////////////////////////////////////////////////////////////////////
11897 -->
11898
11899 <interface
11900 name="IUSBController" extends="$unknown"
11901 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11902 wsmap="managed"
11903 >
11904 <attribute name="enabled" type="boolean">
11905 <desc>
11906 Flag whether the USB controller is present in the
11907 guest system. If disabled, the virtual guest hardware will
11908 not contain any USB controller. Can only be changed when
11909 the VM is powered off.
11910 </desc>
11911 </attribute>
11912
11913 <attribute name="enabledEhci" type="boolean">
11914 <desc>
11915 Flag whether the USB EHCI controller is present in the
11916 guest system. If disabled, the virtual guest hardware will
11917 not contain a USB EHCI controller. Can only be changed when
11918 the VM is powered off.
11919 </desc>
11920 </attribute>
11921
11922 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11923 <desc>
11924 USB standard version which the controller implements.
11925 This is a BCD which means that the major version is in the
11926 high byte and minor version is in the low byte.
11927 </desc>
11928 </attribute>
11929
11930 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11931 <desc>
11932 List of USB device filters associated with the machine.
11933
11934 If the machine is currently running, these filters are activated
11935 every time a new (supported) USB device is attached to the host
11936 computer that was not ignored by global filters
11937 (<link to="IHost::USBDeviceFilters"/>).
11938
11939 These filters are also activated when the machine is powered up.
11940 They are run against a list of all currently available USB
11941 devices (in states
11942 <link to="USBDeviceState_Available"/>,
11943 <link to="USBDeviceState_Busy"/>,
11944 <link to="USBDeviceState_Held"/>) that were not previously
11945 ignored by global filters.
11946
11947 If at least one filter matches the USB device in question, this
11948 device is automatically captured (attached to) the virtual USB
11949 controller of this machine.
11950
11951 <see>IUSBDeviceFilter, ::IUSBController</see>
11952 </desc>
11953 </attribute>
11954
11955 <method name="createDeviceFilter">
11956 <desc>
11957 Creates a new USB device filter. All attributes except
11958 the filter name are set to empty (any match),
11959 <i>active</i> is @c false (the filter is not active).
11960
11961 The created filter can then be added to the list of filters using
11962 <link to="#insertDeviceFilter"/>.
11963
11964 <result name="VBOX_E_INVALID_VM_STATE">
11965 The virtual machine is not mutable.
11966 </result>
11967
11968 <see>#deviceFilters</see>
11969 </desc>
11970 <param name="name" type="wstring" dir="in">
11971 <desc>
11972 Filter name. See <link to="IUSBDeviceFilter::name"/>
11973 for more info.
11974 </desc>
11975 </param>
11976 <param name="filter" type="IUSBDeviceFilter" dir="return">
11977 <desc>Created filter object.</desc>
11978 </param>
11979 </method>
11980
11981 <method name="insertDeviceFilter">
11982 <desc>
11983 Inserts the given USB device to the specified position
11984 in the list of filters.
11985
11986 Positions are numbered starting from <tt>0</tt>. If the specified
11987 position is equal to or greater than the number of elements in
11988 the list, the filter is added to the end of the collection.
11989
11990 <note>
11991 Duplicates are not allowed, so an attempt to insert a
11992 filter that is already in the collection, will return an
11993 error.
11994 </note>
11995
11996 <result name="VBOX_E_INVALID_VM_STATE">
11997 Virtual machine is not mutable.
11998 </result>
11999 <result name="E_INVALIDARG">
12000 USB device filter not created within this VirtualBox instance.
12001 </result>
12002 <result name="VBOX_E_INVALID_OBJECT_STATE">
12003 USB device filter already in list.
12004 </result>
12005
12006 <see>#deviceFilters</see>
12007 </desc>
12008 <param name="position" type="unsigned long" dir="in">
12009 <desc>Position to insert the filter to.</desc>
12010 </param>
12011 <param name="filter" type="IUSBDeviceFilter" dir="in">
12012 <desc>USB device filter to insert.</desc>
12013 </param>
12014 </method>
12015
12016 <method name="removeDeviceFilter">
12017 <desc>
12018 Removes a USB device filter from the specified position in the
12019 list of filters.
12020
12021 Positions are numbered starting from <tt>0</tt>. Specifying a
12022 position equal to or greater than the number of elements in
12023 the list will produce an error.
12024
12025 <see>#deviceFilters</see>
12026
12027 <result name="VBOX_E_INVALID_VM_STATE">
12028 Virtual machine is not mutable.
12029 </result>
12030 <result name="E_INVALIDARG">
12031 USB device filter list empty or invalid @a position.
12032 </result>
12033
12034 </desc>
12035 <param name="position" type="unsigned long" dir="in">
12036 <desc>Position to remove the filter from.</desc>
12037 </param>
12038 <param name="filter" type="IUSBDeviceFilter" dir="return">
12039 <desc>Removed USB device filter.</desc>
12040 </param>
12041 </method>
12042
12043 </interface>
12044
12045
12046 <!--
12047 // IUSBDevice
12048 /////////////////////////////////////////////////////////////////////////
12049 -->
12050
12051 <interface
12052 name="IUSBDevice" extends="$unknown"
12053 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
12054 wsmap="managed"
12055 >
12056 <desc>
12057 The IUSBDevice interface represents a virtual USB device attached to the
12058 virtual machine.
12059
12060 A collection of objects implementing this interface is stored in the
12061 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
12062 attached to a running virtual machine's USB controller.
12063 </desc>
12064
12065 <attribute name="id" type="uuid" mod="string" readonly="yes">
12066 <desc>
12067 Unique USB device ID. This ID is built from #vendorId,
12068 #productId, #revision and #serialNumber.
12069 </desc>
12070 </attribute>
12071
12072 <attribute name="vendorId" type="unsigned short" readonly="yes">
12073 <desc>Vendor ID.</desc>
12074 </attribute>
12075
12076 <attribute name="productId" type="unsigned short" readonly="yes">
12077 <desc>Product ID.</desc>
12078 </attribute>
12079
12080 <attribute name="revision" type="unsigned short" readonly="yes">
12081 <desc>
12082 Product revision number. This is a packed BCD represented as
12083 unsigned short. The high byte is the integer part and the low
12084 byte is the decimal.
12085 </desc>
12086 </attribute>
12087
12088 <attribute name="manufacturer" type="wstring" readonly="yes">
12089 <desc>Manufacturer string.</desc>
12090 </attribute>
12091
12092 <attribute name="product" type="wstring" readonly="yes">
12093 <desc>Product string.</desc>
12094 </attribute>
12095
12096 <attribute name="serialNumber" type="wstring" readonly="yes">
12097 <desc>Serial number string.</desc>
12098 </attribute>
12099
12100 <attribute name="address" type="wstring" readonly="yes">
12101 <desc>Host specific address of the device.</desc>
12102 </attribute>
12103
12104 <attribute name="port" type="unsigned short" readonly="yes">
12105 <desc>
12106 Host USB port number the device is physically
12107 connected to.
12108 </desc>
12109 </attribute>
12110
12111 <attribute name="version" type="unsigned short" readonly="yes">
12112 <desc>
12113 The major USB version of the device - 1 or 2.
12114 </desc>
12115 </attribute>
12116
12117 <attribute name="portVersion" type="unsigned short" readonly="yes">
12118 <desc>
12119 The major USB version of the host USB port the device is
12120 physically connected to - 1 or 2. For devices not connected to
12121 anything this will have the same value as the version attribute.
12122 </desc>
12123 </attribute>
12124
12125 <attribute name="remote" type="boolean" readonly="yes">
12126 <desc>
12127 Whether the device is physically connected to a remote VRDP
12128 client or to a local host machine.
12129 </desc>
12130 </attribute>
12131
12132 </interface>
12133
12134
12135 <!--
12136 // IUSBDeviceFilter
12137 /////////////////////////////////////////////////////////////////////////
12138 -->
12139
12140 <interface
12141 name="IUSBDeviceFilter" extends="$unknown"
12142 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
12143 wsmap="managed"
12144 >
12145 <desc>
12146 The IUSBDeviceFilter interface represents an USB device filter used
12147 to perform actions on a group of USB devices.
12148
12149 This type of filters is used by running virtual machines to
12150 automatically capture selected USB devices once they are physically
12151 attached to the host computer.
12152
12153 A USB device is matched to the given device filter if and only if all
12154 attributes of the device match the corresponding attributes of the
12155 filter (that is, attributes are joined together using the logical AND
12156 operation). On the other hand, all together, filters in the list of
12157 filters carry the semantics of the logical OR operation. So if it is
12158 desirable to create a match like "this vendor id OR this product id",
12159 one needs to create two filters and specify "any match" (see below)
12160 for unused attributes.
12161
12162 All filter attributes used for matching are strings. Each string
12163 is an expression representing a set of values of the corresponding
12164 device attribute, that will match the given filter. Currently, the
12165 following filtering expressions are supported:
12166
12167 <ul>
12168 <li><i>Interval filters</i>. Used to specify valid intervals for
12169 integer device attributes (Vendor ID, Product ID and Revision).
12170 The format of the string is:
12171
12172 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
12173
12174 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
12175 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
12176 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
12177 is omitted before a dash (<tt>-</tt>), the minimum possible integer
12178 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
12179 possible integer is assumed.
12180 </li>
12181 <li><i>Boolean filters</i>. Used to specify acceptable values for
12182 boolean device attributes. The format of the string is:
12183
12184 <tt>true|false|yes|no|0|1</tt>
12185
12186 </li>
12187 <li><i>Exact match</i>. Used to specify a single value for the given
12188 device attribute. Any string that doesn't start with <tt>int:</tt>
12189 represents the exact match. String device attributes are compared to
12190 this string including case of symbols. Integer attributes are first
12191 converted to a string (see individual filter attributes) and then
12192 compared ignoring case.
12193
12194 </li>
12195 <li><i>Any match</i>. Any value of the corresponding device attribute
12196 will match the given filter. An empty or @c null string is
12197 used to construct this type of filtering expressions.
12198
12199 </li>
12200 </ul>
12201
12202 <note>
12203 On the Windows host platform, interval filters are not currently
12204 available. Also all string filter attributes
12205 (<link to="#manufacturer"/>, <link to="#product"/>,
12206 <link to="#serialNumber"/>) are ignored, so they behave as
12207 <i>any match</i> no matter what string expression is specified.
12208 </note>
12209
12210 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12211 </desc>
12212
12213 <attribute name="name" type="wstring">
12214 <desc>
12215 Visible name for this filter.
12216 This name is used to visually distinguish one filter from another,
12217 so it can neither be @c null nor an empty string.
12218 </desc>
12219 </attribute>
12220
12221 <attribute name="active" type="boolean">
12222 <desc>Whether this filter active or has been temporarily disabled.</desc>
12223 </attribute>
12224
12225 <attribute name="vendorId" type="wstring">
12226 <desc>
12227 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12228 The string representation for the <i>exact matching</i>
12229 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12230 (including leading zeroes).
12231 </desc>
12232 </attribute>
12233
12234 <attribute name="productId" type="wstring">
12235 <desc>
12236 <link to="IUSBDevice::productId">Product ID</link> filter.
12237 The string representation for the <i>exact matching</i>
12238 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12239 (including leading zeroes).
12240 </desc>
12241 </attribute>
12242
12243 <attribute name="revision" type="wstring">
12244 <desc>
12245 <link to="IUSBDevice::productId">Product revision number</link>
12246 filter. The string representation for the <i>exact matching</i>
12247 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12248 of the integer part of the revision, and <tt>F</tt> is the
12249 decimal digit of its fractional part (including leading and
12250 trailing zeros).
12251 Note that for interval filters, it's best to use the hexadecimal
12252 form, because the revision is stored as a 16 bit packed BCD value;
12253 so the expression <tt>int:0x0100-0x0199</tt> will match any
12254 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12255 </desc>
12256 </attribute>
12257
12258 <attribute name="manufacturer" type="wstring">
12259 <desc>
12260 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12261 </desc>
12262 </attribute>
12263
12264 <attribute name="product" type="wstring">
12265 <desc>
12266 <link to="IUSBDevice::product">Product</link> filter.
12267 </desc>
12268 </attribute>
12269
12270 <attribute name="serialNumber" type="wstring">
12271 <desc>
12272 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12273 </desc>
12274 </attribute>
12275
12276 <attribute name="port" type="wstring">
12277 <desc>
12278 <link to="IUSBDevice::port">Host USB port</link> filter.
12279 </desc>
12280 </attribute>
12281
12282 <attribute name="remote" type="wstring">
12283 <desc>
12284 <link to="IUSBDevice::remote">Remote state</link> filter.
12285 <note>
12286 This filter makes sense only for machine USB filters,
12287 i.e. it is ignored by IHostUSBDeviceFilter objects.
12288 </note>
12289 </desc>
12290 </attribute>
12291
12292 <attribute name="maskedInterfaces" type="unsigned long">
12293 <desc>
12294 This is an advanced option for hiding one or more USB interfaces
12295 from the guest. The value is a bit mask where the bits that are set
12296 means the corresponding USB interface should be hidden, masked off
12297 if you like.
12298 This feature only works on Linux hosts.
12299 </desc>
12300 </attribute>
12301
12302 </interface>
12303
12304
12305 <!--
12306 // IHostUSBDevice
12307 /////////////////////////////////////////////////////////////////////////
12308 -->
12309
12310 <enum
12311 name="USBDeviceState"
12312 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12313 >
12314 <desc>
12315 USB device state. This enumeration represents all possible states
12316 of the USB device physically attached to the host computer regarding
12317 its state on the host computer and availability to guest computers
12318 (all currently running virtual machines).
12319
12320 Once a supported USB device is attached to the host, global USB
12321 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12322 either ignore the device, or put it to USBDeviceState_Held state, or do
12323 nothing. Unless the device is ignored by global filters, filters of all
12324 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12325 activated that can put it to USBDeviceState_Captured state.
12326
12327 If the device was ignored by global filters, or didn't match
12328 any filters at all (including guest ones), it is handled by the host
12329 in a normal way. In this case, the device state is determined by
12330 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12331 or USBDeviceState_Available, depending on the current device usage.
12332
12333 Besides auto-capturing based on filters, the device can be manually
12334 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12335 state is USBDeviceState_Busy, USBDeviceState_Available or
12336 USBDeviceState_Held.
12337
12338 <note>
12339 Due to differences in USB stack implementations in Linux and Win32,
12340 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12341 only to the Linux version of the product. This also means that (<link
12342 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12343 device state is USBDeviceState_Held.
12344 </note>
12345
12346 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12347 </desc>
12348
12349 <const name="NotSupported" value="0">
12350 <desc>
12351 Not supported by the VirtualBox server, not available to guests.
12352 </desc>
12353 </const>
12354 <const name="Unavailable" value="1">
12355 <desc>
12356 Being used by the host computer exclusively,
12357 not available to guests.
12358 </desc>
12359 </const>
12360 <const name="Busy" value="2">
12361 <desc>
12362 Being used by the host computer, potentially available to guests.
12363 </desc>
12364 </const>
12365 <const name="Available" value="3">
12366 <desc>
12367 Not used by the host computer, available to guests (the host computer
12368 can also start using the device at any time).
12369 </desc>
12370 </const>
12371 <const name="Held" value="4">
12372 <desc>
12373 Held by the VirtualBox server (ignored by the host computer),
12374 available to guests.
12375 </desc>
12376 </const>
12377 <const name="Captured" value="5">
12378 <desc>
12379 Captured by one of the guest computers, not available
12380 to anybody else.
12381 </desc>
12382 </const>
12383 </enum>
12384
12385 <interface
12386 name="IHostUSBDevice" extends="IUSBDevice"
12387 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12388 wsmap="managed"
12389 >
12390 <desc>
12391 The IHostUSBDevice interface represents a physical USB device attached
12392 to the host computer.
12393
12394 Besides properties inherited from IUSBDevice, this interface adds the
12395 <link to="#state"/> property that holds the current state of the USB
12396 device.
12397
12398 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12399 </desc>
12400
12401 <attribute name="state" type="USBDeviceState" readonly="yes">
12402 <desc>
12403 Current state of the device.
12404 </desc>
12405 </attribute>
12406
12407 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12408
12409 </interface>
12410
12411
12412 <!--
12413 // IHostUSBDeviceFilter
12414 /////////////////////////////////////////////////////////////////////////
12415 -->
12416
12417 <enum
12418 name="USBDeviceFilterAction"
12419 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12420 >
12421 <desc>
12422 Actions for host USB device filters.
12423 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12424 </desc>
12425
12426 <const name="Null" value="0">
12427 <desc>Null value (never used by the API).</desc>
12428 </const>
12429 <const name="Ignore" value="1">
12430 <desc>Ignore the matched USB device.</desc>
12431 </const>
12432 <const name="Hold" value="2">
12433 <desc>Hold the matched USB device.</desc>
12434 </const>
12435 </enum>
12436
12437 <interface
12438 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12439 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12440 wsmap="managed"
12441 >
12442 <desc>
12443 The IHostUSBDeviceFilter interface represents a global filter for a
12444 physical USB device used by the host computer. Used indirectly in
12445 <link to="IHost::USBDeviceFilters"/>.
12446
12447 Using filters of this type, the host computer determines the initial
12448 state of the USB device after it is physically attached to the
12449 host's USB controller.
12450
12451 <note>
12452 The <link to="#remote"/> attribute is ignored by this type of
12453 filters, because it makes sense only for
12454 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12455 </note>
12456
12457 <see>IHost::USBDeviceFilters</see>
12458 </desc>
12459
12460 <attribute name="action" type="USBDeviceFilterAction">
12461 <desc>
12462 Action performed by the host when an attached USB device
12463 matches this filter.
12464 </desc>
12465 </attribute>
12466
12467 </interface>
12468
12469 <!--
12470 // IAudioAdapter
12471 /////////////////////////////////////////////////////////////////////////
12472 -->
12473
12474 <enum
12475 name="AudioDriverType"
12476 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12477 >
12478 <desc>
12479 Host audio driver type.
12480 </desc>
12481
12482 <const name="Null" value="0">
12483 <desc>Null value, also means "dummy audio driver".</desc>
12484 </const>
12485 <const name="WinMM" value="1">
12486 <desc>Windows multimedia (Windows hosts only).</desc>
12487 </const>
12488 <const name="OSS" value="2">
12489 <desc>Open Sound System (Linux hosts only).</desc>
12490 </const>
12491 <const name="ALSA" value="3">
12492 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12493 </const>
12494 <const name="DirectSound" value="4">
12495 <desc>DirectSound (Windows hosts only).</desc>
12496 </const>
12497 <const name="CoreAudio" value="5">
12498 <desc>CoreAudio (Mac hosts only).</desc>
12499 </const>
12500 <const name="MMPM" value="6">
12501 <desc>Reserved for historical reasons.</desc>
12502 </const>
12503 <const name="Pulse" value="7">
12504 <desc>PulseAudio (Linux hosts only).</desc>
12505 </const>
12506 <const name="SolAudio" value="8">
12507 <desc>Solaris audio (Solaris hosts only).</desc>
12508 </const>
12509 </enum>
12510
12511 <enum
12512 name="AudioControllerType"
12513 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12514 >
12515 <desc>
12516 Virtual audio controller type.
12517 </desc>
12518
12519 <const name="AC97" value="0"/>
12520 <const name="SB16" value="1"/>
12521 </enum>
12522
12523 <interface
12524 name="IAudioAdapter" extends="$unknown"
12525 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12526 wsmap="managed"
12527 >
12528 <desc>
12529 The IAudioAdapter interface represents the virtual audio adapter of
12530 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12531 </desc>
12532 <attribute name="enabled" type="boolean">
12533 <desc>
12534 Flag whether the audio adapter is present in the
12535 guest system. If disabled, the virtual guest hardware will
12536 not contain any audio adapter. Can only be changed when
12537 the VM is not running.
12538 </desc>
12539 </attribute>
12540 <attribute name="audioController" type="AudioControllerType">
12541 <desc>
12542 The audio hardware we emulate.
12543 </desc>
12544 </attribute>
12545 <attribute name="audioDriver" type="AudioDriverType">
12546 <desc>
12547 Audio driver the adapter is connected to. This setting
12548 can only be changed when the VM is not running.
12549 </desc>
12550 </attribute>
12551 </interface>
12552
12553 <!--
12554 // IVRDPServer
12555 /////////////////////////////////////////////////////////////////////////
12556 -->
12557
12558 <enum
12559 name="VRDPAuthType"
12560 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12561 >
12562 <desc>
12563 VRDP authentication type.
12564 </desc>
12565
12566 <const name="Null" value="0">
12567 <desc>Null value, also means "no authentication".</desc>
12568 </const>
12569 <const name="External" value="1"/>
12570 <const name="Guest" value="2"/>
12571 </enum>
12572
12573 <interface
12574 name="IVRDPServer" extends="$unknown"
12575 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12576 wsmap="managed"
12577 >
12578 <attribute name="enabled" type="boolean">
12579 <desc>VRDP server status.</desc>
12580 </attribute>
12581
12582 <attribute name="ports" type="wstring">
12583 <desc>
12584 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12585 <note>
12586 This is a string of comma separated TCP port numbers or port number ranges.
12587 Example <tt>5000,5010-5012,5015</tt>
12588 </note>
12589 </desc>
12590 </attribute>
12591
12592 <attribute name="netAddress" type="wstring">
12593 <desc>VRDP server address.</desc>
12594 </attribute>
12595
12596 <attribute name="authType" type="VRDPAuthType">
12597 <desc>VRDP authentication method.</desc>
12598 </attribute>
12599
12600 <attribute name="authTimeout" type="unsigned long">
12601 <desc>Timeout for guest authentication. Milliseconds.</desc>
12602 </attribute>
12603
12604 <attribute name="allowMultiConnection" type="boolean">
12605 <desc>
12606 Flag whether multiple simultaneous connections to the VM are permitted.
12607 Note that this will be replaced by a more powerful mechanism in the future.
12608 </desc>
12609 </attribute>
12610
12611 <attribute name="reuseSingleConnection" type="boolean">
12612 <desc>
12613 Flag whether the existing connection must be dropped and a new connection
12614 must be established by the VRDP server, when a new client connects in single
12615 connection mode.
12616 </desc>
12617 </attribute>
12618
12619 </interface>
12620
12621
12622 <!--
12623 // ISharedFolder
12624 /////////////////////////////////////////////////////////////////////////
12625 -->
12626
12627 <interface
12628 name="ISharedFolder" extends="$unknown"
12629 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12630 wsmap="struct"
12631 >
12632 <desc>
12633 The ISharedFolder interface represents a folder in the host computer's
12634 file system accessible from the guest OS running inside a virtual
12635 machine using an associated logical name.
12636
12637 There are three types of shared folders:
12638 <ul>
12639 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12640 folders available to all virtual machines.</li>
12641 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12642 VM-specific shared folders available to the given virtual machine at
12643 startup.</li>
12644 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12645 VM-specific shared folders created in the session context (for
12646 example, when the virtual machine is running) and automatically
12647 discarded when the session is closed (the VM is powered off).</li>
12648 </ul>
12649
12650 Logical names of shared folders must be unique within the given scope
12651 (global, permanent or transient). However, they do not need to be unique
12652 across scopes. In this case, the definition of the shared folder in a
12653 more specific scope takes precedence over definitions in all other
12654 scopes. The order of precedence is (more specific to more general):
12655 <ol>
12656 <li>Transient definitions</li>
12657 <li>Permanent definitions</li>
12658 <li>Global definitions</li>
12659 </ol>
12660
12661 For example, if MyMachine has a shared folder named
12662 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12663 transient shared folder named <tt>C_DRIVE</tt> (that points
12664 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12665 of <tt>C_DRIVE</tt> in the guest OS so
12666 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12667 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12668 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12669 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12670 to <tt>C:\\</tt> if it still exists.
12671
12672 Note that permanent and transient shared folders of different machines
12673 are in different name spaces, so they don't overlap and don't need to
12674 have unique logical names.
12675
12676 <note>
12677 Global shared folders are not implemented in the current version of the
12678 product.
12679 </note>
12680 </desc>
12681
12682 <attribute name="name" type="wstring" readonly="yes">
12683 <desc>Logical name of the shared folder.</desc>
12684 </attribute>
12685
12686 <attribute name="hostPath" type="wstring" readonly="yes">
12687 <desc>Full path to the shared folder in the host file system.</desc>
12688 </attribute>
12689
12690 <attribute name="accessible" type="boolean" readonly="yes">
12691 <desc>
12692 Whether the folder defined by the host path is currently
12693 accessible or not.
12694 For example, the folder can be unaccessible if it is placed
12695 on the network share that is not available by the time
12696 this property is read.
12697 </desc>
12698 </attribute>
12699
12700 <attribute name="writable" type="boolean" readonly="yes">
12701 <desc>
12702 Whether the folder defined by the host path is writable or
12703 not.
12704 </desc>
12705 </attribute>
12706
12707 <attribute name="lastAccessError" type="wstring" readonly="yes">
12708 <desc>
12709 Text message that represents the result of the last accessibility
12710 check.
12711
12712 Accessibility checks are performed each time the <link to="#accessible"/>
12713 attribute is read. An empty string is returned if the last
12714 accessibility check was successful. A non-empty string indicates a
12715 failure and should normally describe a reason of the failure (for
12716 example, a file read error).
12717 </desc>
12718 </attribute>
12719
12720 </interface>
12721
12722 <!--
12723 // ISession
12724 /////////////////////////////////////////////////////////////////////////
12725 -->
12726
12727 <interface
12728 name="IInternalSessionControl" extends="$unknown"
12729 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12730 internal="yes"
12731 wsmap="suppress"
12732 >
12733 <method name="getPID">
12734 <desc>PID of the process that has created this Session object.
12735 </desc>
12736 <param name="pid" type="unsigned long" dir="return"/>
12737 </method>
12738
12739 <method name="getRemoteConsole">
12740 <desc>
12741 Returns the console object suitable for remote control.
12742
12743 <result name="VBOX_E_INVALID_VM_STATE">
12744 Session state prevents operation.
12745 </result>
12746 <result name="VBOX_E_INVALID_OBJECT_STATE">
12747 Session type prevents operation.
12748 </result>
12749
12750 </desc>
12751 <param name="console" type="IConsole" dir="return"/>
12752 </method>
12753
12754 <method name="assignMachine">
12755 <desc>
12756 Assigns the machine object associated with this direct-type
12757 session or informs the session that it will be a remote one
12758 (if @a machine == @c null).
12759
12760 <result name="VBOX_E_INVALID_VM_STATE">
12761 Session state prevents operation.
12762 </result>
12763 <result name="VBOX_E_INVALID_OBJECT_STATE">
12764 Session type prevents operation.
12765 </result>
12766
12767 </desc>
12768 <param name="machine" type="IMachine" dir="in"/>
12769 </method>
12770
12771 <method name="assignRemoteMachine">
12772 <desc>
12773 Assigns the machine and the (remote) console object associated with
12774 this remote-type session.
12775
12776 <result name="VBOX_E_INVALID_VM_STATE">
12777 Session state prevents operation.
12778 </result>
12779
12780 </desc>
12781 <param name="machine" type="IMachine" dir="in"/>
12782 <param name="console" type="IConsole" dir="in"/>
12783 </method>
12784
12785 <method name="updateMachineState">
12786 <desc>
12787 Updates the machine state in the VM process.
12788 Must be called only in certain cases
12789 (see the method implementation).
12790
12791 <result name="VBOX_E_INVALID_VM_STATE">
12792 Session state prevents operation.
12793 </result>
12794 <result name="VBOX_E_INVALID_OBJECT_STATE">
12795 Session type prevents operation.
12796 </result>
12797
12798 </desc>
12799 <param name="aMachineState" type="MachineState" dir="in"/>
12800 </method>
12801
12802 <method name="uninitialize">
12803 <desc>
12804 Uninitializes (closes) this session. Used by VirtualBox to close
12805 the corresponding remote session when the direct session dies
12806 or gets closed.
12807
12808 <result name="VBOX_E_INVALID_VM_STATE">
12809 Session state prevents operation.
12810 </result>
12811
12812 </desc>
12813 </method>
12814
12815 <method name="onNetworkAdapterChange">
12816 <desc>
12817 Triggered when settings of a network adapter of the
12818 associated virtual machine have changed.
12819
12820 <result name="VBOX_E_INVALID_VM_STATE">
12821 Session state prevents operation.
12822 </result>
12823 <result name="VBOX_E_INVALID_OBJECT_STATE">
12824 Session type prevents operation.
12825 </result>
12826
12827 </desc>
12828 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12829 <param name="changeAdapter" type="boolean" dir="in"/>
12830 </method>
12831
12832 <method name="onSerialPortChange">
12833 <desc>
12834 Triggered when settings of a serial port of the
12835 associated virtual machine have changed.
12836
12837 <result name="VBOX_E_INVALID_VM_STATE">
12838 Session state prevents operation.
12839 </result>
12840 <result name="VBOX_E_INVALID_OBJECT_STATE">
12841 Session type prevents operation.
12842 </result>
12843
12844 </desc>
12845 <param name="serialPort" type="ISerialPort" dir="in"/>
12846 </method>
12847
12848 <method name="onParallelPortChange">
12849 <desc>
12850 Triggered when settings of a parallel port of the
12851 associated virtual machine have changed.
12852
12853 <result name="VBOX_E_INVALID_VM_STATE">
12854 Session state prevents operation.
12855 </result>
12856 <result name="VBOX_E_INVALID_OBJECT_STATE">
12857 Session type prevents operation.
12858 </result>
12859
12860 </desc>
12861 <param name="parallelPort" type="IParallelPort" dir="in"/>
12862 </method>
12863
12864 <method name="onStorageControllerChange">
12865 <desc>
12866 Triggered when settings of a storage controller of the
12867 associated virtual machine have changed.
12868
12869 <result name="VBOX_E_INVALID_VM_STATE">
12870 Session state prevents operation.
12871 </result>
12872 <result name="VBOX_E_INVALID_OBJECT_STATE">
12873 Session type prevents operation.
12874 </result>
12875
12876 </desc>
12877 </method>
12878
12879 <method name="onMediumChange">
12880 <desc>
12881 Triggered when attached media of the
12882 associated virtual machine have changed.
12883
12884 <result name="VBOX_E_INVALID_VM_STATE">
12885 Session state prevents operation.
12886 </result>
12887 <result name="VBOX_E_INVALID_OBJECT_STATE">
12888 Session type prevents operation.
12889 </result>
12890
12891 </desc>
12892
12893 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12894 <param name="force" type="boolean" dir="in"/>
12895 </method>
12896
12897 <method name="onCPUChange">
12898 <desc>
12899 Notification when a CPU changes.
12900 </desc>
12901 <param name="cpu" type="unsigned long" dir="in">
12902 <desc>The CPU which changed</desc>
12903 </param>
12904 <param name="add" type="boolean" dir="in">
12905 <desc>Flag whether the CPU was added or removed</desc>
12906 </param>
12907 </method>
12908
12909 <method name="onVRDPServerChange">
12910 <desc>
12911 Triggered when settings of the VRDP server object of the
12912 associated virtual machine have changed.
12913
12914 <result name="VBOX_E_INVALID_VM_STATE">
12915 Session state prevents operation.
12916 </result>
12917 <result name="VBOX_E_INVALID_OBJECT_STATE">
12918 Session type prevents operation.
12919 </result>
12920
12921 </desc>
12922 </method>
12923
12924 <method name="onUSBControllerChange">
12925 <desc>
12926 Triggered when settings of the USB controller object of the
12927 associated virtual machine have changed.
12928
12929 <result name="VBOX_E_INVALID_VM_STATE">
12930 Session state prevents operation.
12931 </result>
12932 <result name="VBOX_E_INVALID_OBJECT_STATE">
12933 Session type prevents operation.
12934 </result>
12935
12936 </desc>
12937 </method>
12938
12939 <method name="onSharedFolderChange">
12940 <desc>
12941 Triggered when a permanent (global or machine) shared folder has been
12942 created or removed.
12943 <note>
12944 We don't pass shared folder parameters in this notification because
12945 the order in which parallel notifications are delivered is not defined,
12946 therefore it could happen that these parameters were outdated by the
12947 time of processing this notification.
12948 </note>
12949
12950 <result name="VBOX_E_INVALID_VM_STATE">
12951 Session state prevents operation.
12952 </result>
12953 <result name="VBOX_E_INVALID_OBJECT_STATE">
12954 Session type prevents operation.
12955 </result>
12956
12957 </desc>
12958 <param name="global" type="boolean" dir="in"/>
12959 </method>
12960
12961 <method name="onUSBDeviceAttach">
12962 <desc>
12963 Triggered when a request to capture a USB device (as a result
12964 of matched USB filters or direct call to
12965 <link to="IConsole::attachUSBDevice"/>) has completed.
12966 A @c null @a error object means success, otherwise it
12967 describes a failure.
12968
12969 <result name="VBOX_E_INVALID_VM_STATE">
12970 Session state prevents operation.
12971 </result>
12972 <result name="VBOX_E_INVALID_OBJECT_STATE">
12973 Session type prevents operation.
12974 </result>
12975
12976 </desc>
12977 <param name="device" type="IUSBDevice" dir="in"/>
12978 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12979 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12980 </method>
12981
12982 <method name="onUSBDeviceDetach">
12983 <desc>
12984 Triggered when a request to release the USB device (as a result
12985 of machine termination or direct call to
12986 <link to="IConsole::detachUSBDevice"/>) has completed.
12987 A @c null @a error object means success, otherwise it
12988 describes a failure.
12989
12990 <result name="VBOX_E_INVALID_VM_STATE">
12991 Session state prevents operation.
12992 </result>
12993 <result name="VBOX_E_INVALID_OBJECT_STATE">
12994 Session type prevents operation.
12995 </result>
12996
12997 </desc>
12998 <param name="id" type="uuid" mod="string" dir="in"/>
12999 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13000 </method>
13001
13002 <method name="onShowWindow">
13003 <desc>
13004 Called by <link to="IMachine::canShowConsoleWindow"/> and by
13005 <link to="IMachine::showConsoleWindow"/> in order to notify
13006 console callbacks
13007 <link to="IConsoleCallback::onCanShowWindow"/>
13008 and <link to="IConsoleCallback::onShowWindow"/>.
13009
13010 <result name="VBOX_E_INVALID_OBJECT_STATE">
13011 Session type prevents operation.
13012 </result>
13013
13014 </desc>
13015 <param name="check" type="boolean" dir="in"/>
13016 <param name="canShow" type="boolean" dir="out"/>
13017 <param name="winId" type="unsigned long long" dir="out"/>
13018 </method>
13019
13020 <method name="accessGuestProperty">
13021 <desc>
13022 Called by <link to="IMachine::getGuestProperty"/> and by
13023 <link to="IMachine::setGuestProperty"/> in order to read and
13024 modify guest properties.
13025
13026 <result name="VBOX_E_INVALID_VM_STATE">
13027 Machine session is not open.
13028 </result>
13029 <result name="VBOX_E_INVALID_OBJECT_STATE">
13030 Session type is not direct.
13031 </result>
13032
13033 </desc>
13034 <param name="name" type="wstring" dir="in"/>
13035 <param name="value" type="wstring" dir="in"/>
13036 <param name="flags" type="wstring" dir="in"/>
13037 <param name="isSetter" type="boolean" dir="in"/>
13038 <param name="retValue" type="wstring" dir="out"/>
13039 <param name="retTimestamp" type="unsigned long long" dir="out"/>
13040 <param name="retFlags" type="wstring" dir="out"/>
13041 </method>
13042
13043 <method name="enumerateGuestProperties">
13044 <desc>
13045 Return a list of the guest properties matching a set of patterns along
13046 with their values, time stamps and flags.
13047
13048 <result name="VBOX_E_INVALID_VM_STATE">
13049 Machine session is not open.
13050 </result>
13051 <result name="VBOX_E_INVALID_OBJECT_STATE">
13052 Session type is not direct.
13053 </result>
13054
13055 </desc>
13056 <param name="patterns" type="wstring" dir="in">
13057 <desc>
13058 The patterns to match the properties against as a comma-separated
13059 string. If this is empty, all properties currently set will be
13060 returned.
13061 </desc>
13062 </param>
13063 <param name="key" type="wstring" dir="out" safearray="yes">
13064 <desc>
13065 The key names of the properties returned.
13066 </desc>
13067 </param>
13068 <param name="value" type="wstring" dir="out" safearray="yes">
13069 <desc>
13070 The values of the properties returned. The array entries match the
13071 corresponding entries in the @a key array.
13072 </desc>
13073 </param>
13074 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
13075 <desc>
13076 The time stamps of the properties returned. The array entries match
13077 the corresponding entries in the @a key array.
13078 </desc>
13079 </param>
13080 <param name="flags" type="wstring" dir="out" safearray="yes">
13081 <desc>
13082 The flags of the properties returned. The array entries match the
13083 corresponding entries in the @a key array.
13084 </desc>
13085 </param>
13086 </method>
13087
13088 </interface>
13089
13090 <interface
13091 name="ISession" extends="$dispatched"
13092 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
13093 wsmap="managed"
13094 >
13095 <desc>
13096 The ISession interface represents a serialization primitive for virtual
13097 machines.
13098
13099 With VirtualBox, every time one wishes to manipulate a virtual machine
13100 (e.g. change its settings or start execution), a session object is
13101 required. Such an object must be passed to one of the session methods
13102 that open the given session, which then initiates the machine manipulation.
13103
13104 A session serves several purposes: it identifies to the inter-process VirtualBox
13105 code which process is currently working with the virtual machine, and it ensures
13106 that there are no incompatible requests from several processes for the
13107 same virtual machine. Session objects can therefore be thought of as mutex
13108 semaphores that lock virtual machines to prevent conflicting accesses from
13109 several processes.
13110
13111 How sessions objects are used depends on whether you use the Main API
13112 via COM or via the webservice:
13113
13114 <ul>
13115 <li>When using the COM API directly, an object of the Session class from the
13116 VirtualBox type library needs to be created. In regular COM C++ client code,
13117 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13118 This object will then act as a local session object in further calls to open
13119 a session.
13120 </li>
13121
13122 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13123 one session object automatically when <link to="IWebsessionManager::logon" />
13124 is called. A managed object reference to that session object can be retrieved by
13125 calling <link to="IWebsessionManager::getSessionObject" />. This session object
13126 reference can then be used to open sessions.
13127 </li>
13128 </ul>
13129
13130 Sessions are mainly used in two variations:
13131
13132 <ul>
13133 <li>
13134 To start a virtual machine in a separate process, one would call
13135 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
13136 object as its first parameter. This session then identifies the caller
13137 and lets him control the started machine (for example, pause machine
13138 execution or power it down) as well as be notified about machine
13139 execution state changes.
13140 </li>
13141
13142 <li>To alter machine settings, or to start machine execution within the
13143 current process, one needs to open a direct session for the machine first by
13144 calling <link to="IVirtualBox::openSession"/>. While a direct session
13145 is open within one process, no any other process may open another direct
13146 session for the same machine. This prevents the machine from being changed
13147 by other processes while it is running or while the machine is being configured.
13148 </li>
13149 </ul>
13150
13151 One also can attach to an existing direct session already opened by
13152 another process (for example, in order to send a control request to the
13153 virtual machine such as the pause or the reset request). This is done by
13154 calling <link to="IVirtualBox::openExistingSession"/>.
13155
13156 <note>
13157 Unless you are trying to write a new VirtualBox front-end that
13158 performs direct machine execution (like the VirtualBox or VBoxSDL
13159 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
13160 session opened by <link to="IVirtualBox::openSession"/> and use this
13161 session only to change virtual machine settings. If you simply want to
13162 start virtual machine execution using one of the existing front-ends
13163 (for example the VirtualBox GUI or headless server), simply use
13164 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
13165 will power up the machine automatically for you.
13166 </note>
13167 </desc>
13168
13169 <attribute name="state" type="SessionState" readonly="yes">
13170 <desc>Current state of this session.</desc>
13171 </attribute>
13172
13173 <attribute name="type" type="SessionType" readonly="yes">
13174 <desc>
13175 Type of this session. The value of this attribute is valid only
13176 if the session is currently open (i.e. its #state is
13177 SessionType_SessionOpen), otherwise an error will be returned.
13178 </desc>
13179 </attribute>
13180
13181 <attribute name="machine" type="IMachine" readonly="yes">
13182 <desc>Machine object associated with this session.</desc>
13183 </attribute>
13184
13185 <attribute name="console" type="IConsole" readonly="yes">
13186 <desc>Console object associated with this session.</desc>
13187 </attribute>
13188
13189 <method name="close">
13190 <desc>
13191 Closes a session that was previously opened.
13192
13193 It is recommended that every time an "open session" method (such as
13194 <link to="IVirtualBox::openRemoteSession" /> or
13195 <link to="IVirtualBox::openSession" />) has been called to
13196 manipulate a virtual machine, the caller invoke
13197 ISession::close() when it's done doing so. Since sessions are
13198 serialization primitives much like ordinary mutexes, they are
13199 best used the same way: for each "open" call, there should be
13200 a matching "close" call, even when errors occur.
13201
13202 Otherwise, if a direct session for a machine opened with
13203 <link to="IVirtualBox::openSession"/> is not explicitly closed
13204 when the application terminates, the state of the machine will
13205 be set to <link to="MachineState_Aborted" /> on the server.
13206
13207 Generally, it is recommended to close all open sessions explicitly
13208 before terminating the application (regardless of the reason for
13209 the termination).
13210
13211 <note>
13212 Do not expect the session state (<link to="ISession::state" />
13213 to return to "Closed" immediately after you invoke
13214 ISession::close(), particularly if you have started a remote
13215 session to execute the VM in a new process. The session state will
13216 automatically return to "Closed" once the VM is no longer executing,
13217 which can of course take a very long time.
13218 </note>
13219
13220 <result name="E_UNEXPECTED">
13221 Session is not open.
13222 </result>
13223
13224 </desc>
13225 </method>
13226
13227 </interface>
13228
13229 <!--
13230 // IStorageController
13231 /////////////////////////////////////////////////////////////////////////
13232 -->
13233
13234 <enum
13235 name="StorageBus"
13236 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13237 >
13238 <desc>
13239 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13240 see <link to="IStorageController::bus" />.
13241 </desc>
13242 <const name="Null" value="0">
13243 <desc>@c null value. Never used by the API.</desc>
13244 </const>
13245 <const name="IDE" value="1"/>
13246 <const name="SATA" value="2"/>
13247 <const name="SCSI" value="3"/>
13248 <const name="Floppy" value="4"/>
13249 <const name="SAS" value="5"/>
13250 </enum>
13251
13252 <enum
13253 name="StorageControllerType"
13254 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13255 >
13256 <desc>
13257 The exact variant of storage controller hardware presented
13258 to the guest; see <link to="IStorageController::controllerType" />.
13259 </desc>
13260
13261 <const name="Null" value="0">
13262 <desc>@c null value. Never used by the API.</desc>
13263 </const>
13264 <const name="LsiLogic" value="1">
13265 <desc>A SCSI controller of the LsiLogic variant.</desc>
13266 </const>
13267 <const name="BusLogic" value="2">
13268 <desc>A SCSI controller of the BusLogic variant.</desc>
13269 </const>
13270 <const name="IntelAhci" value="3">
13271 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13272 </const>
13273 <const name="PIIX3" value="4">
13274 <desc>An IDE controller of the PIIX3 variant.</desc>
13275 </const>
13276 <const name="PIIX4" value="5">
13277 <desc>An IDE controller of the PIIX4 variant.</desc>
13278 </const>
13279 <const name="ICH6" value="6">
13280 <desc>An IDE controller of the ICH6 variant.</desc>
13281 </const>
13282 <const name="I82078" value="7">
13283 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13284 </const>
13285 <const name="LsiLogicSas" value="8">
13286 <desc>A variant of the LsiLogic controller using SAS.</desc>
13287 </const>
13288 </enum>
13289
13290 <interface
13291 name="IStorageController" extends="$unknown"
13292 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
13293 wsmap="managed"
13294 >
13295 <desc>
13296 Represents a storage controller that is attached to a virtual machine
13297 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13298 attached to storage controllers in a real computer, virtual drives
13299 (represented by <link to="IMediumAttachment" />) are attached to virtual
13300 storage controllers, represented by this interface.
13301
13302 As opposed to physical hardware, VirtualBox has a very generic concept
13303 of a storage controller, and for purposes of the Main API, all virtual
13304 storage is attached to virtual machines via instances of this interface.
13305 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13306 and Floppy (see <link to="#bus" />). Depending on which of these four is
13307 used, certain sub-types may be available and can be selected in
13308 <link to="#controllerType" />.
13309
13310 Depending on these settings, the guest operating system might see
13311 significantly different virtual hardware.
13312 </desc>
13313
13314 <attribute name="name" type="wstring" readonly="yes">
13315 <desc>
13316 Name of the storage controller, as originally specified with
13317 <link to="IMachine::addStorageController" />. This then uniquely
13318 identifies this controller with other method calls such as
13319 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13320 </desc>
13321 </attribute>
13322
13323 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13324 <desc>
13325 Maximum number of devices which can be attached to one port.
13326 </desc>
13327 </attribute>
13328
13329 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13330 <desc>
13331 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13332 </desc>
13333 </attribute>
13334
13335 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13336 <desc>
13337 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13338 </desc>
13339 </attribute>
13340
13341 <attribute name="instance" type="unsigned long">
13342 <desc>
13343 The instance number of the device in the running VM.
13344 </desc>
13345 </attribute>
13346
13347 <attribute name="portCount" type="unsigned long">
13348 <desc>
13349 The number of currently usable ports on the controller.
13350 The minimum and maximum number of ports for one controller are
13351 stored in <link to="IStorageController::minPortCount"/>
13352 and <link to="IStorageController::maxPortCount"/>.
13353 </desc>
13354 </attribute>
13355
13356 <attribute name="bus" type="StorageBus" readonly="yes">
13357 <desc>
13358 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13359 </desc>
13360 </attribute>
13361
13362 <attribute name="controllerType" type="StorageControllerType">
13363 <desc>
13364 The exact variant of storage controller hardware presented
13365 to the guest.
13366 Depending on this value, VirtualBox will provide a different
13367 virtual storage controller hardware to the guest.
13368 For SATA and floppy controllers, only one variant is available,
13369 but for IDE and SCSI, there are several.
13370
13371 For SCSI controllers, the default type is LsiLogic.
13372 </desc>
13373 </attribute>
13374
13375 <method name="GetIDEEmulationPort">
13376 <desc>
13377 Gets the corresponding port number which is emulated as an IDE device.
13378 Works only with SATA controllers.
13379
13380 <result name="E_INVALIDARG">
13381 The @a devicePosition is not in the range 0 to 3.
13382 </result>
13383 <result name="E_NOTIMPL">
13384 The storage controller type is not SATAIntelAhci.
13385 </result>
13386
13387 </desc>
13388 <param name="devicePosition" type="long" dir="in"/>
13389 <param name="portNumber" type="long" dir="return"/>
13390 </method>
13391
13392 <method name="SetIDEEmulationPort">
13393 <desc>
13394 Sets the port number which is emulated as an IDE device.
13395 Works only with SATA controllers.
13396
13397 <result name="E_INVALIDARG">
13398 The @a devicePosition is not in the range 0 to 3 or the
13399 @a portNumber is not in the range 0 to 29.
13400 </result>
13401 <result name="E_NOTIMPL">
13402 The storage controller type is not SATAIntelAhci.
13403 </result>
13404
13405 </desc>
13406 <param name="devicePosition" type="long" dir="in"/>
13407 <param name="portNumber" type="long" dir="in"/>
13408 </method>
13409
13410 </interface>
13411
13412<if target="wsdl">
13413
13414 <!--
13415 // IManagedObjectRef
13416 /////////////////////////////////////////////////////////////////////////
13417 -->
13418
13419 <interface
13420 name="IManagedObjectRef" extends="$unknown"
13421 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13422 internal="yes"
13423 wsmap="managed"
13424 wscpp="hardcoded"
13425 >
13426 <desc>
13427 Managed object reference.
13428
13429 Only within the webservice, a managed object reference (which is really
13430 an opaque number) allows a webservice client to address an object
13431 that lives in the address space of the webservice server.
13432
13433 Behind each managed object reference, there is a COM object that lives
13434 in the webservice server's address space. The COM object is not freed
13435 until the managed object reference is released, either by an explicit
13436 call to <link to="IManagedObjectRef::release" /> or by logging off from
13437 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13438 all objects created during the webservice session.
13439
13440 Whenever a method call of the VirtualBox API returns a COM object, the
13441 webservice representation of that method will instead return a
13442 managed object reference, which can then be used to invoke methods
13443 on that object.
13444 </desc>
13445
13446 <method name="getInterfaceName">
13447 <desc>
13448 Returns the name of the interface that this managed object represents,
13449 for example, "IMachine", as a string.
13450 </desc>
13451 <param name="return" type="wstring" dir="return"/>
13452 </method>
13453
13454 <method name="release">
13455 <desc>
13456 Releases this managed object reference and frees the resources that
13457 were allocated for it in the webservice server process. After calling
13458 this method, the identifier of the reference can no longer be used.
13459 </desc>
13460 </method>
13461
13462 </interface>
13463
13464 <!--
13465 // IWebsessionManager
13466 /////////////////////////////////////////////////////////////////////////
13467 -->
13468
13469 <interface
13470 name="IWebsessionManager" extends="$unknown"
13471 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13472 internal="yes"
13473 wsmap="global"
13474 wscpp="hardcoded"
13475 >
13476 <desc>
13477 Websession manager. This provides essential services
13478 to webservice clients.
13479 </desc>
13480 <method name="logon">
13481 <desc>
13482 Logs a new client onto the webservice and returns a managed object reference to
13483 the IVirtualBox instance, which the client can then use as a basis to further
13484 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13485 interface, in one way or the other.
13486 </desc>
13487 <param name="username" type="wstring" dir="in"/>
13488 <param name="password" type="wstring" dir="in"/>
13489 <param name="return" type="IVirtualBox" dir="return"/>
13490 </method>
13491
13492 <method name="getSessionObject">
13493 <desc>
13494 Returns a managed object reference to the internal ISession object that was created
13495 for this web service session when the client logged on.
13496
13497 <see>ISession</see>
13498 </desc>
13499 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13500 <param name="return" type="ISession" dir="return"/>
13501 </method>
13502
13503 <method name="logoff">
13504 <desc>
13505 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13506 and destroys all resources associated with the session (most importantly, all
13507 managed objects created in the server while the session was active).
13508 </desc>
13509 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13510 </method>
13511
13512 </interface>
13513
13514</if>
13515
13516 <!--
13517 // IPerformanceCollector & friends
13518 /////////////////////////////////////////////////////////////////////////
13519 -->
13520
13521 <interface
13522 name="IPerformanceMetric" extends="$unknown"
13523 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13524 >
13525 <desc>
13526 The IPerformanceMetric interface represents parameters of the given
13527 performance metric.
13528 </desc>
13529
13530 <attribute name="metricName" type="wstring" readonly="yes">
13531 <desc>
13532 Name of the metric.
13533 </desc>
13534 </attribute>
13535
13536 <attribute name="object" type="$unknown" readonly="yes">
13537 <desc>
13538 Object this metric belongs to.
13539 </desc>
13540 </attribute>
13541
13542 <attribute name="description" type="wstring" readonly="yes">
13543 <desc>
13544 Textual description of the metric.
13545 </desc>
13546 </attribute>
13547
13548 <attribute name="period" type="unsigned long" readonly="yes">
13549 <desc>
13550 Time interval between samples, measured in seconds.
13551 </desc>
13552 </attribute>
13553
13554 <attribute name="count" type="unsigned long" readonly="yes">
13555 <desc>
13556 Number of recent samples retained by the performance collector for this
13557 metric.
13558
13559 When the collected sample count exceeds this number, older samples
13560 are discarded.
13561 </desc>
13562 </attribute>
13563
13564 <attribute name="unit" type="wstring" readonly="yes">
13565 <desc>
13566 Unit of measurement.
13567 </desc>
13568 </attribute>
13569
13570 <attribute name="minimumValue" type="long" readonly="yes">
13571 <desc>
13572 Minimum possible value of this metric.
13573 </desc>
13574 </attribute>
13575
13576 <attribute name="maximumValue" type="long" readonly="yes">
13577 <desc>
13578 Maximum possible value of this metric.
13579 </desc>
13580 </attribute>
13581 </interface>
13582
13583 <interface
13584 name="IPerformanceCollector" extends="$unknown"
13585 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13586 wsmap="managed"
13587 >
13588 <desc>
13589 The IPerformanceCollector interface represents a service that collects and
13590 stores performance metrics data.
13591
13592 Performance metrics are associated with objects of interfaces like IHost and
13593 IMachine. Each object has a distinct set of performance metrics.
13594 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13595
13596 Metric data is collected at the specified intervals and is retained
13597 internally. The interval and the number of retained samples can be set
13598 with <link to="IPerformanceCollector::setupMetrics" />.
13599
13600 Metrics are organized hierarchically, with each level separated by a
13601 slash (/) character. Generally, the scheme for metric names is like this:
13602
13603 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13604
13605 "Category/Metric" together form the base metric name. A base metric is the
13606 smallest unit for which a sampling interval and the number of retained
13607 samples can be set. Only base metrics can be enabled and disabled. All
13608 sub-metrics are collected when their base metric is collected.
13609 Collected values for any set of sub-metrics can be queried with
13610 <link to="IPerformanceCollector::queryMetricsData" />.
13611
13612 For example "CPU/Load/User:avg"
13613 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13614 "average" aggregate. An aggregate function is computed over all retained
13615 data. Valid aggregate functions are:
13616
13617 <ul>
13618 <li>avg -- average</li>
13619 <li>min -- minimum</li>
13620 <li>max -- maximum</li>
13621 </ul>
13622
13623 When setting up
13624 metric parameters, querying metric data, enabling or disabling metrics
13625 wildcards can be used in metric names to specify a subset of metrics. For
13626 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13627 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13628 values without aggregates <tt>*:</tt> can be used.
13629
13630 The valid names for base metrics are:
13631
13632 <ul>
13633 <li>CPU/Load</li>
13634 <li>CPU/MHz</li>
13635 <li>RAM/Usage</li>
13636 </ul>
13637
13638 The general sequence for collecting and retrieving the metrics is:
13639 <ul>
13640 <li>
13641 Obtain an instance of IPerformanceCollector with
13642 <link to="IVirtualBox::performanceCollector" />
13643 </li>
13644 <li>
13645 Allocate and populate an array with references to objects the metrics
13646 will be collected for. Use references to IHost and IMachine objects.
13647 </li>
13648 <li>
13649 Allocate and populate an array with base metric names the data will be
13650 collected for.
13651 </li>
13652 <li>
13653 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13654 metric data will be collected and stored.
13655 </li>
13656 <li>
13657 Wait for the data to get collected.
13658 </li>
13659 <li>
13660 Allocate and populate an array with references to objects the metric
13661 values will be queried for. You can re-use the object array used for
13662 setting base metrics.
13663 </li>
13664 <li>
13665 Allocate and populate an array with metric names the data will be
13666 collected for. Note that metric names differ from base metric names.
13667 </li>
13668 <li>
13669 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13670 have been collected so far are returned. Note that the values are still
13671 retained internally and data collection continues.
13672 </li>
13673 </ul>
13674
13675 For an example of usage refer to the following files in VirtualBox SDK:
13676 <ul>
13677 <li>
13678 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13679 </li>
13680 <li>
13681 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13682 </li>
13683 </ul>
13684 </desc>
13685
13686 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13687 <desc>
13688 Array of unique names of metrics.
13689
13690 This array represents all metrics supported by the performance
13691 collector. Individual objects do not necessarily support all of them.
13692 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13693 list of supported metrics for a particular object.
13694 </desc>
13695 </attribute>
13696
13697 <method name="getMetrics">
13698 <desc>
13699 Returns parameters of specified metrics for a set of objects.
13700 <note>
13701 @c Null metrics array means all metrics. @c Null object array means
13702 all existing objects.
13703 </note>
13704 </desc>
13705 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13706 <desc>
13707 Metric name filter. Currently, only a comma-separated list of metrics
13708 is supported.
13709 </desc>
13710 </param>
13711 <param name="objects" type="$unknown" dir="in" safearray="yes">
13712 <desc>
13713 Set of objects to return metric parameters for.
13714 </desc>
13715 </param>
13716 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13717 <desc>
13718 Array of returned metric parameters.
13719 </desc>
13720 </param>
13721 </method>
13722
13723 <method name="setupMetrics">
13724 <desc>
13725 Sets parameters of specified base metrics for a set of objects. Returns
13726 an array of <link to="IPerformanceMetric" /> describing the metrics have
13727 been affected.
13728 <note>
13729 @c Null or empty metric name array means all metrics. @c Null or empty
13730 object array means all existing objects. If metric name array contains
13731 a single element and object array contains many, the single metric
13732 name array element is applied to each object array element to form
13733 metric/object pairs.
13734 </note>
13735 </desc>
13736 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13737 <desc>
13738 Metric name filter. Comma-separated list of metrics with wildcard
13739 support.
13740 </desc>
13741 </param>
13742 <param name="objects" type="$unknown" dir="in" safearray="yes">
13743 <desc>
13744 Set of objects to setup metric parameters for.
13745 </desc>
13746 </param>
13747 <param name="period" type="unsigned long" dir="in">
13748 <desc>
13749 Time interval in seconds between two consecutive samples of performance
13750 data.
13751 </desc>
13752 </param>
13753 <param name="count" type="unsigned long" dir="in">
13754 <desc>
13755 Number of samples to retain in performance data history. Older samples
13756 get discarded.
13757 </desc>
13758 </param>
13759 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13760 <desc>
13761 Array of metrics that have been modified by the call to this method.
13762 </desc>
13763 </param>
13764 </method>
13765
13766 <method name="enableMetrics">
13767 <desc>
13768 Turns on collecting specified base metrics. Returns an array of
13769 <link to="IPerformanceMetric" /> describing the metrics have been
13770 affected.
13771 <note>
13772 @c Null or empty metric name array means all metrics. @c Null or empty
13773 object array means all existing objects. If metric name array contains
13774 a single element and object array contains many, the single metric
13775 name array element is applied to each object array element to form
13776 metric/object pairs.
13777 </note>
13778 </desc>
13779 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13780 <desc>
13781 Metric name filter. Comma-separated list of metrics with wildcard
13782 support.
13783 </desc>
13784 </param>
13785 <param name="objects" type="$unknown" dir="in" safearray="yes">
13786 <desc>
13787 Set of objects to enable metrics for.
13788 </desc>
13789 </param>
13790 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13791 <desc>
13792 Array of metrics that have been modified by the call to this method.
13793 </desc>
13794 </param>
13795 </method>
13796
13797 <method name="disableMetrics">
13798 <desc>
13799 Turns off collecting specified base metrics. Returns an array of
13800 <link to="IPerformanceMetric" /> describing the metrics have been
13801 affected.
13802 <note>
13803 @c Null or empty metric name array means all metrics. @c Null or empty
13804 object array means all existing objects. If metric name array contains
13805 a single element and object array contains many, the single metric
13806 name array element is applied to each object array element to form
13807 metric/object pairs.
13808 </note>
13809 </desc>
13810 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13811 <desc>
13812 Metric name filter. Comma-separated list of metrics with wildcard
13813 support.
13814 </desc>
13815 </param>
13816 <param name="objects" type="$unknown" dir="in" safearray="yes">
13817 <desc>
13818 Set of objects to disable metrics for.
13819 </desc>
13820 </param>
13821 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13822 <desc>
13823 Array of metrics that have been modified by the call to this method.
13824 </desc>
13825 </param>
13826 </method>
13827
13828 <method name="queryMetricsData">
13829 <desc>
13830 Queries collected metrics data for a set of objects.
13831
13832 The data itself and related metric information are returned in seven
13833 parallel and one flattened array of arrays. Elements of
13834 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13835 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13836 the same index describe one set of values corresponding to a single
13837 metric.
13838
13839 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13840 start and length of a sub-array is indicated by
13841 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13842 value for metric <tt>metricNames[i]</tt> is at
13843 <tt>returnData[returnIndices[i]]</tt>.
13844
13845 <note>
13846 @c Null or empty metric name array means all metrics. @c Null or empty
13847 object array means all existing objects. If metric name array contains
13848 a single element and object array contains many, the single metric
13849 name array element is applied to each object array element to form
13850 metric/object pairs.
13851 </note>
13852 <note>
13853 Data collection continues behind the scenes after call to
13854 @c queryMetricsData. The return data can be seen as the snapshot of
13855 the current state at the time of @c queryMetricsData call. The
13856 internally kept metric values are not cleared by the call. This makes
13857 possible querying different subsets of metrics or aggregates with
13858 subsequent calls. If periodic querying is needed it is highly
13859 suggested to query the values with @c interval*count period to avoid
13860 confusion. This way a completely new set of data values will be
13861 provided by each query.
13862 </note>
13863 </desc>
13864 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13865 <desc>
13866 Metric name filter. Comma-separated list of metrics with wildcard
13867 support.
13868 </desc>
13869 </param>
13870 <param name="objects" type="$unknown" dir="in" safearray="yes">
13871 <desc>
13872 Set of objects to query metrics for.
13873 </desc>
13874 </param>
13875 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13876 <desc>
13877 Names of metrics returned in @c returnData.
13878 </desc>
13879 </param>
13880 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13881 <desc>
13882 Objects associated with metrics returned in @c returnData.
13883 </desc>
13884 </param>
13885 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13886 <desc>
13887 Units of measurement for each returned metric.
13888 </desc>
13889 </param>
13890 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13891 <desc>
13892 Divisor that should be applied to return values in order to get
13893 floating point values. For example:
13894 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13895 will retrieve the floating point value of i-th sample of the first
13896 metric.
13897 </desc>
13898 </param>
13899 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13900 <desc>
13901 Sequence numbers of the first elements of value sequences of particular metrics
13902 returned in @c returnData. For aggregate metrics it is the sequence number of
13903 the sample the aggregate started calculation from.
13904 </desc>
13905 </param>
13906 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13907 <desc>
13908 Indices of the first elements of value sequences of particular metrics
13909 returned in @c returnData.
13910 </desc>
13911 </param>
13912 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13913 <desc>
13914 Lengths of value sequences of particular metrics.
13915 </desc>
13916 </param>
13917 <param name="returnData" type="long" dir="return" safearray="yes">
13918 <desc>
13919 Flattened array of all metric data containing sequences of values for
13920 each metric.
13921 </desc>
13922 </param>
13923 </method>
13924
13925 </interface>
13926
13927 <module name="VBoxSVC" context="LocalServer">
13928 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13929 namespace="virtualbox.org">
13930 <interface name="IVirtualBox" default="yes"/>
13931 </class>
13932 </module>
13933
13934 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13935 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13936 namespace="virtualbox.org">
13937 <interface name="ISession" default="yes"/>
13938 </class>
13939 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13940 namespace="virtualbox.org">
13941 <interface name="ILocalOwner" default="yes"/>
13942 <interface name="IVirtualBoxCallback"/>
13943 <interface name="IConsoleCallback"/>
13944 </class>
13945 </module>
13946
13947</library>
13948
13949</idl>
13950
13951<!-- 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