VirtualBox

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

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

API: make necessary adjustments to support DVD passthrough again, together with the necessary client code changes. Unfortunately it is not possible to define the API in the ideal way due to how settings are handled in MachineImpl.cpp.

  • Property svn:eol-style set to native
File size: 489.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="0f4cc50c-e1cc-4cde-ae7a-e6164bac5ba2"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Aborted" value="3">
619 <desc>
620 The process running the machine has terminated abnormally. This may
621 indicate a crash of the VM process in host execution context, or
622 the VM process has been terminated externally.
623 </desc>
624 </const>
625 <const name="Running" value="4">
626 <desc>
627 The machine is currently being executed.
628 <note internal="yes">
629 For whoever decides to touch this enum: In order to keep the
630 comparisons in the old source code valid, this state must immediately
631 precede the Paused state.
632 </note>
633 </desc>
634 </const>
635 <const name="Paused" value="5">
636 <desc>
637 Execution of the machine has been paused.
638 <note internal="yes">
639 For whoever decides to touch this enum: In order to keep the
640 comparisons in the old source code valid, this state must immediately
641 follow the Running state.
642 </note>
643 </desc>
644 </const>
645 <const name="Stuck" value="6">
646 <desc>
647 Execution of the machine has reached the "Guru Meditation"
648 condition. This indicates a severe error in the hypervisor itself.
649 </desc>
650 </const>
651 <const name="Starting" value="7">
652 <desc>
653 Machine is being started after powering it on from a
654 zero execution state.
655 </desc>
656 </const>
657 <const name="Stopping" value="8">
658 <desc>
659 Machine is being normally stopped powering it off, or after the guest OS
660 has initiated a shutdown sequence.
661 </desc>
662 </const>
663 <const name="Saving" value="9">
664 <desc>
665 Machine is saving its execution state to a file, or an online
666 snapshot of the machine is being taken.
667 </desc>
668 </const>
669 <const name="Restoring" value="10">
670 <desc>
671 Execution state of the machine is being restored from a file
672 after powering it on from the saved execution state.
673 </desc>
674 </const>
675 <const name="TeleportingFrom" value="11">
676 <desc>
677 Teleporting the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="RestoringSnapshot" value="12">
681 <desc>
682 A machine snapshot is being restored; this typically does not take long.
683 </desc>
684 </const>
685 <const name="DeletingSnapshot" value="13">
686 <desc>
687 A machine snapshot is being deleted; this can take a long time since this
688 may require merging differencing hard disk images.
689 </desc>
690 </const>
691 <const name="SettingUp" value="14">
692 <desc>
693 Lengthy setup operation is in progress.
694 </desc>
695 </const>
696
697 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
698 <desc>
699 Pseudo-state: first online state (for use in relational expressions).
700 </desc>
701 </const>
702 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
703 <desc>
704 Pseudo-state: last online state (for use in relational expressions).
705 </desc>
706 </const>
707
708 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
709 <desc>
710 Pseudo-state: first transient state (for use in relational expressions).
711 </desc>
712 </const>
713 <const name="LastTransient" value="14" wsmap="suppress"> <!-- SettingUp -->
714 <desc>
715 Pseudo-state: last transient state (for use in relational expressions).
716 </desc>
717 </const>
718
719 </enum>
720
721 <enum
722 name="SessionState"
723 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
724 >
725 <desc>
726 Session state. This enumeration represents possible values of
727 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
728 attributes. See individual enumerator descriptions for the meaning for
729 every value.
730 </desc>
731
732 <const name="Null" value="0">
733 <desc>Null value (never used by the API).</desc>
734 </const>
735 <const name="Closed" value="1">
736 <desc>
737 The machine has no open sessions (<link to="IMachine::sessionState"/>);
738 the session is closed (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Open" value="2">
742 <desc>
743 The machine has an open direct session (<link to="IMachine::sessionState"/>);
744 the session is open (<link to="ISession::state"/>)
745 </desc>
746 </const>
747 <const name="Spawning" value="3">
748 <desc>
749 A new (direct) session is being opened for the machine
750 as a result of <link to="IVirtualBox::openRemoteSession"/>
751 call (<link to="IMachine::sessionState"/>);
752 the session is currently being opened
753 as a result of <link to="IVirtualBox::openRemoteSession"/>
754 call (<link to="ISession::state"/>)
755 </desc>
756 </const>
757 <const name="Closing" value="4">
758 <desc>
759 The direct session is being closed (<link to="IMachine::sessionState"/>);
760 the session is being closed (<link to="ISession::state"/>)
761 </desc>
762 </const>
763 </enum>
764
765 <enum
766 name="CpuPropertyType"
767 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
768 >
769 <desc>
770 Virtual CPU property type. This enumeration represents possible values of the
771 IMachine get- and setCpuProperty methods.
772 </desc>
773 <const name="Null" value="0">
774 <desc>Null value (never used by the API).</desc>
775 </const>
776 <const name="PAE" value="1">
777 <desc>
778 This setting determines whether VirtualBox will expose the Physical Address
779 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
780 is not available, it will not be reported.
781 </desc>
782 </const>
783 <const name="Synthetic" value="2">
784 <desc>
785 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
786 teleporting between host systems that differ significantly.
787 </desc>
788 </const>
789 </enum>
790
791
792 <enum
793 name="HWVirtExPropertyType"
794 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
795 >
796 <desc>
797 HWVirtEx property type. This enumeration represents possible values of the
798 IMachine get- and setHWVirtExProperty methods.
799 </desc>
800 <const name="Null" value="0">
801 <desc>Null value (never used by the API).</desc>
802 </const>
803 <const name="Enabled" value="1">
804 <desc>
805 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
806 they will not be used.
807 </desc>
808 </const>
809 <const name="Exclusive" value="2">
810 <desc>
811 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
812 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
813 </desc>
814 </const>
815 <const name="VPID" value="3">
816 <desc>
817 VT-x VPID boolean property. Note that in case this extension is not available,
818 it will not be used.
819 </desc>
820 </const>
821 <const name="NestedPaging" value="4">
822 <desc>
823 Nested Paging boolean property. Note that in case this extension is not available,
824 it will not be used.
825 </desc>
826 </const>
827 </enum>
828
829 <enum
830 name="SessionType"
831 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
832 >
833 <desc>
834 Session type. This enumeration represents possible values of the
835 <link to="ISession::type"/> attribute.
836 </desc>
837
838 <const name="Null" value="0">
839 <desc>Null value (never used by the API).</desc>
840 </const>
841 <const name="Direct" value="1">
842 <desc>
843 Direct session
844 (opened by <link to="IVirtualBox::openSession"/>)
845 </desc>
846 </const>
847 <const name="Remote" value="2">
848 <desc>
849 Remote session
850 (opened by <link to="IVirtualBox::openRemoteSession"/>)
851 </desc>
852 </const>
853 <const name="Existing" value="3">
854 <desc>
855 Existing session
856 (opened by <link to="IVirtualBox::openExistingSession"/>)
857 </desc>
858 </const>
859 </enum>
860
861 <enum
862 name="DeviceType"
863 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
864 >
865 <desc>
866 Device type.
867 </desc>
868 <const name="Null" value="0">
869 <desc>
870 Null value, may also mean "no device" (not allowed for
871 <link to="IConsole::getDeviceActivity"/>).
872 </desc>
873 </const>
874 <const name="Floppy" value="1">
875 <desc>Floppy device.</desc>
876 </const>
877 <const name="DVD" value="2">
878 <desc>CD/DVD-ROM device.</desc>
879 </const>
880 <const name="HardDisk" value="3">
881 <desc>Hard disk device.</desc>
882 </const>
883 <const name="Network" value="4">
884 <desc>Network device.</desc>
885 </const>
886 <const name="USB" value="5">
887 <desc>USB device.</desc>
888 </const>
889 <const name="SharedFolder" value="6">
890 <desc>Shared folder device.</desc>
891 </const>
892 </enum>
893
894 <enum
895 name="DeviceActivity"
896 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
897 >
898 <desc>
899 Device activity for <link to="IConsole::getDeviceActivity"/>.
900 </desc>
901
902 <const name="Null" value="0"/>
903 <const name="Idle" value="1"/>
904 <const name="Reading" value="2"/>
905 <const name="Writing" value="3"/>
906 </enum>
907
908 <enum
909 name="ClipboardMode"
910 uuid="33364716-4008-4701-8f14-be0fa3d62950"
911 >
912 <desc>
913 Host-Guest clipboard interchange mode.
914 </desc>
915
916 <const name="Disabled" value="0"/>
917 <const name="HostToGuest" value="1"/>
918 <const name="GuestToHost" value="2"/>
919 <const name="Bidirectional" value="3"/>
920 </enum>
921
922 <enum
923 name="Scope"
924 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
925 >
926 <desc>
927 Scope of the operation.
928
929 A generic enumeration used in various methods to define the action or
930 argument scope.
931 </desc>
932
933 <const name="Global" value="0"/>
934 <const name="Machine" value="1"/>
935 <const name="Session" value="2"/>
936 </enum>
937
938 <enum
939 name="GuestStatisticType"
940 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
941 >
942 <desc>
943 Statistics type for <link to="IGuest::getStatistic"/>.
944 </desc>
945
946 <const name="CPULoad_Idle" value="0">
947 <desc>
948 Idle CPU load (0-100%) for last interval.
949 </desc>
950 </const>
951 <const name="CPULoad_Kernel" value="1">
952 <desc>
953 Kernel CPU load (0-100%) for last interval.
954 </desc>
955 </const>
956 <const name="CPULoad_User" value="2">
957 <desc>
958 User CPU load (0-100%) for last interval.
959 </desc>
960 </const>
961 <const name="Threads" value="3">
962 <desc>
963 Total number of threads in the system.
964 </desc>
965 </const>
966 <const name="Processes" value="4">
967 <desc>
968 Total number of processes in the system.
969 </desc>
970 </const>
971 <const name="Handles" value="5">
972 <desc>
973 Total number of handles in the system.
974 </desc>
975 </const>
976 <const name="MemoryLoad" value="6">
977 <desc>
978 Memory load (0-100%).
979 </desc>
980 </const>
981 <const name="PhysMemTotal" value="7">
982 <desc>
983 Total physical memory in megabytes.
984 </desc>
985 </const>
986 <const name="PhysMemAvailable" value="8">
987 <desc>
988 Free physical memory in megabytes.
989 </desc>
990 </const>
991 <const name="PhysMemBalloon" value="9">
992 <desc>
993 Ballooned physical memory in megabytes.
994 </desc>
995 </const>
996 <const name="MemCommitTotal" value="10">
997 <desc>
998 Total amount of memory in the committed state in megabytes.
999 </desc>
1000 </const>
1001 <const name="MemKernelTotal" value="11">
1002 <desc>
1003 Total amount of memory used by the guest OS's kernel in megabytes.
1004 </desc>
1005 </const>
1006 <const name="MemKernelPaged" value="12">
1007 <desc>
1008 Total amount of paged memory used by the guest OS's kernel in megabytes.
1009 </desc>
1010 </const>
1011 <const name="MemKernelNonpaged" value="13">
1012 <desc>
1013 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1014 </desc>
1015 </const>
1016 <const name="MemSystemCache" value="14">
1017 <desc>
1018 Total amount of memory used by the guest OS's system cache in megabytes.
1019 </desc>
1020 </const>
1021 <const name="PageFileSize" value="15">
1022 <desc>
1023 Pagefile size in megabytes.
1024 </desc>
1025 </const>
1026 <const name="SampleNumber" value="16">
1027 <desc>
1028 Statistics sample number
1029 </desc>
1030 </const>
1031 <const name="MaxVal" value="17"/>
1032 </enum>
1033
1034 <enum
1035 name="BIOSBootMenuMode"
1036 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1037 >
1038 <desc>
1039 BIOS boot menu mode.
1040 </desc>
1041
1042 <const name="Disabled" value="0"/>
1043 <const name="MenuOnly" value="1"/>
1044 <const name="MessageAndMenu" value="2"/>
1045 </enum>
1046
1047 <enum
1048 name="ProcessorFeature"
1049 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1050 >
1051 <desc>
1052 CPU features.
1053 </desc>
1054
1055 <const name="HWVirtEx" value="0"/>
1056 <const name="PAE" value="1"/>
1057 <const name="LongMode" value="2"/>
1058 <const name="NestedPaging" value="3"/>
1059 </enum>
1060
1061 <enum
1062 name="FirmwareType"
1063 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1064 >
1065 <desc>
1066 Firmware type.
1067 </desc>
1068 <const name="BIOS" value="1">
1069 <desc>BIOS Firmware.</desc>
1070 </const>
1071 <const name="EFI" value="2">
1072 <desc>Efi firmware.</desc>
1073 </const>
1074 </enum>
1075
1076 <!--
1077 // IVirtualBoxErrorInfo
1078 /////////////////////////////////////////////////////////////////////////
1079 -->
1080
1081 <interface
1082 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1083 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1084 supportsErrorInfo="no"
1085 wsmap="managed"
1086 >
1087 <desc>
1088 The IVirtualBoxErrorInfo interface represents extended error information.
1089
1090 Extended error information can be set by VirtualBox components after
1091 unsuccessful or partially successful method invocation. This information
1092 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1093 and then shown to the client in addition to the plain 32-bit result code.
1094
1095 In MS COM, this interface extends the IErrorInfo interface,
1096 in XPCOM, it extends the nsIException interface. In both cases,
1097 it provides a set of common attributes to retrieve error
1098 information.
1099
1100 Sometimes invocation of some component's method may involve methods of
1101 other components that may also fail (independently of this method's
1102 failure), or a series of non-fatal errors may precede a fatal error that
1103 causes method failure. In cases like that, it may be desirable to preserve
1104 information about all errors happened during method invocation and deliver
1105 it to the caller. The <link to="#next"/> attribute is intended
1106 specifically for this purpose and allows to represent a chain of errors
1107 through a single IVirtualBoxErrorInfo object set after method invocation.
1108
1109 Note that errors are stored to a chain in the reverse order, i.e. the
1110 initial error object you query right after method invocation is the last
1111 error set by the callee, the object it points to in the @a next attribute
1112 is the previous error and so on, up to the first error (which is the last
1113 in the chain).
1114 </desc>
1115
1116 <attribute name="resultCode" type="long" readonly="yes">
1117 <desc>
1118 Result code of the error.
1119 Usually, it will be the same as the result code returned
1120 by the method that provided this error information, but not
1121 always. For example, on Win32, CoCreateInstance() will most
1122 likely return E_NOINTERFACE upon unsuccessful component
1123 instantiation attempt, but not the value the component factory
1124 returned. Value is typed 'long', not 'result',
1125 to make interface usable from scripting languages.
1126 <note>
1127 In MS COM, there is no equivalent.
1128 In XPCOM, it is the same as nsIException::result.
1129 </note>
1130 </desc>
1131 </attribute>
1132
1133 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1134 <desc>
1135 UUID of the interface that defined the error.
1136 <note>
1137 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1138 data type.
1139 In XPCOM, there is no equivalent.
1140 </note>
1141 </desc>
1142 </attribute>
1143
1144 <attribute name="component" type="wstring" readonly="yes">
1145 <desc>
1146 Name of the component that generated the error.
1147 <note>
1148 In MS COM, it is the same as IErrorInfo::GetSource.
1149 In XPCOM, there is no equivalent.
1150 </note>
1151 </desc>
1152 </attribute>
1153
1154 <attribute name="text" type="wstring" readonly="yes">
1155 <desc>
1156 Text description of the error.
1157 <note>
1158 In MS COM, it is the same as IErrorInfo::GetDescription.
1159 In XPCOM, it is the same as nsIException::message.
1160 </note>
1161 </desc>
1162 </attribute>
1163
1164 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1165 <desc>
1166 Next error object if there is any, or @c null otherwise.
1167 <note>
1168 In MS COM, there is no equivalent.
1169 In XPCOM, it is the same as nsIException::inner.
1170 </note>
1171 </desc>
1172 </attribute>
1173
1174 </interface>
1175
1176 <interface
1177 name="ILocalOwner" extends="$dispatched"
1178 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1179 >
1180 <desc>
1181 The ILocalOwner interface allows to register local objects
1182 (created without COM calls, but with new()).
1183 Once registered, calls to methods of such objects can be made
1184 from remote COM processes.
1185 The main usecase is the event callback implementation where
1186 API clients provide callback objects.
1187 </desc>
1188 <method name="setLocalObject">
1189 <desc>
1190 Set local object.
1191 </desc>
1192 <param name="object" type="$unknown" dir="in">
1193 <desc>Local object to forward requests to.
1194 If null, clears currently set local object.</desc>
1195 </param>
1196 </method>
1197 </interface>
1198
1199 <!--
1200 // IVirtualBox
1201 /////////////////////////////////////////////////////////////////////////
1202 -->
1203
1204 <interface
1205 name="IVirtualBoxCallback" extends="$unknown"
1206 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1207 wsmap="suppress"
1208 >
1209
1210 <method name="onMachineStateChange">
1211 <desc>
1212 The execution state of the given machine has changed.
1213 <see>IMachine::state</see>
1214 </desc>
1215 <param name="machineId" type="uuid" mod="string" dir="in">
1216 <desc>ID of the machine this event relates to.</desc>
1217 </param>
1218 <param name="state" type="MachineState" dir="in">
1219 <desc>New execution state.</desc>
1220 </param>
1221 </method>
1222
1223 <method name="onMachineDataChange">
1224 <desc>
1225 Any of the settings of the given machine has changed.
1226 </desc>
1227 <param name="machineId" type="uuid" mod="string" dir="in">
1228 <desc>ID of the machine this event relates to.</desc>
1229 </param>
1230 </method>
1231
1232 <method name="onExtraDataCanChange">
1233 <desc>
1234 Notification when someone tries to change extra data for
1235 either the given machine or (if @c null) global extra data.
1236 This gives the chance to veto against changes.
1237 </desc>
1238 <param name="machineId" type="uuid" mod="string" dir="in">
1239 <desc>
1240 ID of the machine this event relates to
1241 (@c null ID for global extra data change requests).
1242 </desc>
1243 </param>
1244 <param name="key" type="wstring" dir="in">
1245 <desc>
1246 Extra data key for the attempted write.
1247 </desc>
1248 </param>
1249 <param name="value" type="wstring" dir="in">
1250 <desc>
1251 Extra data value for the given key.
1252 </desc>
1253 </param>
1254 <param name="error" type="wstring" dir="out">
1255 <desc>
1256 Optional error message describing the reason of the
1257 veto (ignored if this notification returns @c true).
1258 </desc>
1259 </param>
1260 <param name="allowChange" type="boolean" dir="return">
1261 <desc>
1262 Flag to indicate whether the callee agrees (@c true)
1263 or vetoes against the change (@c false).
1264 </desc>
1265 </param>
1266 </method>
1267
1268 <method name="onExtraDataChange">
1269 <desc>
1270 Notification when machine specific or global extra data
1271 has changed.
1272 </desc>
1273 <param name="machineId" type="uuid" mod="string" dir="in">
1274 <desc>
1275 ID of the machine this event relates to.
1276 Null for global extra data changes.
1277 </desc>
1278 </param>
1279 <param name="key" type="wstring" dir="in">
1280 <desc>
1281 Extra data key that has changed.
1282 </desc>
1283 </param>
1284 <param name="value" type="wstring" dir="in">
1285 <desc>
1286 Extra data value for the given key.
1287 </desc>
1288 </param>
1289 </method>
1290
1291 <method name="onMediumRegistered">
1292 <desc>
1293 The given medium was registered or unregistered
1294 within this VirtualBox installation.
1295
1296 The @a mediumType parameter describes what type of
1297 medium the specified @a mediumId refers to. Possible
1298 values are:
1299
1300 <ul>
1301 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1302 that, if registered, can be obtained using the
1303 <link to="IVirtualBox::getHardDisk"/> call.</li>
1304 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1305 that, if registered, can be obtained using the
1306 <link to="IVirtualBox::getDVDImage"/> call.</li>
1307 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1308 that, if registered, can be obtained using the
1309 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1310 </ul>
1311
1312 Note that if this is a deregistration notification,
1313 there is no way to access the object representing the
1314 unregistered medium. It is supposed that the
1315 application will do required cleanup based on the
1316 @a mediumId value.
1317 </desc>
1318 <param name="mediumId" type="uuid" mod="string" dir="in">
1319 <desc>ID of the medium this event relates to.</desc>
1320 </param>
1321 <param name="mediumType" type="DeviceType" dir="in">
1322 <desc>Type of the medium this event relates to.</desc>
1323 </param>
1324 <param name="registered" type="boolean" dir="in">
1325 <desc>
1326 If @c true, the medium was registered, otherwise it was
1327 unregistered.
1328 </desc>
1329 </param>
1330 </method>
1331
1332 <method name="onMachineRegistered">
1333 <desc>
1334 The given machine was registered or unregistered
1335 within this VirtualBox installation.
1336 </desc>
1337 <param name="machineId" type="uuid" mod="string" dir="in">
1338 <desc>ID of the machine this event relates to.</desc>
1339 </param>
1340 <param name="registered" type="boolean" dir="in">
1341 <desc>
1342 If @c true, the machine was registered, otherwise it was
1343 unregistered.
1344 </desc>
1345 </param>
1346 </method>
1347
1348 <method name="onSessionStateChange">
1349 <desc>
1350 The state of the session for the given machine was changed.
1351 <see>IMachine::sessionState</see>
1352 </desc>
1353 <param name="machineId" type="uuid" mod="string" dir="in">
1354 <desc>ID of the machine this event relates to.</desc>
1355 </param>
1356 <param name="state" type="SessionState" dir="in">
1357 <desc>New session state.</desc>
1358 </param>
1359 </method>
1360
1361 <method name="onSnapshotTaken">
1362 <desc>
1363 A new snapshot of the machine has been taken.
1364 <see>ISnapshot</see>
1365 </desc>
1366 <param name="machineId" type="uuid" mod="string" dir="in">
1367 <desc>ID of the machine this event relates to.</desc>
1368 </param>
1369 <param name="snapshotId" type="uuid" mod="string" dir="in">
1370 <desc>ID of the new snapshot.</desc>
1371 </param>
1372 </method>
1373
1374 <method name="onSnapshotDiscarded">
1375 <desc>
1376 Snapshot of the given machine has been discarded.
1377
1378 <note>
1379 This notification is delivered <b>after</b> the snapshot
1380 object has been uninitialized on the server (so that any
1381 attempt to call its methods will return an error).
1382 </note>
1383
1384 <see>ISnapshot</see>
1385 </desc>
1386 <param name="machineId" type="uuid" mod="string" dir="in">
1387 <desc>ID of the machine this event relates to.</desc>
1388 </param>
1389 <param name="snapshotId" type="uuid" mod="string" dir="in">
1390 <desc>
1391 ID of the discarded snapshot. @c null means the current machine
1392 state has been discarded (restored from the current snapshot).
1393 </desc>
1394 </param>
1395 </method>
1396
1397 <method name="onSnapshotChange">
1398 <desc>
1399 Snapshot properties (name and/or description) have been changed.
1400 <see>ISnapshot</see>
1401 </desc>
1402 <param name="machineId" type="uuid" mod="string" dir="in">
1403 <desc>ID of the machine this event relates to.</desc>
1404 </param>
1405 <param name="snapshotId" type="uuid" mod="string" dir="in">
1406 <desc>ID of the changed snapshot.</desc>
1407 </param>
1408 </method>
1409
1410 <method name="onGuestPropertyChange">
1411 <desc>
1412 Notification when a guest property has changed.
1413 </desc>
1414 <param name="machineId" type="uuid" mod="string" dir="in">
1415 <desc>
1416 ID of the machine this event relates to.
1417 </desc>
1418 </param>
1419 <param name="name" type="wstring" dir="in">
1420 <desc>
1421 The name of the property that has changed.
1422 </desc>
1423 </param>
1424 <param name="value" type="wstring" dir="in">
1425 <desc>
1426 The new property value.
1427 </desc>
1428 </param>
1429 <param name="flags" type="wstring" dir="in">
1430 <desc>
1431 The new property flags.
1432 </desc>
1433 </param>
1434 </method>
1435
1436 </interface>
1437
1438 <interface
1439 name="IDHCPServer" extends="$unknown"
1440 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1441 wsmap="managed"
1442 >
1443 <desc>
1444 The IDHCPServer interface represents the vbox dhcp server configuration.
1445
1446 To enumerate all the dhcp servers on the host, use the
1447 <link to="IVirtualBox::DHCPServers"/> attribute.
1448 </desc>
1449
1450 <attribute name="enabled" type="boolean">
1451 <desc>
1452 specifies if the dhcp server is enabled
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="IPAddress" type="wstring" readonly="yes">
1457 <desc>
1458 specifies server IP
1459 </desc>
1460 </attribute>
1461
1462 <attribute name="networkMask" type="wstring" readonly="yes">
1463 <desc>
1464 specifies server network mask
1465 </desc>
1466 </attribute>
1467
1468 <attribute name="networkName" type="wstring" readonly="yes">
1469 <desc>
1470 specifies internal network name the server is used for
1471 </desc>
1472 </attribute>
1473
1474 <attribute name="lowerIP" type="wstring" readonly="yes">
1475 <desc>
1476 specifies from IP adrres in server address range
1477 </desc>
1478 </attribute>
1479
1480 <attribute name="upperIP" type="wstring" readonly="yes">
1481 <desc>
1482 specifies to IP adrres in server address range
1483 </desc>
1484 </attribute>
1485
1486 <method name="setConfiguration">
1487 <desc>
1488 configures the server
1489 <result name="E_INVALIDARG">
1490 invalid configuration supplied
1491 </result>
1492 </desc>
1493 <param name="IPAddress" type="wstring" dir="in">
1494 <desc>
1495 server IP address
1496 </desc>
1497 </param>
1498 <param name="networkMask" type="wstring" dir="in">
1499 <desc>
1500 server network mask
1501 </desc>
1502 </param>
1503 <param name="FromIPAddress" type="wstring" dir="in">
1504 <desc>
1505 server From IP address for address range
1506 </desc>
1507 </param>
1508 <param name="ToIPAddress" type="wstring" dir="in">
1509 <desc>
1510 server To IP address for address range
1511 </desc>
1512 </param>
1513 </method>
1514
1515 <method name="start">
1516 <desc>
1517 Starts DHCP server process.
1518 <result name="E_FAIL">
1519 Failed to start the process.
1520 </result>
1521 </desc>
1522 <param name="networkName" type="wstring" dir="in">
1523 <desc>
1524 Name of internal network DHCP server should attach to.
1525 </desc>
1526 </param>
1527 <param name="trunkName" type="wstring" dir="in">
1528 <desc>
1529 Name of internal network trunk.
1530 </desc>
1531 </param>
1532 <param name="trunkType" type="wstring" dir="in">
1533 <desc>
1534 Type of internal network trunk.
1535 </desc>
1536 </param>
1537 </method>
1538
1539 <method name="stop">
1540 <desc>
1541 Stops DHCP server process.
1542 <result name="E_FAIL">
1543 Failed to stop the process.
1544 </result>
1545 </desc>
1546 </method>
1547 </interface>
1548
1549 <interface
1550 name="IVirtualBox" extends="$dispatched"
1551 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1552 wsmap="managed"
1553 >
1554 <desc>
1555 The IVirtualBox interface represents the main interface exposed by the
1556 product that provides virtual machine management.
1557
1558 An instance of IVirtualBox is required for the product to do anything
1559 useful. Even though the interface does not expose this, internally,
1560 IVirtualBox is implemented as a singleton and actually lives in the
1561 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1562 IVirtualBox can track the state of all virtual machines on a particular
1563 host, regardless of which frontend started them.
1564
1565 To enumerate all the virtual machines on the host, use the
1566 <link to="IVirtualBox::machines"/> attribute.
1567 </desc>
1568
1569 <attribute name="version" type="wstring" readonly="yes">
1570 <desc>
1571 A string representing the version number of the product. The
1572 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1573 last number represents the build number and will frequently change.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="revision" type="unsigned long" readonly="yes">
1578 <desc>
1579 The internal build revision number of the product.
1580 </desc>
1581 </attribute>
1582
1583 <attribute name="packageType" type="wstring" readonly="yes">
1584 <desc>
1585 A string representing the package type of this product. The
1586 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1587 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1588 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1589 this.
1590 </desc>
1591 </attribute>
1592
1593 <attribute name="homeFolder" type="wstring" readonly="yes">
1594 <desc>
1595 Full path to the directory where the global settings file,
1596 <tt>VirtualBox.xml</tt>, is stored.
1597
1598 In this version of VirtualBox, the value of this property is
1599 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1600 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1601 as determined by the host OS), and cannot be changed.
1602
1603 This path is also used as the base to resolve relative paths in
1604 places where relative paths are allowed (unless otherwise
1605 expressly indicated).
1606 </desc>
1607 </attribute>
1608
1609 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1610 <desc>
1611 Full name of the global settings file.
1612 The value of this property corresponds to the value of
1613 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1614 </desc>
1615 </attribute>
1616
1617 <attribute name="host" type="IHost" readonly="yes">
1618 <desc>Associated host object.</desc>
1619 </attribute>
1620
1621 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1622 <desc>Associated system information object.</desc>
1623 </attribute>
1624
1625 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1626 <desc>
1627 Array of machine objects registered within this VirtualBox instance.
1628 </desc>
1629 </attribute>
1630
1631 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1632 <desc>
1633 Array of medium objects known to this VirtualBox installation.
1634
1635 This array contains only base media. All differencing
1636 media of the given base medium can be enumerated using
1637 <link to="IMedium::children"/>.
1638 </desc>
1639 </attribute>
1640
1641 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1642 <desc>
1643 Array of CD/DVD image objects registered with this VirtualBox instance.
1644 </desc>
1645 </attribute>
1646
1647 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1648 <desc>
1649 Array of floppy image objects registered with this VirtualBox instance.
1650 </desc>
1651 </attribute>
1652
1653 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1654
1655 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1656
1657 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1658 <desc>
1659 Collection of global shared folders. Global shared folders are
1660 available to all virtual machines.
1661
1662 New shared folders are added to the collection using
1663 <link to="#createSharedFolder"/>. Existing shared folders can be
1664 removed using <link to="#removeSharedFolder"/>.
1665
1666 <note>
1667 In the current version of the product, global shared folders are not
1668 implemented and therefore this collection is always empty.
1669 </note>
1670 </desc>
1671 </attribute>
1672
1673 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1674 <desc>
1675 Associated performance collector object.
1676 </desc>
1677 </attribute>
1678
1679 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1680 <desc>
1681 dhcp server settings.
1682 </desc>
1683 </attribute>
1684
1685 <method name="createMachine">
1686 <desc>
1687 Creates a new virtual machine.
1688
1689 The new machine is created unregistered, with the initial configuration
1690 set according to the specified guest OS type. A typical sequence of
1691 actions to create a new virtual machine is as follows:
1692
1693 <ol>
1694 <li>
1695 Call this method to have a new machine created. The returned machine
1696 object will be "mutable" allowing to change any machine property.
1697 </li>
1698
1699 <li>
1700 Configure the machine using the appropriate attributes and methods.
1701 </li>
1702
1703 <li>
1704 Call <link to="IMachine::saveSettings" /> to write the settings
1705 to the machine's XML settings file. The configuration of the newly
1706 created machine will not be saved to disk until this method is
1707 called.
1708 </li>
1709
1710 <li>
1711 Call <link to="#registerMachine" /> to add the machine to the list
1712 of machines known to VirtualBox.
1713 </li>
1714 </ol>
1715
1716 You should specify valid name for the newly created machine when calling
1717 this method. See the <link to="IMachine::name"/> attribute description
1718 for more details about the machine name.
1719
1720 The specified guest OS type identifier must match an ID of one of known
1721 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1722 array.
1723
1724 Every machine has a <i>settings file</i> that is used to store
1725 the machine configuration. This file is stored in a directory called the
1726 <i>machine settings subfolder</i>. Both the settings subfolder and file
1727 will have a name that corresponds to the name of the virtual machine.
1728 You can specify where to create the machine setting subfolder using the
1729 @a baseFolder argument. The base folder can be absolute (full path) or
1730 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1731 directory</link>.
1732
1733 If @a baseFolder is a @c null or empty string (which is recommended), the
1734 <link to="ISystemProperties::defaultMachineFolder">default machine
1735 settings folder</link> will be used as a base folder for the created
1736 machine. Otherwise the given base folder will be used. In either case,
1737 the full path to the resulting settings file has the following
1738 structure:
1739 <pre>
1740 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1741 </pre>
1742
1743 Note that if the resulting settings file already exists, this method
1744 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1745
1746 Optionally, you may specify an UUID of to assign to the created machine.
1747 However, this is not recommended and you should normally pass an empty
1748 (@c null) UUID to this method so that a new UUID will be automatically
1749 generated for every created machine. You can use UUID
1750 00000000-0000-0000-0000-000000000000 as @c null value.
1751
1752 <note>
1753 There is no way to change the name of the settings file or
1754 subfolder of the created machine directly.
1755 </note>
1756
1757 <result name="VBOX_E_OBJECT_NOT_FOUND">
1758 @a osTypeId is invalid.
1759 </result>
1760 <result name="VBOX_E_FILE_ERROR">
1761 Resulting settings file name is invalid or the settings file already
1762 exists or could not be created due to an I/O error.
1763 </result>
1764 <result name="E_INVALIDARG">
1765 @a name is empty or @c null.
1766 </result>
1767 </desc>
1768
1769 <param name="name" type="wstring" dir="in">
1770 <desc>Machine name.</desc>
1771 </param>
1772 <param name="osTypeId" type="wstring" dir="in">
1773 <desc>Guest OS Type ID.</desc>
1774 </param>
1775 <param name="baseFolder" type="wstring" dir="in">
1776 <desc>Base machine folder (optional).</desc>
1777 </param>
1778 <param name="id" type="uuid" mod="string" dir="in">
1779 <desc>Machine UUID (optional).</desc>
1780 </param>
1781 <param name="machine" type="IMachine" dir="return">
1782 <desc>Created machine object.</desc>
1783 </param>
1784 </method>
1785
1786 <method name="createLegacyMachine">
1787 <desc>
1788 Creates a new virtual machine in "legacy" mode, using the specified
1789 settings file to store machine settings.
1790
1791 As opposed to machines created by <link to="#createMachine"/>,
1792 the settings file of the machine created in "legacy" mode is not
1793 automatically renamed when the machine name is changed -- it will always
1794 remain the same as specified in this method call.
1795
1796 The specified settings file name can be absolute (full path) or relative
1797 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1798 directory</link>. If the file name doesn't contain an extension, the
1799 default extension (.xml) will be appended.
1800
1801 Note that the configuration of the newly created machine is not
1802 saved to disk (and therefore no settings file is created)
1803 until <link to="IMachine::saveSettings"/> is called. If the
1804 specified settings file already exists, this method
1805 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1806
1807 See <link to="#createMachine"/> for more information.
1808
1809 @deprecated This method may be removed later. Use <link
1810 to="IVirtualBox::createMachine"/> instead.
1811
1812 <note>
1813 There is no way to change the name of the settings file
1814 of the machine created in "legacy" mode.
1815 </note>
1816
1817 <result name="VBOX_E_OBJECT_NOT_FOUND">
1818 @a osTypeId is invalid.
1819 </result>
1820 <result name="VBOX_E_FILE_ERROR">
1821 @a settingsFile is invalid or the settings file already exists or
1822 could not be created due to an I/O error.
1823 </result>
1824 <result name="E_INVALIDARG">
1825 @a name or @a settingsFile is empty or @c null.
1826 </result>
1827 </desc>
1828
1829 <param name="name" type="wstring" dir="in">
1830 <desc>Machine name.</desc>
1831 </param>
1832 <param name="osTypeId" type="wstring" dir="in">
1833 <desc>Machine OS Type ID.</desc>
1834 </param>
1835 <param name="settingsFile" type="wstring" dir="in">
1836 <desc>Name of the machine settings file.</desc>
1837 </param>
1838 <param name="id" type="uuid" mod="string" dir="in">
1839 <desc>Machine UUID (optional).</desc>
1840 </param>
1841 <param name="machine" type="IMachine" dir="return">
1842 <desc>Created machine object.</desc>
1843 </param>
1844 </method>
1845
1846 <method name="openMachine">
1847 <desc>
1848 Opens a virtual machine from the existing settings file.
1849 The opened machine remains unregistered until you call
1850 <link to="#registerMachine"/>.
1851
1852 The specified settings file name can be absolute
1853 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1854 VirtualBox home directory</link>. This file must exist
1855 and must be a valid machine settings file whose contents
1856 will be used to construct the machine object.
1857
1858 @deprecated Will be removed soon.
1859 <result name="VBOX_E_FILE_ERROR">
1860 Settings file name invalid, not found or sharing violation.
1861 </result>
1862 </desc>
1863 <param name="settingsFile" type="wstring" dir="in">
1864 <desc>
1865 Name of the machine settings file.
1866 </desc>
1867 </param>
1868 <param name="machine" type="IMachine" dir="return">
1869 <desc>Opened machine object.</desc>
1870 </param>
1871 <note>
1872 <link to="IMachine::settingsModified"/> will return
1873 @c false for the created machine, until any of machine settings
1874 are changed.
1875 </note>
1876 </method>
1877
1878 <method name="registerMachine">
1879 <desc>
1880
1881 Registers the machine previously created using
1882 <link to="#createMachine"/> or opened using
1883 <link to="#openMachine"/> within this VirtualBox installation. After
1884 successful method invocation, the
1885 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1886 to all registered callbacks.
1887
1888 <note>
1889 This method implicitly calls <link to="IMachine::saveSettings"/>
1890 to save all current machine settings before registering it.
1891 </note>
1892
1893 <result name="VBOX_E_OBJECT_NOT_FOUND">
1894 No matching virtual machine found.
1895 </result>
1896 <result name="VBOX_E_INVALID_OBJECT_STATE">
1897 Virtual machine was not created within this VirtualBox instance.
1898 </result>
1899
1900 </desc>
1901 <param name="machine" type="IMachine" dir="in"/>
1902 </method>
1903
1904 <method name="getMachine">
1905 <desc>
1906 Attempts to find a virtual machine given its UUID.
1907 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1908 instead.
1909
1910 <result name="VBOX_E_OBJECT_NOT_FOUND">
1911 Could not find registered machine matching @a id.
1912 </result>
1913
1914 </desc>
1915 <param name="id" type="uuid" mod="string" dir="in"/>
1916 <param name="machine" type="IMachine" dir="return"/>
1917 </method>
1918
1919 <method name="findMachine">
1920 <desc>
1921 Attempts to find a virtual machine given its name.
1922 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1923 instead.
1924
1925 <result name="VBOX_E_OBJECT_NOT_FOUND">
1926 Could not find registered machine matching @a name.
1927 </result>
1928
1929 </desc>
1930 <param name="name" type="wstring" dir="in"/>
1931 <param name="machine" type="IMachine" dir="return"/>
1932 </method>
1933
1934 <method name="unregisterMachine">
1935 <desc>
1936
1937 Unregisters the machine previously registered using
1938 <link to="#registerMachine"/>. After successful method invocation, the
1939 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1940 to all registered callbacks.
1941
1942 <note>
1943 The specified machine must not be in the Saved state, have an open
1944 (or a spawning) direct session associated with it, have snapshots or
1945 have hard disks attached.
1946 </note>
1947
1948 <note>
1949 This method implicitly calls <link to="IMachine::saveSettings"/> to
1950 save all current machine settings before unregistering it.
1951 </note>
1952
1953 <note>
1954 If the given machine is inaccessible (see
1955 <link to="IMachine::accessible"/>), it will be unregistered and
1956 fully uninitialized right afterwards. As a result, the returned
1957 machine object will be unusable and an attempt to call
1958 <b>any</b> method will return the "Object not ready" error.
1959 </note>
1960
1961 <result name="VBOX_E_OBJECT_NOT_FOUND">
1962 Could not find registered machine matching @a id.
1963 </result>
1964 <result name="VBOX_E_INVALID_VM_STATE">
1965 Machine is in Saved state.
1966 </result>
1967 <result name="VBOX_E_INVALID_OBJECT_STATE">
1968 Machine has snapshot or open session or hard disk attached.
1969 </result>
1970
1971 </desc>
1972 <param name="id" type="uuid" mod="string" dir="in">
1973 <desc>UUID of the machine to unregister.</desc>
1974 </param>
1975 <param name="machine" type="IMachine" dir="return">
1976 <desc>Unregistered machine object.</desc>
1977 </param>
1978 </method>
1979
1980 <method name="createAppliance">
1981 <desc>
1982 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1983 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1984 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1985 </desc>
1986 <param name="appliance" type="IAppliance" dir="return">
1987 <desc>New appliance.</desc>
1988 </param>
1989 </method>
1990
1991 <method name="createHardDisk">
1992 <desc>
1993 Creates a new base medium object that will use the given storage
1994 format and location for medium data.
1995
1996 Note that the actual storage unit is not created by this method. In
1997 order to do it, and before you are able to attach the created medium
1998 to virtual machines, you must call one of the following methods to
1999 allocate a format-specific storage unit at the specified location:
2000 <ul>
2001 <li><link to="IMedium::createBaseStorage"/></li>
2002 <li><link to="IMedium::createDiffStorage"/></li>
2003 </ul>
2004
2005 Some medium attributes, such as <link to="IMedium::id"/>, may
2006 remain uninitialized until the medium storage unit is successfully
2007 created by one of the above methods.
2008
2009 After the storage unit is successfully created, the medium gets
2010 remembered by this VirtualBox installation and will be accessible
2011 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2012 methods. Remembered base medium are also returned as part of
2013 the <link to="#hardDisks"/> array. See IMedium for more details.
2014
2015 The list of all storage formats supported by this VirtualBox
2016 installation can be obtained using
2017 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2018 attribute is empty or @c null then the default storage format
2019 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2020 be used for creating a storage unit of the medium.
2021
2022 Note that the format of the location string is storage format specific.
2023 See <link to="IMedium::location"/>, IMedium and
2024 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2025
2026 <result name="VBOX_E_OBJECT_NOT_FOUND">
2027 @a format identifier is invalid. See
2028 <link to="ISystemProperties::mediumFormats"/>.
2029 </result>
2030 <result name="VBOX_E_FILE_ERROR">
2031 @a location is a not valid file name (for file-based formats only).
2032 </result>
2033 </desc>
2034 <param name="format" type="wstring" dir="in">
2035 <desc>
2036 Identifier of the storage format to use for the new medium.
2037 </desc>
2038 </param>
2039 <param name="location" type="wstring" dir="in">
2040 <desc>
2041 Location of the storage unit for the new medium.
2042 </desc>
2043 </param>
2044 <param name="medium" type="IMedium" dir="return">
2045 <desc>Created medium object.</desc>
2046 </param>
2047 </method>
2048
2049 <method name="openHardDisk">
2050 <desc>
2051 Opens a medium from an existing location, optionally replacing
2052 the image UUID and/or parent UUID.
2053
2054 After the medium is successfully opened by this method, it gets
2055 remembered by (known to) this VirtualBox installation and will be
2056 accessible through <link to="#getHardDisk"/> and
2057 <link to="#findHardDisk"/> methods. Remembered base media
2058 are also returned as part of the <link to="#hardDisks"/> array and can
2059 be attached to virtual machines. See IMedium for more details.
2060
2061 If a differencing medium is to be opened by this method, the
2062 operation will succeed only if its parent medium and all ancestors,
2063 if any, are already known to this VirtualBox installation (for example,
2064 were opened by this method before).
2065
2066 This method tries to guess the storage format of the specified medium
2067 by reading medium data at the specified location.
2068
2069 If @a write is ReadWrite (which it should be), the image is opened for
2070 read/write access and must have according permissions, as VirtualBox
2071 may actually write status information into the disk's metadata sections.
2072
2073 Note that write access is required for all typical image usage in VirtualBox,
2074 since VirtualBox may need to write metadata such as a UUID into the image.
2075 The only exception is opening a source image temporarily for copying and
2076 cloning when the image will quickly be closed again.
2077
2078 Note that the format of the location string is storage format specific.
2079 See <link to="IMedium::location"/>, IMedium and
2080 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2081
2082 <result name="VBOX_E_FILE_ERROR">
2083 Invalid medium storage file location or could not find the medium
2084 at the specified location.
2085 </result>
2086 <result name="VBOX_E_IPRT_ERROR">
2087 Could not get medium storage format.
2088 </result>
2089 <result name="E_INVALIDARG">
2090 Invalid medium storage format.
2091 </result>
2092
2093 </desc>
2094 <param name="location" type="wstring" dir="in">
2095 <desc>
2096 Location of the storage unit that contains medium data in one of
2097 the supported storage formats.
2098 </desc>
2099 </param>
2100 <param name="accessMode" type="AccessMode" dir="in">
2101 <desc>
2102 Determines whether to open the image in read/write or read-only mode.
2103 </desc>
2104 </param>
2105 <param name="setImageId" type="boolean" dir="in">
2106 <desc>
2107 Select whether a new image UUID is set or not.
2108 </desc>
2109 </param>
2110 <param name="imageId" type="uuid" mod="string" dir="in">
2111 <desc>
2112 New UUID for the image. If an empty string is passed, then a new
2113 UUID is automatically created. Specifying a zero UUIDs is not valid.
2114 </desc>
2115 </param>
2116 <param name="setParentId" type="boolean" dir="in">
2117 <desc>
2118 Select whether a new parent UUID is set or not.
2119 </desc>
2120 </param>
2121 <param name="parentId" type="uuid" mod="string" dir="in">
2122 <desc>
2123 New parent UUID for the image. If an empty string is passed, then a
2124 new UUID is automatically created, provided @a setParentId is
2125 @c true. A zero UUID is valid.
2126 </desc>
2127 </param>
2128 <param name="medium" type="IMedium" dir="return">
2129 <desc>Opened medium object.</desc>
2130 </param>
2131 </method>
2132
2133 <method name="getHardDisk" const="yes">
2134 <desc>
2135 Returns a medium with the given UUID.
2136
2137 The medium with the given UUID must be known to this VirtualBox
2138 installation, i.e. it must be previously created by
2139 <link to="#createHardDisk"/> or opened by <link
2140 to="#openHardDisk"/>, or attached to some known virtual machine.
2141
2142 <result name="VBOX_E_OBJECT_NOT_FOUND">
2143 No medium object matching @a id found.
2144 </result>
2145
2146 </desc>
2147 <param name="id" type="uuid" mod="string" dir="in">
2148 <desc>UUID of the medium to look for.</desc>
2149 </param>
2150 <param name="medium" type="IMedium" dir="return">
2151 <desc>Found medium object.</desc>
2152 </param>
2153 </method>
2154
2155 <method name="findHardDisk">
2156 <desc>
2157 Returns a medium that uses the given location to store medium data.
2158
2159 The given medium must be known to this VirtualBox installation, i.e.
2160 it must be previously created by
2161 <link to="#createHardDisk"/> or opened by <link
2162 to="#openHardDisk"/>, or attached to some known virtual machine.
2163
2164 The search is done by comparing the value of the @a location argument to
2165 the <link to="IMedium::location"/> attribute of each known medium.
2166
2167 For locations represented by file names in the host's file system, the
2168 requested location can be a path relative to the
2169 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2170 only a file name without any path is given, the
2171 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2172 folder</link> will be prepended to the file name before searching. Note
2173 that on case sensitive file systems, a case sensitive comparison is
2174 performed, otherwise the case of symbols in the file path is ignored.
2175
2176 <result name="VBOX_E_OBJECT_NOT_FOUND">
2177 No medium object matching @a location found.
2178 </result>
2179
2180 </desc>
2181 <param name="location" type="wstring" dir="in">
2182 <desc>Location string to search for.</desc>
2183 </param>
2184 <param name="medium" type="IMedium" dir="return">
2185 <desc>Found medium object.</desc>
2186 </param>
2187 </method>
2188
2189 <method name="openDVDImage">
2190 <desc>
2191 Opens a CD/DVD image contained in the specified file of the supported
2192 format and assigns it the given UUID.
2193
2194 After the image is successfully opened by this method, it gets
2195 remembered by (known to) this VirtualBox installation and will be
2196 accessible through <link to="#getDVDImage"/> and
2197 <link to="#findDVDImage"/> methods. Remembered images are also
2198 returned as part of the <link to="#DVDImages"/> array and can be mounted
2199 to virtual machines. See IMedium for more details.
2200
2201 See <link to="IMedium::location"/> to get more details about the format
2202 of the location string.
2203
2204 <note>
2205 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2206 </note>
2207
2208 <result name="VBOX_E_FILE_ERROR">
2209 Invalid CD/DVD image file location or could not find the CD/DVD
2210 image at the specified location.
2211 </result>
2212 <result name="VBOX_E_INVALID_OBJECT_STATE">
2213 CD/DVD image already exists in the media registry.
2214 </result>
2215
2216 </desc>
2217 <param name="location" type="wstring" dir="in">
2218 <desc>
2219 Full path to the file that contains a valid CD/DVD image.
2220 </desc>
2221 </param>
2222 <param name="id" type="uuid" mod="string" dir="in">
2223 <desc>
2224 UUID to assign to the given image within this VirtualBox installation.
2225 If an empty (@c null) UUID is specified, the system will randomly
2226 generate a new UUID.
2227 </desc>
2228 </param>
2229 <param name="image" type="IMedium" dir="return">
2230 <desc>Opened CD/DVD image object.</desc>
2231 </param>
2232 </method>
2233
2234 <method name="getDVDImage">
2235 <desc>
2236 Returns a CD/DVD image with the given UUID.
2237
2238 The image with the given UUID must be known to this VirtualBox
2239 installation, i.e. it must be previously opened by <link
2240 to="#openDVDImage"/>, or mounted to some known virtual machine.
2241
2242 <result name="VBOX_E_OBJECT_NOT_FOUND">
2243 No matching DVD image found in the media registry.
2244 </result>
2245
2246 </desc>
2247 <param name="id" type="uuid" mod="string" dir="in">
2248 <desc>UUID of the image to look for.</desc>
2249 </param>
2250 <param name="image" type="IMedium" dir="return">
2251 <desc>Found CD/DVD image object.</desc>
2252 </param>
2253 </method>
2254
2255 <method name="findDVDImage">
2256 <desc>
2257 Returns a CD/DVD image with the given image location.
2258
2259 The image with the given UUID must be known to this VirtualBox
2260 installation, i.e. it must be previously opened by <link
2261 to="#openDVDImage"/>, or mounted to some known virtual machine.
2262
2263 The search is done by comparing the value of the @a location argument to
2264 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2265
2266 The requested location can be a path relative to the
2267 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2268 only a file name without any path is given, the
2269 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2270 folder</link> will be prepended to the file name before searching. Note
2271 that on case sensitive file systems, a case sensitive comparison is
2272 performed, otherwise the case in the file path is ignored.
2273
2274 <result name="VBOX_E_FILE_ERROR">
2275 Invalid image file location.
2276 </result>
2277 <result name="VBOX_E_OBJECT_NOT_FOUND">
2278 No matching DVD image found in the media registry.
2279 </result>
2280
2281 </desc>
2282 <param name="location" type="wstring" dir="in">
2283 <desc>CD/DVD image file path to look for.</desc>
2284 </param>
2285 <param name="image" type="IMedium" dir="return">
2286 <desc>Found CD/DVD image object.</desc>
2287 </param>
2288 </method>
2289
2290 <method name="openFloppyImage">
2291 <desc>
2292 Opens a floppy 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="#getFloppyImage"/> and
2298 <link to="#findFloppyImage"/> methods. Remembered images are also
2299 returned as part of the <link to="#floppyImages"/> array and can be
2300 mounted 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 <result name="VBOX_E_FILE_ERROR">
2306 Invalid floppy image file location or could not find the floppy
2307 image at the specified location.
2308 </result>
2309 <result name="VBOX_E_INVALID_OBJECT_STATE">
2310 Floppy image already exists in the media registry.
2311 </result>
2312
2313 <note>
2314 Currently, only raw floppy images are supported by VirtualBox.
2315 </note>
2316 </desc>
2317 <param name="location" type="wstring" dir="in">
2318 <desc>
2319 Full path to the file that contains a valid floppy image.
2320 </desc>
2321 </param>
2322 <param name="id" type="uuid" mod="string" dir="in">
2323 <desc>
2324 UUID to assign to the given image file within this VirtualBox
2325 installation. If an empty (@c null) UUID is specified, the system will
2326 randomly generate a new UUID.
2327 </desc>
2328 </param>
2329 <param name="image" type="IMedium" dir="return">
2330 <desc>Opened floppy image object.</desc>
2331 </param>
2332 </method>
2333
2334 <method name="getFloppyImage">
2335 <desc>
2336 Returns a floppy image with the given UUID.
2337
2338 The image with the given UUID must be known to this VirtualBox
2339 installation, i.e. it must be previously opened by <link
2340 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2341
2342 <result name="VBOX_E_OBJECT_NOT_FOUND">
2343 No matching floppy image found in the media registry.
2344 </result>
2345
2346 </desc>
2347 <param name="id" type="uuid" mod="string" dir="in">
2348 <desc>UUID of the image to look for.</desc>
2349 </param>
2350 <param name="image" type="IMedium" dir="return">
2351 <desc>Found floppy image object.</desc>
2352 </param>
2353 </method>
2354
2355 <method name="findFloppyImage">
2356 <desc>
2357 Returns a floppy image with the given image location.
2358
2359 The image with the given UUID must be known to this VirtualBox
2360 installation, i.e. it must be previously opened by <link
2361 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2362
2363 The search is done by comparing the value of the @a location argument to
2364 the <link to="IMedium::location"/> attribute of each known floppy image.
2365
2366 The requested location can be a path relative to the
2367 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2368 only a file name without any path is given, the
2369 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2370 folder</link> will be prepended to the file name before searching. Note
2371 that on case sensitive file systems, a case sensitive comparison is
2372 performed, otherwise the case of symbols in the file path is ignored.
2373
2374 <result name="VBOX_E_FILE_ERROR">
2375 Invalid image file location.
2376 </result>
2377 <result name="VBOX_E_OBJECT_NOT_FOUND">
2378 No matching floppy image found in the media registry.
2379 </result>
2380
2381 </desc>
2382 <param name="location" type="wstring" dir="in">
2383 <desc>Floppy image file path to look for.</desc>
2384 </param>
2385 <param name="image" type="IMedium" dir="return">
2386 <desc>Found floppy image object.</desc>
2387 </param>
2388 </method>
2389
2390 <method name="getGuestOSType">
2391 <desc>
2392 Returns an object describing the specified guest OS type.
2393
2394 The requested guest OS type is specified using a string which is a
2395 mnemonic identifier of the guest operating system, such as
2396 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2397 particular virtual machine can be read or set using the
2398 <link to="IMachine::OSTypeId"/> attribute.
2399
2400 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2401 available guest OS type objects. Each object has an
2402 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2403 the guest OS this object describes.
2404
2405 <result name="E_INVALIDARG">
2406 @a id is not a valid Guest OS type.
2407 </result>
2408
2409 </desc>
2410 <param name="id" type="uuid" mod="string" dir="in">
2411 <desc>Guest OS type ID string.</desc>
2412 </param>
2413 <param name="type" type="IGuestOSType" dir="return">
2414 <desc>Guest OS type object.</desc>
2415 </param>
2416 </method>
2417
2418 <method name="createSharedFolder">
2419 <desc>
2420 Creates a new global shared folder by associating the given logical
2421 name with the given host path, adds it to the collection of shared
2422 folders and starts sharing it. Refer to the description of
2423 <link to="ISharedFolder"/> to read more about logical names.
2424 <note>
2425 In the current implementation, this operation is not
2426 implemented.
2427 </note>
2428 </desc>
2429 <param name="name" type="wstring" dir="in">
2430 <desc>Unique logical name of the shared folder.</desc>
2431 </param>
2432 <param name="hostPath" type="wstring" dir="in">
2433 <desc>Full path to the shared folder in the host file system.</desc>
2434 </param>
2435 <param name="writable" type="boolean" dir="in">
2436 <desc>Whether the share is writable or readonly</desc>
2437 </param>
2438 </method>
2439
2440 <method name="removeSharedFolder">
2441 <desc>
2442 Removes the global shared folder with the given name previously
2443 created by <link to="#createSharedFolder"/> from the collection of
2444 shared folders and stops sharing it.
2445 <note>
2446 In the current implementation, this operation is not
2447 implemented.
2448 </note>
2449 </desc>
2450 <param name="name" type="wstring" dir="in">
2451 <desc>Logical name of the shared folder to remove.</desc>
2452 </param>
2453 </method>
2454
2455 <method name="getExtraDataKeys">
2456 <desc>
2457 Returns an array representing the global extra data keys which currently
2458 have values defined.
2459 </desc>
2460 <param name="value" type="wstring" dir="return" safearray="yes">
2461 <desc>Array of extra data keys.</desc>
2462 </param>
2463 </method>
2464
2465 <method name="getExtraData">
2466 <desc>
2467 Returns associated global extra data.
2468
2469 If the requested data @a key does not exist, this function will
2470 succeed and return an empty string in the @a value argument.
2471
2472 <result name="VBOX_E_FILE_ERROR">
2473 Settings file not accessible.
2474 </result>
2475 <result name="VBOX_E_XML_ERROR">
2476 Could not parse the settings file.
2477 </result>
2478
2479 </desc>
2480 <param name="key" type="wstring" dir="in">
2481 <desc>Name of the data key to get.</desc>
2482 </param>
2483 <param name="value" type="wstring" dir="return">
2484 <desc>Value of the requested data key.</desc>
2485 </param>
2486 </method>
2487
2488 <method name="setExtraData">
2489 <desc>
2490 Sets associated global extra data.
2491
2492 If you pass @c null or empty string as a key @a value, the given @a key
2493 will be deleted.
2494
2495 <note>
2496 Before performing the actual data change, this method will ask all
2497 registered callbacks using the
2498 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2499 notification for a permission. If one of the callbacks refuses the
2500 new value, the change will not be performed.
2501 </note>
2502 <note>
2503 On success, the
2504 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2505 is called to inform all registered callbacks about a successful data
2506 change.
2507 </note>
2508
2509 <result name="VBOX_E_FILE_ERROR">
2510 Settings file not accessible.
2511 </result>
2512 <result name="VBOX_E_XML_ERROR">
2513 Could not parse the settings file.
2514 </result>
2515 <result name="E_ACCESSDENIED">
2516 Modification request refused.
2517 </result>
2518
2519 </desc>
2520 <param name="key" type="wstring" dir="in">
2521 <desc>Name of the data key to set.</desc>
2522 </param>
2523 <param name="value" type="wstring" dir="in">
2524 <desc>Value to assign to the key.</desc>
2525 </param>
2526 </method>
2527
2528 <method name="openSession">
2529 <desc>
2530 Opens a new direct session with the given virtual machine.
2531
2532 A direct session acts as a local lock on the given VM.
2533 There can be only one direct session open at a time for every
2534 virtual machine, protecting the VM from being manipulated by
2535 conflicting actions from different processes. Only after a
2536 direct session has been opened, one can change all VM settings
2537 and execute the VM in the process space of the session object.
2538
2539 Sessions therefore can be compared to mutex semaphores that
2540 lock a given VM for modification and execution.
2541 See <link to="ISession">ISession</link> for details.
2542
2543 <note>Unless you are writing a new VM frontend, you will not
2544 want to execute a VM in the current process. To spawn a new
2545 process that executes a VM, use
2546 <link to="IVirtualBox::openRemoteSession" />
2547 instead.</note>
2548
2549 Upon successful return, the session object can be used to
2550 get access to the machine and to the VM console.
2551
2552 In VirtualBox terminology, the machine becomes "mutable" after
2553 a session has been opened. Note that the "mutable" machine
2554 object, on which you may invoke IMachine methods to change its
2555 settings, will be a different object from the immutable IMachine
2556 objects returned by various IVirtualBox methods. To obtain a
2557 mutable IMachine object (upon which you can invoke settings methods),
2558 use the <link to="ISession::machine" /> attribute.
2559
2560 One must always call <link to="ISession::close" /> to release the
2561 lock on the machine, or the machine's state will eventually be
2562 set to "Aborted".
2563
2564 In other words, to change settings on a machine, the following
2565 sequence is typically performed:
2566
2567 <ol>
2568 <li>Call this method (openSession) to have a machine locked for
2569 the current session.</li>
2570
2571 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2572
2573 <li>Change the settings of the machine.</li>
2574
2575 <li>Call <link to="IMachine::saveSettings" />.</li>
2576
2577 <li>Close the session by calling <link to="ISession::close"/>.</li>
2578 </ol>
2579
2580 <result name="E_UNEXPECTED">
2581 Virtual machine not registered.
2582 </result>
2583 <result name="E_ACCESSDENIED">
2584 Process not started by OpenRemoteSession.
2585 </result>
2586 <result name="VBOX_E_OBJECT_NOT_FOUND">
2587 No matching virtual machine found.
2588 </result>
2589 <result name="VBOX_E_INVALID_OBJECT_STATE">
2590 Session already open or being opened.
2591 </result>
2592 <result name="VBOX_E_VM_ERROR">
2593 Failed to assign machine to session.
2594 </result>
2595
2596 </desc>
2597 <param name="session" type="ISession" dir="in">
2598 <desc>
2599 Session object that will represent the opened session after
2600 successful method invocation. This object must not represent
2601 the already open session.
2602 <note>
2603 This session will be automatically closed if the
2604 VirtualBox server is terminated for some reason.
2605 </note>
2606 </desc>
2607 </param>
2608 <param name="machineId" type="uuid" mod="string" dir="in">
2609 <desc>ID of the virtual machine to open a session with.</desc>
2610 </param>
2611 </method>
2612
2613 <method name="openRemoteSession">
2614 <desc>
2615 Spawns a new process that executes a virtual machine (called a
2616 "remote session").
2617
2618 Opening a remote session causes the VirtualBox server to start a new
2619 process that opens a direct session with the given VM. As a result, the
2620 VM is locked by that direct session in the new process, preventing
2621 conflicting changes from other processes. Since sessions act as locks
2622 that prevent conflicting changes, one cannot open a remote session
2623 for a VM that already has another open session (direct or remote), or
2624 is currently in the process of opening one (see <link
2625 to="IMachine::sessionState"/>).
2626
2627 While the remote session still provides some level of control over the
2628 VM execution to the caller (using the <link to="IConsole" /> interface),
2629 not all VM settings are available for modification within the remote
2630 session context.
2631
2632 This operation can take some time (a new VM is started in a new process,
2633 for which memory and other resources need to be set up). Because of this,
2634 an <link to="IProgress" /> is returned to allow the caller to wait for this
2635 asynchronous operation to be completed. Until then, the remote session
2636 object remains in the closed state, and accessing the machine or its
2637 console through it is invalid. It is recommended to use
2638 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2639 completion.
2640
2641 As with all <link to="ISession" /> objects, it is recommended to call
2642 <link to="ISession::close" /> on the local session object once openRemoteSession()
2643 has been called. However, the session's state (see <link to="ISession::state" />)
2644 will not return to "Closed" until the remote session has also closed (i.e.
2645 until the VM is no longer running). In that case, however, the state of
2646 the session will automatically change back to "Closed".
2647
2648 Currently supported session types (values of the @a type
2649 argument) are:
2650 <ul>
2651 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2652 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2653 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2654 </ul>
2655
2656 The @a environment argument is a string containing definitions of
2657 environment variables in the following format:
2658 @code
2659 NAME[=VALUE]\n
2660 NAME[=VALUE]\n
2661 ...
2662 @endcode
2663 where <tt>\\n</tt> is the new line character. These environment
2664 variables will be appended to the environment of the VirtualBox server
2665 process. If an environment variable exists both in the server process
2666 and in this list, the value from this list takes precedence over the
2667 server's variable. If the value of the environment variable is
2668 omitted, this variable will be removed from the resulting environment.
2669 If the environment string is @c null or empty, the server environment
2670 is inherited by the started process as is.
2671
2672 <see>openExistingSession</see>
2673
2674 <result name="E_UNEXPECTED">
2675 Virtual machine not registered.
2676 </result>
2677 <result name="E_INVALIDARG">
2678 Invalid session type @a type.
2679 </result>
2680 <result name="VBOX_E_OBJECT_NOT_FOUND">
2681 No machine matching @a machineId found.
2682 </result>
2683 <result name="VBOX_E_INVALID_OBJECT_STATE">
2684 Session already open or being opened.
2685 </result>
2686 <result name="VBOX_E_IPRT_ERROR">
2687 Launching process for machine failed.
2688 </result>
2689 <result name="VBOX_E_VM_ERROR">
2690 Failed to assign machine to session.
2691 </result>
2692
2693 </desc>
2694 <param name="session" type="ISession" dir="in">
2695 <desc>
2696 Session object that will represent the opened remote session
2697 after successful method invocation (this object must not
2698 represent an already open session).
2699 </desc>
2700 </param>
2701 <param name="machineId" type="uuid" mod="string" dir="in">
2702 <desc>ID of the virtual machine to open a session with.</desc>
2703 </param>
2704 <param name="type" type="wstring" dir="in">
2705 <desc>
2706 Type of the remote session (case sensitive).
2707 </desc>
2708 </param>
2709 <param name="environment" type="wstring" dir="in">
2710 <desc>
2711 Environment to pass to the opened session.
2712 </desc>
2713 </param>
2714 <param name="progress" type="IProgress" dir="return">
2715 <desc>Progress object to track the operation completion.</desc>
2716 </param>
2717 </method>
2718
2719 <method name="openExistingSession">
2720 <desc>
2721 Opens a new remote session with the virtual machine for
2722 which a direct session is already open.
2723
2724 The remote session provides some level of control over the VM
2725 execution (using the IConsole interface) to the caller; however,
2726 within the remote session context, not all VM settings are available
2727 for modification.
2728
2729 As opposed to <link to="#openRemoteSession"/>, the number of
2730 remote sessions opened this way is not limited by the API
2731
2732 <note>
2733 It is an error to open a remote session with the machine that
2734 doesn't have an open direct session.
2735 </note>
2736
2737 <result name="E_UNEXPECTED">
2738 Virtual machine not registered.
2739 </result>
2740 <result name="VBOX_E_OBJECT_NOT_FOUND">
2741 No machine matching @a machineId found.
2742 </result>
2743 <result name="VBOX_E_INVALID_OBJECT_STATE">
2744 Session already open or being opened.
2745 </result>
2746 <result name="VBOX_E_INVALID_SESSION_STATE">
2747 Direct session state not Open.
2748 </result>
2749 <result name="VBOX_E_VM_ERROR">
2750 Failed to get console object from direct session or assign
2751 machine to session.
2752 </result>
2753
2754 <see>openRemoteSession</see>
2755 </desc>
2756 <param name="session" type="ISession" dir="in">
2757 <desc>
2758 Session object that will represent the open remote session
2759 after successful method invocation. This object must not
2760 represent an already open session.
2761 <note>
2762 This session will be automatically closed when the peer
2763 (direct) session dies or gets closed.
2764 </note>
2765 </desc>
2766 </param>
2767 <param name="machineId" type="uuid" mod="string" dir="in">
2768 <desc>ID of the virtual machine to open a session with.</desc>
2769 </param>
2770 </method>
2771
2772 <method name="registerCallback">
2773 <desc>
2774 Registers a new global VirtualBox callback. The methods of the given
2775 callback object will be called by VirtualBox when an appropriate
2776 event occurs.
2777
2778 <result name="E_INVALIDARG">
2779 A @c null callback cannot be registered.
2780 </result>
2781
2782 </desc>
2783 <param name="callback" type="IVirtualBoxCallback" dir="in">
2784 <desc>Callback object to register.</desc>
2785 </param>
2786 </method>
2787
2788 <method name="unregisterCallback">
2789 <desc>
2790 Unregisters the previously registered global VirtualBox callback.
2791
2792 <result name="E_INVALIDARG">
2793 Specified @a callback not registered.
2794 </result>
2795
2796 </desc>
2797 <param name="callback" type="IVirtualBoxCallback" dir="in">
2798 <desc>Callback object to unregister.</desc>
2799 </param>
2800 </method>
2801
2802 <method name="waitForPropertyChange">
2803 <desc>
2804 Blocks the caller until any of the properties represented by the
2805 @a what argument changes the value or until the given timeout interval
2806 expires.
2807
2808 The @a what argument is a comma separated list of property masks that
2809 describe properties the caller is interested in. The property mask is
2810 a string in the following format:
2811
2812 <pre>
2813 [[group.]subgroup.]name
2814 </pre>
2815
2816 where @c name is the property name and @c group, @c subgroup are zero
2817 or more property group specifiers. Each element (group or name) in
2818 the property mask may be either a Latin string or an asterisk symbol
2819 (@c "*") which is used to match any string for the given element. A
2820 property mask that doesn't contain asterisk symbols represents a
2821 single fully qualified property name.
2822
2823 Groups in the fully qualified property name go from more generic (the
2824 left-most part) to more specific (the right-most part). The first
2825 element is usually a name of the object the property belongs to. The
2826 second element may be either a property name, or a child object name,
2827 or an index if the preceding element names an object which is one of
2828 many objects of the same type. This way, property names form a
2829 hierarchy of properties. Here are some examples of property names:
2830
2831 <table>
2832 <tr>
2833 <td><tt>VirtualBox.version</tt></td>
2834 <td><link to="IVirtualBox::version"/> property</td>
2835 </tr>
2836 <tr>
2837 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2838 <td><link to="IMachine::name"/> property of the machine with the
2839 given UUID</td>
2840 </tr>
2841 </table>
2842
2843 Most property names directly correspond to the properties of objects
2844 (components) provided by the VirtualBox library and may be used to
2845 track changes to these properties. However, there may be
2846 pseudo-property names that don't correspond to any existing object's
2847 property directly, as well as there may be object properties that
2848 don't have a corresponding property name that is understood by this
2849 method, and therefore changes to such properties cannot be
2850 tracked. See individual object's property descriptions to get a
2851 fully qualified property name that can be used with this method (if
2852 any).
2853
2854 There is a special property mask @c "*" (i.e. a string consisting of a
2855 single asterisk symbol) that can be used to match all properties.
2856 Below are more examples of property masks:
2857
2858 <table>
2859 <tr>
2860 <td><tt>VirtualBox.*</tt></td>
2861 <td>Track all properties of the VirtualBox object</td>
2862 </tr>
2863 <tr>
2864 <td><tt>Machine.*.name</tt></td>
2865 <td>Track changes to the <link to="IMachine::name"/> property of
2866 all registered virtual machines</td>
2867 </tr>
2868 </table>
2869
2870 <note>
2871 This function is not implemented in the current version of the
2872 product.
2873 </note>
2874 </desc>
2875 <param name="what" type="wstring" dir="in">
2876 <desc>Comma separated list of property masks.</desc>
2877 </param>
2878 <param name="timeout" type="unsigned long" dir="in">
2879 <desc>
2880 Wait timeout in milliseconds.
2881 Specify -1 for an indefinite wait.
2882 </desc>
2883 </param>
2884 <param name="changed" type="wstring" dir="out">
2885 <desc>
2886 Comma separated list of properties that have been changed and caused
2887 this method to return to the caller.
2888 </desc>
2889 </param>
2890 <param name="values" type="wstring" dir="out">
2891 <desc>Reserved, not currently used.</desc>
2892 </param>
2893 </method>
2894
2895 <!--method name="createDHCPServerForInterface">
2896 <desc>
2897 Creates a dhcp server settings to be used for the given interface
2898 <result name="E_INVALIDARG">
2899 Host network interface @a name already exists.
2900 </result>
2901 </desc>
2902 <param name="interface" type="IHostNetworkInterface" dir="in">
2903 <desc>Network Interface</desc>
2904 </param>
2905 <param name="server" type="IDHCPServer" dir="out">
2906 <desc>Dhcp server settings</desc>
2907 </param>
2908 </method-->
2909
2910 <method name="createDHCPServer">
2911 <desc>
2912 Creates a dhcp server settings to be used for the given internal network name
2913 <result name="E_INVALIDARG">
2914 Host network interface @a name already exists.
2915 </result>
2916 </desc>
2917 <param name="name" type="wstring" dir="in">
2918 <desc>server name</desc>
2919 </param>
2920 <param name="server" type="IDHCPServer" dir="return">
2921 <desc>Dhcp server settings</desc>
2922 </param>
2923 </method>
2924
2925 <method name="findDHCPServerByNetworkName">
2926 <desc>
2927 Searches a dhcp server settings to be used for the given internal network name
2928 <result name="E_INVALIDARG">
2929 Host network interface @a name already exists.
2930 </result>
2931
2932 </desc>
2933 <param name="name" type="wstring" dir="in">
2934 <desc>server name</desc>
2935 </param>
2936 <param name="server" type="IDHCPServer" dir="return">
2937 <desc>Dhcp server settings</desc>
2938 </param>
2939 </method>
2940
2941 <!--method name="findDHCPServerForInterface">
2942 <desc>
2943 Searches a dhcp server settings to be used for the given interface
2944 <result name="E_INVALIDARG">
2945 Host network interface @a name already exists.
2946 </result>
2947 </desc>
2948 <param name="interface" type="IHostNetworkInterface" dir="in">
2949 <desc>Network Interface</desc>
2950 </param>
2951 <param name="server" type="IDHCPServer" dir="out">
2952 <desc>Dhcp server settings</desc>
2953 </param>
2954 </method-->
2955
2956 <method name="removeDHCPServer">
2957 <desc>
2958 Removes the dhcp server settings
2959 <result name="E_INVALIDARG">
2960 Host network interface @a name already exists.
2961 </result>
2962 </desc>
2963 <param name="server" type="IDHCPServer" dir="in">
2964 <desc>Dhcp server settings to be removed</desc>
2965 </param>
2966 </method>
2967
2968 </interface>
2969
2970 <!--
2971 // IVFSExplorer
2972 /////////////////////////////////////////////////////////////////////////
2973 -->
2974
2975 <enum
2976 name="VFSType"
2977 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2978 >
2979 <desc>
2980 Virtual file systems supported by VFSExplorer.
2981 </desc>
2982
2983 <const name="File" value="1" />
2984 <const name="Cloud" value="2" />
2985 <const name="S3" value="3" />
2986 <const name="WebDav" value="4" />
2987 </enum>
2988
2989 <enum
2990 name="VFSFileType"
2991 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2992 >
2993 <desc>
2994 File types known by VFSExplorer.
2995 </desc>
2996
2997 <const name="Unknown" value="1" />
2998 <const name="Fifo" value="2" />
2999 <const name="DevChar" value="3" />
3000 <const name="Directory" value="4" />
3001 <const name="DevBlock" value="5" />
3002 <const name="File" value="6" />
3003 <const name="SymLink" value="7" />
3004 <const name="Socket" value="8" />
3005 <const name="WhiteOut" value="9" />
3006 </enum>
3007
3008 <interface
3009 name="IVFSExplorer" extends="$unknown"
3010 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3011 wsmap="managed"
3012 >
3013 <desc>
3014 The VFSExplorer interface unifies access to different file system
3015 types. This includes local file systems as well remote file systems like
3016 S3. For a list of supported types see <link to="VFSType" />.
3017 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3018 </desc>
3019
3020 <attribute name="path" type="wstring" readonly="yes">
3021 <desc>Returns the current path in the virtual file system.</desc>
3022 </attribute>
3023
3024 <attribute name="type" type="VFSType" readonly="yes">
3025 <desc>Returns the file system type which is currently in use.</desc>
3026 </attribute>
3027
3028 <method name="update">
3029 <desc>Updates the internal list of files/directories from the
3030 current directory level. Use <link to="#entryList" /> to get the full list
3031 after a call to this method.</desc>
3032
3033 <param name="aProgress" type="IProgress" dir="return">
3034 <desc>Progress object to track the operation completion.</desc>
3035 </param>
3036 </method>
3037
3038 <method name="cd">
3039 <desc>Change the current directory level.</desc>
3040
3041 <param name="aDir" type="wstring" dir="in">
3042 <desc>The name of the directory to go in.</desc>
3043 </param>
3044
3045 <param name="aProgress" type="IProgress" dir="return">
3046 <desc>Progress object to track the operation completion.</desc>
3047 </param>
3048 </method>
3049
3050 <method name="cdUp">
3051 <desc>Go one directory upwards from the current directory level.</desc>
3052
3053 <param name="aProgress" type="IProgress" dir="return">
3054 <desc>Progress object to track the operation completion.</desc>
3055 </param>
3056 </method>
3057
3058 <method name="entryList">
3059 <desc>Returns a list of files/directories after a call to <link
3060 to="#update" />. The user is responsible for keeping this internal
3061 list up do date.</desc>
3062
3063 <param name="aNames" type="wstring" safearray="yes" dir="out">
3064 <desc>The list of names for the entries.</desc>
3065 </param>
3066
3067 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3068 <desc>The list of types for the entries.</desc>
3069 </param>
3070 </method>
3071
3072 <method name="exists">
3073 <desc>Checks if the given file list exists in the current directory
3074 level.</desc>
3075
3076 <param name="aNames" type="wstring" safearray="yes" dir="in">
3077 <desc>The names to check.</desc>
3078 </param>
3079
3080 <param name="aExists" type="wstring" safearray="yes" dir="return">
3081 <desc>The names which exist.</desc>
3082 </param>
3083 </method>
3084
3085 <method name="remove">
3086 <desc>Deletes the given files in the current directory level.</desc>
3087
3088 <param name="aNames" type="wstring" safearray="yes" dir="in">
3089 <desc>The names to remove.</desc>
3090 </param>
3091
3092 <param name="aProgress" type="IProgress" dir="return">
3093 <desc>Progress object to track the operation completion.</desc>
3094 </param>
3095 </method>
3096
3097 </interface>
3098
3099 <!--
3100 // IAppliance
3101 /////////////////////////////////////////////////////////////////////////
3102 -->
3103
3104 <interface
3105 name="IAppliance" extends="$unknown"
3106 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3107 wsmap="managed"
3108 >
3109 <desc>
3110 Represents a platform-independent appliance in OVF format. An instance of this is returned
3111 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3112 appliances with VirtualBox.
3113
3114 The OVF standard suggests two different physical file formats:
3115
3116 <ol>
3117 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3118 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3119 this descriptor file references other files, as OVF appliances distributed as a set of
3120 files most likely do, those files must be in the same directory as the descriptor file.</li>
3121
3122 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3123 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3124 files and optionally other files.
3125
3126 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3127 be added with a later version.</li>
3128 </ol>
3129
3130 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3131 <link to="IMachine" /> involves the following sequence of API calls:
3132
3133 <ol>
3134 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3135 </li>
3136
3137 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3138 would like to import. So long as this file is syntactically valid, this will succeed
3139 and return an instance of IAppliance that contains the parsed data from the OVF file.
3140 </li>
3141
3142 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3143 contents of the IAppliance attributes accordingly. These can be inspected by a
3144 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3145 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3146 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3147 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3148 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3149 The GUI can then give the user the option to confirm and/or change these suggestions.
3150 </li>
3151
3152 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3153 virtual system to override the suggestions made by the interpret() routine.
3154 </li>
3155
3156 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3157 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3158 virtual system descriptions.
3159 </li>
3160 </ol>
3161
3162 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3163
3164 <ol>
3165 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3166 an empty IAppliance object.
3167 </li>
3168
3169 <li>For each machine you would like to export, call <link to="IMachine::export" />
3170 with the IAppliance object you just created. This creates an instance of
3171 <link to="IVirtualSystemDescription" /> inside the appliance.
3172 </li>
3173
3174 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3175 virtual system to override the suggestions made by the export() routine.
3176 </li>
3177
3178 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3179 file written.</li>
3180 </ol>
3181
3182 </desc>
3183
3184 <attribute name="path" type="wstring" readonly="yes">
3185 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3186 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3187 <link to="#write" /> (for export).
3188 This attribute is empty until one of these methods has been called.
3189 </desc>
3190 </attribute>
3191
3192 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3193 <desc>
3194 Array of virtual disk definitions. One such description exists for each
3195 disk definition in the OVF; each string array item represents one such piece of
3196 disk information, with the information fields separated by tab (\\t) characters.
3197
3198 The caller should be prepared for additional fields being appended to
3199 this string in future versions of VirtualBox and therefore check for
3200 the number of tabs in the strings returned.
3201
3202 In the current version, the following eight fields are returned per string
3203 in the array:
3204
3205 <ol>
3206 <li>Disk ID (unique string identifier given to disk)</li>
3207
3208 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3209
3210 <li>Populated size (optional unsigned integer indicating the current size of the
3211 disk; can be approximate; -1 if unspecified)</li>
3212
3213 <li>Format (string identifying the disk format, typically
3214 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3215
3216 <li>Reference (where to find the disk image, typically a file name; if empty,
3217 then the disk should be created on import)</li>
3218
3219 <li>Image size (optional unsigned integer indicating the size of the image,
3220 which need not necessarily be the same as the values specified above, since
3221 the image may be compressed or sparse; -1 if not specified)</li>
3222
3223 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3224 presently unsupported and always -1)</li>
3225
3226 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3227 </ol>
3228 </desc>
3229 </attribute>
3230
3231 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3232 <desc> Array of virtual system descriptions. One such description is created
3233 for each virtual system found in the OVF.
3234 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3235 (for export) has been called.
3236 </desc>
3237 </attribute>
3238
3239 <method name="read">
3240 <desc>
3241 Reads an OVF file into the appliance object.
3242
3243 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3244 mere fact that this method returns successfully does not mean that VirtualBox supports all
3245 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3246 </desc>
3247 <param name="file" type="wstring" dir="in">
3248 <desc>
3249 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3250 on whether the appliance is distributed as a set of files or as a single file, respectively).
3251 </desc>
3252 </param>
3253 <param name="aProgress" type="IProgress" dir="return">
3254 <desc></desc>
3255 </param>
3256 </method>
3257
3258 <method name="interpret">
3259 <desc>
3260 Interprets the OVF data that was read when the appliance was constructed. After
3261 calling this method, one can inspect the
3262 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3263 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3264 the appliance.
3265
3266 Calling this method is the second step of importing an appliance into VirtualBox;
3267 see <link to="IAppliance" /> for an overview.
3268
3269 After calling this method, one should call <link to="#getWarnings" /> to find out
3270 if problems were encountered during the processing which might later lead to
3271 errors.
3272 </desc>
3273 </method>
3274
3275 <method name="importMachines">
3276 <desc>
3277 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3278 and other interfaces that match the information contained in the appliance as
3279 closely as possible, as represented by the import instructions in the
3280 <link to="#virtualSystemDescriptions" /> array.
3281
3282 Calling this method is the final step of importing an appliance into VirtualBox;
3283 see <link to="IAppliance" /> for an overview.
3284
3285 Since importing the appliance will most probably involve copying and converting
3286 disk images, which can take a long time, this method operates asynchronously and
3287 returns an IProgress object to allow the caller to monitor the progress.
3288 </desc>
3289
3290 <param name="aProgress" type="IProgress" dir="return">
3291 <desc></desc>
3292 </param>
3293 </method>
3294
3295 <method name="createVFSExplorer">
3296 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3297
3298 <param name="aUri" type="wstring" dir="in">
3299 <desc>The URI describing the file system to use.</desc>
3300 </param>
3301
3302 <param name="aExplorer" type="IVFSExplorer" dir="return">
3303 <desc></desc>
3304 </param>
3305 </method>
3306
3307 <method name="write">
3308 <desc>
3309 Writes the contents of the appliance exports into a new OVF file.
3310
3311 Calling this method is the final step of exporting an appliance from VirtualBox;
3312 see <link to="IAppliance" /> for an overview.
3313
3314 Since exporting the appliance will most probably involve copying and converting
3315 disk images, which can take a long time, this method operates asynchronously and
3316 returns an IProgress object to allow the caller to monitor the progress.
3317 </desc>
3318 <param name="format" type="wstring" dir="in">
3319 <desc>
3320 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3321 future versions of VirtualBox may support additional formats.
3322 </desc>
3323 </param>
3324 <param name="path" type="wstring" dir="in">
3325 <desc>
3326 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3327 on whether the appliance is distributed as a set of files or as a single file, respectively).
3328 </desc>
3329 </param>
3330 <param name="aProgress" type="IProgress" dir="return">
3331 <desc>Progress object to track the operation completion.</desc>
3332 </param>
3333 </method>
3334
3335 <method name="getWarnings">
3336 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3337
3338 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3339 <desc></desc>
3340 </param>
3341 </method>
3342
3343 </interface>
3344
3345 <enum
3346 name="VirtualSystemDescriptionType"
3347 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3348 >
3349 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3350 a configuration value.</desc>
3351
3352 <const name="Ignore" value="1" />
3353 <const name="OS" value="2" />
3354 <const name="Name" value="3" />
3355 <const name="Product" value="4" />
3356 <const name="Vendor" value="5" />
3357 <const name="Version" value="6" />
3358 <const name="ProductUrl" value="7" />
3359 <const name="VendorUrl" value="8" />
3360 <const name="Description" value="9" />
3361 <const name="License" value="10" />
3362 <const name="Miscellaneous" value="11" />
3363 <const name="CPU" value="12" />
3364 <const name="Memory" value="13" />
3365 <const name="HardDiskControllerIDE" value="14" />
3366 <const name="HardDiskControllerSATA" value="15" />
3367 <const name="HardDiskControllerSCSI" value="16" />
3368 <const name="HardDiskImage" value="17" />
3369 <const name="Floppy" value="18" />
3370 <const name="CDROM" value="19" />
3371 <const name="NetworkAdapter" value="20" />
3372 <const name="USBController" value="21" />
3373 <const name="SoundCard" value="22" />
3374
3375 </enum>
3376
3377 <enum
3378 name="VirtualSystemDescriptionValueType"
3379 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3380 >
3381 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3382 type to fetch.</desc>
3383
3384 <const name="Reference" value="1" />
3385 <const name="Original" value="2" />
3386 <const name="Auto" value="3" />
3387 <const name="ExtraConfig" value="4" />
3388
3389 </enum>
3390
3391 <interface
3392 name="IVirtualSystemDescription" extends="$unknown"
3393 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3394 wsmap="managed"
3395 >
3396
3397 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3398 After <link to="IAppliance::interpret" /> has been called, that array contains
3399 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3400 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3401 into VirtualBox.
3402 </desc>
3403
3404 <attribute name="count" type="unsigned long" readonly="yes">
3405 <desc>Return the number of virtual system description entries.</desc>
3406 </attribute>
3407
3408 <method name="getDescription">
3409 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3410 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3411
3412 The list below identifies the value sets that are possible depending on the
3413 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3414 the array item with the same index in aOvfValues[] will contain the original value as contained
3415 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3416 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3417 the aExtraConfigValues[] array item may also be used.
3418
3419 <ul>
3420 <li>
3421 "OS": the guest operating system type. There must be exactly one such array item on import. The
3422 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3423 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3424 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3425 </li>
3426 <li>
3427 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3428 if none is present on import, then an automatic name will be created from the operating system
3429 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3430 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3431 <link to="IMachine" /> name that does not exist yet.
3432 </li>
3433 <li>
3434 "Description": an arbitrary description.
3435 </li>
3436 <li>
3437 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3438 code to display such a license for agreement; the Main API does not enforce any such policy.
3439 </li>
3440 <li>
3441 Miscellaneous: reserved for future use.
3442 </li>
3443 <li>
3444 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3445 </li>
3446 <li>
3447 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3448 is present on import, then VirtualBox will set a meaningful default based on the operating system
3449 type.
3450 </li>
3451 <li>
3452 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3453 has no value in aOvfValues[] or aVBoxValues[].
3454 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3455 type can use to specify which hard disk controller a virtual disk should be connected to.
3456 </li>
3457 <li>
3458 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3459 has no value in aOvfValues[] or aVBoxValues[].
3460 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3461 </li>
3462 <li>
3463 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3464 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3465 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3466 </li>
3467 <li>
3468 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3469 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3470
3471 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3472 a path since the image file should be in the same location as the OVF file itself), whereas the
3473 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3474 hard disk image. This means that on import the image will be copied and converted from the
3475 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3476 On import, the target image will also be registered with VirtualBox.
3477
3478 The matching item in the aExtraConfigValues[] array must contain a string of the following
3479 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3480 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3481 the image to. That number must be the index of an array item with one of the hard disk controller
3482 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3483 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3484 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3485 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3486 </li>
3487 <li>
3488 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3489 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3490 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3491 </li>
3492 <li>
3493 "USBController": a USB controller. There can be at most one such item. If and only if such an
3494 item ispresent, USB support will be enabled for the new virtual machine.
3495 </li>
3496 <li>
3497 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3498 present, sound support will be enabled for the new virtual machine. Note that the virtual
3499 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3500 may be different from the virtual soundcard expected by the appliance.
3501 </li>
3502 </ul>
3503
3504 </desc>
3505
3506 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3507 <desc></desc>
3508 </param>
3509
3510 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3511 <desc></desc>
3512 </param>
3513
3514 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3515 <desc></desc>
3516 </param>
3517
3518 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3519 <desc></desc>
3520 </param>
3521
3522 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3523 <desc></desc>
3524 </param>
3525
3526 </method>
3527
3528 <method name="getDescriptionByType">
3529 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3530 should be returned.</desc>
3531
3532 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3533 <desc></desc>
3534 </param>
3535
3536 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3537 <desc></desc>
3538 </param>
3539
3540 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3541 <desc></desc>
3542 </param>
3543
3544 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3545 <desc></desc>
3546 </param>
3547
3548 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3549 <desc></desc>
3550 </param>
3551
3552 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3553 <desc></desc>
3554 </param>
3555
3556 </method>
3557
3558 <method name="getValuesByType">
3559 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3560 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3561 values.</desc>
3562
3563 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3564 <desc></desc>
3565 </param>
3566
3567 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3568 <desc></desc>
3569 </param>
3570
3571 <param name="aValues" type="wstring" dir="return" safearray="yes">
3572 <desc></desc>
3573 </param>
3574
3575 </method>
3576
3577 <method name="setFinalValues">
3578 <desc>
3579 This method allows the appliance's user to change the configuration for the virtual
3580 system descriptions. For each array item returned from <link to="#getDescription" />,
3581 you must pass in one boolean value and one configuration value.
3582
3583 Each item in the boolean array determines whether the particular configuration item
3584 should be enabled.
3585 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3586 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3587 and SoundCard.
3588
3589 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3590 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3591 the configuration remains unchanged. Please see the documentation for getDescription()
3592 for valid configuration values for the individual array item types. If the
3593 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3594 </desc>
3595
3596 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3597 <desc></desc>
3598 </param>
3599
3600 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3601 <desc></desc>
3602 </param>
3603
3604 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3605 <desc></desc>
3606 </param>
3607 </method>
3608
3609 <method name="addDescription">
3610 <desc>
3611 This method adds an additional description entry to the stack of already
3612 available descriptions for this virtual system. This is handy for writing
3613 values which aren't directly supported by VirtualBox. One example would
3614 be the License type of <link to="VirtualSystemDescriptionType" />.
3615 </desc>
3616
3617 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3618 <desc></desc>
3619 </param>
3620
3621 <param name="aVBoxValue" type="wstring" dir="in">
3622 <desc></desc>
3623 </param>
3624
3625 <param name="aExtraConfigValue" type="wstring" dir="in">
3626 <desc></desc>
3627 </param>
3628 </method>
3629 </interface>
3630
3631
3632 <!--
3633 // IMachine
3634 /////////////////////////////////////////////////////////////////////////
3635 -->
3636
3637 <interface
3638 name="IInternalMachineControl" extends="$unknown"
3639 uuid="4e2b8f0f-6575-49d2-bb19-5cd15a6ca2f0"
3640 internal="yes"
3641 wsmap="suppress"
3642 >
3643 <method name="setRemoveSavedState">
3644 <desc>
3645 Updates the flag whether saved state is removed on a machine state
3646 change from Saved to PoweredOff.
3647 </desc>
3648 <param name="aRemove" type="boolean" dir="in"/>
3649 </method>
3650
3651 <method name="updateState">
3652 <desc>
3653 Updates the VM state.
3654 <note>
3655 This operation will also update the settings file with
3656 the correct information about the saved state file
3657 and delete this file from disk when appropriate.
3658 </note>
3659 </desc>
3660 <param name="state" type="MachineState" dir="in"/>
3661 </method>
3662
3663 <method name="getIPCId">
3664 <param name="id" type="wstring" dir="return"/>
3665 </method>
3666
3667 <method name="runUSBDeviceFilters">
3668 <desc>
3669 Asks the server to run USB devices filters of the associated
3670 machine against the given USB device and tell if there is
3671 a match.
3672 <note>
3673 Intended to be used only for remote USB devices. Local
3674 ones don't require to call this method (this is done
3675 implicitly by the Host and USBProxyService).
3676 </note>
3677 </desc>
3678 <param name="device" type="IUSBDevice" dir="in"/>
3679 <param name="matched" type="boolean" dir="out"/>
3680 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3681 </method>
3682
3683 <method name="captureUSBDevice">
3684 <desc>
3685 Requests a capture of the given host USB device.
3686 When the request is completed, the VM process will
3687 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3688 notification.
3689 </desc>
3690 <param name="id" type="uuid" mod="string" dir="in"/>
3691 </method>
3692
3693 <method name="detachUSBDevice">
3694 <desc>
3695 Notification that a VM is going to detach (@a done = @c false) or has
3696 already detached (@a done = @c true) the given USB device.
3697 When the @a done = @c true request is completed, the VM process will
3698 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3699 notification.
3700 <note>
3701 In the @a done = @c true case, the server must run its own filters
3702 and filters of all VMs but this one on the detached device
3703 as if it were just attached to the host computer.
3704 </note>
3705 </desc>
3706 <param name="id" type="uuid" mod="string" dir="in"/>
3707 <param name="done" type="boolean" dir="in"/>
3708 </method>
3709
3710 <method name="autoCaptureUSBDevices">
3711 <desc>
3712 Requests a capture all matching USB devices attached to the host.
3713 When the request is completed, the VM process will
3714 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3715 notification per every captured device.
3716 </desc>
3717 </method>
3718
3719 <method name="detachAllUSBDevices">
3720 <desc>
3721 Notification that a VM that is being powered down. The done
3722 parameter indicates whether which stage of the power down
3723 we're at. When @a done = @c false the VM is announcing its
3724 intentions, while when @a done = @c true the VM is reporting
3725 what it has done.
3726 <note>
3727 In the @a done = @c true case, the server must run its own filters
3728 and filters of all VMs but this one on all detach devices as
3729 if they were just attached to the host computer.
3730 </note>
3731 </desc>
3732 <param name="done" type="boolean" dir="in"/>
3733 </method>
3734
3735 <method name="onSessionEnd">
3736 <desc>
3737 Triggered by the given session object when the session is about
3738 to close normally.
3739 </desc>
3740 <param name="session" type="ISession" dir="in">
3741 <desc>Session that is being closed</desc>
3742 </param>
3743 <param name="progress" type="IProgress" dir="return">
3744 <desc>
3745 Used to wait until the corresponding machine is actually
3746 dissociated from the given session on the server.
3747 Returned only when this session is a direct one.
3748 </desc>
3749 </param>
3750 </method>
3751
3752 <method name="beginSavingState">
3753 <desc>
3754 Called by the VM process to inform the server it wants to
3755 save the current state and stop the VM execution.
3756 </desc>
3757 <param name="progress" type="IProgress" dir="in">
3758 <desc>
3759 Progress object created by the VM process to wait until
3760 the state is saved.
3761 </desc>
3762 </param>
3763 <param name="stateFilePath" type="wstring" dir="out">
3764 <desc>
3765 File path the VM process must save the execution state to.
3766 </desc>
3767 </param>
3768 </method>
3769
3770 <method name="endSavingState">
3771 <desc>
3772 Called by the VM process to inform the server that saving
3773 the state previously requested by #beginSavingState is either
3774 successfully finished or there was a failure.
3775
3776 <result name="VBOX_E_FILE_ERROR">
3777 Settings file not accessible.
3778 </result>
3779 <result name="VBOX_E_XML_ERROR">
3780 Could not parse the settings file.
3781 </result>
3782
3783 </desc>
3784
3785 <param name="success" type="boolean" dir="in">
3786 <desc>@c true to indicate success and @c false otherwise.
3787 </desc>
3788 </param>
3789 </method>
3790
3791 <method name="adoptSavedState">
3792 <desc>
3793 Gets called by IConsole::adoptSavedState.
3794 <result name="VBOX_E_FILE_ERROR">
3795 Invalid saved state file path.
3796 </result>
3797 </desc>
3798 <param name="savedStateFile" type="wstring" dir="in">
3799 <desc>Path to the saved state file to adopt.</desc>
3800 </param>
3801 </method>
3802
3803 <method name="beginTakingSnapshot">
3804 <desc>
3805 Called from the VM process to request from the server to perform the
3806 server-side actions of creating a snapshot (creating differencing images
3807 and the snapshot object).
3808
3809 <result name="VBOX_E_FILE_ERROR">
3810 Settings file not accessible.
3811 </result>
3812 <result name="VBOX_E_XML_ERROR">
3813 Could not parse the settings file.
3814 </result>
3815 </desc>
3816 <param name="initiator" type="IConsole" dir="in">
3817 <desc>The console object that initiated this call.</desc>
3818 </param>
3819 <param name="name" type="wstring" dir="in">
3820 <desc>Snapshot name.</desc>
3821 </param>
3822 <param name="description" type="wstring" dir="in">
3823 <desc>Snapshot description.</desc>
3824 </param>
3825 <param name="consoleProgress" type="IProgress" dir="in">
3826 <desc>
3827 Progress object created by the VM process tracking the
3828 snapshot's progress. This has the following sub-operations:
3829 <ul>
3830 <li>setting up (weight 1);</li>
3831 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3832 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3833 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3834 <li>finishing up (weight 1)</li>
3835 </ul>
3836 </desc>
3837 </param>
3838 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3839 <desc>
3840 Whether this is an online snapshot (i.e. the machine is running).
3841 </desc>
3842 </param>
3843 <param name="stateFilePath" type="wstring" dir="out">
3844 <desc>
3845 File path the VM process must save the execution state to.
3846 </desc>
3847 </param>
3848 </method>
3849
3850 <method name="endTakingSnapshot">
3851 <desc>
3852 Called by the VM process to inform the server that the snapshot
3853 previously requested by #beginTakingSnapshot is either
3854 successfully taken or there was a failure.
3855 </desc>
3856
3857 <param name="success" type="boolean" dir="in">
3858 <desc>@c true to indicate success and @c false otherwise</desc>
3859 </param>
3860 </method>
3861
3862 <method name="deleteSnapshot">
3863 <desc>
3864 Gets called by IConsole::deleteSnapshot.
3865 <result name="VBOX_E_INVALID_OBJECT_STATE">
3866 Snapshot has more than one child snapshot.
3867 </result>
3868 </desc>
3869 <param name="initiator" type="IConsole" dir="in">
3870 <desc>The console object that initiated this call.</desc>
3871 </param>
3872 <param name="id" type="uuid" mod="string" dir="in">
3873 <desc>UUID of the snapshot to discard.</desc>
3874 </param>
3875 <param name="machineState" type="MachineState" dir="out">
3876 <desc>New machine state after this operation is started.</desc>
3877 </param>
3878 <param name="progress" type="IProgress" dir="return">
3879 <desc>Progress object to track the operation completion.</desc>
3880 </param>
3881 </method>
3882
3883 <method name="restoreSnapshot">
3884 <desc>
3885 Gets called by IConsole::RestoreSnapshot.
3886 </desc>
3887 <param name="initiator" type="IConsole" dir="in">
3888 <desc>The console object that initiated this call.</desc>
3889 </param>
3890 <param name="snapshot" type="ISnapshot" dir="in">
3891 <desc>The snapshot to restore the VM state from.</desc>
3892 </param>
3893 <param name="machineState" type="MachineState" dir="out">
3894 <desc>New machine state after this operation is started.</desc>
3895 </param>
3896 <param name="progress" type="IProgress" dir="return">
3897 <desc>Progress object to track the operation completion.</desc>
3898 </param>
3899 </method>
3900
3901 <method name="pullGuestProperties">
3902 <desc>
3903 Get the list of the guest properties matching a set of patterns along
3904 with their values, time stamps and flags and give responsibility for
3905 managing properties to the console.
3906 </desc>
3907 <param name="name" type="wstring" dir="out" safearray="yes">
3908 <desc>
3909 The names of the properties returned.
3910 </desc>
3911 </param>
3912 <param name="value" type="wstring" dir="out" safearray="yes">
3913 <desc>
3914 The values of the properties returned. The array entries match the
3915 corresponding entries in the @a name array.
3916 </desc>
3917 </param>
3918 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3919 <desc>
3920 The time stamps of the properties returned. The array entries match
3921 the corresponding entries in the @a name array.
3922 </desc>
3923 </param>
3924 <param name="flags" type="wstring" dir="out" safearray="yes">
3925 <desc>
3926 The flags of the properties returned. The array entries match the
3927 corresponding entries in the @a name array.
3928 </desc>
3929 </param>
3930 </method>
3931
3932 <method name="pushGuestProperties">
3933 <desc>
3934 Set the list of the guest properties matching a set of patterns along
3935 with their values, time stamps and flags and return responsibility for
3936 managing properties to IMachine.
3937 </desc>
3938 <param name="name" type="wstring" dir="in" safearray="yes">
3939 <desc>
3940 The names of the properties.
3941 </desc>
3942 </param>
3943 <param name="value" type="wstring" dir="in" safearray="yes">
3944 <desc>
3945 The values of the properties. The array entries match the
3946 corresponding entries in the @a name array.
3947 </desc>
3948 </param>
3949 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3950 <desc>
3951 The time stamps of the properties. The array entries match
3952 the corresponding entries in the @a name array.
3953 </desc>
3954 </param>
3955 <param name="flags" type="wstring" dir="in" safearray="yes">
3956 <desc>
3957 The flags of the properties. The array entries match the
3958 corresponding entries in the @a name array.
3959 </desc>
3960 </param>
3961 </method>
3962 <method name="pushGuestProperty">
3963 <desc>
3964 Update a single guest property in IMachine.
3965 </desc>
3966 <param name="name" type="wstring" dir="in">
3967 <desc>
3968 The name of the property to be updated.
3969 </desc>
3970 </param>
3971 <param name="value" type="wstring" dir="in">
3972 <desc>
3973 The value of the property.
3974 </desc>
3975 </param>
3976 <param name="timestamp" type="unsigned long long" dir="in">
3977 <desc>
3978 The timestamp of the property.
3979 </desc>
3980 </param>
3981 <param name="flags" type="wstring" dir="in">
3982 <desc>
3983 The flags of the property.
3984 </desc>
3985 </param>
3986 </method>
3987
3988 <method name="lockMedia">
3989 <desc>
3990 Locks all media attached to the machine for writing and parents of
3991 attached differencing media (if any) for reading. This operation is
3992 atomic so that if it fails no media is actually locked.
3993
3994 This method is intended to be called when the machine is in Starting or
3995 Restoring state. The locked media will be automatically unlocked when
3996 the machine is powered off or crashed.
3997 </desc>
3998 </method>
3999 </interface>
4000
4001 <interface
4002 name="IBIOSSettings" extends="$unknown"
4003 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4004 wsmap="managed"
4005 >
4006 <desc>
4007 The IBIOSSettings interface represents BIOS settings of the virtual
4008 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4009 </desc>
4010 <attribute name="logoFadeIn" type="boolean">
4011 <desc>Fade in flag for BIOS logo animation.</desc>
4012 </attribute>
4013
4014 <attribute name="logoFadeOut" type="boolean">
4015 <desc>Fade out flag for BIOS logo animation.</desc>
4016 </attribute>
4017
4018 <attribute name="logoDisplayTime" type="unsigned long">
4019 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4020 </attribute>
4021
4022 <attribute name="logoImagePath" type="wstring">
4023 <desc>Local file system path for external BIOS image.</desc>
4024 </attribute>
4025
4026 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4027 <desc>Mode of the BIOS boot device menu.</desc>
4028 </attribute>
4029
4030 <attribute name="ACPIEnabled" type="boolean">
4031 <desc>ACPI support flag.</desc>
4032 </attribute>
4033
4034 <attribute name="IOAPICEnabled" type="boolean">
4035 <desc>
4036 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4037 and support IRQs above 15.
4038 </desc>
4039 </attribute>
4040
4041 <attribute name="timeOffset" type="long long">
4042 <desc>
4043 Offset in milliseconds from the host system time. This allows for
4044 guests running with a different system date/time than the host.
4045 It is equivalent to setting the system date/time in the BIOS except
4046 it is not an absolute value but a relative one. Guest Additions
4047 time synchronization honors this offset.
4048 </desc>
4049 </attribute>
4050
4051 <attribute name="PXEDebugEnabled" type="boolean">
4052 <desc>
4053 PXE debug logging flag. If set, VirtualBox will write extensive
4054 PXE trace information to the release log.
4055 </desc>
4056 </attribute>
4057
4058 </interface>
4059
4060 <interface
4061 name="IMachine" extends="$unknown"
4062 uuid="db35f17a-179f-4332-91b2-a49d5cfb678c"
4063 wsmap="managed"
4064 >
4065 <desc>
4066 The IMachine interface represents a virtual machine, or guest, created
4067 in VirtualBox.
4068
4069 This interface is used in two contexts. First of all, a collection of
4070 objects implementing this interface is stored in the
4071 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4072 machines that are currently registered with this VirtualBox
4073 installation. Also, once a session has been opened for the given virtual
4074 machine (e.g. the virtual machine is running), the machine object
4075 associated with the open session can be queried from the session object;
4076 see <link to="ISession"/> for details.
4077
4078 The main role of this interface is to expose the settings of the virtual
4079 machine and provide methods to change various aspects of the virtual
4080 machine's configuration. For machine objects stored in the
4081 <link to="IVirtualBox::machines"/> collection, all attributes are
4082 read-only unless explicitly stated otherwise in individual attribute
4083 and method descriptions. In order to change a machine setting, a session
4084 for this machine must be opened using one of
4085 <link to="IVirtualBox::openSession"/>,
4086 <link to="IVirtualBox::openRemoteSession"/> or
4087 <link to="IVirtualBox::openExistingSession"/> methods. After the
4088 session has been successfully opened, a mutable machine object needs to
4089 be queried from the session object and then the desired settings changes
4090 can be applied to the returned object using IMachine attributes and
4091 methods. See the <link to="ISession"/> interface description for more
4092 information about sessions.
4093
4094 Note that IMachine does not provide methods to control virtual machine
4095 execution (such as start the machine, or power it down) -- these methods
4096 are grouped in a separate interface called <link to="IConsole" />.
4097
4098 <see>ISession, IConsole</see>
4099 </desc>
4100
4101 <attribute name="parent" type="IVirtualBox" readonly="yes">
4102 <desc>Associated parent object.</desc>
4103 </attribute>
4104
4105 <attribute name="accessible" type="boolean" readonly="yes">
4106 <desc>
4107 Whether this virtual machine is currently accessible or not.
4108
4109 A machine is always deemed accessible unless it is registered <i>and</i>
4110 its settings file cannot be read or parsed (either because the file itself
4111 is unavailable or has invalid XML contents).
4112
4113 Every time this property is read, the accessibility state of
4114 this machine is re-evaluated. If the returned value is @c false,
4115 the <link to="#accessError"/> property may be used to get the
4116 detailed error information describing the reason of
4117 inaccessibility, including XML error messages.
4118
4119 When the machine is inaccessible, only the following properties
4120 can be used on it:
4121 <ul>
4122 <li><link to="#parent"/></li>
4123 <li><link to="#id"/></li>
4124 <li><link to="#settingsFilePath"/></li>
4125 <li><link to="#accessible"/></li>
4126 <li><link to="#accessError"/></li>
4127 </ul>
4128
4129 An attempt to access any other property or method will return
4130 an error.
4131
4132 The only possible action you can perform on an inaccessible
4133 machine is to unregister it using the
4134 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4135 for the accessibility state once more by querying this
4136 property).
4137
4138 <note>
4139 In the current implementation, once this property returns
4140 @c true, the machine will never become inaccessible
4141 later, even if its settings file cannot be successfully
4142 read/written any more (at least, until the VirtualBox
4143 server is restarted). This limitation may be removed in
4144 future releases.
4145 </note>
4146 </desc>
4147 </attribute>
4148
4149 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4150 <desc>
4151 Error information describing the reason of machine
4152 inaccessibility.
4153
4154 Reading this property is only valid after the last call to
4155 <link to="#accessible"/> returned @c false (i.e. the
4156 machine is currently unaccessible). Otherwise, a @c null
4157 IVirtualBoxErrorInfo object will be returned.
4158 </desc>
4159 </attribute>
4160
4161 <attribute name="name" type="wstring">
4162 <desc>
4163 Name of the virtual machine.
4164
4165 Besides being used for human-readable identification purposes
4166 everywhere in VirtualBox, the virtual machine name is also used
4167 as a name of the machine's settings file and as a name of the
4168 subdirectory this settings file resides in. Thus, every time you
4169 change the value of this property, the settings file will be
4170 renamed once you call <link to="#saveSettings"/> to confirm the
4171 change. The containing subdirectory will be also renamed, but
4172 only if it has exactly the same name as the settings file
4173 itself prior to changing this property (for backward compatibility
4174 with previous API releases). The above implies the following
4175 limitations:
4176 <ul>
4177 <li>The machine name cannot be empty.</li>
4178 <li>The machine name can contain only characters that are valid
4179 file name characters according to the rules of the file
4180 system used to store VirtualBox configuration.</li>
4181 <li>You cannot have two or more machines with the same name
4182 if they use the same subdirectory for storing the machine
4183 settings files.</li>
4184 <li>You cannot change the name of the machine if it is running,
4185 or if any file in the directory containing the settings file
4186 is being used by another running machine or by any other
4187 process in the host operating system at a time when
4188 <link to="#saveSettings"/> is called.
4189 </li>
4190 </ul>
4191 If any of the above limitations are hit, <link to="#saveSettings"/>
4192 will return an appropriate error message explaining the exact
4193 reason and the changes you made to this machine will not be
4194 saved.
4195 <note>
4196 For "legacy" machines created using the
4197 <link to="IVirtualBox::createLegacyMachine"/> call,
4198 the above naming limitations do not apply because the
4199 machine name does not affect the settings file name.
4200 The settings file name remains the same as it was specified
4201 during machine creation and never changes.
4202 </note>
4203 </desc>
4204 </attribute>
4205
4206 <attribute name="description" type="wstring">
4207 <desc>
4208 Description of the virtual machine.
4209
4210 The description attribute can contain any text and is
4211 typically used to describe the hardware and software
4212 configuration of the virtual machine in detail (i.e. network
4213 settings, versions of the installed software and so on).
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="id" type="uuid" mod="string" readonly="yes">
4218 <desc>UUID of the virtual machine.</desc>
4219 </attribute>
4220
4221 <attribute name="OSTypeId" type="wstring">
4222 <desc>
4223 User-defined identifier of the Guest OS type.
4224 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4225 an IGuestOSType object representing details about the given
4226 Guest OS type.
4227 <note>
4228 This value may differ from the value returned by
4229 <link to="IGuest::OSTypeId"/> if Guest Additions are
4230 installed to the guest OS.
4231 </note>
4232 </desc>
4233 </attribute>
4234
4235 <attribute name="HardwareVersion" type="wstring">
4236 <desc>Hardware version identifier. Internal use only for now.</desc>
4237 </attribute>
4238
4239 <attribute name="CPUCount" type="unsigned long">
4240 <desc>Number of virtual CPUs in the VM.</desc>
4241 </attribute>
4242
4243 <attribute name="memorySize" type="unsigned long">
4244 <desc>System memory size in megabytes.</desc>
4245 </attribute>
4246
4247 <attribute name="memoryBalloonSize" type="unsigned long">
4248 <desc>Initial memory balloon size in megabytes.</desc>
4249 </attribute>
4250
4251 <attribute name="statisticsUpdateInterval" type="unsigned long">
4252 <desc>Initial interval to update guest statistics in seconds.</desc>
4253 </attribute>
4254
4255 <attribute name="VRAMSize" type="unsigned long">
4256 <desc>Video memory size in megabytes.</desc>
4257 </attribute>
4258
4259 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4260 <desc>
4261 This setting determines whether VirtualBox allows this machine to make
4262 use of the 3D graphics support available on the host.</desc>
4263 </attribute>
4264
4265 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4266 <desc>
4267 This setting determines whether VirtualBox allows this machine to make
4268 use of the 2D video acceleration support available on the host.</desc>
4269 </attribute>
4270
4271 <attribute name="monitorCount" type="unsigned long">
4272 <desc>
4273 Number of virtual monitors.
4274 <note>
4275 Only effective on Windows XP and later guests with
4276 Guest Additions installed.
4277 </note>
4278 </desc>
4279 </attribute>
4280
4281 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4282 <desc>Object containing all BIOS settings.</desc>
4283 </attribute>
4284
4285 <attribute name="firmwareType" type="FirmwareType">
4286 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4287 bootstrap in this VM.</desc>
4288 </attribute>
4289
4290 <attribute name="snapshotFolder" type="wstring">
4291 <desc>
4292 Full path to the directory used to store snapshot data
4293 (differencing media and saved state files) of this machine.
4294
4295 The initial value of this property is
4296 <tt>&lt;</tt><link to="#settingsFilePath">
4297 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4298 <link to="#id">machine_uuid</link>
4299 <tt>&gt;</tt>.
4300
4301 Currently, it is an error to try to change this property on
4302 a machine that has snapshots (because this would require to
4303 move possibly large files to a different location).
4304 A separate method will be available for this purpose later.
4305
4306 <note>
4307 Setting this property to @c null or to an empty string will restore
4308 the initial value.
4309 </note>
4310 <note>
4311 When setting this property, the specified path can be
4312 absolute (full path) or relative to the directory where the
4313 <link to="#settingsFilePath">machine settings file</link>
4314 is located. When reading this property, a full path is
4315 always returned.
4316 </note>
4317 <note>
4318 The specified path may not exist, it will be created
4319 when necessary.
4320 </note>
4321 </desc>
4322 </attribute>
4323
4324 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4325 <desc>VRDP server object.</desc>
4326 </attribute>
4327
4328 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4329 <desc>Array of media attached to this machine.</desc>
4330 </attribute>
4331
4332 <attribute name="USBController" type="IUSBController" readonly="yes">
4333 <desc>
4334 Associated USB controller object.
4335
4336 <note>
4337 If USB functionality is not available in the given edition of
4338 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4339 </note>
4340 </desc>
4341 </attribute>
4342
4343 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4344 <desc>Associated audio adapter, always present.</desc>
4345 </attribute>
4346
4347 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4348 <desc>Array of storage controllers attached to this machine.</desc>
4349 </attribute>
4350
4351 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4352 <desc>
4353 Full name of the file containing machine settings data.
4354 </desc>
4355 </attribute>
4356
4357 <attribute name="settingsModified" type="boolean" readonly="yes">
4358 <desc>
4359 Whether the settings of this machine have been modified
4360 (but neither yet saved nor discarded).
4361 <note>
4362 Reading this property is only valid on instances returned
4363 by <link to="ISession::machine"/> and on new machines
4364 created by <link to="IVirtualBox::createMachine"/> or opened
4365 by <link to="IVirtualBox::openMachine"/> but not
4366 yet registered, or on unregistered machines after calling
4367 <link to="IVirtualBox::unregisterMachine"/>. For all other
4368 cases, the settings can never be modified.
4369 </note>
4370 <note>
4371 For newly created unregistered machines, the value of this
4372 property is always @c true until <link to="#saveSettings"/>
4373 is called (no matter if any machine settings have been
4374 changed after the creation or not). For opened machines
4375 the value is set to @c false (and then follows to normal rules).
4376 </note>
4377 </desc>
4378 </attribute>
4379
4380 <attribute name="sessionState" type="SessionState" readonly="yes">
4381 <desc>Current session state for this machine.</desc>
4382 </attribute>
4383
4384 <attribute name="sessionType" type="wstring" readonly="yes">
4385 <desc>
4386 Type of the session. If <link to="#sessionState"/> is
4387 SessionSpawning or SessionOpen, this attribute contains the
4388 same value as passed to the
4389 <link to="IVirtualBox::openRemoteSession"/> method in the
4390 @a type parameter. If the session was opened directly using
4391 <link to="IVirtualBox::openSession"/>, or if
4392 <link to="#sessionState"/> is SessionClosed, the value of this
4393 attribute is an empty string.
4394 </desc>
4395 </attribute>
4396
4397 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4398 <desc>
4399 Identifier of the session process. This attribute contains the
4400 platform-dependent identifier of the process that has opened a
4401 direct session for this machine using the
4402 <link to="IVirtualBox::openSession"/> call. The returned value
4403 is only valid if <link to="#sessionState"/> is SessionOpen or
4404 SessionClosing (i.e. a session is currently open or being
4405 closed) by the time this property is read.
4406 </desc>
4407 </attribute>
4408
4409 <attribute name="state" type="MachineState" readonly="yes">
4410 <desc>Current execution state of this machine.</desc>
4411 </attribute>
4412
4413 <attribute name="lastStateChange" type="long long" readonly="yes">
4414 <desc>
4415 Time stamp of the last execution state change,
4416 in milliseconds since 1970-01-01 UTC.
4417 </desc>
4418 </attribute>
4419
4420 <attribute name="stateFilePath" type="wstring" readonly="yes">
4421 <desc>
4422 Full path to the file that stores the execution state of
4423 the machine when it is in the <link to="MachineState_Saved"/> state.
4424 <note>
4425 When the machine is not in the Saved state, this attribute is
4426 an empty string.
4427 </note>
4428 </desc>
4429 </attribute>
4430
4431 <attribute name="logFolder" type="wstring" readonly="yes">
4432 <desc>
4433 Full path to the folder that stores a set of rotated log files
4434 recorded during machine execution. The most recent log file is
4435 named <tt>VBox.log</tt>, the previous log file is
4436 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4437 in the current version).
4438 </desc>
4439 </attribute>
4440
4441 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4442 <desc>
4443 Current snapshot of this machine. This is @c null if the machine
4444 currently has no snapshots. If it is not @c null, then it was
4445 set by one of <link to="Console::takeSnapshot" />,
4446 <link to="Console::deleteSnapshot" />
4447 or <link to="Console::restoreSnapshot" />, depending on which
4448 was called last. See <link to="ISnapshot"/> for details.
4449 </desc>
4450 </attribute>
4451
4452 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4453 <desc>
4454 Number of snapshots taken on this machine. Zero means the
4455 machine doesn't have any snapshots.
4456 </desc>
4457 </attribute>
4458
4459 <attribute name="currentStateModified" type="boolean" readonly="yes">
4460 <desc>
4461 Returns @c true if the current state of the machine is not
4462 identical to the state stored in the current snapshot.
4463
4464 The current state is identical to the current snapshot only
4465 directly after one of the following calls are made:
4466
4467 <ul>
4468 <li><link to="IConsole::restoreSnapshot"/>
4469 </li>
4470 <li><link to="IConsole::takeSnapshot"/> (issued on a
4471 "powered off" or "saved" machine, for which
4472 <link to="#settingsModified"/> returns @c false)
4473 </li>
4474 <li><link to="IMachine::setCurrentSnapshot"/>
4475 </li>
4476 </ul>
4477
4478 The current state remains identical until one of the following
4479 happens:
4480 <ul>
4481 <li>settings of the machine are changed</li>
4482 <li>the saved state is discarded</li>
4483 <li>the current snapshot is discarded</li>
4484 <li>an attempt to execute the machine is made</li>
4485 </ul>
4486
4487 <note>
4488 For machines that don't have snapshots, this property is
4489 always @c false.
4490 </note>
4491 </desc>
4492 </attribute>
4493
4494 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4495 <desc>
4496 Collection of shared folders for this machine (permanent shared
4497 folders). These folders are shared automatically at machine startup
4498 and available only to the guest OS installed within this machine.
4499
4500 New shared folders are added to the collection using
4501 <link to="#createSharedFolder"/>. Existing shared folders can be
4502 removed using <link to="#removeSharedFolder"/>.
4503 </desc>
4504 </attribute>
4505
4506 <attribute name="clipboardMode" type="ClipboardMode">
4507 <desc>
4508 Synchronization mode between the host OS clipboard
4509 and the guest OS clipboard.
4510 </desc>
4511 </attribute>
4512
4513 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4514 <desc>
4515 A comma-separated list of simple glob patterns. Changes to guest
4516 properties whose name matches one of the patterns will generate an
4517 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4518 </desc>
4519 </attribute>
4520
4521 <attribute name="teleporterEnabled" type="boolean">
4522 <desc>
4523 When set to @a true, the virtual machine becomes a target teleporter
4524 the next time it is powered on. This can only set to @a true when the
4525 VM is in the @a PoweredOff or @a Aborted state.
4526
4527 This property is automatically set to @a false when the VM is powered
4528 on.
4529 </desc>
4530 </attribute>
4531
4532 <attribute name="teleporterPort" type="unsigned long">
4533 <desc>
4534 The TCP port the target teleporter will listen for incoming
4535 teleportations on.
4536
4537 0 means the port is automatically selected upon power on. The actual
4538 value can be read from this property while the machine is waiting for
4539 incoming teleportations.
4540 </desc>
4541 </attribute>
4542
4543 <attribute name="teleporterAddress" type="wstring">
4544 <desc>
4545 The address the target teleporter will listen on. If set to an empty
4546 string, it will listen on all addresses.
4547 </desc>
4548 </attribute>
4549
4550 <attribute name="teleporterPassword" type="wstring">
4551 <desc>
4552 The password the to check for on the target teleporter. This is just a
4553 very basic measure to prevent simple hacks and operators accidentally
4554 beaming a virtual machine to the wrong place.
4555 </desc>
4556 </attribute>
4557
4558 <method name="setBootOrder">
4559 <desc>
4560 Puts the given device to the specified position in
4561 the boot order.
4562
4563 To indicate that no device is associated with the given position,
4564 <link to="DeviceType_Null"/> should be used.
4565
4566 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4567
4568 <result name="E_INVALIDARG">
4569 Boot @a position out of range.
4570 </result>
4571 <result name="E_NOTIMPL">
4572 Booting from USB @a device currently not supported.
4573 </result>
4574
4575 </desc>
4576 <param name="position" type="unsigned long" dir="in">
4577 <desc>
4578 Position in the boot order (@c 1 to the total number of
4579 devices the machine can boot from, as returned by
4580 <link to="ISystemProperties::maxBootPosition"/>).
4581 </desc>
4582 </param>
4583 <param name="device" type="DeviceType" dir="in">
4584 <desc>
4585 The type of the device used to boot at the given position.
4586 </desc>
4587 </param>
4588 </method>
4589
4590 <method name="getBootOrder" const="yes">
4591 <desc>
4592 Returns the device type that occupies the specified
4593 position in the boot order.
4594
4595 @todo [remove?]
4596 If the machine can have more than one device of the returned type
4597 (such as hard disks), then a separate method should be used to
4598 retrieve the individual device that occupies the given position.
4599
4600 If here are no devices at the given position, then
4601 <link to="DeviceType_Null"/> is returned.
4602
4603 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4604
4605 <result name="E_INVALIDARG">
4606 Boot @a position out of range.
4607 </result>
4608
4609 </desc>
4610 <param name="position" type="unsigned long" dir="in">
4611 <desc>
4612 Position in the boot order (@c 1 to the total number of
4613 devices the machine can boot from, as returned by
4614 <link to="ISystemProperties::maxBootPosition"/>).
4615 </desc>
4616 </param>
4617 <param name="device" type="DeviceType" dir="return">
4618 <desc>
4619 Device at the given position.
4620 </desc>
4621 </param>
4622 </method>
4623
4624 <method name="attachDevice">
4625 <desc>
4626 Attaches a device and optionally mounts a medium to the given storage
4627 controller (<link to="IStorageController" />, identified by @a name),
4628 at the indicated port and device.
4629
4630 This method is intended for managing storage devices in general (it works
4631 for both fixed and removable media). For storage devices supporting removable
4632 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4633 for changing the media while the machine is running.
4634
4635 For the IDE bus, the @a controllerPort parameter can be either
4636 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4637 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4638 to specify the master or the slave device, respectively. (In the
4639 default configuration of virtual machines, the secondary master is
4640 used for a CD/DVD drive.)
4641
4642 For an SATA controller, @a controllerPort must be a number ranging
4643 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4644 be a number ranging from @c 0 to @c 15.
4645
4646 For both SCSI and SATA, the @a device parameter is unused and must
4647 be @c 0.
4648
4649 For fixed media such as hard disks, the given medium cannot be NULL. It may
4650 be NULL for removable media such as DVDs and floppies.
4651
4652 After calling this returns successfully, a new instance of
4653 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4654 attachments (<link to="IMachine::mediumAttachments"/>).
4655
4656 The specified device slot must not have another disk attached to it, or
4657 this method will fail.
4658
4659 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4660 information about attaching media.
4661
4662 <note>
4663 You cannot attach a hard disk to a running machine. Also, you cannot
4664 attach a hard disk to a newly created machine until this machine's
4665 settings are saved to disk using <link to="#saveSettings"/>.
4666 </note>
4667 <note>
4668 If the medium is being attached indirectly, a new differencing medium
4669 will implicitly be created for it and attached instead. If the
4670 changes made to the machine settings (including this indirect
4671 attachment) are later cancelled using <link to="#discardSettings"/>,
4672 this implicitly created differencing medium will implicitly
4673 be deleted.
4674 </note>
4675
4676 <result name="E_INVALIDARG">
4677 SATA device, SATA port, IDE port or IDE slot out of range.
4678 </result>
4679 <result name="VBOX_E_INVALID_OBJECT_STATE">
4680 Attempt to attach medium to an unregistered virtual machine.
4681 </result>
4682 <result name="VBOX_E_INVALID_VM_STATE">
4683 Invalid machine state.
4684 </result>
4685 <result name="VBOX_E_OBJECT_IN_USE">
4686 Hard disk already attached to this or another virtual machine.
4687 </result>
4688
4689 </desc>
4690 <param name="name" type="wstring" dir="in">
4691 <desc>Name of the storage controller to attach the device to.</desc>
4692 </param>
4693 <param name="controllerPort" type="long" dir="in">
4694 <desc>Port to attach the device to.</desc>
4695 </param>
4696 <param name="device" type="long" dir="in">
4697 <desc>Device slot in the given port to attach the device to.</desc>
4698 </param>
4699 <param name="type" type="DeviceType" dir="in">
4700 <desc>Device type of the attached device.</desc>
4701 </param>
4702 <param name="id" type="uuid" mod="string" dir="in">
4703 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4704 medium.</desc>
4705 </param>
4706 </method>
4707
4708 <method name="detachDevice">
4709 <desc>
4710 Detaches the device attached to a device slot of the specified bus.
4711
4712 Detaching the device from the virtual machine is deferred. This means
4713 that the medium remains associated with the machine when this method
4714 returns and gets actually de-associated only after a successful
4715 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4716 for more detailed information about attaching media.
4717
4718 <note>
4719 You cannot detach the hard disk from a running machine.
4720 </note>
4721 <note>
4722 Detaching differencing media implicitly created by <link
4723 to="#attachDevice"/> for the indirect attachment using this
4724 method will <b>not</b> implicitly delete them. The
4725 <link to="IMedium::deleteStorage"/> operation should be
4726 explicitly performed by the caller after the medium is successfully
4727 detached and the settings are saved with
4728 <link to="#saveSettings"/>, if it is the desired action.
4729 </note>
4730
4731 <result name="VBOX_E_INVALID_VM_STATE">
4732 Attempt to detach medium from a running virtual machine.
4733 </result>
4734 <result name="VBOX_E_OBJECT_NOT_FOUND">
4735 No medium attached to given slot/bus.
4736 </result>
4737 <result name="VBOX_E_NOT_SUPPORTED">
4738 Hard disk format does not support storage deletion.
4739 </result>
4740
4741 </desc>
4742 <param name="name" type="wstring" dir="in">
4743 <desc>Name of the storage controller to detach the medium from.</desc>
4744 </param>
4745 <param name="controllerPort" type="long" dir="in">
4746 <desc>Port number to detach the medium from.</desc>
4747 </param>
4748 <param name="device" type="long" dir="in">
4749 <desc>Device slot number to detach the medium from.</desc>
4750 </param>
4751 </method>
4752
4753 <method name="passthroughDevice">
4754 <desc>
4755 Sets the passthrough mode of an existing DVD device. Changing the
4756 setting while the VM is running is forbidden. The setting is only used
4757 if at VM start the device is configured as a host DVD drive, in all
4758 other cases it is ignored. The device must already exist; see
4759 <link to="IMachine::attachDevice"/> for how to attach a new device.
4760
4761 The @a controllerPort and @a device parameters specify the device slot and
4762 have have the same meaning as with <link to="IMachine::attachDevice" />.
4763
4764 <result name="E_INVALIDARG">
4765 SATA device, SATA port, IDE port or IDE slot out of range.
4766 </result>
4767 <result name="VBOX_E_INVALID_OBJECT_STATE">
4768 Attempt to modify an unregistered virtual machine.
4769 </result>
4770 <result name="VBOX_E_INVALID_VM_STATE">
4771 Invalid machine state.
4772 </result>
4773
4774 </desc>
4775 <param name="name" type="wstring" dir="in">
4776 <desc>Name of the storage controller.</desc>
4777 </param>
4778 <param name="controllerPort" type="long" dir="in">
4779 <desc>Storage controller port.</desc>
4780 </param>
4781 <param name="device" type="long" dir="in">
4782 <desc>Device slot in the given port.</desc>
4783 </param>
4784 <param name="passthrough" type="boolean" dir="in">
4785 <desc>New value for the passthrough setting.</desc>
4786 </param>
4787 </method>
4788
4789 <method name="mountMedium">
4790 <desc>
4791 Mounts a medium (<link to="IMedium" />, identified
4792 by the given UUID @a id) to the given storage controller
4793 (<link to="IStorageController" />, identified by @a name),
4794 at the indicated port and device. The device must already exist;
4795 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4796
4797 This method is intended only for managing removable media, where the
4798 device is fixed but media is changeable at runtime (such as DVDs
4799 and floppies). It cannot be used for fixed media such as hard disks.
4800
4801 The @a controllerPort and @a device parameters specify the device slot and
4802 have have the same meaning as with <link to="IMachine::attachDevice" />.
4803
4804 The specified device slot can have a medium mounted, which will be
4805 unmounted first. Specifying a NULL medium does just an unmount.
4806
4807 See <link to="IMedium"/> for more detailed information about
4808 attaching media.
4809
4810 <result name="E_INVALIDARG">
4811 SATA device, SATA port, IDE port or IDE slot out of range.
4812 </result>
4813 <result name="VBOX_E_INVALID_OBJECT_STATE">
4814 Attempt to attach medium to an unregistered virtual machine.
4815 </result>
4816 <result name="VBOX_E_INVALID_VM_STATE">
4817 Invalid machine state.
4818 </result>
4819 <result name="VBOX_E_OBJECT_IN_USE">
4820 Medium already attached to this or another virtual machine.
4821 </result>
4822
4823 </desc>
4824 <param name="name" type="wstring" dir="in">
4825 <desc>Name of the storage controller to attach the medium to.</desc>
4826 </param>
4827 <param name="controllerPort" type="long" dir="in">
4828 <desc>Port to attach the medium to.</desc>
4829 </param>
4830 <param name="device" type="long" dir="in">
4831 <desc>Device slot in the given port to attach the medium to.</desc>
4832 </param>
4833 <param name="id" type="uuid" mod="string" dir="in">
4834 <desc>UUID of the medium to attach.</desc>
4835 </param>
4836 </method>
4837
4838 <method name="getMedium" const="yes">
4839 <desc>
4840 Returns the virtual medium attached to a device slot of the specified
4841 bus.
4842
4843 Note that if the medium was indirectly attached by
4844 <link to="#mountMedium"/> to the given device slot then this
4845 method will return not the same object as passed to the
4846 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4847 more detailed information about mounting a medium.
4848
4849 <result name="VBOX_E_OBJECT_NOT_FOUND">
4850 No medium attached to given slot/bus.
4851 </result>
4852
4853 </desc>
4854 <param name="name" type="wstring" dir="in">
4855 <desc>Name of the storage controller the medium is attached to.</desc>
4856 </param>
4857 <param name="controllerPort" type="long" dir="in">
4858 <desc>Port to query.</desc>
4859 </param>
4860 <param name="device" type="long" dir="in">
4861 <desc>Device slot in the given port to query.</desc>
4862 </param>
4863 <param name="medium" type="IMedium" dir="return">
4864 <desc>Attached medium object.</desc>
4865 </param>
4866 </method>
4867
4868 <method name="getMediumAttachmentsOfController" const="yes">
4869 <desc>
4870 Returns an array of medium attachments which are attached to the
4871 the controller with the given name.
4872
4873 <result name="VBOX_E_OBJECT_NOT_FOUND">
4874 A storage controller with given name doesn't exist.
4875 </result>
4876 </desc>
4877 <param name="name" type="wstring" dir="in"/>
4878 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4879 </method>
4880
4881 <method name="getMediumAttachment" const="yes">
4882 <desc>
4883 Returns a medium attachment which corresponds to the controller with
4884 the given name, on the given port and device slot.
4885
4886 <result name="VBOX_E_OBJECT_NOT_FOUND">
4887 No attachment exists for the given controller/port/device combination.
4888 </result>
4889 </desc>
4890 <param name="name" type="wstring" dir="in"/>
4891 <param name="controllerPort" type="long" dir="in"/>
4892 <param name="device" type="long" dir="in"/>
4893 <param name="attachment" type="IMediumAttachment" dir="return"/>
4894 </method>
4895
4896 <method name="getNetworkAdapter" const="yes">
4897 <desc>
4898 Returns the network adapter associated with the given slot.
4899 Slots are numbered sequentially, starting with zero. The total
4900 number of adapters per machine is defined by the
4901 <link to="ISystemProperties::networkAdapterCount"/> property,
4902 so the maximum slot number is one less than that property's value.
4903
4904 <result name="E_INVALIDARG">
4905 Invalid @a slot number.
4906 </result>
4907
4908 </desc>
4909 <param name="slot" type="unsigned long" dir="in"/>
4910 <param name="adapter" type="INetworkAdapter" dir="return"/>
4911 </method>
4912
4913 <method name="addStorageController">
4914 <desc>
4915 Adds a new storage controller (SCSI or SATA controller) to the
4916 machine and returns it as an instance of
4917 <link to="IStorageController" />.
4918
4919 @a name identifies the controller for subsequent calls such as
4920 <link to="#getStorageControllerByName" />,
4921 <link to="#removeStorageController" />,
4922 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4923
4924 After the controller has been added, you can set its exact
4925 type by setting the <link to="IStorageController::controllerType" />.
4926
4927 <result name="VBOX_E_OBJECT_IN_USE">
4928 A storage controller with given name exists already.
4929 </result>
4930 <result name="E_INVALIDARG">
4931 Invalid @a controllerType.
4932 </result>
4933 </desc>
4934 <param name="name" type="wstring" dir="in"/>
4935 <param name="connectionType" type="StorageBus" dir="in"/>
4936 <param name="controller" type="IStorageController" dir="return"/>
4937 </method>
4938
4939 <method name="getStorageControllerByName" const="yes">
4940 <desc>
4941 Returns a storage controller with the given name.
4942
4943 <result name="VBOX_E_OBJECT_NOT_FOUND">
4944 A storage controller with given name doesn't exist.
4945 </result>
4946 </desc>
4947 <param name="name" type="wstring" dir="in"/>
4948 <param name="storageController" type="IStorageController" dir="return"/>
4949 </method>
4950
4951 <method name="removeStorageController">
4952 <desc>
4953 Removes a storage controller from the machine.
4954
4955 <result name="VBOX_E_OBJECT_NOT_FOUND">
4956 A storage controller with given name doesn't exist.
4957 </result>
4958 </desc>
4959 <param name="name" type="wstring" dir="in"/>
4960 </method>
4961
4962 <method name="getSerialPort" const="yes">
4963 <desc>
4964 Returns the serial port associated with the given slot.
4965 Slots are numbered sequentially, starting with zero. The total
4966 number of serial ports per machine is defined by the
4967 <link to="ISystemProperties::serialPortCount"/> property,
4968 so the maximum slot number is one less than that property's value.
4969
4970 <result name="E_INVALIDARG">
4971 Invalid @a slot number.
4972 </result>
4973
4974 </desc>
4975 <param name="slot" type="unsigned long" dir="in"/>
4976 <param name="port" type="ISerialPort" dir="return"/>
4977 </method>
4978
4979 <method name="getParallelPort" const="yes">
4980 <desc>
4981 Returns the parallel port associated with the given slot.
4982 Slots are numbered sequentially, starting with zero. The total
4983 number of parallel ports per machine is defined by the
4984 <link to="ISystemProperties::parallelPortCount"/> property,
4985 so the maximum slot number is one less than that property's value.
4986
4987 <result name="E_INVALIDARG">
4988 Invalid @a slot number.
4989 </result>
4990
4991 </desc>
4992 <param name="slot" type="unsigned long" dir="in"/>
4993 <param name="port" type="IParallelPort" dir="return"/>
4994 </method>
4995
4996 <method name="getExtraDataKeys">
4997 <desc>
4998 Returns an array representing the machine-specific extra data keys
4999 which currently have values defined.
5000 </desc>
5001 <param name="value" type="wstring" dir="return" safearray="yes">
5002 <desc>Array of extra data keys.</desc>
5003 </param>
5004 </method>
5005
5006 <method name="getExtraData">
5007 <desc>
5008 Returns associated machine-specific extra data.
5009
5010 If the requested data @a key does not exist, this function will
5011 succeed and return an empty string in the @a value argument.
5012
5013 <result name="VBOX_E_FILE_ERROR">
5014 Settings file not accessible.
5015 </result>
5016 <result name="VBOX_E_XML_ERROR">
5017 Could not parse the settings file.
5018 </result>
5019
5020 </desc>
5021 <param name="key" type="wstring" dir="in">
5022 <desc>Name of the data key to get.</desc>
5023 </param>
5024 <param name="value" type="wstring" dir="return">
5025 <desc>Value of the requested data key.</desc>
5026 </param>
5027 </method>
5028
5029 <method name="setExtraData">
5030 <desc>
5031 Sets associated machine-specific extra data.
5032
5033 If you pass @c null or an empty string as a key @a value, the given
5034 @a key will be deleted.
5035
5036 <note>
5037 Before performing the actual data change, this method will ask all
5038 registered callbacks using the
5039 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5040 notification for a permission. If one of the callbacks refuses the
5041 new value, the change will not be performed.
5042 </note>
5043 <note>
5044 On success, the
5045 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5046 is called to inform all registered callbacks about a successful data
5047 change.
5048 </note>
5049 <note>
5050 This method can be called outside the machine session and therefore
5051 it's a caller's responsibility to handle possible race conditions
5052 when several clients change the same key at the same time.
5053 </note>
5054
5055 <result name="VBOX_E_FILE_ERROR">
5056 Settings file not accessible.
5057 </result>
5058 <result name="VBOX_E_XML_ERROR">
5059 Could not parse the settings file.
5060 </result>
5061
5062 </desc>
5063 <param name="key" type="wstring" dir="in">
5064 <desc>Name of the data key to set.</desc>
5065 </param>
5066 <param name="value" type="wstring" dir="in">
5067 <desc>Value to assign to the key.</desc>
5068 </param>
5069 </method>
5070
5071 <method name="getCpuProperty" const="yes">
5072 <desc>
5073 Returns the virtual CPU boolean value of the specified property.
5074
5075 <result name="E_INVALIDARG">
5076 Invalid property.
5077 </result>
5078
5079 </desc>
5080 <param name="property" type="CpuPropertyType" dir="in">
5081 <desc>
5082 Property type to query.
5083 </desc>
5084 </param>
5085 <param name="value" type="boolean" dir="return">
5086 <desc>
5087 Property value.
5088 </desc>
5089 </param>
5090 </method>
5091
5092 <method name="setCpuProperty">
5093 <desc>
5094 Sets the virtual CPU boolean value of the specified property.
5095
5096 <result name="E_INVALIDARG">
5097 Invalid property.
5098 </result>
5099
5100 </desc>
5101 <param name="property" type="CpuPropertyType" dir="in">
5102 <desc>
5103 Property type to query.
5104 </desc>
5105 </param>
5106 <param name="value" type="boolean" dir="in">
5107 <desc>
5108 Property value.
5109 </desc>
5110 </param>
5111 </method>
5112
5113 <method name="getHWVirtExProperty" const="yes">
5114 <desc>
5115 Returns the HWVirtEx boolean value of the specified property.
5116
5117 <result name="E_INVALIDARG">
5118 Invalid property.
5119 </result>
5120
5121 </desc>
5122 <param name="property" type="HWVirtExPropertyType" dir="in">
5123 <desc>
5124 Property type to query.
5125 </desc>
5126 </param>
5127 <param name="value" type="boolean" dir="return">
5128 <desc>
5129 Property value.
5130 </desc>
5131 </param>
5132 </method>
5133
5134 <method name="setHWVirtExProperty">
5135 <desc>
5136 Sets the HWVirtEx boolean value of the specified property.
5137
5138 <result name="E_INVALIDARG">
5139 Invalid property.
5140 </result>
5141
5142 </desc>
5143 <param name="property" type="HWVirtExPropertyType" dir="in">
5144 <desc>
5145 Property type to query.
5146 </desc>
5147 </param>
5148 <param name="value" type="boolean" dir="in">
5149 <desc>
5150 Property value.
5151 </desc>
5152 </param>
5153 </method>
5154
5155 <method name="saveSettings">
5156 <desc>
5157 Saves any changes to machine settings made since the session
5158 has been opened or a new machine has been created, or since the
5159 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5160 For registered machines, new settings become visible to all
5161 other VirtualBox clients after successful invocation of this
5162 method.
5163 <note>
5164 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5165 notification event after the configuration has been successfully
5166 saved (only for registered machines).
5167 </note>
5168 <note>
5169 Calling this method is only valid on instances returned
5170 by <link to="ISession::machine"/> and on new machines
5171 created by <link to="IVirtualBox::createMachine"/> but not
5172 yet registered, or on unregistered machines after calling
5173 <link to="IVirtualBox::unregisterMachine"/>.
5174 </note>
5175
5176 <result name="VBOX_E_FILE_ERROR">
5177 Settings file not accessible.
5178 </result>
5179 <result name="VBOX_E_XML_ERROR">
5180 Could not parse the settings file.
5181 </result>
5182 <result name="E_ACCESSDENIED">
5183 Modification request refused.
5184 </result>
5185
5186 </desc>
5187 </method>
5188
5189 <method name="discardSettings">
5190 <desc>
5191 Discards any changes to the machine settings made since the session
5192 has been opened or since the last call to <link to="#saveSettings"/>
5193 or <link to="#discardSettings"/>.
5194 <note>
5195 Calling this method is only valid on instances returned
5196 by <link to="ISession::machine"/> and on new machines
5197 created by <link to="IVirtualBox::createMachine"/> or
5198 opened by <link to="IVirtualBox::openMachine"/> but not
5199 yet registered, or on unregistered machines after calling
5200 <link to="IVirtualBox::unregisterMachine"/>.
5201 </note>
5202
5203 <result name="VBOX_E_INVALID_VM_STATE">
5204 Virtual machine is not mutable.
5205 </result>
5206
5207 </desc>
5208 </method>
5209
5210 <method name="deleteSettings">
5211 <desc>
5212 Deletes the settings file of this machine from disk.
5213 The machine must not be registered in order for this operation
5214 to succeed.
5215 <note>
5216 <link to="#settingsModified"/> will return @c true after this
5217 method successfully returns.
5218 </note>
5219 <note>
5220 Calling this method is only valid on instances returned
5221 by <link to="ISession::machine"/> and on new machines
5222 created by <link to="IVirtualBox::createMachine"/> or
5223 opened by <link to="IVirtualBox::openMachine"/> but not
5224 yet registered, or on unregistered machines after calling
5225 <link to="IVirtualBox::unregisterMachine"/>.
5226 </note>
5227 <note>
5228 The deleted machine settings file can be restored (saved again)
5229 by calling <link to="#saveSettings"/>.
5230 </note>
5231
5232 <result name="VBOX_E_INVALID_VM_STATE">
5233 Cannot delete settings of a registered machine or
5234 machine not mutable.
5235 </result>
5236 <result name="VBOX_E_IPRT_ERROR">
5237 Could not delete the settings file.
5238 </result>
5239
5240 </desc>
5241 </method>
5242
5243 <method name="export">
5244 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5245 steps required to export VirtualBox machines to OVF.
5246 </desc>
5247
5248 <param name="aAppliance" type="IAppliance" dir="in">
5249 <desc>Appliance to export this machine to.</desc>
5250 </param>
5251 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5252 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5253 </param>
5254 </method >
5255
5256 <method name="getSnapshot">
5257 <desc>
5258 Returns a snapshot of this machine with the given UUID.
5259 A @c null UUID can be used to obtain the first snapshot
5260 taken on this machine. This is useful if you want to traverse
5261 the whole tree of snapshots starting from the root.
5262
5263 <result name="VBOX_E_OBJECT_NOT_FOUND">
5264 Virtual machine has no snapshots or snapshot not found.
5265 </result>
5266
5267 </desc>
5268 <param name="id" type="uuid" mod="string" dir="in">
5269 <desc>UUID of the snapshot to get</desc>
5270 </param>
5271 <param name="snapshot" type="ISnapshot" dir="return">
5272 <desc>Snapshot object with the given UUID.</desc>
5273 </param>
5274 </method>
5275
5276 <method name="findSnapshot">
5277 <desc>
5278 Returns a snapshot of this machine with the given name.
5279
5280 <result name="VBOX_E_OBJECT_NOT_FOUND">
5281 Virtual machine has no snapshots or snapshot not found.
5282 </result>
5283
5284 </desc>
5285 <param name="name" type="wstring" dir="in">
5286 <desc>Name of the snapshot to find</desc>
5287 </param>
5288 <param name="snapshot" type="ISnapshot" dir="return">
5289 <desc>Snapshot object with the given name.</desc>
5290 </param>
5291 </method>
5292
5293 <method name="setCurrentSnapshot">
5294 <desc>
5295 Sets the current snapshot of this machine.
5296 <note>
5297 In the current implementation, this operation is not
5298 implemented.
5299 </note>
5300 </desc>
5301 <param name="id" type="uuid" mod="string" dir="in">
5302 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5303 </param>
5304 </method>
5305
5306 <method name="createSharedFolder">
5307 <desc>
5308 Creates a new permanent shared folder by associating the given logical
5309 name with the given host path, adds it to the collection of shared
5310 folders and starts sharing it. Refer to the description of
5311 <link to="ISharedFolder"/> to read more about logical names.
5312
5313 <result name="VBOX_E_OBJECT_IN_USE">
5314 Shared folder already exists.
5315 </result>
5316 <result name="VBOX_E_FILE_ERROR">
5317 Shared folder @a hostPath not accessible.
5318 </result>
5319
5320 </desc>
5321 <param name="name" type="wstring" dir="in">
5322 <desc>Unique logical name of the shared folder.</desc>
5323 </param>
5324 <param name="hostPath" type="wstring" dir="in">
5325 <desc>Full path to the shared folder in the host file system.</desc>
5326 </param>
5327 <param name="writable" type="boolean" dir="in">
5328 <desc>Whether the share is writable or readonly</desc>
5329 </param>
5330 </method>
5331
5332 <method name="removeSharedFolder">
5333 <desc>
5334 Removes the permanent shared folder with the given name previously
5335 created by <link to="#createSharedFolder"/> from the collection of
5336 shared folders and stops sharing it.
5337
5338 <result name="VBOX_E_INVALID_VM_STATE">
5339 Virtual machine is not mutable.
5340 </result>
5341 <result name="VBOX_E_OBJECT_NOT_FOUND">
5342 Shared folder @a name does not exist.
5343 </result>
5344
5345 </desc>
5346 <param name="name" type="wstring" dir="in">
5347 <desc>Logical name of the shared folder to remove.</desc>
5348 </param>
5349 </method>
5350
5351 <method name="canShowConsoleWindow">
5352 <desc>
5353 Returns @c true if the VM console process can activate the
5354 console window and bring it to foreground on the desktop of
5355 the host PC.
5356 <note>
5357 This method will fail if a session for this machine is not
5358 currently open.
5359 </note>
5360
5361 <result name="VBOX_E_INVALID_VM_STATE">
5362 Machine session is not open.
5363 </result>
5364
5365 </desc>
5366 <param name="canShow" type="boolean" dir="return">
5367 <desc>
5368 @c true if the console window can be shown and @c false otherwise.
5369 </desc>
5370 </param>
5371 </method>
5372
5373 <method name="showConsoleWindow">
5374 <desc>
5375 Activates the console window and brings it to foreground on
5376 the desktop of the host PC. Many modern window managers on
5377 many platforms implement some sort of focus stealing
5378 prevention logic, so that it may be impossible to activate
5379 a window without the help of the currently active
5380 application. In this case, this method will return a non-zero
5381 identifier that represents the top-level window of the VM
5382 console process. The caller, if it represents a currently
5383 active process, is responsible to use this identifier (in a
5384 platform-dependent manner) to perform actual window
5385 activation.
5386 <note>
5387 This method will fail if a session for this machine is not
5388 currently open.
5389 </note>
5390
5391 <result name="VBOX_E_INVALID_VM_STATE">
5392 Machine session is not open.
5393 </result>
5394
5395 </desc>
5396 <param name="winId" type="unsigned long long" dir="return">
5397 <desc>
5398 Platform-dependent identifier of the top-level VM console
5399 window, or zero if this method has performed all actions
5400 necessary to implement the <i>show window</i> semantics for
5401 the given platform and/or VirtualBox front-end.
5402 </desc>
5403 </param>
5404 </method>
5405
5406 <method name="getGuestProperty">
5407 <desc>
5408 Reads an entry from the machine's guest property store.
5409
5410 <result name="VBOX_E_INVALID_VM_STATE">
5411 Machine session is not open.
5412 </result>
5413
5414 </desc>
5415 <param name="name" type="wstring" dir="in">
5416 <desc>
5417 The name of the property to read.
5418 </desc>
5419 </param>
5420 <param name="value" type="wstring" dir="out">
5421 <desc>
5422 The value of the property. If the property does not exist then this
5423 will be empty.
5424 </desc>
5425 </param>
5426 <param name="timestamp" type="unsigned long long" dir="out">
5427 <desc>
5428 The time at which the property was last modified, as seen by the
5429 server process.
5430 </desc>
5431 </param>
5432 <param name="flags" type="wstring" dir="out">
5433 <desc>
5434 Additional property parameters, passed as a comma-separated list of
5435 "name=value" type entries.
5436 </desc>
5437 </param>
5438 </method>
5439
5440 <method name="getGuestPropertyValue">
5441 <desc>
5442 Reads a value from the machine's guest property store.
5443
5444 <result name="VBOX_E_INVALID_VM_STATE">
5445 Machine session is not open.
5446 </result>
5447
5448 </desc>
5449 <param name="property" type="wstring" dir="in">
5450 <desc>
5451 The name of the property to read.
5452 </desc>
5453 </param>
5454 <param name="value" type="wstring" dir="return">
5455 <desc>
5456 The value of the property. If the property does not exist then this
5457 will be empty.
5458 </desc>
5459 </param>
5460 </method>
5461
5462 <method name="getGuestPropertyTimestamp">
5463 <desc>
5464 Reads a property timestamp from the machine's guest property store.
5465
5466 <result name="VBOX_E_INVALID_VM_STATE">
5467 Machine session is not open.
5468 </result>
5469
5470 </desc>
5471 <param name="property" type="wstring" dir="in">
5472 <desc>
5473 The name of the property to read.
5474 </desc>
5475 </param>
5476 <param name="value" type="unsigned long long" dir="return">
5477 <desc>
5478 The timestamp. If the property does not exist then this will be
5479 empty.
5480 </desc>
5481 </param>
5482 </method>
5483
5484 <method name="setGuestProperty">
5485 <desc>
5486 Sets, changes or deletes an entry in the machine's guest property
5487 store.
5488
5489 <result name="E_ACCESSDENIED">
5490 Property cannot be changed.
5491 </result>
5492 <result name="E_INVALIDARG">
5493 Invalid @a flags.
5494 </result>
5495 <result name="VBOX_E_INVALID_VM_STATE">
5496 Virtual machine is not mutable or session not open.
5497 </result>
5498 <result name="VBOX_E_INVALID_OBJECT_STATE">
5499 Cannot set transient property when machine not running.
5500 </result>
5501
5502 </desc>
5503 <param name="property" type="wstring" dir="in">
5504 <desc>
5505 The name of the property to set, change or delete.
5506 </desc>
5507 </param>
5508 <param name="value" type="wstring" dir="in">
5509 <desc>
5510 The new value of the property to set, change or delete. If the
5511 property does not yet exist and value is non-empty, it will be
5512 created. If the value is @c null or empty, the property will be
5513 deleted if it exists.
5514 </desc>
5515 </param>
5516 <param name="flags" type="wstring" dir="in">
5517 <desc>
5518 Additional property parameters, passed as a comma-separated list of
5519 "name=value" type entries.
5520 </desc>
5521 </param>
5522 </method>
5523
5524 <method name="setGuestPropertyValue">
5525 <desc>
5526 Sets, changes or deletes a value in the machine's guest property
5527 store. The flags field will be left unchanged or created empty for a
5528 new property.
5529
5530 <result name="E_ACCESSDENIED">
5531 Property cannot be changed.
5532 </result>
5533 <result name="VBOX_E_INVALID_VM_STATE">
5534 Virtual machine is not mutable or session not open.
5535 </result>
5536 <result name="VBOX_E_INVALID_OBJECT_STATE">
5537 Cannot set transient property when machine not running.
5538 </result>
5539 </desc>
5540
5541 <param name="property" type="wstring" dir="in">
5542 <desc>
5543 The name of the property to set, change or delete.
5544 </desc>
5545 </param>
5546 <param name="value" type="wstring" dir="in">
5547 <desc>
5548 The new value of the property to set, change or delete. If the
5549 property does not yet exist and value is non-empty, it will be
5550 created. If the value is @c null or empty, the property will be
5551 deleted if it exists.
5552 </desc>
5553 </param>
5554 </method>
5555
5556 <method name="enumerateGuestProperties">
5557 <desc>
5558 Return a list of the guest properties matching a set of patterns along
5559 with their values, time stamps and flags.
5560 </desc>
5561 <param name="patterns" type="wstring" dir="in">
5562 <desc>
5563 The patterns to match the properties against, separated by '|'
5564 characters. If this is empty or @c null, all properties will match.
5565 </desc>
5566 </param>
5567 <param name="name" type="wstring" dir="out" safearray="yes">
5568 <desc>
5569 The names of the properties returned.
5570 </desc>
5571 </param>
5572 <param name="value" type="wstring" dir="out" safearray="yes">
5573 <desc>
5574 The values of the properties returned. The array entries match the
5575 corresponding entries in the @a name array.
5576 </desc>
5577 </param>
5578 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5579 <desc>
5580 The time stamps of the properties returned. The array entries match
5581 the corresponding entries in the @a name array.
5582 </desc>
5583 </param>
5584 <param name="flags" type="wstring" dir="out" safearray="yes">
5585 <desc>
5586 The flags of the properties returned. The array entries match the
5587 corresponding entries in the @a name array.
5588 </desc>
5589 </param>
5590 </method>
5591</interface>
5592
5593 <!--
5594 // IConsole
5595 /////////////////////////////////////////////////////////////////////////
5596 -->
5597
5598 <interface
5599 name="IConsoleCallback" extends="$unknown"
5600 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5601 wsmap="suppress"
5602 >
5603
5604 <desc>
5605 This interface is used by a client of the Main API that need to
5606 be notified of events. For example, a graphical user interface
5607 can use this to learn about machine state changes so they can
5608 update the list of virtual machines without having to rely
5609 on polling.
5610
5611 Whenever relevant events occur in VirtualBox, the callbacks in
5612 objects of this interface are called. In order for this to be
5613 useful, a client needs to create its own subclass that implements
5614 this interface in which the methods for the relevant callbacks
5615 are overridden. An instance of this subclass interface can then
5616 be passed to <link to="IConsole::registerCallback" />.
5617 </desc>
5618
5619 <method name="onMousePointerShapeChange">
5620 <desc>
5621 Notification when the guest mouse pointer shape has
5622 changed. The new shape data is given.
5623 </desc>
5624 <param name="visible" type="boolean" dir="in">
5625 <desc>
5626 Flag whether the pointer is visible.
5627 </desc>
5628 </param>
5629 <param name="alpha" type="boolean" dir="in">
5630 <desc>
5631 Flag whether the pointer has an alpha channel.
5632 </desc>
5633 </param>
5634 <param name="xHot" type="unsigned long" dir="in">
5635 <desc>
5636 The pointer hot spot x coordinate.
5637 </desc>
5638 </param>
5639 <param name="yHot" type="unsigned long" dir="in">
5640 <desc>
5641 The pointer hot spot y coordinate.
5642 </desc>
5643 </param>
5644 <param name="width" type="unsigned long" dir="in">
5645 <desc>
5646 Width of the pointer shape in pixels.
5647 </desc>
5648 </param>
5649 <param name="height" type="unsigned long" dir="in">
5650 <desc>
5651 Height of the pointer shape in pixels.
5652 </desc>
5653 </param>
5654 <param name="shape" type="octet" mod="ptr" dir="in">
5655 <desc>
5656 Address of the shape buffer.
5657
5658 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5659 followed by a 32-bpp XOR (color) mask.
5660
5661 For pointers without alpha channel the XOR mask pixels are 32
5662 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5663 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5664
5665 An AND mask is used for pointers with alpha channel, so if the
5666 callback does not support alpha, the pointer could be
5667 displayed as a normal color pointer.
5668
5669 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5670 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5671 height</tt>. The padding bits at the end of each scanline are
5672 undefined.
5673
5674 The XOR mask follows the AND mask on the next 4-byte aligned
5675 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5676 Bytes in the gap between the AND and the XOR mask are undefined.
5677 The XOR mask scanlines have no gap between them and the size of
5678 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5679
5680 <note>
5681 If @a shape is 0, only the pointer visibility is changed.
5682 </note>
5683 </desc>
5684 </param>
5685 </method>
5686
5687 <method name="onMouseCapabilityChange">
5688 <desc>
5689 Notification when the mouse capabilities reported by the
5690 guest have changed. The new capabilities are passed.
5691 </desc>
5692 <param name="supportsAbsolute" type="boolean" dir="in"/>
5693 <param name="needsHostCursor" type="boolean" dir="in"/>
5694 </method>
5695
5696 <method name="onKeyboardLedsChange">
5697 <desc>
5698 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5699 to alter the state of the keyboard LEDs.
5700 </desc>
5701 <param name="numLock" type="boolean" dir="in"/>
5702 <param name="capsLock" type="boolean" dir="in"/>
5703 <param name="scrollLock" type="boolean" dir="in"/>
5704 </method>
5705
5706 <method name="onStateChange">
5707 <desc>
5708 Notification when the execution state of the machine has changed.
5709 The new state will be given.
5710 </desc>
5711 <param name="state" type="MachineState" dir="in"/>
5712 </method>
5713
5714 <method name="onAdditionsStateChange">
5715 <desc>
5716 Notification when a Guest Additions property changes.
5717 Interested callees should query IGuest attributes to
5718 find out what has changed.
5719 </desc>
5720 </method>
5721
5722 <method name="onNetworkAdapterChange">
5723 <desc>
5724 Notification when a property of one of the
5725 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5726 changes. Interested callees should use INetworkAdapter methods and
5727 attributes to find out what has changed.
5728 </desc>
5729 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5730 <desc>Network adapter that is subject to change.</desc>
5731 </param>
5732 </method>
5733
5734 <method name="onSerialPortChange">
5735 <desc>
5736 Notification when a property of one of the
5737 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5738 Interested callees should use ISerialPort methods and attributes
5739 to find out what has changed.
5740 </desc>
5741 <param name="serialPort" type="ISerialPort" dir="in">
5742 <desc>Serial port that is subject to change.</desc>
5743 </param>
5744 </method>
5745
5746 <method name="onParallelPortChange">
5747 <desc>
5748 Notification when a property of one of the
5749 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5750 changes. Interested callees should use ISerialPort methods and
5751 attributes to find out what has changed.
5752 </desc>
5753 <param name="parallelPort" type="IParallelPort" dir="in">
5754 <desc>Parallel port that is subject to change.</desc>
5755 </param>
5756 </method>
5757
5758 <method name="onStorageControllerChange">
5759 <desc>
5760 Notification when a property of one of the
5761 virtual <link to="IMachine::storageControllers">storage controllers</link>
5762 changes. Interested callees should query the corresponding collections
5763 to find out what has changed.
5764 </desc>
5765 </method>
5766
5767 <method name="onMediumChange">
5768 <desc>
5769 Notification when a
5770 <link to="IMachine::mediumAttachments">medium attachment</link>
5771 changes.
5772 </desc>
5773 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5774 <desc>Medium attachment that is subject to change.</desc>
5775 </param>
5776 </method>
5777
5778 <method name="onVRDPServerChange">
5779 <desc>
5780 Notification when a property of the
5781 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5782 Interested callees should use IVRDPServer methods and attributes to
5783 find out what has changed.
5784 </desc>
5785 </method>
5786
5787 <method name="onRemoteDisplayInfoChange">
5788 <desc>
5789 Notification when the status of the VRDP server changes. Interested callees
5790 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5791 attributes to find out what is the current status.
5792 </desc>
5793 </method>
5794
5795 <method name="onUSBControllerChange">
5796 <desc>
5797 Notification when a property of the virtual
5798 <link to="IMachine::USBController">USB controller</link> changes.
5799 Interested callees should use IUSBController methods and attributes to
5800 find out what has changed.
5801 </desc>
5802 </method>
5803
5804 <method name="onUSBDeviceStateChange">
5805 <desc>
5806 Notification when a USB device is attached to or detached from
5807 the virtual USB controller.
5808
5809 This notification is sent as a result of the indirect
5810 request to attach the device because it matches one of the
5811 machine USB filters, or as a result of the direct request
5812 issued by <link to="IConsole::attachUSBDevice"/> or
5813 <link to="IConsole::detachUSBDevice"/>.
5814
5815 This notification is sent in case of both a succeeded and a
5816 failed request completion. When the request succeeds, the
5817 @a error parameter is @c null, and the given device has been
5818 already added to (when @a attached is @c true) or removed from
5819 (when @a attached is @c false) the collection represented by
5820 <link to="IConsole::USBDevices"/>. On failure, the collection
5821 doesn't change and the @a error parameter represents the error
5822 message describing the failure.
5823
5824 </desc>
5825 <param name="device" type="IUSBDevice" dir="in">
5826 <desc>Device that is subject to state change.</desc>
5827 </param>
5828 <param name="attached" type="boolean" dir="in">
5829 <desc>
5830 @c true if the device was attached and @c false otherwise.
5831 </desc>
5832 </param>
5833 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5834 <desc>
5835 @c null on success or an error message object on failure.
5836 </desc>
5837 </param>
5838 </method>
5839
5840 <method name="onSharedFolderChange">
5841 <desc>
5842 Notification when a shared folder is added or removed.
5843 The @a scope argument defines one of three scopes:
5844 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5845 (<link to="Scope_Global">Global</link>),
5846 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5847 the machine (<link to="Scope_Machine">Machine</link>) or <link
5848 to="IConsole::sharedFolders">transient shared folders</link> of the
5849 machine (<link to="Scope_Session">Session</link>). Interested callees
5850 should use query the corresponding collections to find out what has
5851 changed.
5852 </desc>
5853 <param name="scope" type="Scope" dir="in">
5854 <desc>Scope of the notification.</desc>
5855 </param>
5856 </method>
5857
5858 <method name="onRuntimeError">
5859 <desc>
5860 Notification when an error happens during the virtual
5861 machine execution.
5862
5863 There are three kinds of runtime errors:
5864 <ul>
5865 <li><i>fatal</i></li>
5866 <li><i>non-fatal with retry</i></li>
5867 <li><i>non-fatal warnings</i></li>
5868 </ul>
5869
5870 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5871 to @c true. In case of fatal errors, the virtual machine
5872 execution is always paused before calling this notification, and
5873 the notification handler is supposed either to immediately save
5874 the virtual machine state using <link to="IConsole::saveState"/>
5875 or power it off using <link to="IConsole::powerDown"/>.
5876 Resuming the execution can lead to unpredictable results.
5877
5878 <b>Non-fatal</b> errors and warnings are indicated by the
5879 @a fatal parameter set to @c false. If the virtual machine
5880 is in the Paused state by the time the error notification is
5881 received, it means that the user can <i>try to resume</i> the machine
5882 execution after attempting to solve the problem that caused the
5883 error. In this case, the notification handler is supposed
5884 to show an appropriate message to the user (depending on the
5885 value of the @a id parameter) that offers several actions such
5886 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5887 wants to retry, the notification handler should continue
5888 the machine execution using the <link to="IConsole::resume"/>
5889 call. If the machine execution is not Paused during this
5890 notification, then it means this notification is a <i>warning</i>
5891 (for example, about a fatal condition that can happen very soon);
5892 no immediate action is required from the user, the machine
5893 continues its normal execution.
5894
5895 Note that in either case the notification handler
5896 <b>must not</b> perform any action directly on a thread
5897 where this notification is called. Everything it is allowed to
5898 do is to post a message to another thread that will then talk
5899 to the user and take the corresponding action.
5900
5901 Currently, the following error identifiers are known:
5902 <ul>
5903 <li><tt>"HostMemoryLow"</tt></li>
5904 <li><tt>"HostAudioNotResponding"</tt></li>
5905 <li><tt>"VDIStorageFull"</tt></li>
5906 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5907 </ul>
5908
5909 <note>
5910 This notification is not designed to be implemented by
5911 more than one callback at a time. If you have multiple
5912 IConsoleCallback instances registered on the given
5913 IConsole object, make sure you simply do nothing but
5914 return @c S_OK from all but one of them that does actual
5915 user notification and performs necessary actions.
5916 </note>
5917
5918 </desc>
5919 <param name="fatal" type="boolean" dir="in">
5920 <desc>Whether the error is fatal or not</desc>
5921 </param>
5922 <param name="id" type="wstring" dir="in">
5923 <desc>Error identifier</desc>
5924 </param>
5925 <param name="message" type="wstring" dir="in">
5926 <desc>Optional error message</desc>
5927 </param>
5928 </method>
5929
5930 <method name="onCanShowWindow">
5931 <desc>
5932 Notification when a call to
5933 <link to="IMachine::canShowConsoleWindow"/> is made by a
5934 front-end to check if a subsequent call to
5935 <link to="IMachine::showConsoleWindow"/> can succeed.
5936
5937 The callee should give an answer appropriate to the current
5938 machine state in the @a canShow argument. This answer must
5939 remain valid at least until the next
5940 <link to="IConsole::state">machine state</link> change.
5941
5942 <note>
5943 This notification is not designed to be implemented by
5944 more than one callback at a time. If you have multiple
5945 IConsoleCallback instances registered on the given
5946 IConsole object, make sure you simply do nothing but
5947 return @c true and @c S_OK from all but one of them that
5948 actually manages console window activation.
5949 </note>
5950 </desc>
5951 <param name="canShow" type="boolean" dir="return">
5952 <desc>
5953 @c true if the console window can be shown and @c false otherwise.
5954 </desc>
5955 </param>
5956 </method>
5957
5958 <method name="onShowWindow">
5959 <desc>
5960 Notification when a call to
5961 <link to="IMachine::showConsoleWindow"/>
5962 requests the console window to be activated and brought to
5963 foreground on the desktop of the host PC.
5964
5965 This notification should cause the VM console process to
5966 perform the requested action as described above. If it is
5967 impossible to do it at a time of this notification, this
5968 method should return a failure.
5969
5970 Note that many modern window managers on many platforms
5971 implement some sort of focus stealing prevention logic, so
5972 that it may be impossible to activate a window without the
5973 help of the currently active application (which is supposedly
5974 an initiator of this notification). In this case, this method
5975 must return a non-zero identifier that represents the
5976 top-level window of the VM console process. The caller, if it
5977 represents a currently active process, is responsible to use
5978 this identifier (in a platform-dependent manner) to perform
5979 actual window activation.
5980
5981 This method must set @a winId to zero if it has performed all
5982 actions necessary to complete the request and the console
5983 window is now active and in foreground, to indicate that no
5984 further action is required on the caller's side.
5985
5986 <note>
5987 This notification is not designed to be implemented by
5988 more than one callback at a time. If you have multiple
5989 IConsoleCallback instances registered on the given
5990 IConsole object, make sure you simply do nothing but
5991 return @c S_OK from all but one of them that actually
5992 manages console window activation.
5993 </note>
5994 </desc>
5995 <param name="winId" type="unsigned long long" dir="return">
5996 <desc>
5997 Platform-dependent identifier of the top-level VM console
5998 window, or zero if this method has performed all actions
5999 necessary to implement the <i>show window</i> semantics for
6000 the given platform and/or this VirtualBox front-end.
6001 </desc>
6002 </param>
6003 </method>
6004
6005 </interface>
6006
6007 <interface
6008 name="IRemoteDisplayInfo" extends="$unknown"
6009 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6010 wsmap="struct"
6011 >
6012 <desc>
6013 Contains information about the remote display (VRDP) capabilities and status.
6014 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6015 </desc>
6016
6017 <attribute name="active" type="boolean" readonly="yes">
6018 <desc>
6019 Whether the remote display connection is active.
6020 </desc>
6021 </attribute>
6022
6023 <attribute name="port" type="long" readonly="yes">
6024 <desc>
6025 VRDP server port number. If this property is equal to <tt>0</tt>, then
6026 the VRDP server failed to start, usually because there are no free TCP
6027 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6028 server has not yet been started.
6029 </desc>
6030 </attribute>
6031
6032 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6033 <desc>
6034 How many times a client connected.
6035 </desc>
6036 </attribute>
6037
6038 <attribute name="beginTime" type="long long" readonly="yes">
6039 <desc>
6040 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6041 </desc>
6042 </attribute>
6043
6044 <attribute name="endTime" type="long long" readonly="yes">
6045 <desc>
6046 When the last connection was terminated or the current time, if
6047 connection is still active, in milliseconds since 1970-01-01 UTC.
6048 </desc>
6049 </attribute>
6050
6051 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6052 <desc>
6053 How many bytes were sent in last or current, if still active, connection.
6054 </desc>
6055 </attribute>
6056
6057 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6058 <desc>
6059 How many bytes were sent in all connections.
6060 </desc>
6061 </attribute>
6062
6063 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6064 <desc>
6065 How many bytes were received in last or current, if still active, connection.
6066 </desc>
6067 </attribute>
6068
6069 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6070 <desc>
6071 How many bytes were received in all connections.
6072 </desc>
6073 </attribute>
6074
6075 <attribute name="user" type="wstring" readonly="yes">
6076 <desc>
6077 Login user name supplied by the client.
6078 </desc>
6079 </attribute>
6080
6081 <attribute name="domain" type="wstring" readonly="yes">
6082 <desc>
6083 Login domain name supplied by the client.
6084 </desc>
6085 </attribute>
6086
6087 <attribute name="clientName" type="wstring" readonly="yes">
6088 <desc>
6089 The client name supplied by the client.
6090 </desc>
6091 </attribute>
6092
6093 <attribute name="clientIP" type="wstring" readonly="yes">
6094 <desc>
6095 The IP address of the client.
6096 </desc>
6097 </attribute>
6098
6099 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6100 <desc>
6101 The client software version number.
6102 </desc>
6103 </attribute>
6104
6105 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6106 <desc>
6107 Public key exchange method used when connection was established.
6108 Values: 0 - RDP4 public key exchange scheme.
6109 1 - X509 certificates were sent to client.
6110 </desc>
6111 </attribute>
6112
6113 </interface>
6114
6115 <interface
6116 name="IConsole" extends="$unknown"
6117 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6118 wsmap="managed"
6119 >
6120 <desc>
6121 The IConsole interface represents an interface to control virtual
6122 machine execution.
6123
6124 The console object that implements the IConsole interface is obtained
6125 from a session object after the session for the given machine has been
6126 opened using one of <link to="IVirtualBox::openSession"/>,
6127 <link to="IVirtualBox::openRemoteSession"/> or
6128 <link to="IVirtualBox::openExistingSession"/> methods.
6129
6130 Methods of the IConsole interface allow the caller to query the current
6131 virtual machine execution state, pause the machine or power it down, save
6132 the machine state or take a snapshot, attach and detach removable media
6133 and so on.
6134
6135 <see>ISession</see>
6136 </desc>
6137
6138 <attribute name="machine" type="IMachine" readonly="yes">
6139 <desc>
6140 Machine object this console is sessioned with.
6141 <note>
6142 This is a convenience property, it has the same value as
6143 <link to="ISession::machine"/> of the corresponding session
6144 object.
6145 </note>
6146 </desc>
6147 </attribute>
6148
6149 <attribute name="state" type="MachineState" readonly="yes">
6150 <desc>
6151 Current execution state of the machine.
6152 <note>
6153 This property always returns the same value as the corresponding
6154 property of the IMachine object this console is sessioned with.
6155 For the process that owns (executes) the VM, this is the
6156 preferable way of querying the VM state, because no IPC
6157 calls are made.
6158 </note>
6159 </desc>
6160 </attribute>
6161
6162 <attribute name="guest" type="IGuest" readonly="yes">
6163 <desc>Guest object.</desc>
6164 </attribute>
6165
6166 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6167 <desc>
6168 Virtual keyboard object.
6169 <note>
6170 If the machine is not running, any attempt to use
6171 the returned object will result in an error.
6172 </note>
6173 </desc>
6174 </attribute>
6175
6176 <attribute name="mouse" type="IMouse" readonly="yes">
6177 <desc>
6178 Virtual mouse object.
6179 <note>
6180 If the machine is not running, any attempt to use
6181 the returned object will result in an error.
6182 </note>
6183 </desc>
6184 </attribute>
6185
6186 <attribute name="display" type="IDisplay" readonly="yes">
6187 <desc>Virtual display object.
6188 <note>
6189 If the machine is not running, any attempt to use
6190 the returned object will result in an error.
6191 </note>
6192 </desc>
6193 </attribute>
6194
6195 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6196 <desc>Debugging interface.</desc>
6197 </attribute>
6198
6199 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6200 <desc>
6201 Collection of USB devices currently attached to the virtual
6202 USB controller.
6203 <note>
6204 The collection is empty if the machine is not running.
6205 </note>
6206 </desc>
6207 </attribute>
6208
6209 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6210 <desc>
6211 List of USB devices currently attached to the remote VRDP client.
6212 Once a new device is physically attached to the remote host computer,
6213 it appears in this list and remains there until detached.
6214 </desc>
6215 </attribute>
6216
6217 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6218 <desc>
6219 Collection of shared folders for the current session. These folders
6220 are called transient shared folders because they are available to the
6221 guest OS running inside the associated virtual machine only for the
6222 duration of the session (as opposed to
6223 <link to="IMachine::sharedFolders"/> which represent permanent shared
6224 folders). When the session is closed (e.g. the machine is powered down),
6225 these folders are automatically discarded.
6226
6227 New shared folders are added to the collection using
6228 <link to="#createSharedFolder"/>. Existing shared folders can be
6229 removed using <link to="#removeSharedFolder"/>.
6230 </desc>
6231 </attribute>
6232
6233 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6234 <desc>
6235 Interface that provides information on Remote Display (VRDP) connection.
6236 </desc>
6237 </attribute>
6238
6239 <method name="powerUp">
6240 <desc>
6241 Starts the virtual machine execution using the current machine
6242 state (that is, its current execution state, current settings and
6243 current hard disks).
6244
6245 If the machine is powered off or aborted, the execution will
6246 start from the beginning (as if the real hardware were just
6247 powered on).
6248
6249 If the machine is in the <link to="MachineState_Saved"/> state,
6250 it will continue its execution the point where the state has
6251 been saved.
6252
6253 <note>
6254 Unless you are trying to write a new VirtualBox front-end that
6255 performs direct machine execution (like the VirtualBox or VBoxSDL
6256 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6257 session opened by <link to="IVirtualBox::openSession"/> and use this
6258 session only to change virtual machine settings. If you simply want to
6259 start virtual machine execution using one of the existing front-ends
6260 (for example the VirtualBox GUI or headless server), simply use
6261 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6262 power up the machine automatically for you.
6263 </note>
6264
6265 <see>#saveState</see>
6266 <result name="VBOX_E_INVALID_VM_STATE">
6267 Virtual machine already running.
6268 </result>
6269 <result name="VBOX_E_HOST_ERROR">
6270 Host interface does not exist or name not set.
6271 </result>
6272 <result name="VBOX_E_FILE_ERROR">
6273 Invalid saved state file.
6274 </result>
6275 </desc>
6276 <param name="progress" type="IProgress" dir="return">
6277 <desc>Progress object to track the operation completion.</desc>
6278 </param>
6279 </method>
6280
6281 <method name="powerUpPaused">
6282 <desc>
6283 Identical to powerUp except that the VM will enter the
6284 <link to="MachineState_Paused"/> state, instead of
6285 <link to="MachineState_Running"/>.
6286
6287 <see>#powerUp</see>
6288 <result name="VBOX_E_INVALID_VM_STATE">
6289 Virtual machine already running.
6290 </result>
6291 <result name="VBOX_E_HOST_ERROR">
6292 Host interface does not exist or name not set.
6293 </result>
6294 <result name="VBOX_E_FILE_ERROR">
6295 Invalid saved state file.
6296 </result>
6297 </desc>
6298 <param name="progress" type="IProgress" dir="return">
6299 <desc>Progress object to track the operation completion.</desc>
6300 </param>
6301 </method>
6302
6303 <method name="powerDown">
6304 <desc>
6305 Initiates the power down procedure to stop the virtual machine
6306 execution.
6307
6308 The completion of the power down procedure is tracked using the returned
6309 IProgress object. After the operation is complete, the machine will go
6310 to the PoweredOff state.
6311 <result name="VBOX_E_INVALID_VM_STATE">
6312 Virtual machine must be Running, Paused or Stuck to be powered down.
6313 </result>
6314 </desc>
6315 <param name="progress" type="IProgress" dir="return">
6316 <desc>Progress object to track the operation completion.</desc>
6317 </param>
6318 </method>
6319
6320 <method name="reset">
6321 <desc>Resets the virtual machine.
6322 <result name="VBOX_E_INVALID_VM_STATE">
6323 Virtual machine not in Running state.
6324 </result>
6325 <result name="VBOX_E_VM_ERROR">
6326 Virtual machine error in reset operation.
6327 </result>
6328 </desc>
6329 </method>
6330
6331 <method name="pause">
6332 <desc>Pauses the virtual machine execution.
6333 <result name="VBOX_E_INVALID_VM_STATE">
6334 Virtual machine not in Running state.
6335 </result>
6336 <result name="VBOX_E_VM_ERROR">
6337 Virtual machine error in suspend operation.
6338 </result>
6339 </desc>
6340 </method>
6341
6342 <method name="resume">
6343 <desc>Resumes the virtual machine execution.
6344 <result name="VBOX_E_INVALID_VM_STATE">
6345 Virtual machine not in Paused state.
6346 </result>
6347 <result name="VBOX_E_VM_ERROR">
6348 Virtual machine error in resume operation.
6349 </result>
6350 </desc>
6351 </method>
6352
6353 <method name="powerButton">
6354 <desc>Sends the ACPI power button event to the guest.
6355 <result name="VBOX_E_INVALID_VM_STATE">
6356 Virtual machine not in Running state.
6357 </result>
6358 <result name="VBOX_E_PDM_ERROR">
6359 Controlled power off failed.
6360 </result>
6361 </desc>
6362 </method>
6363
6364 <method name="sleepButton">
6365 <desc>Sends the ACPI sleep button event to the guest.
6366 <result name="VBOX_E_INVALID_VM_STATE">
6367 Virtual machine not in Running state.
6368 </result>
6369 <result name="VBOX_E_PDM_ERROR">
6370 Sending sleep button event failed.
6371 </result>
6372 </desc>
6373 </method>
6374
6375 <method name="getPowerButtonHandled">
6376 <desc>Checks if the last power button event was handled by guest.
6377 <result name="VBOX_E_PDM_ERROR">
6378 Checking if the event was handled by the guest OS failed.
6379 </result>
6380 </desc>
6381 <param name="handled" type="boolean" dir="return"/>
6382 </method>
6383
6384 <method name="getGuestEnteredACPIMode">
6385 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6386 G1 (sleeping). If this method returns @c false, the guest will
6387 most likely not respond to external ACPI events.
6388 <result name="VBOX_E_INVALID_VM_STATE">
6389 Virtual machine not in Running state.
6390 </result>
6391 </desc>
6392 <param name="entered" type="boolean" dir="return"/>
6393 </method>
6394
6395 <method name="saveState">
6396 <desc>
6397 Saves the current execution state of a running virtual machine
6398 and stops its execution.
6399
6400 After this operation completes, the machine will go to the
6401 Saved state. Next time it is powered up, this state will
6402 be restored and the machine will continue its execution from
6403 the place where it was saved.
6404
6405 This operation differs from taking a snapshot to the effect
6406 that it doesn't create new differencing media. Also, once
6407 the machine is powered up from the state saved using this method,
6408 the saved state is deleted, so it will be impossible to return
6409 to this state later.
6410
6411 <note>
6412 On success, this method implicitly calls
6413 <link to="IMachine::saveSettings"/> to save all current machine
6414 settings (including runtime changes to the DVD medium, etc.).
6415 Together with the impossibility to change any VM settings when it is
6416 in the Saved state, this guarantees adequate hardware
6417 configuration of the machine when it is restored from the saved
6418 state file.
6419 </note>
6420
6421 <note>
6422 The machine must be in the Running or Paused state, otherwise
6423 the operation will fail.
6424 </note>
6425 <result name="VBOX_E_INVALID_VM_STATE">
6426 Virtual machine state neither Running nor Paused.
6427 </result>
6428 <result name="VBOX_E_FILE_ERROR">
6429 Failed to create directory for saved state file.
6430 </result>
6431
6432 <see><link to="#takeSnapshot"/></see>
6433 </desc>
6434 <param name="progress" type="IProgress" dir="return">
6435 <desc>Progress object to track the operation completion.</desc>
6436 </param>
6437 </method>
6438
6439 <method name="adoptSavedState">
6440 <desc>
6441 Associates the given saved state file to the virtual machine.
6442
6443 On success, the machine will go to the Saved state. Next time it is
6444 powered up, it will be restored from the adopted saved state and
6445 continue execution from the place where the saved state file was
6446 created.
6447
6448 The specified saved state file path may be absolute or relative to the
6449 folder the VM normally saves the state to (usually,
6450 <link to="IMachine::snapshotFolder"/>).
6451
6452 <note>
6453 It's a caller's responsibility to make sure the given saved state
6454 file is compatible with the settings of this virtual machine that
6455 represent its virtual hardware (memory size, hard disk configuration
6456 etc.). If there is a mismatch, the behavior of the virtual machine
6457 is undefined.
6458 </note>
6459 <result name="VBOX_E_INVALID_VM_STATE">
6460 Virtual machine state neither PoweredOff nor Aborted.
6461 </result>
6462 </desc>
6463 <param name="savedStateFile" type="wstring" dir="in">
6464 <desc>Path to the saved state file to adopt.</desc>
6465 </param>
6466 </method>
6467
6468 <method name="forgetSavedState">
6469 <desc>
6470 Forgets the saved state of the virtual machine previously created
6471 by <link to="#saveState"/>. Next time the machine is powered up, a
6472 clean boot will occur. If @a remove is @c true the saved state file
6473 is deleted.
6474 <note>
6475 This operation is equivalent to resetting or powering off
6476 the machine without doing a proper shutdown in the guest OS.
6477 </note>
6478 <result name="VBOX_E_INVALID_VM_STATE">
6479 Virtual machine not in state Saved.
6480 </result>
6481 </desc>
6482 <param name="remove" type="boolean" dir="in">
6483 <desc>If @c true remove the saved state file.</desc>
6484 </param>
6485 </method>
6486
6487 <method name="getDeviceActivity">
6488 <desc>
6489 Gets the current activity type of a given device or device group.
6490 <result name="E_INVALIDARG">
6491 Invalid device type.
6492 </result>
6493 </desc>
6494 <param name="type" type="DeviceType" dir="in"/>
6495 <param name="activity" type="DeviceActivity" dir="return"/>
6496 </method>
6497
6498 <method name="attachUSBDevice">
6499 <desc>
6500 Attaches a host USB device with the given UUID to the
6501 USB controller of the virtual machine.
6502
6503 The device needs to be in one of the following states:
6504 <link to="USBDeviceState_Busy"/>,
6505 <link to="USBDeviceState_Available"/> or
6506 <link to="USBDeviceState_Held"/>,
6507 otherwise an error is immediately returned.
6508
6509 When the device state is
6510 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6511 be returned if the host computer refuses to release it for some reason.
6512
6513 <see>IUSBController::deviceFilters, USBDeviceState</see>
6514 <result name="VBOX_E_INVALID_VM_STATE">
6515 Virtual machine state neither Running nor Paused.
6516 </result>
6517 <result name="VBOX_E_PDM_ERROR">
6518 Virtual machine does not have a USB controller.
6519 </result>
6520 </desc>
6521 <param name="id" type="uuid" mod="string" dir="in">
6522 <desc>UUID of the host USB device to attach.</desc>
6523 </param>
6524 </method>
6525
6526 <method name="detachUSBDevice">
6527 <desc>
6528 Detaches an USB device with the given UUID from the USB controller
6529 of the virtual machine.
6530
6531 After this method succeeds, the VirtualBox server re-initiates
6532 all USB filters as if the device were just physically attached
6533 to the host, but filters of this machine are ignored to avoid
6534 a possible automatic re-attachment.
6535
6536 <see>IUSBController::deviceFilters, USBDeviceState</see>
6537
6538 <result name="VBOX_E_PDM_ERROR">
6539 Virtual machine does not have a USB controller.
6540 </result>
6541 <result name="E_INVALIDARG">
6542 USB device not attached to this virtual machine.
6543 </result>
6544 </desc>
6545 <param name="id" type="uuid" mod="string" dir="in">
6546 <desc>UUID of the USB device to detach.</desc>
6547 </param>
6548 <param name="device" type="IUSBDevice" dir="return">
6549 <desc>Detached USB device.</desc>
6550 </param>
6551 </method>
6552
6553 <method name="findUSBDeviceByAddress">
6554 <desc>
6555 Searches for a USB device with the given host address.
6556
6557 <result name="VBOX_E_OBJECT_NOT_FOUND">
6558 Given @c name does not correspond to any USB device.
6559 </result>
6560
6561 <see>IUSBDevice::address</see>
6562 </desc>
6563 <param name="name" type="wstring" dir="in">
6564 <desc>
6565 Address of the USB device (as assigned by the host) to
6566 search for.
6567 </desc>
6568 </param>
6569 <param name="device" type="IUSBDevice" dir="return">
6570 <desc>Found USB device object.</desc>
6571 </param>
6572 </method>
6573
6574 <method name="findUSBDeviceById">
6575 <desc>
6576 Searches for a USB device with the given UUID.
6577
6578 <result name="VBOX_E_OBJECT_NOT_FOUND">
6579 Given @c id does not correspond to any USB device.
6580 </result>
6581
6582 <see>IUSBDevice::id</see>
6583 </desc>
6584 <param name="id" type="uuid" mod="string" dir="in">
6585 <desc>UUID of the USB device to search for.</desc>
6586 </param>
6587 <param name="device" type="IUSBDevice" dir="return">
6588 <desc>Found USB device object.</desc>
6589 </param>
6590 </method>
6591
6592 <method name="createSharedFolder">
6593 <desc>
6594 Creates a transient new shared folder by associating the given logical
6595 name with the given host path, adds it to the collection of shared
6596 folders and starts sharing it. Refer to the description of
6597 <link to="ISharedFolder"/> to read more about logical names.
6598
6599 <result name="VBOX_E_INVALID_VM_STATE">
6600 Virtual machine in Saved state or currently changing state.
6601 </result>
6602 <result name="VBOX_E_FILE_ERROR">
6603 Shared folder already exists or not accessible.
6604 </result>
6605 </desc>
6606 <param name="name" type="wstring" dir="in">
6607 <desc>Unique logical name of the shared folder.</desc>
6608 </param>
6609 <param name="hostPath" type="wstring" dir="in">
6610 <desc>Full path to the shared folder in the host file system.</desc>
6611 </param>
6612 <param name="writable" type="boolean" dir="in">
6613 <desc>Whether the share is writable or readonly</desc>
6614 </param>
6615 </method>
6616
6617 <method name="removeSharedFolder">
6618 <desc>
6619 Removes a transient shared folder with the given name previously
6620 created by <link to="#createSharedFolder"/> from the collection of
6621 shared folders and stops sharing it.
6622 <result name="VBOX_E_INVALID_VM_STATE">
6623 Virtual machine in Saved state or currently changing state.
6624 </result>
6625 <result name="VBOX_E_FILE_ERROR">
6626 Shared folder does not exists.
6627 </result>
6628 </desc>
6629 <param name="name" type="wstring" dir="in">
6630 <desc>Logical name of the shared folder to remove.</desc>
6631 </param>
6632 </method>
6633
6634 <method name="takeSnapshot">
6635 <desc>
6636 Saves the current execution state
6637 and all settings of the machine and creates differencing images
6638 for all normal (non-independent) media.
6639 See <link to="ISnapshot" /> for an introduction to snapshots.
6640
6641 This method can be called for a PoweredOff, Saved (see
6642 <link to="#saveState"/>), Running or
6643 Paused virtual machine. When the machine is PoweredOff, an
6644 offline snapshot is created. When the machine is Running a live
6645 snapshot is created, and an online snapshot is is created when Paused.
6646
6647 The taken snapshot is always based on the
6648 <link to="IMachine::currentSnapshot">current snapshot</link>
6649 of the associated virtual machine and becomes a new current snapshot.
6650
6651 <note>
6652 This method implicitly calls <link to="IMachine::saveSettings"/> to
6653 save all current machine settings before taking an offline snapshot.
6654 </note>
6655
6656 <result name="VBOX_E_INVALID_VM_STATE">
6657 Virtual machine currently changing state.
6658 </result>
6659 </desc>
6660 <param name="name" type="wstring" dir="in">
6661 <desc>Short name for the snapshot.</desc>
6662 </param>
6663 <param name="description" type="wstring" dir="in">
6664 <desc>Optional description of the snapshot.</desc>
6665 </param>
6666 <param name="progress" type="IProgress" dir="return">
6667 <desc>Progress object to track the operation completion.</desc>
6668 </param>
6669 </method>
6670
6671 <method name="deleteSnapshot">
6672 <desc>
6673 Starts discarding the specified snapshot asynchronously.
6674 See <link to="ISnapshot" /> for an introduction to snapshots.
6675
6676 The execution state
6677 and settings of the associated machine stored in the snapshot
6678 will be deleted. The contents of all differencing media of
6679 this snapshot will be merged with the contents of their
6680 dependent child media to keep the disks valid (in other
6681 words, all changes represented by media being discarded
6682 will be propagated to their child medium). After that, this
6683 snapshot's differencing medium will be deleted. The parent
6684 of this snapshot will become a new parent for all its child
6685 snapshots.
6686
6687 If the discarded snapshot is the current one, its parent
6688 snapshot will become a new current snapshot. The current machine
6689 state is not directly affected in this case, except that
6690 currently attached differencing media based on media
6691 of the discarded snapshot will be also merged as described
6692 above.
6693
6694 If the discarded snapshot is the first one (the root snapshot)
6695 and it has exactly one child snapshot, this child snapshot will
6696 become the first snapshot after discarding. If there are no
6697 children at all (i.e. the first snapshot is the only snapshot of
6698 the machine), both the current and the first snapshot of the
6699 machine will be set to @c null. In all other cases, the first
6700 snapshot cannot be discarded.
6701
6702 You cannot discard the snapshot if it
6703 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6704 media that have differencing media based on them. Snapshots of
6705 such kind can be discarded only when every normal medium has either
6706 no children at all or exactly one child. In the former case, the normal
6707 medium simply becomes unused (i.e. not attached to any VM). In the
6708 latter case, it receives all the changes stored in the child medium,
6709 and then it replaces the child medium in the configuration of the
6710 corresponding snapshot or machine.
6711
6712 Also, you cannot discard the snapshot if it stores media
6713 (of any type) having differencing child media that belong
6714 to other machines. Such snapshots can be only discarded after
6715 you discard all snapshots of other machines containing "foreign"
6716 child disks, or detach these "foreign" child disks from machines
6717 they are attached to.
6718
6719 One particular example of the snapshot storing normal media
6720 is the first snapshot of a virtual machine that had normal media
6721 attached when taking the snapshot. Be careful when
6722 discarding such snapshots because this implicitly commits
6723 changes (made since the snapshot being discarded has been taken)
6724 to normal media (as described above), which may be not what
6725 you want.
6726
6727 The virtual machine is put to
6728 the <link to="MachineState_Discarding">Discarding</link> state until
6729 the discard operation is completed.
6730
6731 <note>
6732 The machine must not be running, otherwise the operation
6733 will fail.
6734 </note>
6735
6736 <note>
6737 Child media of all normal media of the discarded snapshot
6738 must be accessible (see <link to="IMedium::state"/>) for this
6739 operation to succeed. In particular, this means that all virtual
6740 machines, whose media are directly or indirectly based on the
6741 media of discarded snapshot, must be powered off.
6742 </note>
6743 <note>
6744 Merging medium contents can be very time and disk space
6745 consuming, if these disks are big in size and have many
6746 children. However, if the snapshot being discarded is the last
6747 (head) snapshot on the branch, the operation will be rather
6748 quick.
6749 </note>
6750 <note>
6751 Note that discarding the current snapshot
6752 will implicitly call <link to="IMachine::saveSettings"/> to
6753 make all current machine settings permanent.
6754 </note>
6755 <result name="VBOX_E_INVALID_VM_STATE">
6756 Virtual machine is running.
6757 </result>
6758 </desc>
6759 <param name="id" type="uuid" mod="string" dir="in">
6760 <desc>UUID of the snapshot to discard.</desc>
6761 </param>
6762 <param name="progress" type="IProgress" dir="return">
6763 <desc>Progress object to track the operation completion.</desc>
6764 </param>
6765 </method>
6766
6767 <method name="restoreSnapshot">
6768 <desc>
6769 Starts resetting the machine's current state to the state contained
6770 in the given snapshot, asynchronously. All current settings of the
6771 machine will be reset and changes stored in differencing media
6772 will be lost.
6773 See <link to="ISnapshot" /> for an introduction to snapshots.
6774
6775 After this operation is successfully completed, new empty differencing
6776 media are created for all normal media of the machine.
6777
6778 If the given snapshot is an online snapshot, the machine will go to
6779 the <link to="MachineState_Saved"> saved state</link>, so that the
6780 next time it is powered on, the execution state will be restored
6781 from the state of the snapshot.
6782
6783 <note>
6784 The machine must not be running, otherwise the operation will fail.
6785 </note>
6786
6787 <note>
6788 If the machine state is <link to="MachineState_Saved">Saved</link>
6789 prior to this operation, the saved state file will be implicitly
6790 discarded (as if <link to="IConsole::forgetSavedState"/> were
6791 called).
6792 </note>
6793
6794 <result name="VBOX_E_INVALID_VM_STATE">
6795 Virtual machine is running.
6796 </result>
6797 </desc>
6798 <param name="snapshot" type="ISnapshot" dir="in">
6799 <desc>The snapshot to restore the VM state from.</desc>
6800 </param>
6801 <param name="progress" type="IProgress" dir="return">
6802 <desc>Progress object to track the operation completion.</desc>
6803 </param>
6804 </method>
6805
6806 <method name="teleport">
6807 <desc>
6808 Teleport the VM to a different host machine or process.
6809
6810 TODO explain the details.
6811
6812 <result name="VBOX_E_INVALID_VM_STATE">
6813 Virtual machine not running or paused.
6814 </result>
6815 </desc>
6816 <param name="hostname" type="wstring" dir="in">
6817 <desc>The name or IP of the host to teleport to.</desc>
6818 </param>
6819 <param name="tcpport" type="unsigned long" dir="in">
6820 <desc>The TCP port to connect to (1..65535).</desc>
6821 </param>
6822 <param name="password" type="wstring" dir="in">
6823 <desc>The password.</desc>
6824 </param>
6825 <param name="progress" type="IProgress" dir="return">
6826 <desc>Progress object to track the operation completion.</desc>
6827 </param>
6828 </method>
6829
6830 <method name="registerCallback">
6831 <desc>
6832 Registers a new console callback on this instance. The methods of the
6833 callback interface will be called by this instance when the appropriate
6834 event occurs.
6835 </desc>
6836 <param name="callback" type="IConsoleCallback" dir="in"/>
6837 </method>
6838
6839 <method name="unregisterCallback">
6840 <desc>
6841 Unregisters the console callback previously registered using
6842 <link to="#registerCallback"/>.
6843 <result name="E_INVALIDARG">
6844 Given @a callback handler is not registered.
6845 </result>
6846 </desc>
6847 <param name="callback" type="IConsoleCallback" dir="in"/>
6848 </method>
6849 </interface>
6850
6851 <!--
6852 // IHost
6853 /////////////////////////////////////////////////////////////////////////
6854 -->
6855
6856 <enum
6857 name="HostNetworkInterfaceMediumType"
6858 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6859 >
6860 <desc>
6861 Type of encapsulation. Ethernet encapsulation includes both wired and
6862 wireless Ethernet connections.
6863 <see>IHostNetworkInterface</see>
6864 </desc>
6865
6866 <const name="Unknown" value="0">
6867 <desc>
6868 The type of interface cannot be determined.
6869 </desc>
6870 </const>
6871 <const name="Ethernet" value="1">
6872 <desc>
6873 Ethernet frame encapsulation.
6874 </desc>
6875 </const>
6876 <const name="PPP" value="2">
6877 <desc>
6878 Point-to-point protocol encapsulation.
6879 </desc>
6880 </const>
6881 <const name="SLIP" value="3">
6882 <desc>
6883 Serial line IP encapsulation.
6884 </desc>
6885 </const>
6886 </enum>
6887
6888 <enum
6889 name="HostNetworkInterfaceStatus"
6890 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6891 >
6892 <desc>
6893 Current status of the interface.
6894 <see>IHostNetworkInterface</see>
6895 </desc>
6896
6897 <const name="Unknown" value="0">
6898 <desc>
6899 The state of interface cannot be determined.
6900 </desc>
6901 </const>
6902 <const name="Up" value="1">
6903 <desc>
6904 The interface is fully operational.
6905 </desc>
6906 </const>
6907 <const name="Down" value="2">
6908 <desc>
6909 The interface is not functioning.
6910 </desc>
6911 </const>
6912 </enum>
6913
6914 <enum
6915 name="HostNetworkInterfaceType"
6916 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6917 >
6918 <desc>
6919 Network interface type.
6920 </desc>
6921 <const name="Bridged" value="1"/>
6922 <const name="HostOnly" value="2"/>
6923 </enum>
6924
6925 <interface
6926 name="IHostNetworkInterface" extends="$unknown"
6927 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6928 wsmap="managed"
6929 >
6930 <desc>
6931 Represents one of host's network interfaces. IP V6 address and network
6932 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6933 separated by colons.
6934 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6935 </desc>
6936 <attribute name="name" type="wstring" readonly="yes">
6937 <desc>Returns the host network interface name.</desc>
6938 </attribute>
6939
6940 <attribute name="id" type="uuid" mod="string" readonly="yes">
6941 <desc>Returns the interface UUID.</desc>
6942 </attribute>
6943
6944 <attribute name="networkName" type="wstring" readonly="yes">
6945 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6946 </attribute>
6947
6948 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6949 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6950 </attribute>
6951
6952 <attribute name="IPAddress" type="wstring" readonly="yes">
6953 <desc>Returns the IP V4 address of the interface.</desc>
6954 </attribute>
6955
6956 <attribute name="networkMask" type="wstring" readonly="yes">
6957 <desc>Returns the network mask of the interface.</desc>
6958 </attribute>
6959
6960 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6961 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6962 </attribute>
6963
6964 <attribute name="IPV6Address" type="wstring" readonly="yes">
6965 <desc>Returns the IP V6 address of the interface.</desc>
6966 </attribute>
6967
6968 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6969 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6970 </attribute>
6971
6972 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6973 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6974 </attribute>
6975
6976 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6977 <desc>Type of protocol encapsulation used.</desc>
6978 </attribute>
6979
6980 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6981 <desc>Status of the interface.</desc>
6982 </attribute>
6983
6984 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6985 <desc>specifies the host interface type.</desc>
6986 </attribute>
6987
6988 <method name="enableStaticIpConfig">
6989 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6990 <param name="IPAddress" type="wstring" dir="in">
6991 <desc>
6992 IP address.
6993 </desc>
6994 </param>
6995 <param name="networkMask" type="wstring" dir="in">
6996 <desc>
6997 network mask.
6998 </desc>
6999 </param>
7000 </method>
7001
7002 <method name="enableStaticIpConfigV6">
7003 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7004 <param name="IPV6Address" type="wstring" dir="in">
7005 <desc>
7006 IP address.
7007 </desc>
7008 </param>
7009 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7010 <desc>
7011 network mask.
7012 </desc>
7013 </param>
7014 </method>
7015
7016 <method name="enableDynamicIpConfig">
7017 <desc>enables the dynamic IP configuration.</desc>
7018 </method>
7019
7020 <method name="dhcpRediscover">
7021 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7022 </method>
7023
7024 </interface>
7025
7026 <interface
7027 name="IHost" extends="$unknown"
7028 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7029 wsmap="managed"
7030 >
7031 <desc>
7032 The IHost interface represents the physical machine that this VirtualBox
7033 installation runs on.
7034
7035 An object implementing this interface is returned by the
7036 <link to="IVirtualBox::host" /> attribute. This interface contains
7037 read-only information about the host's physical hardware (such as what
7038 processors and disks are available, what the host operating system is,
7039 and so on) and also allows for manipulating some of the host's hardware,
7040 such as global USB device filters and host interface networking.
7041
7042 </desc>
7043 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7044 <desc>List of DVD drives available on the host.</desc>
7045 </attribute>
7046
7047 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7048 <desc>List of floppy drives available on the host.</desc>
7049 </attribute>
7050
7051 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7052 <desc>
7053 List of USB devices currently attached to the host.
7054 Once a new device is physically attached to the host computer,
7055 it appears in this list and remains there until detached.
7056
7057 <note>
7058 If USB functionality is not available in the given edition of
7059 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7060 </note>
7061 </desc>
7062 </attribute>
7063
7064 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7065 <desc>
7066 List of USB device filters in action.
7067 When a new device is physically attached to the host computer,
7068 filters from this list are applied to it (in order they are stored
7069 in the list). The first matched filter will determine the
7070 <link to="IHostUSBDeviceFilter::action">action</link>
7071 performed on the device.
7072
7073 Unless the device is ignored by these filters, filters of all
7074 currently running virtual machines
7075 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7076
7077 <note>
7078 If USB functionality is not available in the given edition of
7079 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7080 </note>
7081
7082 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7087 <desc>List of host network interfaces currently defined on the host.</desc>
7088 </attribute>
7089
7090 <attribute name="processorCount" type="unsigned long" readonly="yes">
7091 <desc>Number of (logical) CPUs installed in the host system.</desc>
7092 </attribute>
7093
7094 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7095 <desc>Number of (logical) CPUs online in the host system.</desc>
7096 </attribute>
7097
7098 <method name="getProcessorSpeed">
7099 <desc>Query the (approximate) maximum speed of a specified host CPU in
7100 Megahertz.
7101 </desc>
7102 <param name="cpuId" type="unsigned long" dir="in">
7103 <desc>
7104 Identifier of the CPU.
7105 </desc>
7106 </param>
7107 <param name="speed" type="unsigned long" dir="return">
7108 <desc>
7109 Speed value. 0 is returned if value is not known or @a cpuId is
7110 invalid.
7111 </desc>
7112 </param>
7113 </method>
7114
7115 <method name="getProcessorFeature">
7116 <desc>Query whether a CPU feature is supported or not.</desc>
7117 <param name="feature" type="ProcessorFeature" dir="in">
7118 <desc>
7119 CPU Feature identifier.
7120 </desc>
7121 </param>
7122 <param name="supported" type="boolean" dir="return">
7123 <desc>
7124 Feature is supported or not.
7125 </desc>
7126 </param>
7127 </method>
7128
7129 <method name="getProcessorDescription">
7130 <desc>Query the model string of a specified host CPU.
7131 </desc>
7132 <param name="cpuId" type="unsigned long" dir="in">
7133 <desc>
7134 Identifier of the CPU.
7135 </desc>
7136 </param>
7137 <param name="description" type="wstring" dir="return">
7138 <desc>
7139 Model string. An empty string is returned if value is not known or
7140 @a cpuId is invalid.
7141 </desc>
7142 </param>
7143 </method>
7144
7145 <attribute name="memorySize" type="unsigned long" readonly="yes">
7146 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7147 </attribute>
7148
7149 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7150 <desc>Available system memory in the host system.</desc>
7151 </attribute>
7152
7153 <attribute name="operatingSystem" type="wstring" readonly="yes">
7154 <desc>Name of the host system's operating system.</desc>
7155 </attribute>
7156
7157 <attribute name="OSVersion" type="wstring" readonly="yes">
7158 <desc>Host operating system's version string.</desc>
7159 </attribute>
7160
7161 <attribute name="UTCTime" type="long long" readonly="yes">
7162 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7163 </attribute>
7164
7165 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7166 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7167 </attribute>
7168
7169 <method name="createHostOnlyNetworkInterface">
7170 <desc>
7171 Creates a new adapter for Host Only Networking.
7172 <result name="E_INVALIDARG">
7173 Host network interface @a name already exists.
7174 </result>
7175 </desc>
7176 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7177 <desc>
7178 Created host interface object.
7179 </desc>
7180 </param>
7181 <param name="progress" type="IProgress" dir="return">
7182 <desc>
7183 Progress object to track the operation completion.
7184 </desc>
7185 </param>
7186 </method>
7187
7188 <method name="removeHostOnlyNetworkInterface">
7189 <desc>
7190 Removes the given Host Only Networking interface.
7191 <result name="VBOX_E_OBJECT_NOT_FOUND">
7192 No host network interface matching @a id found.
7193 </result>
7194 </desc>
7195 <param name="id" type="uuid" mod="string" dir="in">
7196 <desc>
7197 Adapter GUID.
7198 </desc>
7199 </param>
7200 <param name="progress" type="IProgress" dir="return">
7201 <desc>
7202 Progress object to track the operation completion.
7203 </desc>
7204 </param>
7205 </method>
7206
7207 <method name="createUSBDeviceFilter">
7208 <desc>
7209 Creates a new USB device filter. All attributes except
7210 the filter name are set to empty (any match),
7211 <i>active</i> is @c false (the filter is not active).
7212
7213 The created filter can be added to the list of filters using
7214 <link to="#insertUSBDeviceFilter"/>.
7215
7216 <see>#USBDeviceFilters</see>
7217 </desc>
7218 <param name="name" type="wstring" dir="in">
7219 <desc>
7220 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7221 for more info.
7222 </desc>
7223 </param>
7224 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7225 <desc>Created filter object.</desc>
7226 </param>
7227 </method>
7228
7229 <method name="insertUSBDeviceFilter">
7230 <desc>
7231 Inserts the given USB device to the specified position
7232 in the list of filters.
7233
7234 Positions are numbered starting from @c 0. If the specified
7235 position is equal to or greater than the number of elements in
7236 the list, the filter is added at the end of the collection.
7237
7238 <note>
7239 Duplicates are not allowed, so an attempt to insert a
7240 filter already in the list is an error.
7241 </note>
7242 <note>
7243 If USB functionality is not available in the given edition of
7244 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7245 </note>
7246
7247 <see>#USBDeviceFilters</see>
7248
7249 <result name="VBOX_E_INVALID_OBJECT_STATE">
7250 USB device filter is not created within this VirtualBox instance.
7251 </result>
7252 <result name="E_INVALIDARG">
7253 USB device filter already in list.
7254 </result>
7255
7256 </desc>
7257 <param name="position" type="unsigned long" dir="in">
7258 <desc>Position to insert the filter to.</desc>
7259 </param>
7260 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7261 <desc>USB device filter to insert.</desc>
7262 </param>
7263 </method>
7264
7265 <method name="removeUSBDeviceFilter">
7266 <desc>
7267 Removes a USB device filter from the specified position in the
7268 list of filters.
7269
7270 Positions are numbered starting from @c 0. Specifying a
7271 position equal to or greater than the number of elements in
7272 the list will produce an error.
7273
7274 <note>
7275 If USB functionality is not available in the given edition of
7276 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7277 </note>
7278
7279 <see>#USBDeviceFilters</see>
7280
7281 <result name="E_INVALIDARG">
7282 USB device filter list empty or invalid @a position.
7283 </result>
7284
7285 </desc>
7286 <param name="position" type="unsigned long" dir="in">
7287 <desc>Position to remove the filter from.</desc>
7288 </param>
7289 </method>
7290
7291 <method name="findHostDVDDrive">
7292 <desc>
7293 Searches for a host DVD drive with the given @c name.
7294
7295 <result name="VBOX_E_OBJECT_NOT_FOUND">
7296 Given @c name does not correspond to any host drive.
7297 </result>
7298
7299 </desc>
7300 <param name="name" type="wstring" dir="in">
7301 <desc>Name of the host drive to search for</desc>
7302 </param>
7303 <param name="drive" type="IMedium" dir="return">
7304 <desc>Found host drive object</desc>
7305 </param>
7306 </method>
7307
7308 <method name="findHostFloppyDrive">
7309 <desc>
7310 Searches for a host floppy drive with the given @c name.
7311
7312 <result name="VBOX_E_OBJECT_NOT_FOUND">
7313 Given @c name does not correspond to any host floppy drive.
7314 </result>
7315
7316 </desc>
7317 <param name="name" type="wstring" dir="in">
7318 <desc>Name of the host floppy drive to search for</desc>
7319 </param>
7320 <param name="drive" type="IMedium" dir="return">
7321 <desc>Found host floppy drive object</desc>
7322 </param>
7323 </method>
7324
7325 <method name="findHostNetworkInterfaceByName">
7326 <desc>
7327 Searches through all host network interfaces for an interface with
7328 the given @c name.
7329 <note>
7330 The method returns an error if the given @c name does not
7331 correspond to any host network interface.
7332 </note>
7333 </desc>
7334 <param name="name" type="wstring" dir="in">
7335 <desc>Name of the host network interface to search for.</desc>
7336 </param>
7337 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7338 <desc>Found host network interface object.</desc>
7339 </param>
7340 </method>
7341 <method name="findHostNetworkInterfaceById">
7342 <desc>
7343 Searches through all host network interfaces for an interface with
7344 the given GUID.
7345 <note>
7346 The method returns an error if the given GUID does not
7347 correspond to any host network interface.
7348 </note>
7349 </desc>
7350 <param name="id" type="uuid" mod="string" dir="in">
7351 <desc>GUID of the host network interface to search for.</desc>
7352 </param>
7353 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7354 <desc>Found host network interface object.</desc>
7355 </param>
7356 </method>
7357 <method name="findHostNetworkInterfacesOfType">
7358 <desc>
7359 Searches through all host network interfaces and returns a list of interfaces of the specified type
7360 </desc>
7361 <param name="type" type="HostNetworkInterfaceType" dir="in">
7362 <desc>type of the host network interfaces to search for.</desc>
7363 </param>
7364 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7365 <desc>Found host network interface objects.</desc>
7366 </param>
7367 </method>
7368
7369 <method name="findUSBDeviceById">
7370 <desc>
7371 Searches for a USB device with the given UUID.
7372
7373 <result name="VBOX_E_OBJECT_NOT_FOUND">
7374 Given @c id does not correspond to any USB device.
7375 </result>
7376
7377 <see>IHostUSBDevice::id</see>
7378 </desc>
7379 <param name="id" type="uuid" mod="string" dir="in">
7380 <desc>UUID of the USB device to search for.</desc>
7381 </param>
7382 <param name="device" type="IHostUSBDevice" dir="return">
7383 <desc>Found USB device object.</desc>
7384 </param>
7385 </method>
7386
7387 <method name="findUSBDeviceByAddress">
7388 <desc>
7389 Searches for a USB device with the given host address.
7390
7391 <result name="VBOX_E_OBJECT_NOT_FOUND">
7392 Given @c name does not correspond to any USB device.
7393 </result>
7394
7395 <see>IHostUSBDevice::address</see>
7396 </desc>
7397 <param name="name" type="wstring" dir="in">
7398 <desc>
7399 Address of the USB device (as assigned by the host) to
7400 search for.
7401 </desc>
7402 </param>
7403 <param name="device" type="IHostUSBDevice" dir="return">
7404 <desc>Found USB device object.</desc>
7405 </param>
7406 </method>
7407
7408 </interface>
7409
7410 <!--
7411 // ISystemProperties
7412 /////////////////////////////////////////////////////////////////////////
7413 -->
7414
7415 <interface
7416 name="ISystemProperties"
7417 extends="$unknown"
7418 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7419 wsmap="managed"
7420 >
7421 <desc>
7422 The ISystemProperties interface represents global properties of the given
7423 VirtualBox installation.
7424
7425 These properties define limits and default values for various attributes
7426 and parameters. Most of the properties are read-only, but some can be
7427 changed by a user.
7428 </desc>
7429
7430 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7431 <desc>Minimum guest system memory in Megabytes.</desc>
7432 </attribute>
7433
7434 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7435 <desc>Maximum guest system memory in Megabytes.</desc>
7436 </attribute>
7437
7438 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7439 <desc>Minimum guest video memory in Megabytes.</desc>
7440 </attribute>
7441
7442 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7443 <desc>Maximum guest video memory in Megabytes.</desc>
7444 </attribute>
7445
7446 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7447 <desc>Minimum CPU count.</desc>
7448 </attribute>
7449
7450 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7451 <desc>Maximum CPU count.</desc>
7452 </attribute>
7453
7454 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7455 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7456 </attribute>
7457
7458 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7459 <desc>
7460 Number of network adapters associated with every
7461 <link to="IMachine"/> instance.
7462 </desc>
7463 </attribute>
7464
7465 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7466 <desc>
7467 Number of serial ports associated with every
7468 <link to="IMachine"/> instance.
7469 </desc>
7470 </attribute>
7471
7472 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7473 <desc>
7474 Number of parallel ports associated with every
7475 <link to="IMachine"/> instance.
7476 </desc>
7477 </attribute>
7478
7479 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7480 <desc>
7481 Maximum device position in the boot order. This value corresponds
7482 to the total number of devices a machine can boot from, to make it
7483 possible to include all possible devices to the boot list.
7484 <see><link to="IMachine::setBootOrder"/></see>
7485 </desc>
7486 </attribute>
7487
7488 <attribute name="defaultMachineFolder" type="wstring">
7489 <desc>
7490 Full path to the default directory used to create new or open
7491 existing machines when a settings file name contains no
7492 path.
7493
7494 The initial value of this property is
7495 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7496 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7497
7498 <note>
7499 Setting this property to @c null or an empty string will restore the
7500 initial value.
7501 </note>
7502 <note>
7503 When settings this property, the specified path can be
7504 absolute (full path) or relative
7505 to the <link to="IVirtualBox::homeFolder">
7506 VirtualBox home directory</link>.
7507 When reading this property, a full path is
7508 always returned.
7509 </note>
7510 <note>
7511 The specified path may not exist, it will be created
7512 when necessary.
7513 </note>
7514
7515 <see>
7516 <link to="IVirtualBox::createMachine"/>,
7517 <link to="IVirtualBox::openMachine"/>
7518 </see>
7519 </desc>
7520 </attribute>
7521
7522 <attribute name="defaultHardDiskFolder" type="wstring">
7523 <desc>
7524 Full path to the default directory used to create new or open existing
7525 virtual disks.
7526
7527 This path is used when the storage unit of a hard disk is a regular file
7528 in the host's file system and only a file name that contains no path is
7529 given.
7530
7531 The initial value of this property is
7532 <tt>&lt;</tt>
7533 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7534 <tt>&gt;/HardDisks</tt>.
7535
7536 <note>
7537 Setting this property to @c null or empty string will restore the
7538 initial value.
7539 </note>
7540 <note>
7541 When settings this property, the specified path can be relative
7542 to the
7543 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7544 absolute. When reading this property, a full path is
7545 always returned.
7546 </note>
7547 <note>
7548 The specified path may not exist, it will be created
7549 when necessary.
7550 </note>
7551
7552 <see>
7553 IMedium,
7554 <link to="IVirtualBox::createHardDisk"/>,
7555 <link to="IVirtualBox::openHardDisk"/>,
7556 <link to="IMedium::location"/>
7557 </see>
7558 </desc>
7559 </attribute>
7560
7561 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7562 <desc>
7563 List of all medium storage formats supported by this VirtualBox
7564 installation.
7565
7566 Keep in mind that the medium format identifier
7567 (<link to="IMediumFormat::id"/>) used in other API calls like
7568 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7569 medium format is a case-insensitive string. This means that, for
7570 example, all of the following strings:
7571 <pre>
7572 "VDI"
7573 "vdi"
7574 "VdI"</pre>
7575 refer to the same medium format.
7576
7577 Note that the virtual medium framework is backend-based, therefore
7578 the list of supported formats depends on what backends are currently
7579 installed.
7580
7581 <see>
7582 <link to="IMediumFormat"/>,
7583 </see>
7584 </desc>
7585 </attribute>
7586
7587 <attribute name="defaultHardDiskFormat" type="wstring">
7588 <desc>
7589 Identifier of the default medium format used by VirtualBox.
7590
7591 The medium format set by this attribute is used by VirtualBox
7592 when the medium format was not specified explicitly. One example is
7593 <link to="IVirtualBox::createHardDisk"/> with the empty
7594 format argument. A more complex example is implicit creation of
7595 differencing media when taking a snapshot of a virtual machine:
7596 this operation will try to use a format of the parent medium first
7597 and if this format does not support differencing media the default
7598 format specified by this argument will be used.
7599
7600 The list of supported medium formats may be obtained by the
7601 <link to="#mediaFormats"/> call. Note that the default medium
7602 format must have a capability to create differencing media;
7603 otherwise operations that create media implicitly may fail
7604 unexpectedly.
7605
7606 The initial value of this property is <tt>"VDI"</tt> in the current
7607 version of the VirtualBox product, but may change in the future.
7608
7609 <note>
7610 Setting this property to @c null or empty string will restore the
7611 initial value.
7612 </note>
7613
7614 <see>
7615 <link to="#mediaFormats"/>,
7616 <link to="IMediumFormat::id"/>,
7617 <link to="IVirtualBox::createHardDisk"/>
7618 </see>
7619 </desc>
7620 </attribute>
7621
7622 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7623 <desc>
7624 Library that provides authentication for VRDP clients. The library
7625 is used if a virtual machine's authentication type is set to "external"
7626 in the VM RemoteDisplay configuration.
7627
7628 The system library extension (".DLL" or ".so") must be omitted.
7629 A full path can be specified; if not, then the library must reside on the
7630 system's default library path.
7631
7632 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7633 of that name in one of the default VirtualBox library directories.
7634
7635 For details about VirtualBox authentication libraries and how to implement
7636 them, please refer to the VirtualBox manual.
7637
7638 <note>
7639 Setting this property to @c null or empty string will restore the
7640 initial value.
7641 </note>
7642 </desc>
7643 </attribute>
7644
7645 <attribute name="webServiceAuthLibrary" type="wstring">
7646 <desc>
7647 Library that provides authentication for webservice clients. The library
7648 is used if a virtual machine's authentication type is set to "external"
7649 in the VM RemoteDisplay configuration and will be called from
7650 within the <link to="IWebsessionManager::logon" /> implementation.
7651
7652 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7653 there is no per-VM setting for this, as the webservice is a global
7654 resource (if it is running). Only for this setting (for the webservice),
7655 setting this value to a literal <tt>"null"</tt> string disables authentication,
7656 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7657 no matter what user name and password are supplied.
7658
7659 The initial value of this property is <tt>"VRDPAuth"</tt>,
7660 meaning that the webservice will use the same authentication
7661 library that is used by default for VBoxVRDP (again, see
7662 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7663 The format and calling convention of authentication libraries
7664 is the same for the webservice as it is for VBoxVRDP.
7665
7666 <note>
7667 Setting this property to @c null or empty string will restore the
7668 initial value.
7669 </note>
7670 </desc>
7671 </attribute>
7672
7673 <attribute name="LogHistoryCount" type="unsigned long">
7674 <desc>
7675 This value specifies how many old release log files are kept.
7676 </desc>
7677 </attribute>
7678
7679 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7680 <desc>This value hold the default audio driver for the current
7681 system.</desc>
7682 </attribute>
7683
7684 <method name="getMaxDevicesPerPortForStorageBus">
7685 <desc>Returns the maximum number of devices which can be attached to a port
7686 for the given storage bus.</desc>
7687
7688 <param name="bus" type="StorageBus" dir="in">
7689 <desc>The storage bus type to get the value for.</desc>
7690 </param>
7691
7692 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7693 <desc>The maximum number of devices which can eb attached to the port for the given
7694 storage bus.</desc>
7695 </param>
7696 </method>
7697
7698 <method name="getMinPortCountForStorageBus">
7699 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7700
7701 <param name="bus" type="StorageBus" dir="in">
7702 <desc>The storage bus type to get the value for.</desc>
7703 </param>
7704
7705 <param name="minPortCount" type="unsigned long" dir="return">
7706 <desc>The minimum number of ports for the given storage bus.</desc>
7707 </param>
7708 </method>
7709
7710 <method name="getMaxPortCountForStorageBus">
7711 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7712
7713 <param name="bus" type="StorageBus" dir="in">
7714 <desc>The storage bus type to get the value for.</desc>
7715 </param>
7716
7717 <param name="maxPortCount" type="unsigned long" dir="return">
7718 <desc>The maximum number of ports for the given storage bus.</desc>
7719 </param>
7720 </method>
7721
7722 <method name="getMaxInstancesOfStorageBus">
7723 <desc>Returns the maximum number of storage bus instances which
7724 can be configured for each VM. This corresponds to the number of
7725 storage controllers one can have.</desc>
7726
7727 <param name="bus" type="StorageBus" dir="in">
7728 <desc>The storage bus type to get the value for.</desc>
7729 </param>
7730
7731 <param name="maxInstances" type="unsigned long" dir="return">
7732 <desc>The maximum number of instances for the given storage bus.</desc>
7733 </param>
7734 </method>
7735 </interface>
7736
7737 <!--
7738 // IGuest
7739 /////////////////////////////////////////////////////////////////////////
7740 -->
7741
7742 <interface
7743 name="IGuestOSType" extends="$unknown"
7744 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7745 wsmap="struct"
7746 >
7747 <desc>
7748 </desc>
7749
7750 <attribute name="familyId" type="wstring" readonly="yes">
7751 <desc>Guest OS family identifier string.</desc>
7752 </attribute>
7753
7754 <attribute name="familyDescription" type="wstring" readonly="yes">
7755 <desc>Human readable description of the guest OS family.</desc>
7756 </attribute>
7757
7758 <attribute name="id" type="wstring" readonly="yes">
7759 <desc>Guest OS identifier string.</desc>
7760 </attribute>
7761
7762 <attribute name="description" type="wstring" readonly="yes">
7763 <desc>Human readable description of the guest OS.</desc>
7764 </attribute>
7765
7766 <attribute name="is64Bit" type="boolean" readonly="yes">
7767 <desc>Returns @c true if the given OS is 64-bit</desc>
7768 </attribute>
7769
7770 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7771 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7772 </attribute>
7773
7774 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7775 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7776 </attribute>
7777
7778 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7779 <desc>Recommended RAM size in Megabytes.</desc>
7780 </attribute>
7781
7782 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7783 <desc>Recommended video RAM size in Megabytes.</desc>
7784 </attribute>
7785
7786 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7787 <desc>Recommended hard disk size in Megabytes.</desc>
7788 </attribute>
7789
7790 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7791 <desc>Returns recommended network adapter for this OS type.</desc>
7792 </attribute>
7793 </interface>
7794
7795 <interface
7796 name="IGuest" extends="$unknown"
7797 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7798 wsmap="managed"
7799 >
7800 <desc>
7801 The IGuest interface represents information about the operating system
7802 running inside the virtual machine. Used in
7803 <link to="IConsole::guest"/>.
7804
7805 IGuest provides information about the guest operating system, whether
7806 Guest Additions are installed and other OS-specific virtual machine
7807 properties.
7808 </desc>
7809
7810 <attribute name="OSTypeId" type="wstring" readonly="yes">
7811 <desc>
7812 Identifier of the Guest OS type as reported by the Guest
7813 Additions.
7814 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7815 an IGuestOSType object representing details about the given
7816 Guest OS type.
7817 <note>
7818 If Guest Additions are not installed, this value will be
7819 the same as <link to="IMachine::OSTypeId"/>.
7820 </note>
7821 </desc>
7822 </attribute>
7823
7824 <attribute name="additionsActive" type="boolean" readonly="yes">
7825 <desc>
7826 Flag whether the Guest Additions are installed and active
7827 in which case their version will be returned by the
7828 <link to="#additionsVersion"/> property.
7829 </desc>
7830 </attribute>
7831
7832 <attribute name="additionsVersion" type="wstring" readonly="yes">
7833 <desc>
7834 Version of the Guest Additions (3 decimal numbers separated
7835 by dots) or empty when the Additions are not installed. The
7836 Additions may also report a version but yet not be active as
7837 the version might be refused by VirtualBox (incompatible) or
7838 other failures occurred.
7839 </desc>
7840 </attribute>
7841
7842 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7843 <desc>
7844 Flag whether seamless guest display rendering (seamless desktop
7845 integration) is supported.
7846 </desc>
7847 </attribute>
7848
7849 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7850 <desc>
7851 Flag whether the guest is in graphics mode. If it is not, then
7852 seamless rendering will not work, resize hints are not immediately
7853 acted on and guest display resizes are probably not initiated by
7854 the guest additions.
7855 </desc>
7856 </attribute>
7857
7858 <attribute name="memoryBalloonSize" type="unsigned long">
7859 <desc>Guest system memory balloon size in megabytes.</desc>
7860 </attribute>
7861
7862 <attribute name="statisticsUpdateInterval" type="unsigned long">
7863 <desc>Interval to update guest statistics in seconds.</desc>
7864 </attribute>
7865
7866 <method name="setCredentials">
7867 <desc>
7868 Store login credentials that can be queried by guest operating
7869 systems with Additions installed. The credentials are transient
7870 to the session and the guest may also choose to erase them. Note
7871 that the caller cannot determine whether the guest operating system
7872 has queried or made use of the credentials.
7873
7874 <result name="VBOX_E_VM_ERROR">
7875 VMM device is not available.
7876 </result>
7877
7878 </desc>
7879 <param name="userName" type="wstring" dir="in">
7880 <desc>User name string, can be empty</desc>
7881 </param>
7882 <param name="password" type="wstring" dir="in">
7883 <desc>Password string, can be empty</desc>
7884 </param>
7885 <param name="domain" type="wstring" dir="in">
7886 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7887 </param>
7888 <param name="allowInteractiveLogon" type="boolean" dir="in">
7889 <desc>
7890 Flag whether the guest should alternatively allow the user to
7891 interactively specify different credentials. This flag might
7892 not be supported by all versions of the Additions.
7893 </desc>
7894 </param>
7895 </method>
7896
7897 <method name="getStatistic">
7898 <desc>
7899 Query specified guest statistics as reported by the VirtualBox Additions.
7900 </desc>
7901 <param name="cpuId" type="unsigned long" dir="in">
7902 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7903 </param>
7904 <param name="statistic" type="GuestStatisticType" dir="in">
7905 <desc>Statistic type.</desc>
7906 </param>
7907 <param name="statVal" type="unsigned long" dir="return">
7908 <desc>Statistics value</desc>
7909 </param>
7910 </method>
7911
7912 </interface>
7913
7914
7915 <!--
7916 // IProgress
7917 /////////////////////////////////////////////////////////////////////////
7918 -->
7919
7920 <interface
7921 name="IProgress" extends="$unknown"
7922 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7923 wsmap="managed"
7924 >
7925 <desc>
7926 The IProgress interface is used to track and control
7927 asynchronous tasks within VirtualBox.
7928
7929 An instance of this is returned every time VirtualBox starts
7930 an asynchronous task (in other words, a separate thread) which
7931 continues to run after a method call returns. For example,
7932 <link to="IConsole::saveState" />, which saves the state of
7933 a running virtual machine, can take a long time to complete.
7934 To be able to display a progress bar, a user interface such as
7935 the VirtualBox graphical user interface can use the IProgress
7936 object returned by that method.
7937
7938 Note that IProgress is a "read-only" interface in the sense
7939 that only the VirtualBox internals behind the Main API can
7940 create and manipulate progress objects, whereas client code
7941 can only use the IProgress object to monitor a task's
7942 progress and, if <link to="#cancelable" /> is @c true,
7943 cancel the task by calling <link to="#cancel" />.
7944
7945 A task represented by IProgress consists of either one or
7946 several sub-operations that run sequentially, one by one (see
7947 <link to="#operation" /> and <link to="#operationCount" />).
7948 Every operation is identified by a number (starting from 0)
7949 and has a separate description.
7950
7951 You can find the individual percentage of completion of the current
7952 operation in <link to="#operationPercent" /> and the
7953 percentage of completion of the task as a whole
7954 in <link to="#percent" />.
7955
7956 Similarly, you can wait for the completion of a particular
7957 operation via <link to="#waitForOperationCompletion" /> or
7958 for the completion of the whole task via
7959 <link to="#waitForCompletion" />.
7960 </desc>
7961
7962 <attribute name="id" type="uuid" mod="string" readonly="yes">
7963 <desc>ID of the task.</desc>
7964 </attribute>
7965
7966 <attribute name="description" type="wstring" readonly="yes">
7967 <desc>Description of the task.</desc>
7968 </attribute>
7969
7970 <attribute name="initiator" type="$unknown" readonly="yes">
7971 <desc>Initiator of the task.</desc>
7972 </attribute>
7973
7974 <attribute name="cancelable" type="boolean" readonly="yes">
7975 <desc>Whether the task can be interrupted.</desc>
7976 </attribute>
7977
7978 <attribute name="percent" type="unsigned long" readonly="yes">
7979 <desc>
7980 Current progress value of the task as a whole, in percent.
7981 This value depends on how many operations are already complete.
7982 Returns 100 if <link to="#completed" /> is @c true.
7983 </desc>
7984 </attribute>
7985
7986 <attribute name="timeRemaining" type="long" readonly="yes">
7987 <desc>
7988 Estimated remaining time until the task completes, in
7989 seconds. Returns 0 once the task has completed; returns -1
7990 if the remaining time cannot be computed, in particular if
7991 the current progress is 0.
7992
7993 Even if a value is returned, the estimate will be unreliable
7994 for low progress values. It will become more reliable as the
7995 task progresses; it is not recommended to display an ETA
7996 before at least 20% of a task have completed.
7997 </desc>
7998 </attribute>
7999
8000 <attribute name="completed" type="boolean" readonly="yes">
8001 <desc>Whether the task has been completed.</desc>
8002 </attribute>
8003
8004 <attribute name="canceled" type="boolean" readonly="yes">
8005 <desc>Whether the task has been canceled.</desc>
8006 </attribute>
8007
8008 <attribute name="resultCode" type="long" readonly="yes">
8009 <desc>
8010 Result code of the progress task.
8011 Valid only if <link to="#completed"/> is @c true.
8012 </desc>
8013 </attribute>
8014
8015 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8016 <desc>
8017 Extended information about the unsuccessful result of the
8018 progress operation. May be @c null if no extended information
8019 is available.
8020 Valid only if <link to="#completed"/> is @c true and
8021 <link to="#resultCode"/> indicates a failure.
8022 </desc>
8023 </attribute>
8024
8025 <attribute name="operationCount" type="unsigned long" readonly="yes">
8026 <desc>
8027 Number of sub-operations this task is divided into.
8028 Every task consists of at least one suboperation.
8029 </desc>
8030 </attribute>
8031
8032 <attribute name="operation" type="unsigned long" readonly="yes">
8033 <desc>Number of the sub-operation being currently executed.</desc>
8034 </attribute>
8035
8036 <attribute name="operationDescription" type="wstring" readonly="yes">
8037 <desc>
8038 Description of the sub-operation being currently executed.
8039 </desc>
8040 </attribute>
8041
8042 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8043 <desc>Progress value of the current sub-operation only, in percent.</desc>
8044 </attribute>
8045
8046 <method name="setCurrentOperationProgress">
8047 <desc>Internal method, not to be called externally.</desc>
8048 <param name="percent" type="unsigned long" dir="in" />
8049 </method>
8050 <method name="setNextOperation">
8051 <desc>Internal method, not to be called externally.</desc>
8052 <param name="nextOperationDescription" type="wstring" dir="in" />
8053 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8054 </method>
8055
8056 <method name="waitForCompletion">
8057 <desc>
8058 Waits until the task is done (including all sub-operations)
8059 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8060
8061 <result name="VBOX_E_IPRT_ERROR">
8062 Failed to wait for task completion.
8063 </result>
8064 </desc>
8065
8066 <param name="timeout" type="long" dir="in">
8067 <desc>
8068 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8069 </desc>
8070 </param>
8071 </method>
8072
8073 <method name="waitForOperationCompletion">
8074 <desc>
8075 Waits until the given operation is done with a given timeout in
8076 milliseconds; specify -1 for an indefinite wait.
8077
8078 <result name="VBOX_E_IPRT_ERROR">
8079 Failed to wait for operation completion.
8080 </result>
8081
8082 </desc>
8083 <param name="operation" type="unsigned long" dir="in">
8084 <desc>
8085 Number of the operation to wait for.
8086 Must be less than <link to="#operationCount"/>.
8087 </desc>
8088 </param>
8089 <param name="timeout" type="long" dir="in">
8090 <desc>
8091 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8092 </desc>
8093 </param>
8094 </method>
8095
8096 <method name="cancel">
8097 <desc>
8098 Cancels the task.
8099 <note>
8100 If <link to="#cancelable"/> is @c false, then this method will fail.
8101 </note>
8102
8103 <result name="VBOX_E_INVALID_OBJECT_STATE">
8104 Operation cannot be canceled.
8105 </result>
8106
8107 </desc>
8108 </method>
8109
8110 </interface>
8111
8112
8113 <!--
8114 // ISnapshot
8115 /////////////////////////////////////////////////////////////////////////
8116 -->
8117
8118 <interface
8119 name="ISnapshot" extends="$unknown"
8120 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8121 wsmap="managed"
8122 >
8123 <desc>
8124 The ISnapshot interface represents a snapshot of the virtual
8125 machine.
8126
8127 Together with the differencing media that are created
8128 when a snapshot is taken, a machine can be brought back to
8129 the exact state it was in when the snapshot was taken.
8130
8131 The ISnapshot interface has no methods, only attributes; snapshots
8132 are controlled through methods of the <link to="IConsole" /> interface
8133 which also manage the media associated with the snapshot.
8134 The following operations exist:
8135
8136 <ul>
8137 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8138 by creating new, empty differencing images for the machine's
8139 media and saving the VM settings and (if the VM is running)
8140 the current VM state in the snapshot.
8141
8142 The differencing images will then receive all data written to
8143 the machine's media, while their parent (base) images
8144 remain unmodified after the snapshot has been taken (see
8145 <link to="IMedium" /> for details about differencing images).
8146 This simplifies restoring a machine to the state of a snapshot:
8147 only the differencing images need to be deleted.
8148
8149 The current machine state is not changed by taking a snapshot.
8150 If the machine is running, it will resume execution after the
8151 snapshot has been taken.
8152 </li>
8153
8154 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8155 a previous snapshot. This resets the machine's state to that of
8156 the previous snapshot by deleting the differencing image of each
8157 of the machine's media and setting the machine's settings
8158 and state to the state that was saved in the snapshot (if any).
8159
8160 This destroys the machine's current state.
8161 </li>
8162
8163 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8164 without affecting the current machine state.
8165
8166 This does not change the machine, but instead frees the resources
8167 allocated when the snapshot was taken: the settings and machine state
8168 is deleted (if any), and the snapshot's differencing image for each
8169 of the machine's media gets merged with its parent image.
8170
8171 Neither the current machine state nor other snapshots are affected
8172 by this operation, except that parent disk images will be modified
8173 to contain the disk data associated with the snapshot being deleted.
8174 </li>
8175 </ul>
8176
8177 Each snapshot contains the settings of the virtual machine (hardware
8178 configuration etc.). In addition, if the machine was running when the
8179 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8180 the current VM state is saved in the snapshot (similarly to what happens
8181 when a VM's state is saved). The snapshot is then said to
8182 be <i>online</i> because when restoring it, the VM will be running.
8183
8184 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8185 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8186
8187 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8188 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8189 it then contains a so-called "zero execution state", representing a
8190 machine that is powered off.
8191
8192 <h3>Snapshot branches and the "current" snapshot</h3>
8193
8194 Snapshots can be chained, whereby every next snapshot is based on the
8195 previous one. This chaining is related to medium branching
8196 (see the <link to="IMedium"/> description) in that every time
8197 a new snapshot is created, a new differencing medium is implicitly
8198 created for all normal media attached to the machine.
8199
8200 Each virtual machine has a "current snapshot", identified by
8201 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8202 to the last snapshot in the chain. In a future version of VirtualBox,
8203 it will be possible to reset a machine's current state to that of an
8204 earlier snapshot without discarding the current state so that it will be
8205 possible to create alternative snapshot paths in a snapshot tree.
8206
8207 In the current implementation, multiple snapshot branches within one
8208 virtual machine are not allowed. Every machine has a single branch,
8209 and <link to="IConsole::takeSnapshot"/> operation adds a new
8210 snapshot to the top of that branch.
8211 </desc>
8212
8213 <attribute name="id" type="uuid" mod="string" readonly="yes">
8214 <desc>UUID of the snapshot.</desc>
8215 </attribute>
8216
8217 <attribute name="name" type="wstring">
8218 <desc>Short name of the snapshot.</desc>
8219 </attribute>
8220
8221 <attribute name="description" type="wstring">
8222 <desc>Optional description of the snapshot.</desc>
8223 </attribute>
8224
8225 <attribute name="timeStamp" type="long long" readonly="yes">
8226 <desc>
8227 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8228 </desc>
8229 </attribute>
8230
8231 <attribute name="online" type="boolean" readonly="yes">
8232 <desc>
8233 @c true if this snapshot is an online snapshot and @c false otherwise.
8234
8235 When this attribute is @c true, the
8236 <link to="IMachine::stateFilePath"/> attribute of the
8237 <link to="#machine"/> object associated with this snapshot
8238 will point to the saved state file. Otherwise, it will be
8239 an empty string.
8240 </desc>
8241 </attribute>
8242
8243 <attribute name="machine" type="IMachine" readonly="yes">
8244 <desc>
8245 Virtual machine this snapshot is taken on. This object
8246 stores all settings the machine had when taking this snapshot.
8247 <note>
8248 The returned machine object is immutable, i.e. no
8249 any settings can be changed.
8250 </note>
8251 </desc>
8252 </attribute>
8253
8254 <attribute name="parent" type="ISnapshot" readonly="yes">
8255 <desc>
8256 Parent snapshot (a snapshot this one is based on), or
8257 @c null if the snapshot has no parent.
8258 </desc>
8259 </attribute>
8260
8261 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8262 <desc>
8263 Child snapshots (all snapshots having this one as a parent).
8264 <note>
8265 In the current implementation, there can be only one
8266 child snapshot, or no children at all, meaning this is the
8267 last (head) snapshot.
8268 </note>
8269 </desc>
8270 </attribute>
8271
8272 </interface>
8273
8274
8275 <!--
8276 // IMedium
8277 /////////////////////////////////////////////////////////////////////////
8278 -->
8279
8280 <enum
8281 name="MediumState"
8282 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8283 >
8284 <desc>
8285 Virtual medium state.
8286 <see>IMedium</see>
8287 </desc>
8288
8289 <const name="NotCreated" value="0">
8290 <desc>
8291 Associated medium storage does not exist (either was not created yet or
8292 was deleted).
8293 </desc>
8294 </const>
8295 <const name="Created" value="1">
8296 <desc>
8297 Associated storage exists and accessible.
8298 </desc>
8299 </const>
8300 <const name="LockedRead" value="2">
8301 <desc>
8302 Medium is locked for reading, no data modification is possible.
8303 </desc>
8304 </const>
8305 <const name="LockedWrite" value="3">
8306 <desc>
8307 Medium is locked for writing, no concurrent data reading or modification
8308 is possible.
8309 </desc>
8310 </const>
8311 <const name="Inaccessible" value="4">
8312 <desc>
8313 Associated medium storage is not accessible.
8314 </desc>
8315 </const>
8316 <const name="Creating" value="5">
8317 <desc>
8318 Associated medium storage is being created.
8319 </desc>
8320 </const>
8321 <const name="Deleting" value="6">
8322 <desc>
8323 Associated medium storage is being deleted.
8324 </desc>
8325 </const>
8326 </enum>
8327
8328 <enum
8329 name="MediumType"
8330 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8331 >
8332 <desc>
8333 Virtual medium type.
8334 <see>IMedium</see>
8335 </desc>
8336
8337 <const name="Normal" value="0">
8338 <desc>
8339 Normal medium (attached directly or indirectly, preserved
8340 when taking snapshots).
8341 </desc>
8342 </const>
8343 <const name="Immutable" value="1">
8344 <desc>
8345 Immutable medium (attached indirectly, changes are wiped out
8346 the next time the virtual machine is started).
8347 </desc>
8348 </const>
8349 <const name="Writethrough" value="2">
8350 <desc>
8351 Write through medium (attached directly, ignored when
8352 taking snapshots).
8353 </desc>
8354 </const>
8355 </enum>
8356
8357 <enum
8358 name="MediumVariant"
8359 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8360 >
8361 <desc>
8362 Virtual medium image variant. More than one flag may be set.
8363 <see>IMedium</see>
8364 </desc>
8365
8366 <const name="Standard" value="0">
8367 <desc>
8368 No particular variant requested, results in using the backend default.
8369 </desc>
8370 </const>
8371 <const name="VmdkSplit2G" value="0x01">
8372 <desc>
8373 VMDK image split in chunks of less than 2GByte.
8374 </desc>
8375 </const>
8376 <const name="VmdkStreamOptimized" value="0x04">
8377 <desc>
8378 VMDK streamOptimized image. Special import/export format which is
8379 read-only/append-only.
8380 </desc>
8381 </const>
8382 <const name="VmdkESX" value="0x08">
8383 <desc>
8384 VMDK format variant used on ESX products.
8385 </desc>
8386 </const>
8387 <const name="Fixed" value="0x10000">
8388 <desc>
8389 Fixed image. Only allowed for base images.
8390 </desc>
8391 </const>
8392 <const name="Diff" value="0x20000">
8393 <desc>
8394 Fixed image. Only allowed for base images.
8395 </desc>
8396 </const>
8397 </enum>
8398
8399 <interface
8400 name="IMediumAttachment" extends="$unknown"
8401 uuid="7bb6ac41-8c03-4863-9eea-d9c76561b8d1"
8402 wsmap="struct"
8403 >
8404 <desc>
8405 The IMediumAttachment interface represents the attachment
8406 of a storage medium to a virtual machine. Each machine contains
8407 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8408
8409 Each medium attachment specifies a storage controller as well as a port
8410 and device number. Fixed media (hard disks) will always also specify
8411 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8412 image or images that represent the virtual hard disk. For removeable media,
8413 the IMedia instance is optional; it can be NULL if no media is mounted (see
8414 <link to="IMachine::mountMedium" />).
8415 </desc>
8416
8417 <attribute name="medium" type="IMedium" readonly="yes">
8418 <desc>Medium object associated with this attachment; it
8419 can be NULL for removable devices.</desc>
8420 </attribute>
8421
8422 <attribute name="controller" type="IStorageController" readonly="yes">
8423 <desc>Storage controller object to which this attachment belongs.</desc>
8424 </attribute>
8425
8426 <attribute name="port" type="long" readonly="yes">
8427 <desc>Port number of this attachment.</desc>
8428 </attribute>
8429
8430 <attribute name="device" type="long" readonly="yes">
8431 <desc>Device slot number of this attachment.</desc>
8432 </attribute>
8433
8434 <attribute name="type" type="DeviceType" readonly="yes">
8435 <desc>Device type of this attachment.</desc>
8436 </attribute>
8437
8438 <attribute name="passthrough" type="boolean" readonly="yes">
8439 <desc>Pass I/O requests through to a device on the host.</desc>
8440 </attribute>
8441
8442 </interface>
8443
8444 <interface
8445 name="IMedium" extends="$unknown"
8446 uuid="ad3cdc5b-28ce-4390-8273-ca2068a217c5"
8447 wsmap="managed"
8448 >
8449 <desc>
8450 The IMedium interface represents virtual storage for a machine's
8451 hard disks, CD/DVD or floppy drives. It will typically represent
8452 a disk image on the host, for example a VDI or VMDK file representing
8453 a virtual hard disk, or an ISO or RAW file representing virtual
8454 removable media, but can also point to a network location (e.g.
8455 for iSCSI targets).
8456
8457 Instances of IMedium are connected to virtual machines by way of
8458 medium attachments (see <link to="IMediumAttachment" />), which link
8459 the storage medium to a particular device slot of a storage controller
8460 of the virtual machine.
8461 In the VirtualBox API, virtual storage is therefore always represented
8462 by the following chain of object links:
8463
8464 <ul>
8465 <li><link to="IMachine::storageControllers"/> contains an array of
8466 storage controllers (IDE, SATA, SCSI or a floppy controller;
8467 these are instances of <link to="IStorageController"/>).</li>
8468 <li><link to="IMachine::mediumAttachments"/> contains an array of
8469 medium attachments (instances of <link to="IMediumAttachment"/>),
8470 each containing the name of a storage controller from the above
8471 array, a port/device specification, and an instance of
8472 IMedium representing the medium storage (image file). For removable
8473 media, the storage medium is optional; a medium attachment with no
8474 medium represents a CD/DVD or floppy drive with no medium inserted.
8475 By contrast, hard disk attachments will always have an IMedium
8476 object attached.</li>
8477 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8478 computer or a network resource) that holds actual data. The location of
8479 the storage unit is represented by the <link to="#location"/> attribute.
8480 The value of this attribute is medium type dependent.</li>
8481 </ul>
8482
8483 Existing media are opened using the following methods, depending on the
8484 media type:
8485 <ul>
8486 <li><link to="IVirtualBox::openHardDisk"/></li>
8487 <li><link to="IVirtualBox::openDVDImage"/></li>
8488 <li><link to="IVirtualBox::openFloppyImage"/></li>
8489 </ul>
8490
8491 New hard disk media can be created with the VirtualBox API using the
8492 <link to="IVirtualBox::createHardDisk"/> method.
8493
8494 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8495 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8496 type in a regular file.
8497
8498 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8499 drive; in that case the <link to="#id" /> attribute contains the UUID of
8500 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8501
8502 <h3>Known media</h3>
8503
8504 When an existing medium is opened for the first time, it is automatically
8505 remembered by the given VirtualBox installation or, in other words, becomes
8506 a <i>known medium</i>. Known media are stored in the media
8507 registry transparently maintained by VirtualBox and stored in settings
8508 files so that this registry is preserved when VirtualBox is not running.
8509
8510 Newly created virtual media are remembered only when the associated
8511 storage unit is actually created.
8512
8513 All known media can be enumerated using
8514 <link to="IVirtualBox::hardDisks"/>,
8515 <link to="IVirtualBox::DVDImages"/> and
8516 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8517 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8518 and similar methods or by location using
8519 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8520
8521 Only known media can be attached to virtual machines.
8522
8523 Removing known media from the media registry is performed when the given
8524 medium is closed using the <link to="#close"/> method or when its
8525 associated storage unit is deleted.
8526
8527 <h3>Accessibility checks</h3>
8528
8529 The given medium (with the created storage unit) is considered to be
8530 <i>accessible</i> when its storage unit can be read. In that case, the
8531 <link to="#state"/> attribute has a value of "Created".
8532 When the storage unit cannot be read (for example, because it is located on
8533 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8534 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8535 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8536 obtained by reading the <link to="#lastAccessError"/> attribute.
8537
8538 A new accessibility check is performed each time the <link to="#state"/>
8539 attribute is read. This check may take long time (several seconds or even
8540 minutes, depending on the storage unit location and format), and will
8541 block the calling thread until finished. For this reason, it is recommended
8542 to never read this attribute on the main UI thread to avoid making the UI
8543 unresponsive.
8544
8545 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8546 created for the first time), all known media are in the
8547 <link to="MediumState_Inaccessible"/> state but the value of the <link
8548 to="#lastAccessError"/> attribute is an empty string because no actual
8549 accessibility check is made on startup. This is done to make the
8550 VirtualBox object ready for serving requests as
8551 fast as possible and let the end-user application decide if it needs to
8552 check media accessibility right away or not.
8553
8554 <h3>Hard disk types</h3>
8555
8556 There are three types of hard disk images (see <link to="MediumType" />):
8557 "normal", "immutable" and "writethrough", represented by the
8558 <link to="#type"/> attribute. The type of the hard disk defines how the
8559 hard disk is attached to a virtual machine and what happens when a
8560 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8561 attached hard disk is taken.
8562
8563 All hard disks can be also divided in two groups: <i>base</i> hard
8564 disks and <i>differencing</i> hard disks. A base hard disk contains all
8565 sectors of the hard disk data in its own storage and therefore can be
8566 used independently. On the contrary, a differencing hard disk is a
8567 "delta" to some other disk and contains only those sectors which differ
8568 from that other disk, which is then called a <i>parent</i>. The differencing
8569 hard disk is said to be <i>linked to</i> that parent.
8570 The parent may be itself a differencing image, thus forming a chain of
8571 linked hard disks. The last element in that chain
8572 must always be a base medium. Note that several differencing
8573 hard disks may be linked to the same parent hard disk.
8574
8575 Differencing hard disks can be distinguished from base hard disks by
8576 querying the <link to="#parent"/> attribute: base hard disks do not have
8577 parents they would depend on, so the value of this attribute is always
8578 @c null for them. Using this attribute, it is possible to walk up
8579 the hard disk tree (from the child hard disk to its parent). It is also
8580 possible to walk down the tree using the <link to="#children"/>
8581 attribute.
8582
8583 Note that the type of all differencing hard disks is
8584 <link to="MediumType_Normal" />; all other values are
8585 meaningless for them. Base hard disks may be of any type.
8586
8587 <h3>Creating hard disks</h3>
8588
8589 New base hard disks are created using
8590 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8591 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8592 disks are usually implicitly created by VirtualBox when needed but may
8593 also be created explicitly using <link to="#createDiffStorage"/>.
8594
8595 After the hard disk is successfully created (including the storage unit)
8596 or opened, it becomes a known hard disk (remembered in the internal media
8597 registry). Known hard disks can be attached to a virtual machine, accessed
8598 through <link to="IVirtualBox::getHardDisk"/> and
8599 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8600 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8601
8602 The following methods, besides <link to="IMedium::close"/>,
8603 automatically remove the hard disk from the media registry:
8604 <ul>
8605 <li><link to="#deleteStorage"/></li>
8606 <li><link to="#mergeTo"/></li>
8607 </ul>
8608
8609 If the storage unit of the hard disk is a regular file in the host's
8610 file system then the rules stated in the description of the
8611 <link to="IMedium::location"/> attribute apply when setting its value. In
8612 addition, a plain file name without any path may be given, in which case
8613 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8614 folder</link> will be prepended to it.
8615
8616 <h4>Automatic composition of the file name part</h4>
8617
8618 Another extension to the <link to="IMedium::location"/> attribute is that
8619 there is a possibility to cause VirtualBox to compose a unique value for
8620 the file name part of the location using the UUID of the hard disk. This
8621 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8622 e.g. before the storage unit is created, and works as follows. You set the
8623 value of the <link to="IMedium::location"/> attribute to a location
8624 specification which only contains the path specification but not the file
8625 name part and ends with either a forward slash or a backslash character.
8626 In response, VirtualBox will generate a new UUID for the hard disk and
8627 compose the file name using the following pattern:
8628 <pre>
8629 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8630 </pre>
8631 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8632 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8633 is the default extension for the storage format of this hard disk. After
8634 that, you may call any of the methods that create a new hard disk storage
8635 unit and they will use the generated UUID and file name.
8636
8637 <h3>Attaching Hard Disks</h3>
8638
8639 Hard disks are attached to virtual machines using the
8640 <link to="IMachine::attachDevice"/> method and detached using the
8641 <link to="IMachine::detachDevice"/> method. Depending on their
8642 <link to="#type"/>, hard disks are attached either
8643 <i>directly</i> or <i>indirectly</i>.
8644
8645 When a hard disk is being attached directly, it is associated with the
8646 virtual machine and used for hard disk operations when the machine is
8647 running. When a hard disk is being attached indirectly, a new differencing
8648 hard disk linked to it is implicitly created and this differencing hard
8649 disk is associated with the machine and used for hard disk operations.
8650 This also means that if <link to="IMachine::attachDevice"/> performs
8651 a direct attachment then the same hard disk will be returned in response
8652 to the subsequent <link to="IMachine::getMedium"/> call; however if
8653 an indirect attachment is performed then
8654 <link to="IMachine::getMedium"/> will return the implicitly created
8655 differencing hard disk, not the original one passed to <link
8656 to="IMachine::attachDevice"/>. In detail:
8657
8658 <ul>
8659 <li><b>Normal base</b> hard disks that do not have children (i.e.
8660 differencing hard disks linked to them) and that are not already
8661 attached to virtual machines in snapshots are attached <b>directly</b>.
8662 Otherwise, they are attached <b>indirectly</b> because having
8663 dependent children or being part of the snapshot makes it impossible
8664 to modify hard disk contents without breaking the integrity of the
8665 dependent party. The <link to="#readOnly"/> attribute allows to
8666 quickly determine the kind of the attachment for the given hard
8667 disk. Note that if a normal base hard disk is to be indirectly
8668 attached to a virtual machine with snapshots then a special
8669 procedure called <i>smart attachment</i> is performed (see below).</li>
8670 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8671 they are attached <b>directly</b> if they do not have children and are
8672 not attached to virtual machines in snapshots, and <b>indirectly</b>
8673 otherwise. Note that the smart attachment procedure is never performed
8674 for differencing hard disks.</li>
8675 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8676 they are designed to be non-writable. If an immutable hard disk is
8677 attached to a virtual machine with snapshots then a special
8678 procedure called smart attachment is performed (see below).</li>
8679 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8680 also as designed. This also means that writethrough hard disks cannot
8681 have other hard disks linked to them at all.</li>
8682 </ul>
8683
8684 Note that the same hard disk, regardless of its type, may be attached to
8685 more than one virtual machine at a time. In this case, the machine that is
8686 started first gains exclusive access to the hard disk and attempts to
8687 start other machines having this hard disk attached will fail until the
8688 first machine is powered down.
8689
8690 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8691 that the given hard disk remains associated with the given machine after a
8692 successful <link to="IMachine::detachDevice"/> call until
8693 <link to="IMachine::saveSettings"/> is called to save all changes to
8694 machine settings to disk. This deferring is necessary to guarantee that
8695 the hard disk configuration may be restored at any time by a call to
8696 <link to="IMachine::discardSettings"/> before the settings
8697 are saved (committed).
8698
8699 Note that if <link to="IMachine::discardSettings"/> is called after
8700 indirectly attaching some hard disks to the machine but before a call to
8701 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8702 all differencing hard disks implicitly created by
8703 <link to="IMachine::attachDevice"/> for these indirect attachments.
8704 Such implicitly created hard disks will also be immediately deleted when
8705 detached explicitly using the <link to="IMachine::detachDevice"/>
8706 call if it is made before <link to="IMachine::saveSettings"/>. This
8707 implicit deletion is safe because newly created differencing hard
8708 disks do not contain any user data.
8709
8710 However, keep in mind that detaching differencing hard disks that were
8711 implicitly created by <link to="IMachine::attachDevice"/>
8712 before the last <link to="IMachine::saveSettings"/> call will
8713 <b>not</b> implicitly delete them as they may already contain some data
8714 (for example, as a result of virtual machine execution). If these hard
8715 disks are no more necessary, the caller can always delete them explicitly
8716 using <link to="#deleteStorage"/> after they are actually de-associated
8717 from this machine by the <link to="IMachine::saveSettings"/> call.
8718
8719 <h3>Smart Attachment</h3>
8720
8721 When normal base or immutable hard disks are indirectly attached to a
8722 virtual machine then some additional steps are performed to make sure the
8723 virtual machine will have the most recent "view" of the hard disk being
8724 attached. These steps include walking through the machine's snapshots
8725 starting from the current one and going through ancestors up to the first
8726 snapshot. Hard disks attached to the virtual machine in all
8727 of the encountered snapshots are checked whether they are descendants of
8728 the given normal base or immutable hard disk. The first found child (which
8729 is the differencing hard disk) will be used instead of the normal base or
8730 immutable hard disk as a parent for creating a new differencing hard disk
8731 that will be actually attached to the machine. And only if no descendants
8732 are found or if the virtual machine does not have any snapshots then the
8733 normal base or immutable hard disk will be used itself as a parent for
8734 this differencing hard disk.
8735
8736 It is easier to explain what smart attachment does using the
8737 following example:
8738 <pre>
8739BEFORE attaching B.vdi: AFTER attaching B.vdi:
8740
8741Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8742 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8743 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8744 Snapshot 4 (none) Snapshot 4 (none)
8745 CurState (none) CurState (D3->D2.vdi)
8746
8747 NOT
8748 ...
8749 CurState (D3->B.vdi)
8750 </pre>
8751 The first column is the virtual machine configuration before the base hard
8752 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8753 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8754 mean that the hard disk that is actually attached to the machine is a
8755 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8756 another hard disk, <tt>B.vdi</tt>.
8757
8758 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8759 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8760 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8761 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8762 it cannot be attached directly and needs an indirect attachment (i.e.
8763 implicit creation of a new differencing hard disk). Due to the smart
8764 attachment procedure, the new differencing hard disk
8765 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8766 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8767 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8768 machine.
8769
8770 Note that if there is more than one descendant hard disk of the given base
8771 hard disk found in a snapshot, and there is an exact device, channel and
8772 bus match, then this exact match will be used. Otherwise, the youngest
8773 descendant will be picked up.
8774
8775 There is one more important aspect of the smart attachment procedure which
8776 is not related to snapshots at all. Before walking through the snapshots
8777 as described above, the backup copy of the current list of hard disk
8778 attachment is searched for descendants. This backup copy is created when
8779 the hard disk configuration is changed for the first time after the last
8780 <link to="IMachine::saveSettings"/> call and used by
8781 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8782 changes. When such a descendant is found in this backup copy, it will be
8783 simply re-attached back, without creating a new differencing hard disk for
8784 it. This optimization is necessary to make it possible to re-attach the
8785 base or immutable hard disk to a different bus, channel or device slot
8786 without losing the contents of the differencing hard disk actually
8787 attached to the machine in place of it.
8788 </desc>
8789
8790 <attribute name="id" type="uuid" mod="string" readonly="yes">
8791 <desc>
8792 UUID of the medium. For a newly created medium, this value is a randomly
8793 generated UUID.
8794
8795 <note>
8796 For media in one of MediumState_NotCreated, MediumState_Creating or
8797 MediumState_Deleting states, the value of this property is undefined
8798 and will most likely be an empty UUID.
8799 </note>
8800 </desc>
8801 </attribute>
8802
8803 <attribute name="description" type="wstring">
8804 <desc>
8805 Optional description of the medium. For a newly created medium the value
8806 of this attribute is an empty string.
8807
8808 Medium types that don't support this attribute will return E_NOTIMPL in
8809 attempt to get or set this attribute's value.
8810
8811 <note>
8812 For some storage types, reading this attribute may return an outdated
8813 (last known) value when <link to="#state"/> is <link
8814 to="MediumState_Inaccessible"/> or <link
8815 to="MediumState_LockedWrite"/> because the value of this attribute is
8816 stored within the storage unit itself. Also note that changing the
8817 attribute value is not possible in such case, as well as when the
8818 medium is the <link to="MediumState_LockedRead"/> state.
8819 </note>
8820 </desc>
8821 </attribute>
8822
8823 <attribute name="state" type="MediumState" readonly="yes">
8824 <desc>
8825 Current medium state. Inspect <link to="MediumState"/> values for details.
8826
8827 Reading this attribute may take a long time because an accessibility
8828 check of the storage unit is performed each time the attribute is read.
8829 This check may cause a significant delay if the storage unit of the
8830 given medium is, for example, a file located on a network share which is
8831 not currently accessible due to connectivity problems -- the call will
8832 not return until a timeout interval defined by the host OS for this
8833 operation expires.
8834
8835 If the last known state of the medium is <link to="MediumState_Created"/>
8836 and the accessibility check fails then the state would be set to
8837 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8838 may be used to get more details about the failure. If the state of the
8839 medium is <link to="MediumState_LockedRead"/> or
8840 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8841 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8842 accessibility check in this case.
8843
8844 Note that not all medium states are applicable to all medium types.
8845 </desc>
8846 </attribute>
8847
8848 <attribute name="location" type="wstring">
8849 <desc>
8850 Location of the storage unit holding medium data.
8851
8852 The format of the location string is medium type specific. For medium
8853 types using regular files in a host's file system, the location
8854 string is the full file name.
8855
8856 Some medium types may support changing the storage unit location by
8857 simply changing the value of this property. If this operation is not
8858 supported, the implementation will return E_NOTIMPL in attempt to set
8859 this attribute's value.
8860
8861 When setting a value of the location attribute which is a regular file
8862 in the host's file system, the given file name may be either relative to
8863 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8864 absolute. Note that if the given location specification does not contain
8865 the file extension part then a proper default extension will be
8866 automatically appended by the implementation depending on the medium type.
8867 </desc>
8868 </attribute>
8869
8870 <attribute name="name" type="wstring" readonly="yes">
8871 <desc>
8872 Name of the storage unit holding medium data.
8873
8874 The returned string is a short version of the <link to="#location"/>
8875 attribute that is suitable for representing the medium in situations
8876 where the full location specification is too long (such as lists
8877 and comboboxes in GUI frontends). This string is also used by frontends
8878 to sort the media list alphabetically when needed.
8879
8880 For example, for locations that are regular files in the host's file
8881 system, the value of this attribute is just the file name (+ extension),
8882 without the path specification.
8883
8884 Note that as opposed to the <link to="#location"/> attribute, the name
8885 attribute will not necessary be unique for a list of media of the
8886 given type and format.
8887 </desc>
8888 </attribute>
8889
8890 <attribute name="deviceType" type="DeviceType" readonly="yes">
8891 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8892 medium.</desc>
8893 </attribute>
8894
8895 <attribute name="hostDrive" type="boolean" readonly="yes">
8896 <desc>True if this corresponds to a drive on the host.</desc>
8897 </attribute>
8898
8899 <attribute name="size" type="unsigned long long" readonly="yes">
8900 <desc>
8901 Physical size of the storage unit used to hold medium data (in bytes).
8902
8903 <note>
8904 For media whose <link to="#state"/> is <link
8905 to="MediumState_Inaccessible"/>, the value of this property is the
8906 last known size. For <link to="MediumState_NotCreated"/> media,
8907 the returned value is zero.
8908 </note>
8909 </desc>
8910 </attribute>
8911
8912 <attribute name="format" type="wstring" readonly="yes">
8913 <desc>
8914 Storage format of this medium.
8915
8916 The value of this attribute is a string that specifies a backend used to
8917 store hard disk data. The storage format is defined when you create a
8918 new hard disk or automatically detected when you open an existing hard
8919 disk medium, and cannot be changed later.
8920
8921 The list of all storage formats supported by this VirtualBox
8922 installation can be obtained using
8923 <link to="ISystemProperties::mediumFormats"/>.
8924 </desc>
8925 </attribute>
8926
8927 <attribute name="type" type="MediumType">
8928 <desc>
8929 Type (role) of this hard disk.
8930
8931 The following constraints apply when changing the value of this
8932 attribute:
8933 <ul>
8934 <li>If a hard disk is attached to a virtual machine (either in the
8935 current state or in one of the snapshots), its type cannot be
8936 changed.
8937 </li>
8938 <li>As long as the hard disk has children, its type cannot be set
8939 to <link to="MediumType_Writethrough"/>.
8940 </li>
8941 <li>The type of all differencing hard disks is
8942 <link to="MediumType_Normal"/> and cannot be changed.
8943 </li>
8944 </ul>
8945
8946 The type of a newly created or opened hard disk is set to
8947 <link to="MediumType_Normal"/>.
8948 </desc>
8949 </attribute>
8950
8951 <attribute name="parent" type="IMedium" readonly="yes">
8952 <desc>
8953 Parent of this hard disk (a hard disk this hard disk is directly based
8954 on).
8955
8956 Only differencing hard disks have parents. For base (non-differencing)
8957 hard disks, @c null is returned.
8958 </desc>
8959 </attribute>
8960
8961 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8962 <desc>
8963 Children of this hard disk (all differencing hard disks directly based
8964 on this hard disk). A @c null array is returned if this hard disk
8965 does not have any children.
8966 </desc>
8967 </attribute>
8968
8969 <attribute name="base" type="IMedium" readonly="yes">
8970 <desc>
8971 Base medium of this medium.
8972
8973 If this is a differencing medium, its base hard disk is the medium
8974 the given hard disk branch starts from. For all other types of hard
8975 disks, this property returns the hard disk object itself (i.e. the same
8976 object this property is read on).
8977 </desc>
8978 </attribute>
8979
8980 <attribute name="readOnly" type="boolean" readonly="yes">
8981 <desc>
8982 Returns @c true if this hard disk is read-only and @c false otherwise.
8983
8984 A hard disk is considered to be read-only when its contents cannot be
8985 modified without breaking the integrity of other parties that depend on
8986 this hard disk such as its child hard disks or snapshots of virtual
8987 machines where this hard disk is attached to these machines. If there
8988 are no children and no such snapshots then there is no dependency and
8989 the hard disk is not read-only.
8990
8991 The value of this attribute can be used to determine the kind of the
8992 attachment that will take place when attaching this hard disk to a
8993 virtual machine. If the value is @c false then the hard disk will
8994 be attached directly. If the value is @c true then the hard disk
8995 will be attached indirectly by creating a new differencing child hard
8996 disk for that. See the interface description for more information.
8997
8998 Note that all <link to="MediumType_Immutable">Immutable</link> hard
8999 disks are always read-only while all
9000 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
9001 always not.
9002
9003 <note>
9004 The read-only condition represented by this attribute is related to
9005 the hard disk type and usage, not to the current
9006 <link to="IMedium::state">medium state</link> and not to the read-only
9007 state of the storage unit.
9008 </note>
9009 </desc>
9010 </attribute>
9011
9012 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9013 <desc>
9014 Logical size of this hard disk (in megabytes), as reported to the
9015 guest OS running inside the virtual machine this disk is
9016 attached to. The logical size is defined when the hard disk is created
9017 and cannot be changed later.
9018
9019 <note>
9020 Reading this property on a differencing hard disk will return the size
9021 of its <link to="#base"/> medium.
9022 </note>
9023 <note>
9024 For hard disks whose state is <link to="#state"/> is <link
9025 to="MediumState_Inaccessible"/>, the value of this property is the
9026 last known logical size. For <link to="MediumaState_NotCreated"/> hard
9027 disks, the returned value is zero.
9028 </note>
9029 </desc>
9030 </attribute>
9031
9032 <attribute name="autoReset" type="boolean">
9033 <desc>
9034 Whether this differencing hard disk will be automatically reset each
9035 time a virtual machine it is attached to is powered up.
9036
9037 See <link to="#reset()"/> for more information about resetting
9038 differencing hard disks.
9039
9040 <note>
9041 Reading this property on a base (non-differencing) hard disk will
9042 always @c false. Changing the value of this property in this
9043 case is not supported.
9044 </note>
9045
9046 <result name="VBOX_E_NOT_SUPPORTED">
9047 This is not a differencing hard disk (when changing the attribute
9048 value).
9049 </result>
9050 </desc>
9051 </attribute>
9052
9053 <attribute name="lastAccessError" type="wstring" readonly="yes">
9054 <desc>
9055 Text message that represents the result of the last accessibility
9056 check.
9057
9058 Accessibility checks are performed each time the <link to="#state"/>
9059 attribute is read. An empty string is returned if the last
9060 accessibility check was successful. A non-empty string indicates a
9061 failure and should normally describe a reason of the failure (for
9062 example, a file read error).
9063 </desc>
9064 </attribute>
9065
9066 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9067 <desc>
9068 Array of UUIDs of all machines this medium is attached to.
9069
9070 A @c null array is returned if this medium is not attached to any
9071 machine or to any machine's snapshot.
9072
9073 <note>
9074 The returned array will include a machine even if this medium is not
9075 attached to that machine in the current state but attached to it in
9076 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9077 details.
9078 </note>
9079 </desc>
9080 </attribute>
9081
9082 <method name="getSnapshotIds">
9083 <desc>
9084 Returns an array of UUIDs of all snapshots of the given machine where
9085 this medium is attached to.
9086
9087 If the medium is attached to the machine in the current state, then the
9088 first element in the array will always be the ID of the queried machine
9089 (i.e. the value equal to the @c machineId argument), followed by
9090 snapshot IDs (if any).
9091
9092 If the medium is not attached to the machine in the current state, then
9093 the array will contain only snapshot IDs.
9094
9095 The returned array may be @c null if this medium is not attached
9096 to the given machine at all, neither in the current state nor in one of
9097 the snapshots.
9098 </desc>
9099 <param name="machineId" type="uuid" mod="string" dir="in">
9100 <desc>
9101 UUID of the machine to query.
9102 </desc>
9103 </param>
9104 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9105 <desc>
9106 Array of snapshot UUIDs of the given machine using this medium.
9107 </desc>
9108 </param>
9109 </method>
9110
9111 <method name="lockRead">
9112 <desc>
9113 Locks this medium for reading.
9114
9115 The read lock is shared: many clients can simultaneously lock the
9116 same medium for reading unless it is already locked for writing (see
9117 <link to="#lockWrite"/>) in which case an error is returned.
9118
9119 When the medium is locked for reading, it cannot be modified
9120 from within VirtualBox. This means that any method that changes
9121 the properties of this medium or contents of the storage unit
9122 will return an error (unless explicitly stated otherwise) and
9123 that an attempt to start a virtual machine that wants to modify
9124 the medium will also fail.
9125
9126 When the virtual machine is started up, it locks for reading all
9127 media it uses in read-only mode. If some medium cannot be locked
9128 for reading, the startup procedure will fail.
9129
9130 The medium locked for reading must be unlocked using the <link
9131 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9132 can be nested and must be followed by the same number of paired
9133 <link to="#unlockRead"/> calls.
9134
9135 This method sets the medium state to <link
9136 to="MediumState_LockedRead" /> on success. The state prior to
9137 this call must be <link to="MediumState_Created" />,
9138 <link to="MediumState_Inaccessible" /> or
9139 <link to="MediumState_LockedRead" />.
9140 As you can see, an inaccessible medium can be locked too. This is
9141 not an error; this method performs a logical lock that prevents
9142 modifications of this medium through the VirtualBox API, not a
9143 physical lock of the underlying storage unit.
9144
9145 This method returns the current state of the medium
9146 <b>before</b> the operation.
9147
9148 <result name="VBOX_E_INVALID_OBJECT_STATE">
9149 Invalid medium state (e.g. not created, locked, inaccessible,
9150 creating, deleting).
9151 </result>
9152
9153 </desc>
9154 <param name="state" type="MediumState" dir="return">
9155 <desc>
9156 State of the medium after the operation.
9157 </desc>
9158 </param>
9159 </method>
9160
9161 <method name="unlockRead">
9162 <desc>
9163 Cancels the read lock previously set by <link to="#lockRead"/>.
9164
9165 For both, success and failure, this method returns the current state
9166 of the medium <b>after</b> the operation.
9167
9168 See <link to="#lockRead"/> for more details.
9169
9170 <result name="VBOX_E_INVALID_OBJECT_STATE">
9171 Medium not locked for reading.
9172 </result>
9173
9174 </desc>
9175 <param name="state" type="MediumState" dir="return">
9176 <desc>
9177 State of the medium after the operation.
9178 </desc>
9179 </param>
9180 </method>
9181
9182 <method name="lockWrite">
9183 <desc>
9184 Locks this medium for writing.
9185
9186 The write lock, as opposed to <link to="#lockRead"/>, is
9187 exclusive: there may be only one client holding a write lock
9188 and there may be no read locks while the write lock is held.
9189
9190 When the medium is locked for writing, it cannot be modified
9191 from within VirtualBox and it is not guaranteed that the values
9192 of its properties are up-to-date. Any method that changes the
9193 properties of this medium or contents of the storage unit will
9194 return an error (unless explicitly stated otherwise) and an
9195 attempt to start a virtual machine wanting to modify or to
9196 read the medium will fail.
9197
9198 When the virtual machine is started up, it locks for writing all
9199 media it uses to write data to. If any medium could not be locked
9200 for writing, the startup procedure will fail.
9201
9202 The medium locked for writing must be unlocked using the <link
9203 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9204 can <b>not</b> be nested and must be followed by a<link
9205 to="#unlockWrite"/> call before the next lockWrite call.
9206
9207 This method sets the medium state to <link to="MediumState_LockedWrite" />
9208 on success. The state prior to this call must be <link to="MediumState_Created"/>
9209 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9210 medium can be locked too. This is not an error; this method
9211 performs a logical lock preventing modifications of this
9212 medium through the VirtualBox API, not a physical lock of the
9213 underlying storage unit.
9214
9215 For both, success and failure, this method returns the current
9216 state of the medium <b>before</b> the operation.
9217
9218 <result name="VBOX_E_INVALID_OBJECT_STATE">
9219 Invalid medium state (e.g. not created, locked, inaccessible,
9220 creating, deleting).
9221 </result>
9222
9223 </desc>
9224 <param name="state" type="MediumState" dir="return">
9225 <desc>
9226 State of the medium after the operation.
9227 </desc>
9228 </param>
9229 </method>
9230
9231 <method name="unlockWrite">
9232 <desc>
9233 Cancels the write lock previously set by <link to="#lockWrite"/>.
9234
9235 For both, success and failure, this method returns the current
9236 state of the medium <b>after</b> the operation.
9237
9238 See <link to="#lockWrite"/> for more details.
9239
9240 <result name="VBOX_E_INVALID_OBJECT_STATE">
9241 Medium not locked for writing.
9242 </result>
9243
9244 </desc>
9245 <param name="state" type="MediumState" dir="return">
9246 <desc>
9247 State of the medium after the operation.
9248 </desc>
9249 </param>
9250 </method>
9251
9252 <method name="close">
9253 <desc>
9254 Closes this medium.
9255
9256 The medium must not be attached to any known virtual machine
9257 and must not have any known child media, otherwise the
9258 operation will fail.
9259
9260 When the medium is successfully closed, it gets removed from
9261 the list of remembered media, but its storage unit is not
9262 deleted. In particular, this means that this medium can be
9263 later opened again using the <link
9264 to="IVirtualBox::openHardDisk"/> call.
9265
9266 Note that after this method successfully returns, the given medium
9267 object becomes uninitialized. This means that any attempt
9268 to call any of its methods or attributes will fail with the
9269 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9270
9271 <result name="VBOX_E_INVALID_OBJECT_STATE">
9272 Invalid medium state (other than not created, created or
9273 inaccessible).
9274 </result>
9275 <result name="VBOX_E_OBJECT_IN_USE">
9276 Medium attached to virtual machine.
9277 </result>
9278 <result name="VBOX_E_FILE_ERROR">
9279 Settings file not accessible.
9280 </result>
9281 <result name="VBOX_E_XML_ERROR">
9282 Could not parse the settings file.
9283 </result>
9284
9285 </desc>
9286 </method>
9287
9288 <!-- storage methods -->
9289
9290 <method name="getProperty">
9291 <desc>
9292 Returns the value of the custom hard disk property with the given name.
9293
9294 The list of all properties supported by the given hard disk format can
9295 be obtained with <link to="IMediumFormat::describeProperties"/>.
9296
9297 Note that if this method returns an empty string in @a value, the
9298 requested property is supported but currently not assigned any value.
9299
9300 <result name="VBOX_E_OBJECT_NOT_FOUND">
9301 Requested property does not exist (not supported by the format).
9302 </result>
9303 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9304 </desc>
9305 <param name="name" type="wstring" dir="in">
9306 <desc>Name of the property to get.</desc>
9307 </param>
9308 <param name="value" type="wstring" dir="return">
9309 <desc>Current property value.</desc>
9310 </param>
9311 </method>
9312
9313 <method name="setProperty">
9314 <desc>
9315 Sets the value of the custom hard disk property with the given name.
9316
9317 The list of all properties supported by the given hard disk format can
9318 be obtained with <link to="IMediumFormat::describeProperties"/>.
9319
9320 Note that setting the property value to @c null or an empty string is
9321 equivalent to deleting the existing value. A default value (if it is
9322 defined for this property) will be used by the format backend in this
9323 case.
9324
9325 <result name="VBOX_E_OBJECT_NOT_FOUND">
9326 Requested property does not exist (not supported by the format).
9327 </result>
9328 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9329 </desc>
9330 <param name="name" type="wstring" dir="in">
9331 <desc>Name of the property to set.</desc>
9332 </param>
9333 <param name="value" type="wstring" dir="in">
9334 <desc>Property value to set.</desc>
9335 </param>
9336 </method>
9337
9338 <method name="getProperties">
9339 <desc>
9340 Returns values for a group of properties in one call.
9341
9342 The names of the properties to get are specified using the @a names
9343 argument which is a list of comma-separated property names or
9344 an empty string if all properties are to be returned. Note that currently
9345 the value of this argument is ignored and the method always returns all
9346 existing properties.
9347
9348 The list of all properties supported by the given hard disk format can
9349 be obtained with <link to="IMediumFormat::describeProperties"/>.
9350
9351 The method returns two arrays, the array of property names corresponding
9352 to the @a names argument and the current values of these properties.
9353 Both arrays have the same number of elements with each elemend at the
9354 given index in the first array corresponds to an element at the same
9355 index in the second array.
9356
9357 Note that for properties that do not have assigned values,
9358 an empty string is returned at the appropriate index in the
9359 @a returnValues array.
9360
9361 </desc>
9362 <param name="names" type="wstring" dir="in">
9363 <desc>
9364 Names of properties to get.
9365 </desc>
9366 </param>
9367 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9368 <desc>Names of returned properties.</desc>
9369 </param>
9370 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9371 <desc>Values of returned properties.</desc>
9372 </param>
9373 </method>
9374
9375 <method name="setProperties">
9376 <desc>
9377 Sets values for a group of properties in one call.
9378
9379 The names of the properties to set are passed in the @a names
9380 array along with the new values for them in the @a values array. Both
9381 arrays have the same number of elements with each elemend at the given
9382 index in the first array corresponding to an element at the same index
9383 in the second array.
9384
9385 If there is at least one property name in @a names that is not valid,
9386 the method will fail before changing the values of any other properties
9387 from the @a names array.
9388
9389 Using this method over <link to="#setProperty"/> is preferred if you
9390 need to set several properties at once since it will result into less
9391 IPC calls.
9392
9393 The list of all properties supported by the given hard disk format can
9394 be obtained with <link to="IMediumFormat::describeProperties"/>.
9395
9396 Note that setting the property value to @c null or an empty string is
9397 equivalent to deleting the existing value. A default value (if it is
9398 defined for this property) will be used by the format backend in this
9399 case.
9400 </desc>
9401 <param name="names" type="wstring" safearray="yes" dir="in">
9402 <desc>Names of properties to set.</desc>
9403 </param>
9404 <param name="values" type="wstring" safearray="yes" dir="in">
9405 <desc>Values of properties to set.</desc>
9406 </param>
9407 </method>
9408
9409 <!-- storage methods -->
9410
9411 <method name="createBaseStorage">
9412 <desc>
9413 Starts creating a hard disk storage unit (fixed/dynamic, according
9414 to the variant flags) in in the background. The previous storage unit
9415 created for this object, if any, must first be deleted using
9416 <link to="#deleteStorage"/>, otherwise the operation will fail.
9417
9418 Before the operation starts, the hard disk is placed in
9419 <link to="MediumState_Creating"/> state. If the create operation
9420 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9421 state.
9422
9423 After the returned progress object reports that the operation has
9424 successfully completed, the medium state will be set to <link
9425 to="MediumState_Created"/>, the hard disk will be remembered by this
9426 VirtualBox installation and may be attached to virtual machines.
9427
9428 <result name="VBOX_E_NOT_SUPPORTED">
9429 The variant of storage creation operation is not supported. See <link
9430 to="IMediumFormat::capabilities"/>.
9431 </result>
9432 </desc>
9433 <param name="logicalSize" type="unsigned long long" dir="in">
9434 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9435 </param>
9436 <param name="variant" type="MediumVariant" dir="in">
9437 <desc>Exact image variant which should be created.</desc>
9438 </param>
9439 <param name="progress" type="IProgress" dir="return">
9440 <desc>Progress object to track the operation completion.</desc>
9441 </param>
9442 </method>
9443
9444 <method name="deleteStorage">
9445 <desc>
9446 Starts deleting the storage unit of this hard disk.
9447
9448 The hard disk must not be attached to any known virtual machine and must
9449 not have any known child hard disks, otherwise the operation will fail.
9450 It will also fail if there is no storage unit to delete or if deletion
9451 is already in progress, or if the hard disk is being in use (locked for
9452 read or for write) or inaccessible. Therefore, the only valid state for
9453 this operation to succeed is <link to="MediumState_Created"/>.
9454
9455 Before the operation starts, the hard disk is placed to
9456 <link to="MediumState_Deleting"/> state and gets removed from the list
9457 of remembered hard disks (media registry). If the delete operation
9458 fails, the medium will be remembered again and placed back to
9459 <link to="MediumState_Created"/> state.
9460
9461 After the returned progress object reports that the operation is
9462 complete, the medium state will be set to
9463 <link to="MediumState_NotCreated"/> and you will be able to use one of
9464 the storage creation methods to create it again.
9465
9466 <see>#close()</see>
9467
9468 <result name="VBOX_E_OBJECT_IN_USE">
9469 Hard disk is attached to a virtual machine.
9470 </result>
9471 <result name="VBOX_E_NOT_SUPPORTED">
9472 Storage deletion is not allowed because neither of storage creation
9473 operations are supported. See
9474 <link to="IMediumFormat::capabilities"/>.
9475 </result>
9476
9477 <note>
9478 If the deletion operation fails, it is not guaranteed that the storage
9479 unit still exists. You may check the <link to="IMedium::state"/> value
9480 to answer this question.
9481 </note>
9482 </desc>
9483 <param name="progress" type="IProgress" dir="return">
9484 <desc>Progress object to track the operation completion.</desc>
9485 </param>
9486 </method>
9487
9488 <!-- diff methods -->
9489
9490 <method name="createDiffStorage">
9491 <desc>
9492 Starts creating an empty differencing storage unit based on this hard
9493 disk in the format and at the location defined by the @a target
9494 argument.
9495
9496 The target hard disk must be in <link to="MediumState_NotCreated"/>
9497 state (i.e. must not have an existing storage unit). Upon successful
9498 completion, this operation will set the type of the target hard disk to
9499 <link to="MediumType_Normal"/> and create a storage unit necessary to
9500 represent the differencing hard disk data in the given format (according
9501 to the storage format of the target object).
9502
9503 After the returned progress object reports that the operation is
9504 successfully complete, the target hard disk gets remembered by this
9505 VirtualBox installation and may be attached to virtual machines.
9506
9507 <note>
9508 The hard disk will be set to <link to="MediumState_LockedRead"/>
9509 state for the duration of this operation.
9510 </note>
9511 <result name="VBOX_E_OBJECT_IN_USE">
9512 Hard disk not in @c NotCreated state.
9513 </result>
9514 </desc>
9515 <param name="target" type="IMedium" dir="in">
9516 <desc>Target hard disk.</desc>
9517 </param>
9518 <param name="variant" type="MediumVariant" dir="in">
9519 <desc>Exact image variant which should be created.</desc>
9520 </param>
9521 <param name="progress" type="IProgress" dir="return">
9522 <desc>Progress object to track the operation completion.</desc>
9523 </param>
9524 </method>
9525
9526 <method name="mergeTo">
9527 <desc>
9528 Starts merging the contents of this hard disk and all intermediate
9529 differencing hard disks in the chain to the given target hard disk.
9530
9531 The target hard disk must be either a descendant of this hard disk or
9532 its ancestor (otherwise this method will immediately return a failure).
9533 It follows that there are two logical directions of the merge operation:
9534 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9535 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9536 chain:
9537
9538 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9539
9540 Here, calling this method on the <tt>Base</tt> hard disk object with
9541 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9542 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9543 merge. Note that in both cases the contents of the resulting hard disk
9544 will be the same, the only difference is the hard disk object that takes
9545 the result of the merge operation. In case of the forward merge in the
9546 above example, the result will be written to <tt>Diff_2</tt>; in case of
9547 the backward merge, the result will be written to <tt>Base</tt>. In
9548 other words, the result of the operation is always stored in the target
9549 hard disk.
9550
9551 Upon successful operation completion, the storage units of all hard
9552 disks in the chain between this (source) hard disk and the target hard
9553 disk, including the source hard disk itself, will be automatically
9554 deleted and the relevant hard disk objects (including this hard disk)
9555 will become uninitialized. This means that any attempt to call any of
9556 their methods or attributes will fail with the
9557 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9558 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9559 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9560 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9561 disk itself since it will no longer be based on any other hard disk.
9562
9563 Considering the above, all of the following conditions must be met in
9564 order for the merge operation to succeed:
9565 <ul>
9566 <li>
9567 Neither this (source) hard disk nor any intermediate
9568 differencing hard disk in the chain between it and the target
9569 hard disk is attached to any virtual machine.
9570 </li>
9571 <li>
9572 Neither the source hard disk nor the target hard disk is an
9573 <link to="MediumType_Immutable"/> hard disk.
9574 </li>
9575 <li>
9576 The part of the hard disk tree from the source hard disk to the
9577 target hard disk is a linear chain, i.e. all hard disks in this
9578 chain have exactly one child which is the next hard disk in this
9579 chain. The only exception from this rule is the target hard disk in
9580 the forward merge operation; it is allowed to have any number of
9581 child hard disks because the merge operation will hot change its
9582 logical contents (as it is seen by the guest OS or by children).
9583 </li>
9584 <li>
9585 None of the involved hard disks are in
9586 <link to="MediumState_LockedRead"/> or
9587 <link to="MediumState_LockedWrite"/> state.
9588 </li>
9589 </ul>
9590
9591 <note>
9592 This (source) hard disk and all intermediates will be placed to <link
9593 to="MediumState_Deleting"/> state and the target hard disk will be
9594 placed to <link to="MediumState_LockedWrite"/> state and for the
9595 duration of this operation.
9596 </note>
9597 </desc>
9598 <param name="targetId" type="uuid" mod="string" dir="in">
9599 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9600 </param>
9601 <param name="progress" type="IProgress" dir="return">
9602 <desc>Progress object to track the operation completion.</desc>
9603 </param>
9604 </method>
9605
9606 <!-- clone method -->
9607
9608 <method name="cloneTo">
9609 <desc>
9610 Starts creating a clone of this hard disk in the format and at the
9611 location defined by the @a target argument.
9612
9613 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9614 state (i.e. must not have an existing storage unit) or in
9615 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9616 big enough to hold the data or else the copy will be partial). Upon
9617 successful completion, the cloned hard disk will contain exactly the
9618 same sector data as the hard disk being cloned, except that in the
9619 first case a new UUID for the clone will be randomly generated, and in
9620 the second case the UUID will remain unchanged.
9621
9622 The @a parent argument defines which hard disk will be the parent
9623 of the clone. Passing a @c null reference indicates that the clone will
9624 be a base image, i.e. completely independent. It is possible to specify
9625 an arbitrary hard disk for this parameter, including the parent of the
9626 hard disk which is being cloned. Even cloning to a child of the source
9627 hard disk is possible. Note that when cloning to an existing image, the
9628 @a parent irgument is ignored.
9629
9630 After the returned progress object reports that the operation is
9631 successfully complete, the target hard disk gets remembered by this
9632 VirtualBox installation and may be attached to virtual machines.
9633
9634 <note>
9635 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9636 state for the duration of this operation.
9637 </note>
9638 <result name="E_NOTIMPL">
9639 The specified cloning variant is not supported at the moment.
9640 </result>
9641 </desc>
9642 <param name="target" type="IMedium" dir="in">
9643 <desc>Target hard disk.</desc>
9644 </param>
9645 <param name="variant" type="MediumVariant" dir="in">
9646 <desc>Exact image variant which should be created.</desc>
9647 </param>
9648 <param name="parent" type="IMedium" dir="in">
9649 <desc>Parent of the cloned hard disk.</desc>
9650 </param>
9651 <param name="progress" type="IProgress" dir="return">
9652 <desc>Progress object to track the operation completion.</desc>
9653 </param>
9654 </method>
9655
9656 <!-- other methods -->
9657
9658 <method name="compact">
9659 <desc>
9660 Starts compacting of this hard disk. This means that the disk is
9661 transformed into a possibly more compact storage representation.
9662 This potentially creates temporary images, which can require a
9663 substantial amount of additional disk space.
9664
9665 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9666 state and all its parent hard disks (if any) will be placed to
9667 <link to="MediumState_LockedRead"/> state for the duration of this
9668 operation.
9669
9670 Please note that the results can be either returned straight away,
9671 or later as the result of the background operation via the object
9672 returned via the @a progress parameter.
9673
9674 <result name="VBOX_E_NOT_SUPPORTED">
9675 Hard disk format does not support compacting (but potentially
9676 needs it).
9677 </result>
9678 </desc>
9679 <param name="progress" type="IProgress" dir="return">
9680 <desc>Progress object to track the operation completion.</desc>
9681 </param>
9682 </method>
9683
9684 <method name="reset">
9685 <desc>
9686 Starts erasing the contents of this differencing hard disk.
9687
9688 This operation will reset the differencing hard disk to its initial
9689 state when it does not contain any sector data and any read operation is
9690 redirected to its parent hard disk.
9691
9692 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9693 for the duration of this operation.
9694
9695 <result name="VBOX_E_NOT_SUPPORTED">
9696 This is not a differencing hard disk.
9697 </result>
9698 <result name="VBOX_E_INVALID_OBJECT_STATE">
9699 Hard disk is not in <link to="MediumState_Created"/> or
9700 <link to="MediumState_Inaccessible"/> state.
9701 </result>
9702 </desc>
9703 <param name="progress" type="IProgress" dir="return">
9704 <desc>Progress object to track the operation completion.</desc>
9705 </param>
9706 </method>
9707
9708 </interface>
9709
9710
9711 <!--
9712 // IMediumFormat
9713 /////////////////////////////////////////////////////////////////////////
9714 -->
9715
9716 <enum
9717 name="DataType"
9718 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9719 >
9720 <const name="Int32" value="0"/>
9721 <const name="Int8" value="1"/>
9722 <const name="String" value="2"/>
9723 </enum>
9724
9725 <enum
9726 name="DataFlags"
9727 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9728 >
9729 <const name="None" value="0x00"/>
9730 <const name="Mandatory" value="0x01"/>
9731 <const name="Expert" value="0x02"/>
9732 <const name="Array" value="0x04"/>
9733 <const name="FlagMask" value="0x07"/>
9734 </enum>
9735
9736 <enum
9737 name="MediumFormatCapabilities"
9738 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9739 >
9740 <desc>
9741 Hard disk format capability flags.
9742 </desc>
9743
9744 <const name="Uuid" value="0x01">
9745 <desc>
9746 Supports UUIDs as expected by VirtualBox code.
9747 </desc>
9748 </const>
9749
9750 <const name="CreateFixed" value="0x02">
9751 <desc>
9752 Supports creating fixed size images, allocating all space instantly.
9753 </desc>
9754 </const>
9755
9756 <const name="CreateDynamic" value="0x04">
9757 <desc>
9758 Supports creating dynamically growing images, allocating space on
9759 demand.
9760 </desc>
9761 </const>
9762
9763 <const name="CreateSplit2G" value="0x08">
9764 <desc>
9765 Supports creating images split in chunks of a bit less than 2 GBytes.
9766 </desc>
9767 </const>
9768
9769 <const name="Differencing" value="0x10">
9770 <desc>
9771 Supports being used as a format for differencing media (see <link
9772 to="IMedium::createDiffStorage"/>).
9773 </desc>
9774 </const>
9775
9776 <const name="Asynchronous" value="0x20">
9777 <desc>
9778 Supports asynchronous I/O operations for at least some configurations.
9779 </desc>
9780 </const>
9781
9782 <const name="File" value="0x40">
9783 <desc>
9784 The format backend operates on files (the <link to="IMedium::location"/>
9785 attribute of the medium specifies a file used to store medium
9786 data; for a list of supported file extensions see
9787 <link to="IMediumFormat::fileExtensions"/>).
9788 </desc>
9789 </const>
9790
9791 <const name="Properties" value="0x80">
9792 <desc>
9793 The format backend uses the property interface to configure the storage
9794 location and properties (the <link to="IMediumFormat::describeProperties"/>
9795 method is used to get access to properties supported by the given medium format).
9796 </desc>
9797 </const>
9798
9799 <const name="CapabilityMask" value="0xFF"/>
9800 </enum>
9801
9802 <interface
9803 name="IMediumFormat" extends="$unknown"
9804 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9805 wsmap="managed"
9806 >
9807 <desc>
9808 The IMediumFormat interface represents a medium format.
9809
9810 Each medium format has an associated backend which is used to handle
9811 media stored in this format. This interface provides information
9812 about the properties of the associated backend.
9813
9814 Each medium format is identified by a string represented by the
9815 <link to="#id"/> attribute. This string is used in calls like
9816 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9817 format.
9818
9819 The list of all supported medium formats can be obtained using
9820 <link to="ISystemProperties::mediaFormats"/>.
9821
9822 <see>IMedium</see>
9823 </desc>
9824
9825 <attribute name="id" type="wstring" readonly="yes">
9826 <desc>
9827 Identifier of this format.
9828
9829 The format identifier is a non-@c null non-empty ASCII string. Note that
9830 this string is case-insensitive. This means that, for example, all of
9831 the following strings:
9832 <pre>
9833 "VDI"
9834 "vdi"
9835 "VdI"</pre>
9836 refer to the same medium format.
9837
9838 This string is used in methods of other interfaces where it is necessary
9839 to specify a medium format, such as
9840 <link to="IVirtualBox::createHardDisk"/>.
9841 </desc>
9842 </attribute>
9843
9844 <attribute name="name" type="wstring" readonly="yes">
9845 <desc>
9846 Human readable description of this format.
9847
9848 Mainly for use in file open dialogs.
9849 </desc>
9850 </attribute>
9851
9852 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9853 <desc>
9854 Array of strings containing the supported file extensions.
9855
9856 The first extension in the array is the extension preferred by the
9857 backend. It is recommended to use this extension when specifying a
9858 location of the storage unit for a new medium.
9859
9860 Note that some backends do not work on files, so this array may be
9861 empty.
9862
9863 <see>IMediumFormat::capabilities</see>
9864 </desc>
9865 </attribute>
9866
9867 <attribute name="capabilities" type="unsigned long" readonly="yes">
9868 <desc>
9869 Capabilities of the format as a set of bit flags.
9870
9871 For the meaning of individual capability flags see
9872 <link to="MediumFormatCapabilities"/>.
9873 </desc>
9874 </attribute>
9875
9876 <method name="describeProperties">
9877 <desc>
9878 Returns several arrays describing the properties supported by this
9879 format.
9880
9881 An element with the given index in each array describes one
9882 property. Thus, the number of elements in each returned array is the
9883 same and corresponds to the number of supported properties.
9884
9885 The returned arrays are filled in only if the
9886 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9887 All arguments must be non-@c null.
9888
9889 <see>DataType</see>
9890 <see>DataFlags</see>
9891 </desc>
9892
9893 <param name="names" type="wstring" safearray="yes" dir="out">
9894 <desc>Array of property names.</desc>
9895 </param>
9896 <param name="description" type="wstring" safearray="yes" dir="out">
9897 <desc>Array of property descriptions.</desc>
9898 </param>
9899 <param name="types" type="DataType" safearray="yes" dir="out">
9900 <desc>Array of property types.</desc>
9901 </param>
9902 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9903 <desc>Array of property flags.</desc>
9904 </param>
9905 <param name="defaults" type="wstring" safearray="yes" dir="out">
9906 <desc>Array of default property values.</desc>
9907 </param>
9908 </method>
9909
9910 </interface>
9911
9912
9913 <!--
9914 // IKeyboard
9915 /////////////////////////////////////////////////////////////////////////
9916 -->
9917
9918 <interface
9919 name="IKeyboard" extends="$unknown"
9920 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9921 wsmap="managed"
9922 >
9923 <desc>
9924 The IKeyboard interface represents the virtual machine's keyboard. Used
9925 in <link to="IConsole::keyboard"/>.
9926
9927 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9928 to the virtual machine.
9929
9930 </desc>
9931 <method name="putScancode">
9932 <desc>Sends a scancode to the keyboard.
9933
9934 <result name="VBOX_E_IPRT_ERROR">
9935 Could not send scan code to virtual keyboard.
9936 </result>
9937
9938 </desc>
9939 <param name="scancode" type="long" dir="in"/>
9940 </method>
9941
9942 <method name="putScancodes">
9943 <desc>Sends an array of scancodes to the keyboard.
9944
9945 <result name="VBOX_E_IPRT_ERROR">
9946 Could not send all scan codes to virtual keyboard.
9947 </result>
9948
9949 </desc>
9950 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9951 <param name="codesStored" type="unsigned long" dir="return"/>
9952 </method>
9953
9954 <method name="putCAD">
9955 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9956 function is nothing special, it is just a convenience function
9957 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9958
9959 <result name="VBOX_E_IPRT_ERROR">
9960 Could not send all scan codes to virtual keyboard.
9961 </result>
9962
9963 </desc>
9964 </method>
9965
9966 </interface>
9967
9968
9969 <!--
9970 // IMouse
9971 /////////////////////////////////////////////////////////////////////////
9972 -->
9973
9974 <enum
9975 name="MouseButtonState"
9976 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9977 >
9978 <desc>
9979 Mouse button state.
9980 </desc>
9981
9982 <const name="LeftButton" value="0x01"/>
9983 <const name="RightButton" value="0x02"/>
9984 <const name="MiddleButton" value="0x04"/>
9985 <const name="WheelUp" value="0x08"/>
9986 <const name="WheelDown" value="0x10"/>
9987 <const name="XButton1" value="0x20"/>
9988 <const name="XButton2" value="0x40"/>
9989 <const name="MouseStateMask" value="0x7F"/>
9990 </enum>
9991
9992 <interface
9993 name="IMouse" extends="$unknown"
9994 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
9995 wsmap="managed"
9996 >
9997 <desc>
9998 The IMouse interface represents the virtual machine's mouse. Used in
9999 <link to="IConsole::mouse"/>.
10000
10001 Through this interface, the virtual machine's virtual mouse can be
10002 controlled.
10003 </desc>
10004
10005 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10006 <desc>
10007 Whether the guest OS supports absolute mouse pointer positioning
10008 or not.
10009 <note>
10010 VirtualBox Guest Tools need to be installed to the guest OS
10011 in order to enable absolute mouse positioning support.
10012 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10013 callback to be instantly informed about changes of this attribute
10014 during virtual machine execution.
10015 </note>
10016 <see><link to="#putMouseEventAbsolute"/></see>
10017 </desc>
10018 </attribute>
10019
10020 <method name="putMouseEvent">
10021 <desc>
10022 Initiates a mouse event using relative pointer movements
10023 along x and y axis.
10024
10025 <result name="E_ACCESSDENIED">
10026 Console not powered up.
10027 </result>
10028 <result name="VBOX_E_IPRT_ERROR">
10029 Could not send mouse event to virtual mouse.
10030 </result>
10031
10032 </desc>
10033
10034 <param name="dx" type="long" dir="in">
10035 <desc>
10036 Amount of pixels the mouse should move to the right.
10037 Negative values move the mouse to the left.
10038 </desc>
10039 </param>
10040 <param name="dy" type="long" dir="in">
10041 <desc>
10042 Amount of pixels the mouse should move downwards.
10043 Negative values move the mouse upwards.
10044 </desc>
10045 </param>
10046 <param name="dz" type="long" dir="in">
10047 <desc>
10048 Amount of mouse wheel moves.
10049 Positive values describe clockwise wheel rotations,
10050 negative values describe counterclockwise rotations.
10051 </desc>
10052 </param>
10053 <param name="dw" type="long" dir="in">
10054 <desc>
10055 Amount of horizontal mouse wheel moves.
10056 Positive values describe a movement to the left,
10057 negative values describe a movement to the right.
10058 </desc>
10059 </param>
10060 <param name="buttonState" type="long" dir="in">
10061 <desc>
10062 The current state of mouse buttons. Every bit represents
10063 a mouse button as follows:
10064 <table>
10065 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10066 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10067 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10068 </table>
10069 A value of <tt>1</tt> means the corresponding button is pressed.
10070 otherwise it is released.
10071 </desc>
10072 </param>
10073 </method>
10074
10075 <method name="putMouseEventAbsolute">
10076 <desc>
10077 Positions the mouse pointer using absolute x and y coordinates.
10078 These coordinates are expressed in pixels and
10079 start from <tt>[1,1]</tt> which corresponds to the top left
10080 corner of the virtual display.
10081
10082 <result name="E_ACCESSDENIED">
10083 Console not powered up.
10084 </result>
10085 <result name="VBOX_E_IPRT_ERROR">
10086 Could not send mouse event to virtual mouse.
10087 </result>
10088
10089 <note>
10090 This method will have effect only if absolute mouse
10091 positioning is supported by the guest OS.
10092 </note>
10093
10094 <see><link to="#absoluteSupported"/></see>
10095 </desc>
10096
10097 <param name="x" type="long" dir="in">
10098 <desc>
10099 X coordinate of the pointer in pixels, starting from @c 1.
10100 </desc>
10101 </param>
10102 <param name="y" type="long" dir="in">
10103 <desc>
10104 Y coordinate of the pointer in pixels, starting from @c 1.
10105 </desc>
10106 </param>
10107 <param name="dz" type="long" dir="in">
10108 <desc>
10109 Amount of mouse wheel moves.
10110 Positive values describe clockwise wheel rotations,
10111 negative values describe counterclockwise rotations.
10112 </desc>
10113 </param>
10114 <param name="dw" type="long" dir="in">
10115 <desc>
10116 Amount of horizontal mouse wheel moves.
10117 Positive values describe a movement to the left,
10118 negative values describe a movement to the right.
10119 </desc>
10120 </param>
10121 <param name="buttonState" type="long" dir="in">
10122 <desc>
10123 The current state of mouse buttons. Every bit represents
10124 a mouse button as follows:
10125 <table>
10126 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10127 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10128 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10129 </table>
10130 A value of @c 1 means the corresponding button is pressed.
10131 otherwise it is released.
10132 </desc>
10133 </param>
10134 </method>
10135
10136 </interface>
10137
10138 <!--
10139 // IDisplay
10140 /////////////////////////////////////////////////////////////////////////
10141 -->
10142
10143 <enum
10144 name="FramebufferPixelFormat"
10145 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10146 >
10147 <desc>
10148 Format of the video memory buffer. Constants represented by this enum can
10149 be used to test for particular values of <link
10150 to="IFramebuffer::pixelFormat"/>. See also <link
10151 to="IFramebuffer::requestResize"/>.
10152
10153 See also www.fourcc.org for more information about FOURCC pixel formats.
10154 </desc>
10155
10156 <const name="Opaque" value="0">
10157 <desc>
10158 Unknown buffer format (the user may not assume any particular format of
10159 the buffer).
10160 </desc>
10161 </const>
10162 <const name="FOURCC_RGB" value="0x32424752">
10163 <desc>
10164 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10165 bit layout).
10166 </desc>
10167 </const>
10168 </enum>
10169
10170 <interface
10171 name="IFramebuffer" extends="$unknown"
10172 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10173 wsmap="suppress"
10174 >
10175 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10176 <desc>Address of the start byte of the frame buffer.</desc>
10177 </attribute>
10178
10179 <attribute name="width" type="unsigned long" readonly="yes">
10180 <desc>Frame buffer width, in pixels.</desc>
10181 </attribute>
10182
10183 <attribute name="height" type="unsigned long" readonly="yes">
10184 <desc>Frame buffer height, in pixels.</desc>
10185 </attribute>
10186
10187 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10188 <desc>
10189 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10190 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10191 are: 8, 15, 16, 24 and 32.
10192 </desc>
10193 </attribute>
10194
10195 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10196 <desc>
10197 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10198 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10199 size of the scan line must be aligned to 32 bits.
10200 </desc>
10201 </attribute>
10202
10203 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10204 <desc>
10205 Frame buffer pixel format. It's either one of the values defined by <link
10206 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10207 <note>
10208 This attribute must never return <link
10209 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10210 <link to="#address"/> points to must be always known.
10211 </note>
10212 </desc>
10213 </attribute>
10214
10215 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10216 <desc>
10217 Defines whether this frame buffer uses the virtual video card's memory
10218 buffer (guest VRAM) directly or not. See <link
10219 to="IFramebuffer::requestResize"/> for more information.
10220 </desc>
10221 </attribute>
10222
10223 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10224 <desc>
10225 Hint from the frame buffer about how much of the standard
10226 screen height it wants to use for itself. This information is
10227 exposed to the guest through the VESA BIOS and VMMDev interface
10228 so that it can use it for determining its video mode table. It
10229 is not guaranteed that the guest respects the value.
10230 </desc>
10231 </attribute>
10232
10233 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10234 <desc>
10235 An alpha-blended overlay which is superposed over the frame buffer.
10236 The initial purpose is to allow the display of icons providing
10237 information about the VM state, including disk activity, in front
10238 ends which do not have other means of doing that. The overlay is
10239 designed to controlled exclusively by IDisplay. It has no locking
10240 of its own, and any changes made to it are not guaranteed to be
10241 visible until the affected portion of IFramebuffer is updated. The
10242 overlay can be created lazily the first time it is requested. This
10243 attribute can also return @c null to signal that the overlay is not
10244 implemented.
10245 </desc>
10246 </attribute>
10247
10248 <attribute name="winId" type="unsigned long long" readonly="yes">
10249 <desc>
10250 Platform-dependent identifier of the window where context of this
10251 frame buffer is drawn, or zero if there's no such window.
10252 </desc>
10253 </attribute>
10254
10255 <method name="lock">
10256 <desc>
10257 Locks the frame buffer.
10258 Gets called by the IDisplay object where this frame buffer is
10259 bound to.
10260 </desc>
10261 </method>
10262
10263 <method name="unlock">
10264 <desc>
10265 Unlocks the frame buffer.
10266 Gets called by the IDisplay object where this frame buffer is
10267 bound to.
10268 </desc>
10269 </method>
10270
10271 <method name="notifyUpdate">
10272 <desc>
10273 Informs about an update.
10274 Gets called by the display object where this buffer is
10275 registered.
10276 </desc>
10277 <param name="x" type="unsigned long" dir="in"/>
10278 <param name="y" type="unsigned long" dir="in"/>
10279 <param name="width" type="unsigned long" dir="in"/>
10280 <param name="height" type="unsigned long" dir="in"/>
10281 </method>
10282
10283 <method name="requestResize">
10284 <desc>
10285 Requests a size and pixel format change.
10286
10287 There are two modes of working with the video buffer of the virtual
10288 machine. The <i>indirect</i> mode implies that the IFramebuffer
10289 implementation allocates a memory buffer for the requested display mode
10290 and provides it to the virtual machine. In <i>direct</i> mode, the
10291 IFramebuffer implementation uses the memory buffer allocated and owned
10292 by the virtual machine. This buffer represents the video memory of the
10293 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10294 usually faster because the implementation gets a raw pointer to the
10295 guest VRAM buffer which it can directly use for visualizing the contents
10296 of the virtual display, as opposed to the indirect mode where the
10297 contents of guest VRAM are copied to the memory buffer provided by
10298 the implementation every time a display update occurs.
10299
10300 It is important to note that the direct mode is really fast only when
10301 the implementation uses the given guest VRAM buffer directly, for
10302 example, by blitting it to the window representing the virtual machine's
10303 display, which saves at least one copy operation comparing to the
10304 indirect mode. However, using the guest VRAM buffer directly is not
10305 always possible: the format and the color depth of this buffer may be
10306 not supported by the target window, or it may be unknown (opaque) as in
10307 case of text or non-linear multi-plane VGA video modes. In this case,
10308 the indirect mode (that is always available) should be used as a
10309 fallback: when the guest VRAM contents are copied to the
10310 implementation-provided memory buffer, color and format conversion is
10311 done automatically by the underlying code.
10312
10313 The @a pixelFormat parameter defines whether the direct mode is
10314 available or not. If @a pixelFormat is <link
10315 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10316 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10317 @a bytesPerLine parameters must be ignored and the implementation must use
10318 the indirect mode (where it provides its own buffer in one of the
10319 supported formats). In all other cases, @a pixelFormat together with
10320 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10321 buffer pointed to by the @a VRAM parameter and the implementation is
10322 free to choose which mode to use. To indicate that this frame buffer uses
10323 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10324 attribute must return @c true and <link to="#address"/> must
10325 return exactly the same address that is passed in the @a VRAM parameter
10326 of this method; otherwise it is assumed that the indirect strategy is
10327 chosen.
10328
10329 The @a width and @a height parameters represent the size of the
10330 requested display mode in both modes. In case of indirect mode, the
10331 provided memory buffer should be big enough to store data of the given
10332 display mode. In case of direct mode, it is guaranteed that the given
10333 @a VRAM buffer contains enough space to represent the display mode of the
10334 given size. Note that this frame buffer's <link to="#width"/> and <link
10335 to="#height"/> attributes must return exactly the same values as
10336 passed to this method after the resize is completed (see below).
10337
10338 The @a finished output parameter determines if the implementation has
10339 finished resizing the frame buffer or not. If, for some reason, the
10340 resize cannot be finished immediately during this call, @a finished
10341 must be set to @c false, and the implementation must call
10342 <link to="IDisplay::resizeCompleted"/> after it has returned from
10343 this method as soon as possible. If @a finished is @c false, the
10344 machine will not call any frame buffer methods until
10345 <link to="IDisplay::resizeCompleted"/> is called.
10346
10347 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10348 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10349 this frame buffer must return exactly the same values as specified in the
10350 parameters of this method, after the resize is completed. If the
10351 indirect mode is chosen, these attributes must return values describing
10352 the format of the implementation's own memory buffer <link
10353 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10354 value must always correlate with <link to="#pixelFormat"/>. Note that
10355 the <link to="#pixelFormat"/> attribute must never return <link
10356 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10357
10358 <note>
10359 This method is called by the IDisplay object under the
10360 <link to="#lock"/> provided by this IFramebuffer
10361 implementation. If this method returns @c false in @a finished, then
10362 this lock is not released until
10363 <link to="IDisplay::resizeCompleted"/> is called.
10364 </note>
10365 </desc>
10366 <param name="screenId" type="unsigned long" dir="in">
10367 <desc>
10368 Logical screen number. Must be used in the corresponding call to
10369 <link to="IDisplay::resizeCompleted"/> if this call is made.
10370 </desc>
10371 </param>
10372 <param name="pixelFormat" type="unsigned long" dir="in">
10373 <desc>
10374 Pixel format of the memory buffer pointed to by @a VRAM.
10375 See also <link to="FramebufferPixelFormat"/>.
10376 </desc>
10377 </param>
10378 <param name="VRAM" type="octet" mod="ptr" dir="in">
10379 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10380 </param>
10381 <param name="bitsPerPixel" type="unsigned long" dir="in">
10382 <desc>Color depth, bits per pixel.</desc>
10383 </param>
10384 <param name="bytesPerLine" type="unsigned long" dir="in">
10385 <desc>Size of one scan line, in bytes.</desc>
10386 </param>
10387 <param name="width" type="unsigned long" dir="in">
10388 <desc>Width of the guest display, in pixels.</desc>
10389 </param>
10390 <param name="height" type="unsigned long" dir="in">
10391 <desc>Height of the guest display, in pixels.</desc>
10392 </param>
10393 <param name="finished" type="boolean" dir="return">
10394 <desc>
10395 Can the VM start using the new frame buffer immediately
10396 after this method returns or it should wait for
10397 <link to="IDisplay::resizeCompleted"/>.
10398 </desc>
10399 </param>
10400 </method>
10401
10402 <method name="videoModeSupported">
10403 <desc>
10404 Returns whether the frame buffer implementation is willing to
10405 support a given video mode. In case it is not able to render
10406 the video mode (or for some reason not willing), it should
10407 return @c false. Usually this method is called when the guest
10408 asks the VMM device whether a given video mode is supported
10409 so the information returned is directly exposed to the guest.
10410 It is important that this method returns very quickly.
10411 </desc>
10412 <param name="width" type="unsigned long" dir="in"/>
10413 <param name="height" type="unsigned long" dir="in"/>
10414 <param name="bpp" type="unsigned long" dir="in"/>
10415 <param name="supported" type="boolean" dir="return"/>
10416 </method>
10417
10418 <method name="getVisibleRegion">
10419 <desc>
10420 Returns the visible region of this frame buffer.
10421
10422 If the @a rectangles parameter is @c null then the value of the
10423 @a count parameter is ignored and the number of elements necessary to
10424 describe the current visible region is returned in @a countCopied.
10425
10426 If @a rectangles is not @c null but @a count is less
10427 than the required number of elements to store region data, the method
10428 will report a failure. If @a count is equal or greater than the
10429 required number of elements, then the actual number of elements copied
10430 to the provided array will be returned in @a countCopied.
10431
10432 <note>
10433 The address of the provided array must be in the process space of
10434 this IFramebuffer object.
10435 </note>
10436 <note>
10437 Method not yet implemented.
10438 </note>
10439 </desc>
10440 <param name="rectangles" type="octet" mod="ptr" dir="in">
10441 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10442 </param>
10443 <param name="count" type="unsigned long" dir="in">
10444 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10445 </param>
10446 <param name="countCopied" type="unsigned long" dir="return">
10447 <desc>Number of elements copied to the @a rectangles array.</desc>
10448 </param>
10449 </method>
10450
10451 <method name="setVisibleRegion">
10452 <desc>
10453 Suggests a new visible region to this frame buffer. This region
10454 represents the area of the VM display which is a union of regions of
10455 all top-level windows of the guest operating system running inside the
10456 VM (if the Guest Additions for this system support this
10457 functionality). This information may be used by the frontends to
10458 implement the seamless desktop integration feature.
10459
10460 <note>
10461 The address of the provided array must be in the process space of
10462 this IFramebuffer object.
10463 </note>
10464 <note>
10465 The IFramebuffer implementation must make a copy of the provided
10466 array of rectangles.
10467 </note>
10468 <note>
10469 Method not yet implemented.
10470 </note>
10471 </desc>
10472 <param name="rectangles" type="octet" mod="ptr" dir="in">
10473 <desc>Pointer to the @c RTRECT array.</desc>
10474 </param>
10475 <param name="count" type="unsigned long" dir="in">
10476 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10477 </param>
10478 </method>
10479
10480 <method name="processVHWACommand">
10481 <desc>
10482 Posts a Video HW Acceleration Command to the frame buffer for processing.
10483 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10484 are posted from quest to the host to be processed by the host hardware.
10485
10486 <note>
10487 The address of the provided command must be in the process space of
10488 this IFramebuffer object.
10489 </note>
10490 </desc>
10491
10492 <param name="command" type="octet" mod="ptr" dir="in">
10493 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10494 </param>
10495 </method>
10496
10497 </interface>
10498
10499 <interface
10500 name="IFramebufferOverlay" extends="IFramebuffer"
10501 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10502 wsmap="suppress"
10503 >
10504 <desc>
10505 The IFramebufferOverlay interface represents an alpha blended overlay
10506 for displaying status icons above an IFramebuffer. It is always created
10507 not visible, so that it must be explicitly shown. It only covers a
10508 portion of the IFramebuffer, determined by its width, height and
10509 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10510 that order) format, and may be written to directly. Do re-read the
10511 width though, after setting it, as it may be adjusted (increased) to
10512 make it more suitable for the front end.
10513 </desc>
10514 <attribute name="x" type="unsigned long" readonly="yes">
10515 <desc>X position of the overlay, relative to the frame buffer.</desc>
10516 </attribute>
10517
10518 <attribute name="y" type="unsigned long" readonly="yes">
10519 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10520 </attribute>
10521
10522 <attribute name="visible" type="boolean" readonly="no">
10523 <desc>
10524 Whether the overlay is currently visible.
10525 </desc>
10526 </attribute>
10527
10528 <attribute name="alpha" type="unsigned long" readonly="no">
10529 <desc>
10530 The global alpha value for the overlay. This may or may not be
10531 supported by a given front end.
10532 </desc>
10533 </attribute>
10534
10535 <method name="move">
10536 <desc>
10537 Changes the overlay's position relative to the IFramebuffer.
10538 </desc>
10539 <param name="x" type="unsigned long" dir="in"/>
10540 <param name="y" type="unsigned long" dir="in"/>
10541 </method>
10542
10543 </interface>
10544
10545 <interface
10546 name="IDisplay" extends="$unknown"
10547 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10548 wsmap="managed"
10549 >
10550 <desc>
10551 The IDisplay interface represents the virtual machine's display.
10552
10553 The object implementing this interface is contained in each
10554 <link to="IConsole::display"/> attribute and represents the visual
10555 output of the virtual machine.
10556
10557 The virtual display supports pluggable output targets represented by the
10558 IFramebuffer interface. Examples of the output target are a window on
10559 the host computer or an RDP session's display on a remote computer.
10560 </desc>
10561 <attribute name="width" type="unsigned long" readonly="yes">
10562 <desc>Current display width.</desc>
10563 </attribute>
10564
10565 <attribute name="height" type="unsigned long" readonly="yes">
10566 <desc>Current display height.</desc>
10567 </attribute>
10568
10569 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10570 <desc>
10571 Current guest display color depth. Note that this may differ
10572 from <link to="IFramebuffer::bitsPerPixel"/>.
10573 </desc>
10574 </attribute>
10575
10576 <method name="setFramebuffer">
10577 <desc>
10578 Sets the framebuffer for given screen.
10579 </desc>
10580 <param name="screenId" type="unsigned long" dir="in"/>
10581 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10582 </method>
10583
10584 <method name="getFramebuffer">
10585 <desc>
10586 Queries the framebuffer for given screen.
10587 </desc>
10588 <param name="screenId" type="unsigned long" dir="in"/>
10589 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10590 <param name="xOrigin" type="long" dir="out"/>
10591 <param name="yOrigin" type="long" dir="out"/>
10592 </method>
10593
10594 <method name="setVideoModeHint">
10595 <desc>
10596 Asks VirtualBox to request the given video mode from
10597 the guest. This is just a hint and it cannot be guaranteed
10598 that the requested resolution will be used. Guest Additions
10599 are required for the request to be seen by guests. The caller
10600 should issue the request and wait for a resolution change and
10601 after a timeout retry.
10602
10603 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10604 parameters means that the corresponding values should be taken from the
10605 current video mode (i.e. left unchanged).
10606
10607 If the guest OS supports multi-monitor configuration then the @a display
10608 parameter specifies the number of the guest display to send the hint to:
10609 @c 0 is the primary display, @c 1 is the first secondary and
10610 so on. If the multi-monitor configuration is not supported, @a display
10611 must be @c 0.
10612
10613 <result name="E_INVALIDARG">
10614 The @a display is not associated with any monitor.
10615 </result>
10616
10617 </desc>
10618 <param name="width" type="unsigned long" dir="in"/>
10619 <param name="height" type="unsigned long" dir="in"/>
10620 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10621 <param name="display" type="unsigned long" dir="in"/>
10622 </method>
10623
10624 <method name="setSeamlessMode">
10625 <desc>
10626 Enables or disables seamless guest display rendering (seamless desktop
10627 integration) mode.
10628 <note>
10629 Calling this method has no effect if <link
10630 to="IGuest::supportsSeamless"/> returns @c false.
10631 </note>
10632 </desc>
10633 <param name="enabled" type="boolean" dir="in"/>
10634 </method>
10635
10636 <method name="takeScreenShot">
10637 <desc>
10638 Takes a screen shot of the requested size and copies it to the
10639 32-bpp buffer allocated by the caller and pointed to by @a address.
10640
10641 <note>This API can be used only by the COM/XPCOM C++ API as it
10642 requires pointer support. Use <link to="#takeScreenShotSlow" />
10643 with other language bindings.
10644 </note>
10645
10646 <result name="E_NOTIMPL">
10647 Feature not implemented.
10648 </result>
10649 <result name="VBOX_E_IPRT_ERROR">
10650 Could not take a screenshot.
10651 </result>
10652
10653 </desc>
10654 <param name="address" type="octet" mod="ptr" dir="in"/>
10655 <param name="width" type="unsigned long" dir="in"/>
10656 <param name="height" type="unsigned long" dir="in"/>
10657 </method>
10658
10659 <method name="takeScreenShotSlow">
10660 <desc>
10661 Takes a guest screen shot of the requested size and returns it as
10662 an array of bytes in uncompressed 32-bit ARGB format.
10663 This API is slow, but could be the only option to get guest screenshot
10664 for scriptable languages not allowed to manipulate with addresses
10665 directly.
10666
10667 <result name="E_NOTIMPL">
10668 Feature not implemented.
10669 </result>
10670 <result name="VBOX_E_IPRT_ERROR">
10671 Could not take a screenshot.
10672 </result>
10673 </desc>
10674 <param name="width" type="unsigned long" dir="in">
10675 <desc>
10676 Desired image width.
10677 </desc>
10678 </param>
10679 <param name="height" type="unsigned long" dir="in">
10680 <desc>
10681 Desired image height.
10682 </desc>
10683 </param>
10684 <param name="screenData" type="octet" dir="return" safearray="yes">
10685 <desc>
10686 Array with resulting screen data.
10687 </desc>
10688 </param>
10689 </method>
10690
10691 <method name="drawToScreen">
10692 <desc>
10693 Draws a 32-bpp image of the specified size from the given buffer
10694 to the given point on the VM display.
10695
10696 <result name="E_NOTIMPL">
10697 Feature not implemented.
10698 </result>
10699 <result name="VBOX_E_IPRT_ERROR">
10700 Could not draw to screen.
10701 </result>
10702
10703 </desc>
10704 <param name="address" type="octet" mod="ptr" dir="in"/>
10705 <param name="x" type="unsigned long" dir="in"/>
10706 <param name="y" type="unsigned long" dir="in"/>
10707 <param name="width" type="unsigned long" dir="in"/>
10708 <param name="height" type="unsigned long" dir="in"/>
10709 </method>
10710
10711 <method name="invalidateAndUpdate">
10712 <desc>
10713 Does a full invalidation of the VM display and instructs the VM
10714 to update it.
10715
10716 <result name="VBOX_E_IPRT_ERROR">
10717 Could not invalidate and update screen.
10718 </result>
10719
10720 </desc>
10721 </method>
10722
10723 <method name="resizeCompleted">
10724 <desc>
10725 Signals that a framebuffer has completed the resize operation.
10726
10727 <result name="VBOX_E_NOT_SUPPORTED">
10728 Operation only valid for external frame buffers.
10729 </result>
10730
10731 </desc>
10732 <param name="screenId" type="unsigned long" dir="in"/>
10733 </method>
10734
10735 <method name="updateCompleted">
10736 <desc>
10737 Signals that a framebuffer has completed the update operation.
10738
10739 <result name="VBOX_E_NOT_SUPPORTED">
10740 Operation only valid for external frame buffers.
10741 </result>
10742
10743 </desc>
10744 </method>
10745
10746 <method name="completeVHWACommand">
10747 <desc>
10748 Signals that the Video HW Acceleration command has completed.
10749 </desc>
10750
10751 <param name="command" type="octet" mod="ptr" dir="in">
10752 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10753 </param>
10754 </method>
10755
10756 </interface>
10757
10758 <!--
10759 // INetworkAdapter
10760 /////////////////////////////////////////////////////////////////////////
10761 -->
10762
10763 <enum
10764 name="NetworkAttachmentType"
10765 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10766 >
10767 <desc>
10768 Network attachment type.
10769 </desc>
10770
10771 <const name="Null" value="0">
10772 <desc>Null value, also means "not attached".</desc>
10773 </const>
10774 <const name="NAT" value="1"/>
10775 <const name="Bridged" value="2"/>
10776 <const name="Internal" value="3"/>
10777 <const name="HostOnly" value="4"/>
10778 </enum>
10779
10780 <enum
10781 name="NetworkAdapterType"
10782 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10783 >
10784 <desc>
10785 Network adapter type.
10786 </desc>
10787
10788 <const name="Null" value="0">
10789 <desc>Null value (never used by the API).</desc>
10790 </const>
10791 <const name="Am79C970A" value="1">
10792 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10793 </const>
10794 <const name="Am79C973" value="2">
10795 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10796 </const>
10797 <const name="I82540EM" value="3">
10798 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10799 </const>
10800 <const name="I82543GC" value="4">
10801 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10802 </const>
10803 <const name="I82545EM" value="5">
10804 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10805 </const>
10806 <const name="Virtio" value="6">
10807 <desc>Virtio network device.</desc>
10808 </const>
10809 </enum>
10810
10811 <interface
10812 name="INetworkAdapter" extends="$unknown"
10813 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10814 wsmap="managed"
10815 >
10816 <desc>
10817 Represents a virtual network adapter that is attached to a virtual machine.
10818 Each virtual machine has a fixed number of network adapter slots with one
10819 instance of this attached to each of them. Call
10820 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10821 is attached to a given slot in a given machine.
10822
10823 Each network adapter can be in one of five attachment modes, which are
10824 represented by the <link to="NetworkAttachmentType" /> enumeration;
10825 see the <link to="#attachmentType" /> attribute.
10826 </desc>
10827
10828 <attribute name="adapterType" type="NetworkAdapterType">
10829 <desc>
10830 Type of the virtual network adapter. Depending on this value,
10831 VirtualBox will provide a different virtual network hardware
10832 to the guest.
10833 </desc>
10834 </attribute>
10835
10836 <attribute name="slot" type="unsigned long" readonly="yes">
10837 <desc>
10838 Slot number this adapter is plugged into. Corresponds to
10839 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10840 to obtain this instance.
10841 </desc>
10842 </attribute>
10843
10844 <attribute name="enabled" type="boolean">
10845 <desc>
10846 Flag whether the network adapter is present in the
10847 guest system. If disabled, the virtual guest hardware will
10848 not contain this network adapter. Can only be changed when
10849 the VM is not running.
10850 </desc>
10851 </attribute>
10852
10853 <attribute name="MACAddress" type="wstring">
10854 <desc>
10855 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10856 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10857 </desc>
10858 </attribute>
10859
10860 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10861
10862 <attribute name="hostInterface" type="wstring">
10863 <desc>
10864 Name of the host network interface the VM is attached to.
10865 </desc>
10866 </attribute>
10867
10868 <attribute name="internalNetwork" type="wstring">
10869 <desc>
10870 Name of the internal network the VM is attached to.
10871 </desc>
10872 </attribute>
10873
10874 <attribute name="NATNetwork" type="wstring">
10875 <desc>
10876 Name of the NAT network the VM is attached to.
10877 </desc>
10878 </attribute>
10879
10880 <attribute name="cableConnected" type="boolean">
10881 <desc>
10882 Flag whether the adapter reports the cable as connected or not.
10883 It can be used to report offline situations to a VM.
10884 </desc>
10885 </attribute>
10886
10887 <attribute name="lineSpeed" type="unsigned long">
10888 <desc>
10889 Line speed reported by custom drivers, in units of 1 kbps.
10890 </desc>
10891 </attribute>
10892
10893 <attribute name="traceEnabled" type="boolean">
10894 <desc>
10895 Flag whether network traffic from/to the network card should be traced.
10896 Can only be toggled when the VM is turned off.
10897 </desc>
10898 </attribute>
10899
10900 <attribute name="traceFile" type="wstring">
10901 <desc>
10902 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10903 will be used.
10904 </desc>
10905 </attribute>
10906
10907 <method name="attachToNAT">
10908 <desc>
10909 Attach the network adapter to the Network Address Translation (NAT) interface.
10910 </desc>
10911 </method>
10912
10913 <method name="attachToBridgedInterface">
10914 <desc>
10915 Attach the network adapter to a bridged host interface.
10916 </desc>
10917 </method>
10918
10919 <method name="attachToInternalNetwork">
10920 <desc>
10921 Attach the network adapter to an internal network.
10922 </desc>
10923 </method>
10924
10925 <method name="attachToHostOnlyInterface">
10926 <desc>
10927 Attach the network adapter to the host-only network.
10928 </desc>
10929 </method>
10930
10931 <method name="detach">
10932 <desc>
10933 Detach the network adapter
10934 </desc>
10935 </method>
10936 </interface>
10937
10938
10939 <!--
10940 // ISerialPort
10941 /////////////////////////////////////////////////////////////////////////
10942 -->
10943
10944 <enum
10945 name="PortMode"
10946 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10947 >
10948 <desc>
10949 The PortMode enumeration represents possible communication modes for
10950 the virtual serial port device.
10951 </desc>
10952
10953 <const name="Disconnected" value="0">
10954 <desc>Virtual device is not attached to any real host device.</desc>
10955 </const>
10956 <const name="HostPipe" value="1">
10957 <desc>Virtual device is attached to a host pipe.</desc>
10958 </const>
10959 <const name="HostDevice" value="2">
10960 <desc>Virtual device is attached to a host device.</desc>
10961 </const>
10962 <const name="RawFile" value="3">
10963 <desc>Virtual device is attached to a raw file.</desc>
10964 </const>
10965 </enum>
10966
10967 <interface
10968 name="ISerialPort" extends="$unknown"
10969 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10970 wsmap="managed"
10971 >
10972
10973 <desc>
10974 The ISerialPort interface represents the virtual serial port device.
10975
10976 The virtual serial port device acts like an ordinary serial port
10977 inside the virtual machine. This device communicates to the real
10978 serial port hardware in one of two modes: host pipe or host device.
10979
10980 In host pipe mode, the #path attribute specifies the path to the pipe on
10981 the host computer that represents a serial port. The #server attribute
10982 determines if this pipe is created by the virtual machine process at
10983 machine startup or it must already exist before starting machine
10984 execution.
10985
10986 In host device mode, the #path attribute specifies the name of the
10987 serial port device on the host computer.
10988
10989 There is also a third communication mode: the disconnected mode. In this
10990 mode, the guest OS running inside the virtual machine will be able to
10991 detect the serial port, but all port write operations will be discarded
10992 and all port read operations will return no data.
10993
10994 <see>IMachine::getSerialPort</see>
10995 </desc>
10996
10997 <attribute name="slot" type="unsigned long" readonly="yes">
10998 <desc>
10999 Slot number this serial port is plugged into. Corresponds to
11000 the value you pass to <link to="IMachine::getSerialPort"/>
11001 to obtain this instance.
11002 </desc>
11003 </attribute>
11004
11005 <attribute name="enabled" type="boolean">
11006 <desc>
11007 Flag whether the serial port is enabled. If disabled,
11008 the serial port will not be reported to the guest OS.
11009 </desc>
11010 </attribute>
11011
11012 <attribute name="IOBase" type="unsigned long">
11013 <desc>Base I/O address of the serial port.</desc>
11014 </attribute>
11015
11016 <attribute name="IRQ" type="unsigned long">
11017 <desc>IRQ number of the serial port.</desc>
11018 </attribute>
11019
11020 <attribute name="hostMode" type="PortMode">
11021 <desc>
11022 How is this port connected to the host.
11023 <note>
11024 Changing this attribute may fail if the conditions for
11025 <link to="#path"/> are not met.
11026 </note>
11027 </desc>
11028 </attribute>
11029
11030 <attribute name="server" type="boolean">
11031 <desc>
11032 Flag whether this serial port acts as a server (creates a new pipe on
11033 the host) or as a client (uses the existing pipe). This attribute is
11034 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11035 </desc>
11036 </attribute>
11037
11038 <attribute name="path" type="wstring">
11039 <desc>
11040 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11041 PortMode_HostPipe, or the host serial device name when
11042 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11043 cases, setting a @c null or empty string as the attribute's value
11044 is an error. Otherwise, the value of this property is ignored.
11045 </desc>
11046 </attribute>
11047
11048 </interface>
11049
11050 <!--
11051 // IParallelPort
11052 /////////////////////////////////////////////////////////////////////////
11053 -->
11054
11055 <interface
11056 name="IParallelPort" extends="$unknown"
11057 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11058 wsmap="managed"
11059 >
11060
11061 <desc>
11062 The IParallelPort interface represents the virtual parallel port device.
11063
11064 The virtual parallel port device acts like an ordinary parallel port
11065 inside the virtual machine. This device communicates to the real
11066 parallel port hardware using the name of the parallel device on the host
11067 computer specified in the #path attribute.
11068
11069 Each virtual parallel port device is assigned a base I/O address and an
11070 IRQ number that will be reported to the guest operating system and used
11071 to operate the given parallel port from within the virtual machine.
11072
11073 <see>IMachine::getParallelPort</see>
11074 </desc>
11075
11076 <attribute name="slot" type="unsigned long" readonly="yes">
11077 <desc>
11078 Slot number this parallel port is plugged into. Corresponds to
11079 the value you pass to <link to="IMachine::getParallelPort"/>
11080 to obtain this instance.
11081 </desc>
11082 </attribute>
11083
11084 <attribute name="enabled" type="boolean">
11085 <desc>
11086 Flag whether the parallel port is enabled. If disabled,
11087 the parallel port will not be reported to the guest OS.
11088 </desc>
11089 </attribute>
11090
11091 <attribute name="IOBase" type="unsigned long">
11092 <desc>Base I/O address of the parallel port.</desc>
11093 </attribute>
11094
11095 <attribute name="IRQ" type="unsigned long">
11096 <desc>IRQ number of the parallel port.</desc>
11097 </attribute>
11098
11099 <attribute name="path" type="wstring">
11100 <desc>
11101 Host parallel device name. If this parallel port is enabled, setting a
11102 @c null or an empty string as this attribute's value will result into
11103 an error.
11104 </desc>
11105 </attribute>
11106
11107 </interface>
11108
11109
11110 <!--
11111 // IMachineDebugger
11112 /////////////////////////////////////////////////////////////////////////
11113 -->
11114
11115 <interface
11116 name="IMachineDebugger" extends="$unknown"
11117 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11118 wsmap="suppress"
11119 >
11120 <method name="resetStats">
11121 <desc>
11122 Reset VM statistics.
11123 </desc>
11124 <param name="pattern" type="wstring" dir="in">
11125 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11126 </param>
11127 </method>
11128
11129 <method name="dumpStats">
11130 <desc>
11131 Dumps VM statistics.
11132 </desc>
11133 <param name="pattern" type="wstring" dir="in">
11134 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11135 </param>
11136 </method>
11137
11138 <method name="getStats">
11139 <desc>
11140 Get the VM statistics in a XMLish format.
11141 </desc>
11142 <param name="pattern" type="wstring" dir="in">
11143 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11144 </param>
11145 <param name="withDescriptions" type="boolean" dir="in">
11146 <desc>Whether to include the descriptions.</desc>
11147 </param>
11148 <param name="stats" type="wstring" dir="out">
11149 <desc>The XML document containing the statistics.</desc>
11150 </param>
11151 </method>
11152
11153 <method name="injectNMI">
11154 <desc>
11155 Inject an NMI into a running VT-x/AMD-V VM.
11156 </desc>
11157 </method>
11158
11159 <attribute name="singlestep" type="boolean">
11160 <desc>Switch for enabling singlestepping.</desc>
11161 </attribute>
11162
11163 <attribute name="recompileUser" type="boolean">
11164 <desc>Switch for forcing code recompilation for user mode code.</desc>
11165 </attribute>
11166
11167 <attribute name="recompileSupervisor" type="boolean">
11168 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11169 </attribute>
11170
11171 <attribute name="PATMEnabled" type="boolean">
11172 <desc>Switch for enabling and disabling the PATM component.</desc>
11173 </attribute>
11174
11175 <attribute name="CSAMEnabled" type="boolean">
11176 <desc>Switch for enabling and disabling the CSAM component.</desc>
11177 </attribute>
11178
11179 <attribute name="logEnabled" type="boolean">
11180 <desc>Switch for enabling and disabling logging.</desc>
11181 </attribute>
11182
11183 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11184 <desc>
11185 Flag indicating whether the VM is currently making use of CPU hardware
11186 virtualization extensions.
11187 </desc>
11188 </attribute>
11189
11190 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11191 <desc>
11192 Flag indicating whether the VM is currently making use of the nested paging
11193 CPU hardware virtualization extension.
11194 </desc>
11195 </attribute>
11196
11197 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11198 <desc>
11199 Flag indicating whether the VM is currently making use of the VPID
11200 VT-x extension.
11201 </desc>
11202 </attribute>
11203
11204 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11205 <desc>
11206 Flag indicating whether the VM is currently making use of the Physical
11207 Address Extension CPU feature.
11208 </desc>
11209 </attribute>
11210
11211 <attribute name="virtualTimeRate" type="unsigned long">
11212 <desc>
11213 The rate at which the virtual time runs expressed as a percentage.
11214 The accepted range is 2% to 20000%.
11215 </desc>
11216 </attribute>
11217
11218 <!-- @todo method for setting log flags, groups and destination! -->
11219
11220 <attribute name="VM" type="unsigned long long" readonly="yes">
11221 <desc>
11222 Gets the VM handle. This is only for internal use while
11223 we carve the details of this interface.
11224 </desc>
11225 </attribute>
11226
11227 </interface>
11228
11229 <!--
11230 // IUSBController
11231 /////////////////////////////////////////////////////////////////////////
11232 -->
11233
11234 <interface
11235 name="IUSBController" extends="$unknown"
11236 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11237 wsmap="managed"
11238 >
11239 <attribute name="enabled" type="boolean">
11240 <desc>
11241 Flag whether the USB controller is present in the
11242 guest system. If disabled, the virtual guest hardware will
11243 not contain any USB controller. Can only be changed when
11244 the VM is powered off.
11245 </desc>
11246 </attribute>
11247
11248 <attribute name="enabledEhci" type="boolean">
11249 <desc>
11250 Flag whether the USB EHCI controller is present in the
11251 guest system. If disabled, the virtual guest hardware will
11252 not contain a USB EHCI controller. Can only be changed when
11253 the VM is powered off.
11254 </desc>
11255 </attribute>
11256
11257 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11258 <desc>
11259 USB standard version which the controller implements.
11260 This is a BCD which means that the major version is in the
11261 high byte and minor version is in the low byte.
11262 </desc>
11263 </attribute>
11264
11265 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11266 <desc>
11267 List of USB device filters associated with the machine.
11268
11269 If the machine is currently running, these filters are activated
11270 every time a new (supported) USB device is attached to the host
11271 computer that was not ignored by global filters
11272 (<link to="IHost::USBDeviceFilters"/>).
11273
11274 These filters are also activated when the machine is powered up.
11275 They are run against a list of all currently available USB
11276 devices (in states
11277 <link to="USBDeviceState_Available"/>,
11278 <link to="USBDeviceState_Busy"/>,
11279 <link to="USBDeviceState_Held"/>) that were not previously
11280 ignored by global filters.
11281
11282 If at least one filter matches the USB device in question, this
11283 device is automatically captured (attached to) the virtual USB
11284 controller of this machine.
11285
11286 <see>IUSBDeviceFilter, ::IUSBController</see>
11287 </desc>
11288 </attribute>
11289
11290 <method name="createDeviceFilter">
11291 <desc>
11292 Creates a new USB device filter. All attributes except
11293 the filter name are set to empty (any match),
11294 <i>active</i> is @c false (the filter is not active).
11295
11296 The created filter can then be added to the list of filters using
11297 <link to="#insertDeviceFilter"/>.
11298
11299 <result name="VBOX_E_INVALID_VM_STATE">
11300 The virtual machine is not mutable.
11301 </result>
11302
11303 <see>#deviceFilters</see>
11304 </desc>
11305 <param name="name" type="wstring" dir="in">
11306 <desc>
11307 Filter name. See <link to="IUSBDeviceFilter::name"/>
11308 for more info.
11309 </desc>
11310 </param>
11311 <param name="filter" type="IUSBDeviceFilter" dir="return">
11312 <desc>Created filter object.</desc>
11313 </param>
11314 </method>
11315
11316 <method name="insertDeviceFilter">
11317 <desc>
11318 Inserts the given USB device to the specified position
11319 in the list of filters.
11320
11321 Positions are numbered starting from <tt>0</tt>. If the specified
11322 position is equal to or greater than the number of elements in
11323 the list, the filter is added to the end of the collection.
11324
11325 <note>
11326 Duplicates are not allowed, so an attempt to insert a
11327 filter that is already in the collection, will return an
11328 error.
11329 </note>
11330
11331 <result name="VBOX_E_INVALID_VM_STATE">
11332 Virtual machine is not mutable.
11333 </result>
11334 <result name="E_INVALIDARG">
11335 USB device filter not created within this VirtualBox instance.
11336 </result>
11337 <result name="VBOX_E_INVALID_OBJECT_STATE">
11338 USB device filter already in list.
11339 </result>
11340
11341 <see>#deviceFilters</see>
11342 </desc>
11343 <param name="position" type="unsigned long" dir="in">
11344 <desc>Position to insert the filter to.</desc>
11345 </param>
11346 <param name="filter" type="IUSBDeviceFilter" dir="in">
11347 <desc>USB device filter to insert.</desc>
11348 </param>
11349 </method>
11350
11351 <method name="removeDeviceFilter">
11352 <desc>
11353 Removes a USB device filter from the specified position in the
11354 list of filters.
11355
11356 Positions are numbered starting from <tt>0</tt>. Specifying a
11357 position equal to or greater than the number of elements in
11358 the list will produce an error.
11359
11360 <see>#deviceFilters</see>
11361
11362 <result name="VBOX_E_INVALID_VM_STATE">
11363 Virtual machine is not mutable.
11364 </result>
11365 <result name="E_INVALIDARG">
11366 USB device filter list empty or invalid @a position.
11367 </result>
11368
11369 </desc>
11370 <param name="position" type="unsigned long" dir="in">
11371 <desc>Position to remove the filter from.</desc>
11372 </param>
11373 <param name="filter" type="IUSBDeviceFilter" dir="return">
11374 <desc>Removed USB device filter.</desc>
11375 </param>
11376 </method>
11377
11378 </interface>
11379
11380
11381 <!--
11382 // IUSBDevice
11383 /////////////////////////////////////////////////////////////////////////
11384 -->
11385
11386 <interface
11387 name="IUSBDevice" extends="$unknown"
11388 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11389 wsmap="managed"
11390 >
11391 <desc>
11392 The IUSBDevice interface represents a virtual USB device attached to the
11393 virtual machine.
11394
11395 A collection of objects implementing this interface is stored in the
11396 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11397 attached to a running virtual machine's USB controller.
11398 </desc>
11399
11400 <attribute name="id" type="uuid" mod="string" readonly="yes">
11401 <desc>
11402 Unique USB device ID. This ID is built from #vendorId,
11403 #productId, #revision and #serialNumber.
11404 </desc>
11405 </attribute>
11406
11407 <attribute name="vendorId" type="unsigned short" readonly="yes">
11408 <desc>Vendor ID.</desc>
11409 </attribute>
11410
11411 <attribute name="productId" type="unsigned short" readonly="yes">
11412 <desc>Product ID.</desc>
11413 </attribute>
11414
11415 <attribute name="revision" type="unsigned short" readonly="yes">
11416 <desc>
11417 Product revision number. This is a packed BCD represented as
11418 unsigned short. The high byte is the integer part and the low
11419 byte is the decimal.
11420 </desc>
11421 </attribute>
11422
11423 <attribute name="manufacturer" type="wstring" readonly="yes">
11424 <desc>Manufacturer string.</desc>
11425 </attribute>
11426
11427 <attribute name="product" type="wstring" readonly="yes">
11428 <desc>Product string.</desc>
11429 </attribute>
11430
11431 <attribute name="serialNumber" type="wstring" readonly="yes">
11432 <desc>Serial number string.</desc>
11433 </attribute>
11434
11435 <attribute name="address" type="wstring" readonly="yes">
11436 <desc>Host specific address of the device.</desc>
11437 </attribute>
11438
11439 <attribute name="port" type="unsigned short" readonly="yes">
11440 <desc>
11441 Host USB port number the device is physically
11442 connected to.
11443 </desc>
11444 </attribute>
11445
11446 <attribute name="version" type="unsigned short" readonly="yes">
11447 <desc>
11448 The major USB version of the device - 1 or 2.
11449 </desc>
11450 </attribute>
11451
11452 <attribute name="portVersion" type="unsigned short" readonly="yes">
11453 <desc>
11454 The major USB version of the host USB port the device is
11455 physically connected to - 1 or 2. For devices not connected to
11456 anything this will have the same value as the version attribute.
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="remote" type="boolean" readonly="yes">
11461 <desc>
11462 Whether the device is physically connected to a remote VRDP
11463 client or to a local host machine.
11464 </desc>
11465 </attribute>
11466
11467 </interface>
11468
11469
11470 <!--
11471 // IUSBDeviceFilter
11472 /////////////////////////////////////////////////////////////////////////
11473 -->
11474
11475 <interface
11476 name="IUSBDeviceFilter" extends="$unknown"
11477 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11478 wsmap="managed"
11479 >
11480 <desc>
11481 The IUSBDeviceFilter interface represents an USB device filter used
11482 to perform actions on a group of USB devices.
11483
11484 This type of filters is used by running virtual machines to
11485 automatically capture selected USB devices once they are physically
11486 attached to the host computer.
11487
11488 A USB device is matched to the given device filter if and only if all
11489 attributes of the device match the corresponding attributes of the
11490 filter (that is, attributes are joined together using the logical AND
11491 operation). On the other hand, all together, filters in the list of
11492 filters carry the semantics of the logical OR operation. So if it is
11493 desirable to create a match like "this vendor id OR this product id",
11494 one needs to create two filters and specify "any match" (see below)
11495 for unused attributes.
11496
11497 All filter attributes used for matching are strings. Each string
11498 is an expression representing a set of values of the corresponding
11499 device attribute, that will match the given filter. Currently, the
11500 following filtering expressions are supported:
11501
11502 <ul>
11503 <li><i>Interval filters</i>. Used to specify valid intervals for
11504 integer device attributes (Vendor ID, Product ID and Revision).
11505 The format of the string is:
11506
11507 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11508
11509 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11510 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11511 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11512 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11513 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11514 possible integer is assumed.
11515 </li>
11516 <li><i>Boolean filters</i>. Used to specify acceptable values for
11517 boolean device attributes. The format of the string is:
11518
11519 <tt>true|false|yes|no|0|1</tt>
11520
11521 </li>
11522 <li><i>Exact match</i>. Used to specify a single value for the given
11523 device attribute. Any string that doesn't start with <tt>int:</tt>
11524 represents the exact match. String device attributes are compared to
11525 this string including case of symbols. Integer attributes are first
11526 converted to a string (see individual filter attributes) and then
11527 compared ignoring case.
11528
11529 </li>
11530 <li><i>Any match</i>. Any value of the corresponding device attribute
11531 will match the given filter. An empty or @c null string is
11532 used to construct this type of filtering expressions.
11533
11534 </li>
11535 </ul>
11536
11537 <note>
11538 On the Windows host platform, interval filters are not currently
11539 available. Also all string filter attributes
11540 (<link to="#manufacturer"/>, <link to="#product"/>,
11541 <link to="#serialNumber"/>) are ignored, so they behave as
11542 <i>any match</i> no matter what string expression is specified.
11543 </note>
11544
11545 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11546 </desc>
11547
11548 <attribute name="name" type="wstring">
11549 <desc>
11550 Visible name for this filter.
11551 This name is used to visually distinguish one filter from another,
11552 so it can neither be @c null nor an empty string.
11553 </desc>
11554 </attribute>
11555
11556 <attribute name="active" type="boolean">
11557 <desc>Whether this filter active or has been temporarily disabled.</desc>
11558 </attribute>
11559
11560 <attribute name="vendorId" type="wstring">
11561 <desc>
11562 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11563 The string representation for the <i>exact matching</i>
11564 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11565 (including leading zeroes).
11566 </desc>
11567 </attribute>
11568
11569 <attribute name="productId" type="wstring">
11570 <desc>
11571 <link to="IUSBDevice::productId">Product ID</link> filter.
11572 The string representation for the <i>exact matching</i>
11573 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11574 (including leading zeroes).
11575 </desc>
11576 </attribute>
11577
11578 <attribute name="revision" type="wstring">
11579 <desc>
11580 <link to="IUSBDevice::productId">Product revision number</link>
11581 filter. The string representation for the <i>exact matching</i>
11582 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11583 of the integer part of the revision, and <tt>F</tt> is the
11584 decimal digit of its fractional part (including leading and
11585 trailing zeros).
11586 Note that for interval filters, it's best to use the hexadecimal
11587 form, because the revision is stored as a 16 bit packed BCD value;
11588 so the expression <tt>int:0x0100-0x0199</tt> will match any
11589 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11590 </desc>
11591 </attribute>
11592
11593 <attribute name="manufacturer" type="wstring">
11594 <desc>
11595 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11596 </desc>
11597 </attribute>
11598
11599 <attribute name="product" type="wstring">
11600 <desc>
11601 <link to="IUSBDevice::product">Product</link> filter.
11602 </desc>
11603 </attribute>
11604
11605 <attribute name="serialNumber" type="wstring">
11606 <desc>
11607 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11608 </desc>
11609 </attribute>
11610
11611 <attribute name="port" type="wstring">
11612 <desc>
11613 <link to="IUSBDevice::port">Host USB port</link> filter.
11614 </desc>
11615 </attribute>
11616
11617 <attribute name="remote" type="wstring">
11618 <desc>
11619 <link to="IUSBDevice::remote">Remote state</link> filter.
11620 <note>
11621 This filter makes sense only for machine USB filters,
11622 i.e. it is ignored by IHostUSBDeviceFilter objects.
11623 </note>
11624 </desc>
11625 </attribute>
11626
11627 <attribute name="maskedInterfaces" type="unsigned long">
11628 <desc>
11629 This is an advanced option for hiding one or more USB interfaces
11630 from the guest. The value is a bit mask where the bits that are set
11631 means the corresponding USB interface should be hidden, masked off
11632 if you like.
11633 This feature only works on Linux hosts.
11634 </desc>
11635 </attribute>
11636
11637 </interface>
11638
11639
11640 <!--
11641 // IHostUSBDevice
11642 /////////////////////////////////////////////////////////////////////////
11643 -->
11644
11645 <enum
11646 name="USBDeviceState"
11647 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11648 >
11649 <desc>
11650 USB device state. This enumeration represents all possible states
11651 of the USB device physically attached to the host computer regarding
11652 its state on the host computer and availability to guest computers
11653 (all currently running virtual machines).
11654
11655 Once a supported USB device is attached to the host, global USB
11656 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11657 either ignore the device, or put it to USBDeviceState_Held state, or do
11658 nothing. Unless the device is ignored by global filters, filters of all
11659 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11660 activated that can put it to USBDeviceState_Captured state.
11661
11662 If the device was ignored by global filters, or didn't match
11663 any filters at all (including guest ones), it is handled by the host
11664 in a normal way. In this case, the device state is determined by
11665 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11666 or USBDeviceState_Available, depending on the current device usage.
11667
11668 Besides auto-capturing based on filters, the device can be manually
11669 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11670 state is USBDeviceState_Busy, USBDeviceState_Available or
11671 USBDeviceState_Held.
11672
11673 <note>
11674 Due to differences in USB stack implementations in Linux and Win32,
11675 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11676 only to the Linux version of the product. This also means that (<link
11677 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11678 device state is USBDeviceState_Held.
11679 </note>
11680
11681 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11682 </desc>
11683
11684 <const name="NotSupported" value="0">
11685 <desc>
11686 Not supported by the VirtualBox server, not available to guests.
11687 </desc>
11688 </const>
11689 <const name="Unavailable" value="1">
11690 <desc>
11691 Being used by the host computer exclusively,
11692 not available to guests.
11693 </desc>
11694 </const>
11695 <const name="Busy" value="2">
11696 <desc>
11697 Being used by the host computer, potentially available to guests.
11698 </desc>
11699 </const>
11700 <const name="Available" value="3">
11701 <desc>
11702 Not used by the host computer, available to guests (the host computer
11703 can also start using the device at any time).
11704 </desc>
11705 </const>
11706 <const name="Held" value="4">
11707 <desc>
11708 Held by the VirtualBox server (ignored by the host computer),
11709 available to guests.
11710 </desc>
11711 </const>
11712 <const name="Captured" value="5">
11713 <desc>
11714 Captured by one of the guest computers, not available
11715 to anybody else.
11716 </desc>
11717 </const>
11718 </enum>
11719
11720 <interface
11721 name="IHostUSBDevice" extends="IUSBDevice"
11722 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11723 wsmap="managed"
11724 >
11725 <desc>
11726 The IHostUSBDevice interface represents a physical USB device attached
11727 to the host computer.
11728
11729 Besides properties inherited from IUSBDevice, this interface adds the
11730 <link to="#state"/> property that holds the current state of the USB
11731 device.
11732
11733 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11734 </desc>
11735
11736 <attribute name="state" type="USBDeviceState" readonly="yes">
11737 <desc>
11738 Current state of the device.
11739 </desc>
11740 </attribute>
11741
11742 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11743
11744 </interface>
11745
11746
11747 <!--
11748 // IHostUSBDeviceFilter
11749 /////////////////////////////////////////////////////////////////////////
11750 -->
11751
11752 <enum
11753 name="USBDeviceFilterAction"
11754 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11755 >
11756 <desc>
11757 Actions for host USB device filters.
11758 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11759 </desc>
11760
11761 <const name="Null" value="0">
11762 <desc>Null value (never used by the API).</desc>
11763 </const>
11764 <const name="Ignore" value="1">
11765 <desc>Ignore the matched USB device.</desc>
11766 </const>
11767 <const name="Hold" value="2">
11768 <desc>Hold the matched USB device.</desc>
11769 </const>
11770 </enum>
11771
11772 <interface
11773 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11774 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11775 wsmap="managed"
11776 >
11777 <desc>
11778 The IHostUSBDeviceFilter interface represents a global filter for a
11779 physical USB device used by the host computer. Used indirectly in
11780 <link to="IHost::USBDeviceFilters"/>.
11781
11782 Using filters of this type, the host computer determines the initial
11783 state of the USB device after it is physically attached to the
11784 host's USB controller.
11785
11786 <note>
11787 The <link to="#remote"/> attribute is ignored by this type of
11788 filters, because it makes sense only for
11789 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11790 </note>
11791
11792 <see>IHost::USBDeviceFilters</see>
11793 </desc>
11794
11795 <attribute name="action" type="USBDeviceFilterAction">
11796 <desc>
11797 Action performed by the host when an attached USB device
11798 matches this filter.
11799 </desc>
11800 </attribute>
11801
11802 </interface>
11803
11804 <!--
11805 // IAudioAdapter
11806 /////////////////////////////////////////////////////////////////////////
11807 -->
11808
11809 <enum
11810 name="AudioDriverType"
11811 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11812 >
11813 <desc>
11814 Host audio driver type.
11815 </desc>
11816
11817 <const name="Null" value="0">
11818 <desc>Null value, also means "dummy audio driver".</desc>
11819 </const>
11820 <const name="WinMM" value="1">
11821 <desc>Windows multimedia (Windows hosts only).</desc>
11822 </const>
11823 <const name="OSS" value="2">
11824 <desc>Open Sound System (Linux hosts only).</desc>
11825 </const>
11826 <const name="ALSA" value="3">
11827 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11828 </const>
11829 <const name="DirectSound" value="4">
11830 <desc>DirectSound (Windows hosts only).</desc>
11831 </const>
11832 <const name="CoreAudio" value="5">
11833 <desc>CoreAudio (Mac hosts only).</desc>
11834 </const>
11835 <const name="MMPM" value="6">
11836 <desc>Reserved for historical reasons.</desc>
11837 </const>
11838 <const name="Pulse" value="7">
11839 <desc>PulseAudio (Linux hosts only).</desc>
11840 </const>
11841 <const name="SolAudio" value="8">
11842 <desc>Solaris audio (Solaris hosts only).</desc>
11843 </const>
11844 </enum>
11845
11846 <enum
11847 name="AudioControllerType"
11848 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11849 >
11850 <desc>
11851 Virtual audio controller type.
11852 </desc>
11853
11854 <const name="AC97" value="0"/>
11855 <const name="SB16" value="1"/>
11856 </enum>
11857
11858 <interface
11859 name="IAudioAdapter" extends="$unknown"
11860 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11861 wsmap="managed"
11862 >
11863 <desc>
11864 The IAudioAdapter interface represents the virtual audio adapter of
11865 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11866 </desc>
11867 <attribute name="enabled" type="boolean">
11868 <desc>
11869 Flag whether the audio adapter is present in the
11870 guest system. If disabled, the virtual guest hardware will
11871 not contain any audio adapter. Can only be changed when
11872 the VM is not running.
11873 </desc>
11874 </attribute>
11875 <attribute name="audioController" type="AudioControllerType">
11876 <desc>
11877 The audio hardware we emulate.
11878 </desc>
11879 </attribute>
11880 <attribute name="audioDriver" type="AudioDriverType">
11881 <desc>
11882 Audio driver the adapter is connected to. This setting
11883 can only be changed when the VM is not running.
11884 </desc>
11885 </attribute>
11886 </interface>
11887
11888 <!--
11889 // IVRDPServer
11890 /////////////////////////////////////////////////////////////////////////
11891 -->
11892
11893 <enum
11894 name="VRDPAuthType"
11895 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11896 >
11897 <desc>
11898 VRDP authentication type.
11899 </desc>
11900
11901 <const name="Null" value="0">
11902 <desc>Null value, also means "no authentication".</desc>
11903 </const>
11904 <const name="External" value="1"/>
11905 <const name="Guest" value="2"/>
11906 </enum>
11907
11908 <interface
11909 name="IVRDPServer" extends="$unknown"
11910 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11911 wsmap="managed"
11912 >
11913 <attribute name="enabled" type="boolean">
11914 <desc>VRDP server status.</desc>
11915 </attribute>
11916
11917 <attribute name="ports" type="wstring">
11918 <desc>
11919 VRDP server port numbers.
11920 <note>
11921 This is a string of comma separated TCP port numbers or port number ranges.
11922 The server will try to bind to one of ports from the list. Example
11923 <tt>3000,3010-3012,3015</tt>
11924 </note>
11925 </desc>
11926 </attribute>
11927
11928 <attribute name="netAddress" type="wstring">
11929 <desc>VRDP server address.</desc>
11930 </attribute>
11931
11932 <attribute name="authType" type="VRDPAuthType">
11933 <desc>VRDP authentication method.</desc>
11934 </attribute>
11935
11936 <attribute name="authTimeout" type="unsigned long">
11937 <desc>Timeout for guest authentication. Milliseconds.</desc>
11938 </attribute>
11939
11940 <attribute name="allowMultiConnection" type="boolean">
11941 <desc>
11942 Flag whether multiple simultaneous connections to the VM are permitted.
11943 Note that this will be replaced by a more powerful mechanism in the future.
11944 </desc>
11945 </attribute>
11946
11947 <attribute name="reuseSingleConnection" type="boolean">
11948 <desc>
11949 Flag whether the existing connection must be dropped and a new connection
11950 must be established by the VRDP server, when a new client connects in single
11951 connection mode.
11952 </desc>
11953 </attribute>
11954
11955 </interface>
11956
11957
11958 <!--
11959 // ISharedFolder
11960 /////////////////////////////////////////////////////////////////////////
11961 -->
11962
11963 <interface
11964 name="ISharedFolder" extends="$unknown"
11965 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11966 wsmap="struct"
11967 >
11968 <desc>
11969 The ISharedFolder interface represents a folder in the host computer's
11970 file system accessible from the guest OS running inside a virtual
11971 machine using an associated logical name.
11972
11973 There are three types of shared folders:
11974 <ul>
11975 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11976 folders available to all virtual machines.</li>
11977 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11978 VM-specific shared folders available to the given virtual machine at
11979 startup.</li>
11980 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11981 VM-specific shared folders created in the session context (for
11982 example, when the virtual machine is running) and automatically
11983 discarded when the session is closed (the VM is powered off).</li>
11984 </ul>
11985
11986 Logical names of shared folders must be unique within the given scope
11987 (global, permanent or transient). However, they do not need to be unique
11988 across scopes. In this case, the definition of the shared folder in a
11989 more specific scope takes precedence over definitions in all other
11990 scopes. The order of precedence is (more specific to more general):
11991 <ol>
11992 <li>Transient definitions</li>
11993 <li>Permanent definitions</li>
11994 <li>Global definitions</li>
11995 </ol>
11996
11997 For example, if MyMachine has a shared folder named
11998 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11999 transient shared folder named <tt>C_DRIVE</tt> (that points
12000 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12001 of <tt>C_DRIVE</tt> in the guest OS so
12002 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12003 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12004 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12005 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12006 to <tt>C:\\</tt> if it still exists.
12007
12008 Note that permanent and transient shared folders of different machines
12009 are in different name spaces, so they don't overlap and don't need to
12010 have unique logical names.
12011
12012 <note>
12013 Global shared folders are not implemented in the current version of the
12014 product.
12015 </note>
12016 </desc>
12017
12018 <attribute name="name" type="wstring" readonly="yes">
12019 <desc>Logical name of the shared folder.</desc>
12020 </attribute>
12021
12022 <attribute name="hostPath" type="wstring" readonly="yes">
12023 <desc>Full path to the shared folder in the host file system.</desc>
12024 </attribute>
12025
12026 <attribute name="accessible" type="boolean" readonly="yes">
12027 <desc>
12028 Whether the folder defined by the host path is currently
12029 accessible or not.
12030 For example, the folder can be unaccessible if it is placed
12031 on the network share that is not available by the time
12032 this property is read.
12033 </desc>
12034 </attribute>
12035
12036 <attribute name="writable" type="boolean" readonly="yes">
12037 <desc>
12038 Whether the folder defined by the host path is writable or
12039 not.
12040 </desc>
12041 </attribute>
12042
12043 <attribute name="lastAccessError" type="wstring" readonly="yes">
12044 <desc>
12045 Text message that represents the result of the last accessibility
12046 check.
12047
12048 Accessibility checks are performed each time the <link to="#accessible"/>
12049 attribute is read. An empty string is returned if the last
12050 accessibility check was successful. A non-empty string indicates a
12051 failure and should normally describe a reason of the failure (for
12052 example, a file read error).
12053 </desc>
12054 </attribute>
12055
12056 </interface>
12057
12058 <!--
12059 // ISession
12060 /////////////////////////////////////////////////////////////////////////
12061 -->
12062
12063 <interface
12064 name="IInternalSessionControl" extends="$unknown"
12065 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12066 internal="yes"
12067 wsmap="suppress"
12068 >
12069 <method name="getPID">
12070 <desc>PID of the process that has created this Session object.
12071 </desc>
12072 <param name="pid" type="unsigned long" dir="return"/>
12073 </method>
12074
12075 <method name="getRemoteConsole">
12076 <desc>
12077 Returns the console object suitable for remote control.
12078
12079 <result name="VBOX_E_INVALID_VM_STATE">
12080 Session state prevents operation.
12081 </result>
12082 <result name="VBOX_E_INVALID_OBJECT_STATE">
12083 Session type prevents operation.
12084 </result>
12085
12086 </desc>
12087 <param name="console" type="IConsole" dir="return"/>
12088 </method>
12089
12090 <method name="assignMachine">
12091 <desc>
12092 Assigns the machine object associated with this direct-type
12093 session or informs the session that it will be a remote one
12094 (if @a machine == @c null).
12095
12096 <result name="VBOX_E_INVALID_VM_STATE">
12097 Session state prevents operation.
12098 </result>
12099 <result name="VBOX_E_INVALID_OBJECT_STATE">
12100 Session type prevents operation.
12101 </result>
12102
12103 </desc>
12104 <param name="machine" type="IMachine" dir="in"/>
12105 </method>
12106
12107 <method name="assignRemoteMachine">
12108 <desc>
12109 Assigns the machine and the (remote) console object associated with
12110 this remote-type session.
12111
12112 <result name="VBOX_E_INVALID_VM_STATE">
12113 Session state prevents operation.
12114 </result>
12115
12116 </desc>
12117 <param name="machine" type="IMachine" dir="in"/>
12118 <param name="console" type="IConsole" dir="in"/>
12119 </method>
12120
12121 <method name="updateMachineState">
12122 <desc>
12123 Updates the machine state in the VM process.
12124 Must be called only in certain cases
12125 (see the method implementation).
12126
12127 <result name="VBOX_E_INVALID_VM_STATE">
12128 Session state prevents operation.
12129 </result>
12130 <result name="VBOX_E_INVALID_OBJECT_STATE">
12131 Session type prevents operation.
12132 </result>
12133
12134 </desc>
12135 <param name="aMachineState" type="MachineState" dir="in"/>
12136 </method>
12137
12138 <method name="uninitialize">
12139 <desc>
12140 Uninitializes (closes) this session. Used by VirtualBox to close
12141 the corresponding remote session when the direct session dies
12142 or gets closed.
12143
12144 <result name="VBOX_E_INVALID_VM_STATE">
12145 Session state prevents operation.
12146 </result>
12147
12148 </desc>
12149 </method>
12150
12151 <method name="onNetworkAdapterChange">
12152 <desc>
12153 Triggered when settings of a network adapter of the
12154 associated virtual machine have changed.
12155
12156 <result name="VBOX_E_INVALID_VM_STATE">
12157 Session state prevents operation.
12158 </result>
12159 <result name="VBOX_E_INVALID_OBJECT_STATE">
12160 Session type prevents operation.
12161 </result>
12162
12163 </desc>
12164 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12165 <param name="changeAdapter" type="boolean" dir="in"/>
12166 </method>
12167
12168 <method name="onSerialPortChange">
12169 <desc>
12170 Triggered when settings of a serial port of the
12171 associated virtual machine have changed.
12172
12173 <result name="VBOX_E_INVALID_VM_STATE">
12174 Session state prevents operation.
12175 </result>
12176 <result name="VBOX_E_INVALID_OBJECT_STATE">
12177 Session type prevents operation.
12178 </result>
12179
12180 </desc>
12181 <param name="serialPort" type="ISerialPort" dir="in"/>
12182 </method>
12183
12184 <method name="onParallelPortChange">
12185 <desc>
12186 Triggered when settings of a parallel port of the
12187 associated virtual machine have changed.
12188
12189 <result name="VBOX_E_INVALID_VM_STATE">
12190 Session state prevents operation.
12191 </result>
12192 <result name="VBOX_E_INVALID_OBJECT_STATE">
12193 Session type prevents operation.
12194 </result>
12195
12196 </desc>
12197 <param name="parallelPort" type="IParallelPort" dir="in"/>
12198 </method>
12199
12200 <method name="onStorageControllerChange">
12201 <desc>
12202 Triggered when settings of a storage controller of the
12203 associated virtual machine have changed.
12204
12205 <result name="VBOX_E_INVALID_VM_STATE">
12206 Session state prevents operation.
12207 </result>
12208 <result name="VBOX_E_INVALID_OBJECT_STATE">
12209 Session type prevents operation.
12210 </result>
12211
12212 </desc>
12213 </method>
12214
12215 <method name="onMediumChange">
12216 <desc>
12217 Triggered when attached media of the
12218 associated virtual machine have changed.
12219
12220 <result name="VBOX_E_INVALID_VM_STATE">
12221 Session state prevents operation.
12222 </result>
12223 <result name="VBOX_E_INVALID_OBJECT_STATE">
12224 Session type prevents operation.
12225 </result>
12226
12227 </desc>
12228
12229 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12230 </method>
12231
12232 <method name="onVRDPServerChange">
12233 <desc>
12234 Triggered when settings of the VRDP server object of the
12235 associated virtual machine have changed.
12236
12237 <result name="VBOX_E_INVALID_VM_STATE">
12238 Session state prevents operation.
12239 </result>
12240 <result name="VBOX_E_INVALID_OBJECT_STATE">
12241 Session type prevents operation.
12242 </result>
12243
12244 </desc>
12245 </method>
12246
12247 <method name="onUSBControllerChange">
12248 <desc>
12249 Triggered when settings of the USB controller object of the
12250 associated virtual machine have changed.
12251
12252 <result name="VBOX_E_INVALID_VM_STATE">
12253 Session state prevents operation.
12254 </result>
12255 <result name="VBOX_E_INVALID_OBJECT_STATE">
12256 Session type prevents operation.
12257 </result>
12258
12259 </desc>
12260 </method>
12261
12262 <method name="onSharedFolderChange">
12263 <desc>
12264 Triggered when a permanent (global or machine) shared folder has been
12265 created or removed.
12266 <note>
12267 We don't pass shared folder parameters in this notification because
12268 the order in which parallel notifications are delivered is not defined,
12269 therefore it could happen that these parameters were outdated by the
12270 time of processing this notification.
12271 </note>
12272
12273 <result name="VBOX_E_INVALID_VM_STATE">
12274 Session state prevents operation.
12275 </result>
12276 <result name="VBOX_E_INVALID_OBJECT_STATE">
12277 Session type prevents operation.
12278 </result>
12279
12280 </desc>
12281 <param name="global" type="boolean" dir="in"/>
12282 </method>
12283
12284 <method name="onUSBDeviceAttach">
12285 <desc>
12286 Triggered when a request to capture a USB device (as a result
12287 of matched USB filters or direct call to
12288 <link to="IConsole::attachUSBDevice"/>) has completed.
12289 A @c null @a error object means success, otherwise it
12290 describes a failure.
12291
12292 <result name="VBOX_E_INVALID_VM_STATE">
12293 Session state prevents operation.
12294 </result>
12295 <result name="VBOX_E_INVALID_OBJECT_STATE">
12296 Session type prevents operation.
12297 </result>
12298
12299 </desc>
12300 <param name="device" type="IUSBDevice" dir="in"/>
12301 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12302 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12303 </method>
12304
12305 <method name="onUSBDeviceDetach">
12306 <desc>
12307 Triggered when a request to release the USB device (as a result
12308 of machine termination or direct call to
12309 <link to="IConsole::detachUSBDevice"/>) has completed.
12310 A @c null @a error object means success, otherwise it
12311 describes a failure.
12312
12313 <result name="VBOX_E_INVALID_VM_STATE">
12314 Session state prevents operation.
12315 </result>
12316 <result name="VBOX_E_INVALID_OBJECT_STATE">
12317 Session type prevents operation.
12318 </result>
12319
12320 </desc>
12321 <param name="id" type="uuid" mod="string" dir="in"/>
12322 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12323 </method>
12324
12325 <method name="onShowWindow">
12326 <desc>
12327 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12328 <link to="IMachine::showConsoleWindow"/> in order to notify
12329 console callbacks
12330 <link to="IConsoleCallback::onCanShowWindow"/>
12331 and <link to="IConsoleCallback::onShowWindow"/>.
12332
12333 <result name="VBOX_E_INVALID_OBJECT_STATE">
12334 Session type prevents operation.
12335 </result>
12336
12337 </desc>
12338 <param name="check" type="boolean" dir="in"/>
12339 <param name="canShow" type="boolean" dir="out"/>
12340 <param name="winId" type="unsigned long long" dir="out"/>
12341 </method>
12342
12343 <method name="accessGuestProperty">
12344 <desc>
12345 Called by <link to="IMachine::getGuestProperty"/> and by
12346 <link to="IMachine::setGuestProperty"/> in order to read and
12347 modify guest properties.
12348
12349 <result name="VBOX_E_INVALID_VM_STATE">
12350 Machine session is not open.
12351 </result>
12352 <result name="VBOX_E_INVALID_OBJECT_STATE">
12353 Session type is not direct.
12354 </result>
12355
12356 </desc>
12357 <param name="name" type="wstring" dir="in"/>
12358 <param name="value" type="wstring" dir="in"/>
12359 <param name="flags" type="wstring" dir="in"/>
12360 <param name="isSetter" type="boolean" dir="in"/>
12361 <param name="retValue" type="wstring" dir="out"/>
12362 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12363 <param name="retFlags" type="wstring" dir="out"/>
12364 </method>
12365
12366 <method name="enumerateGuestProperties">
12367 <desc>
12368 Return a list of the guest properties matching a set of patterns along
12369 with their values, time stamps and flags.
12370
12371 <result name="VBOX_E_INVALID_VM_STATE">
12372 Machine session is not open.
12373 </result>
12374 <result name="VBOX_E_INVALID_OBJECT_STATE">
12375 Session type is not direct.
12376 </result>
12377
12378 </desc>
12379 <param name="patterns" type="wstring" dir="in">
12380 <desc>
12381 The patterns to match the properties against as a comma-separated
12382 string. If this is empty, all properties currently set will be
12383 returned.
12384 </desc>
12385 </param>
12386 <param name="key" type="wstring" dir="out" safearray="yes">
12387 <desc>
12388 The key names of the properties returned.
12389 </desc>
12390 </param>
12391 <param name="value" type="wstring" dir="out" safearray="yes">
12392 <desc>
12393 The values of the properties returned. The array entries match the
12394 corresponding entries in the @a key array.
12395 </desc>
12396 </param>
12397 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12398 <desc>
12399 The time stamps of the properties returned. The array entries match
12400 the corresponding entries in the @a key array.
12401 </desc>
12402 </param>
12403 <param name="flags" type="wstring" dir="out" safearray="yes">
12404 <desc>
12405 The flags of the properties returned. The array entries match the
12406 corresponding entries in the @a key array.
12407 </desc>
12408 </param>
12409 </method>
12410
12411 </interface>
12412
12413 <interface
12414 name="ISession" extends="$dispatched"
12415 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12416 wsmap="managed"
12417 >
12418 <desc>
12419 The ISession interface represents a serialization primitive for virtual
12420 machines.
12421
12422 With VirtualBox, every time one wishes to manipulate a virtual machine
12423 (e.g. change its settings or start execution), a session object is
12424 required. Such an object must be passed to one of the session methods
12425 that open the given session, which then initiates the machine manipulation.
12426
12427 A session serves several purposes: it identifies to the inter-process VirtualBox
12428 code which process is currently working with the virtual machine, and it ensures
12429 that there are no incompatible requests from several processes for the
12430 same virtual machine. Session objects can therefore be thought of as mutex
12431 semaphores that lock virtual machines to prevent conflicting accesses from
12432 several processes.
12433
12434 How sessions objects are used depends on whether you use the Main API
12435 via COM or via the webservice:
12436
12437 <ul>
12438 <li>When using the COM API directly, an object of the Session class from the
12439 VirtualBox type library needs to be created. In regular COM C++ client code,
12440 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12441 This object will then act as a local session object in further calls to open
12442 a session.
12443 </li>
12444
12445 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12446 one session object automatically when <link to="IWebsessionManager::logon" />
12447 is called. A managed object reference to that session object can be retrieved by
12448 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12449 reference can then be used to open sessions.
12450 </li>
12451 </ul>
12452
12453 Sessions are mainly used in two variations:
12454
12455 <ul>
12456 <li>
12457 To start a virtual machine in a separate process, one would call
12458 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12459 object as its first parameter. This session then identifies the caller
12460 and lets him control the started machine (for example, pause machine
12461 execution or power it down) as well as be notified about machine
12462 execution state changes.
12463 </li>
12464
12465 <li>To alter machine settings, or to start machine execution within the
12466 current process, one needs to open a direct session for the machine first by
12467 calling <link to="IVirtualBox::openSession"/>. While a direct session
12468 is open within one process, no any other process may open another direct
12469 session for the same machine. This prevents the machine from being changed
12470 by other processes while it is running or while the machine is being configured.
12471 </li>
12472 </ul>
12473
12474 One also can attach to an existing direct session already opened by
12475 another process (for example, in order to send a control request to the
12476 virtual machine such as the pause or the reset request). This is done by
12477 calling <link to="IVirtualBox::openExistingSession"/>.
12478
12479 <note>
12480 Unless you are trying to write a new VirtualBox front-end that
12481 performs direct machine execution (like the VirtualBox or VBoxSDL
12482 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12483 session opened by <link to="IVirtualBox::openSession"/> and use this
12484 session only to change virtual machine settings. If you simply want to
12485 start virtual machine execution using one of the existing front-ends
12486 (for example the VirtualBox GUI or headless server), simply use
12487 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12488 will power up the machine automatically for you.
12489 </note>
12490 </desc>
12491
12492 <attribute name="state" type="SessionState" readonly="yes">
12493 <desc>Current state of this session.</desc>
12494 </attribute>
12495
12496 <attribute name="type" type="SessionType" readonly="yes">
12497 <desc>
12498 Type of this session. The value of this attribute is valid only
12499 if the session is currently open (i.e. its #state is
12500 SessionType_SessionOpen), otherwise an error will be returned.
12501 </desc>
12502 </attribute>
12503
12504 <attribute name="machine" type="IMachine" readonly="yes">
12505 <desc>Machine object associated with this session.</desc>
12506 </attribute>
12507
12508 <attribute name="console" type="IConsole" readonly="yes">
12509 <desc>Console object associated with this session.</desc>
12510 </attribute>
12511
12512 <method name="close">
12513 <desc>
12514 Closes a session that was previously opened.
12515
12516 It is recommended that every time an "open session" method (such as
12517 <link to="IVirtualBox::openRemoteSession" /> or
12518 <link to="IVirtualBox::openSession" />) has been called to
12519 manipulate a virtual machine, the caller invoke
12520 ISession::close() when it's done doing so. Since sessions are
12521 serialization primitives much like ordinary mutexes, they are
12522 best used the same way: for each "open" call, there should be
12523 a matching "close" call, even when errors occur.
12524
12525 Otherwise, if a direct session for a machine opened with
12526 <link to="IVirtualBox::openSession"/> is not explicitly closed
12527 when the application terminates, the state of the machine will
12528 be set to <link to="MachineState_Aborted" /> on the server.
12529
12530 Generally, it is recommended to close all open sessions explicitly
12531 before terminating the application (regardless of the reason for
12532 the termination).
12533
12534 <note>
12535 Do not expect the session state (<link to="ISession::state" />
12536 to return to "Closed" immediately after you invoke
12537 ISession::close(), particularly if you have started a remote
12538 session to execute the VM in a new process. The session state will
12539 automatically return to "Closed" once the VM is no longer executing,
12540 which can of course take a very long time.
12541 </note>
12542
12543 <result name="E_UNEXPECTED">
12544 Session is not open.
12545 </result>
12546
12547 </desc>
12548 </method>
12549
12550 </interface>
12551
12552 <!--
12553 // IStorageController
12554 /////////////////////////////////////////////////////////////////////////
12555 -->
12556
12557 <enum
12558 name="StorageBus"
12559 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12560 >
12561 <desc>
12562 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12563 see <link to="IStorageController::bus" />.
12564 </desc>
12565 <const name="Null" value="0">
12566 <desc>@c null value. Never used by the API.</desc>
12567 </const>
12568 <const name="IDE" value="1"/>
12569 <const name="SATA" value="2"/>
12570 <const name="SCSI" value="3"/>
12571 <const name="Floppy" value="4"/>
12572 </enum>
12573
12574 <enum
12575 name="StorageControllerType"
12576 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12577 >
12578 <desc>
12579 The exact variant of storage controller hardware presented
12580 to the guest; see <link to="IStorageController::controllerType" />.
12581 </desc>
12582
12583 <const name="Null" value="0">
12584 <desc>@c null value. Never used by the API.</desc>
12585 </const>
12586 <const name="LsiLogic" value="1">
12587 <desc>A SCSI controller of the LsiLogic variant.</desc>
12588 </const>
12589 <const name="BusLogic" value="2">
12590 <desc>A SCSI controller of the BusLogic variant.</desc>
12591 </const>
12592 <const name="IntelAhci" value="3">
12593 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12594 </const>
12595 <const name="PIIX3" value="4">
12596 <desc>An IDE controller of the PIIX3 variant.</desc>
12597 </const>
12598 <const name="PIIX4" value="5">
12599 <desc>An IDE controller of the PIIX4 variant.</desc>
12600 </const>
12601 <const name="ICH6" value="6">
12602 <desc>An IDE controller of the ICH6 variant.</desc>
12603 </const>
12604 <const name="I82078" value="7">
12605 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12606 </const>
12607 </enum>
12608
12609 <interface
12610 name="IStorageController" extends="$unknown"
12611 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12612 wsmap="managed"
12613 >
12614 <desc>
12615 Represents a storage controller that is attached to a virtual machine
12616 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12617 attached to storage controllers in a real computer, virtual media
12618 (represented by <link to="IMedium" />) are attached to virtual
12619 storage controllers, represented by this interface.
12620
12621 As opposed to physical hardware, VirtualBox has a very generic concept
12622 of a storage controller, and for purposes of the Main API, all virtual
12623 storage is attached to virtual machines via instances of this interface.
12624 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12625 and Floppy (see <link to="#bus" />). Depending on which of these four is
12626 used, certain sub-types may be available and can be selected in
12627 <link to="#controllerType" />.
12628
12629 Depending on these settings, the guest operating system might see
12630 significantly different virtual hardware.
12631 </desc>
12632
12633 <attribute name="name" type="wstring" readonly="yes">
12634 <desc>
12635 Name of the storage controller, as originally specified with
12636 <link to="IMachine::addStorageController" />. This then uniquely
12637 identifies this controller with other method calls such as
12638 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12639 </desc>
12640 </attribute>
12641
12642 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12643 <desc>
12644 Maximum number of devices which can be attached to one port.
12645 </desc>
12646 </attribute>
12647
12648 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12649 <desc>
12650 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12651 </desc>
12652 </attribute>
12653
12654 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12655 <desc>
12656 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12657 </desc>
12658 </attribute>
12659
12660 <attribute name="instance" type="unsigned long">
12661 <desc>
12662 The instance number of the device in the running VM.
12663 </desc>
12664 </attribute>
12665
12666 <attribute name="portCount" type="unsigned long">
12667 <desc>
12668 The number of currently usable ports on the controller.
12669 The minimum and maximum number of ports for one controller are
12670 stored in <link to="IStorageController::minPortCount"/>
12671 and <link to="IStorageController::maxPortCount"/>.
12672 </desc>
12673 </attribute>
12674
12675 <attribute name="bus" type="StorageBus" readonly="yes">
12676 <desc>
12677 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12678 </desc>
12679 </attribute>
12680
12681 <attribute name="controllerType" type="StorageControllerType">
12682 <desc>
12683 The exact variant of storage controller hardware presented
12684 to the guest.
12685 Depending on this value, VirtualBox will provide a different
12686 virtual storage controller hardware to the guest.
12687 For SATA and floppy controllers, only one variant is available,
12688 but for IDE and SCSI, there are several.
12689
12690 For SCSI controllers, the default type is LsiLogic.
12691 </desc>
12692 </attribute>
12693
12694 <method name="GetIDEEmulationPort">
12695 <desc>
12696 Gets the corresponding port number which is emulated as an IDE device.
12697 Works only with SATA controllers.
12698
12699 <result name="E_INVALIDARG">
12700 The @a devicePosition is not in the range 0 to 3.
12701 </result>
12702 <result name="E_NOTIMPL">
12703 The storage controller type is not SATAIntelAhci.
12704 </result>
12705
12706 </desc>
12707 <param name="devicePosition" type="long" dir="in"/>
12708 <param name="portNumber" type="long" dir="return"/>
12709 </method>
12710
12711 <method name="SetIDEEmulationPort">
12712 <desc>
12713 Sets the port number which is emulated as an IDE device.
12714 Works only with SATA controllers.
12715
12716 <result name="E_INVALIDARG">
12717 The @a devicePosition is not in the range 0 to 3 or the
12718 @a portNumber is not in the range 0 to 29.
12719 </result>
12720 <result name="E_NOTIMPL">
12721 The storage controller type is not SATAIntelAhci.
12722 </result>
12723
12724 </desc>
12725 <param name="devicePosition" type="long" dir="in"/>
12726 <param name="portNumber" type="long" dir="in"/>
12727 </method>
12728
12729 </interface>
12730
12731<if target="wsdl">
12732
12733 <!--
12734 // IManagedObjectRef
12735 /////////////////////////////////////////////////////////////////////////
12736 -->
12737
12738 <interface
12739 name="IManagedObjectRef" extends="$unknown"
12740 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12741 internal="yes"
12742 wsmap="managed"
12743 wscpp="hardcoded"
12744 >
12745 <desc>
12746 Managed object reference.
12747
12748 Only within the webservice, a managed object reference (which is really
12749 an opaque number) allows a webservice client to address an object
12750 that lives in the address space of the webservice server.
12751
12752 Behind each managed object reference, there is a COM object that lives
12753 in the webservice server's address space. The COM object is not freed
12754 until the managed object reference is released, either by an explicit
12755 call to <link to="IManagedObjectRef::release" /> or by logging off from
12756 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12757 all objects created during the webservice session.
12758
12759 Whenever a method call of the VirtualBox API returns a COM object, the
12760 webservice representation of that method will instead return a
12761 managed object reference, which can then be used to invoke methods
12762 on that object.
12763 </desc>
12764
12765 <method name="getInterfaceName">
12766 <desc>
12767 Returns the name of the interface that this managed object represents,
12768 for example, "IMachine", as a string.
12769 </desc>
12770 <param name="return" type="wstring" dir="return"/>
12771 </method>
12772
12773 <method name="release">
12774 <desc>
12775 Releases this managed object reference and frees the resources that
12776 were allocated for it in the webservice server process. After calling
12777 this method, the identifier of the reference can no longer be used.
12778 </desc>
12779 </method>
12780
12781 </interface>
12782
12783 <!--
12784 // IWebsessionManager
12785 /////////////////////////////////////////////////////////////////////////
12786 -->
12787
12788 <interface
12789 name="IWebsessionManager" extends="$unknown"
12790 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12791 internal="yes"
12792 wsmap="global"
12793 wscpp="hardcoded"
12794 >
12795 <desc>
12796 Websession manager. This provides essential services
12797 to webservice clients.
12798 </desc>
12799 <method name="logon">
12800 <desc>
12801 Logs a new client onto the webservice and returns a managed object reference to
12802 the IVirtualBox instance, which the client can then use as a basis to further
12803 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12804 interface, in one way or the other.
12805 </desc>
12806 <param name="username" type="wstring" dir="in"/>
12807 <param name="password" type="wstring" dir="in"/>
12808 <param name="return" type="IVirtualBox" dir="return"/>
12809 </method>
12810
12811 <method name="getSessionObject">
12812 <desc>
12813 Returns a managed object reference to the internal ISession object that was created
12814 for this web service session when the client logged on.
12815
12816 <see>ISession</see>
12817 </desc>
12818 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12819 <param name="return" type="ISession" dir="return"/>
12820 </method>
12821
12822 <method name="logoff">
12823 <desc>
12824 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12825 and destroys all resources associated with the session (most importantly, all
12826 managed objects created in the server while the session was active).
12827 </desc>
12828 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12829 </method>
12830
12831 </interface>
12832
12833</if>
12834
12835 <!--
12836 // IPerformanceCollector & friends
12837 /////////////////////////////////////////////////////////////////////////
12838 -->
12839
12840 <interface
12841 name="IPerformanceMetric" extends="$unknown"
12842 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12843 >
12844 <desc>
12845 The IPerformanceMetric interface represents parameters of the given
12846 performance metric.
12847 </desc>
12848
12849 <attribute name="metricName" type="wstring" readonly="yes">
12850 <desc>
12851 Name of the metric.
12852 </desc>
12853 </attribute>
12854
12855 <attribute name="object" type="$unknown" readonly="yes">
12856 <desc>
12857 Object this metric belongs to.
12858 </desc>
12859 </attribute>
12860
12861 <attribute name="description" type="wstring" readonly="yes">
12862 <desc>
12863 Textual description of the metric.
12864 </desc>
12865 </attribute>
12866
12867 <attribute name="period" type="unsigned long" readonly="yes">
12868 <desc>
12869 Time interval between samples, measured in seconds.
12870 </desc>
12871 </attribute>
12872
12873 <attribute name="count" type="unsigned long" readonly="yes">
12874 <desc>
12875 Number of recent samples retained by the performance collector for this
12876 metric.
12877
12878 When the collected sample count exceeds this number, older samples
12879 are discarded.
12880 </desc>
12881 </attribute>
12882
12883 <attribute name="unit" type="wstring" readonly="yes">
12884 <desc>
12885 Unit of measurement.
12886 </desc>
12887 </attribute>
12888
12889 <attribute name="minimumValue" type="long" readonly="yes">
12890 <desc>
12891 Minimum possible value of this metric.
12892 </desc>
12893 </attribute>
12894
12895 <attribute name="maximumValue" type="long" readonly="yes">
12896 <desc>
12897 Maximum possible value of this metric.
12898 </desc>
12899 </attribute>
12900 </interface>
12901
12902 <interface
12903 name="IPerformanceCollector" extends="$unknown"
12904 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12905 wsmap="managed"
12906 >
12907 <desc>
12908 The IPerformanceCollector interface represents a service that collects and
12909 stores performance metrics data.
12910
12911 Performance metrics are associated with objects of interfaces like IHost and
12912 IMachine. Each object has a distinct set of performance metrics.
12913 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12914
12915 Metric data is collected at the specified intervals and is retained
12916 internally. The interval and the number of retained samples can be set
12917 with <link to="IPerformanceCollector::setupMetrics" />.
12918
12919 Metrics are organized hierarchically, with each level separated by a
12920 slash (/) character. Generally, the scheme for metric names is like this:
12921
12922 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12923
12924 "Category/Metric" together form the base metric name. A base metric is the
12925 smallest unit for which a sampling interval and the number of retained
12926 samples can be set. Only base metrics can be enabled and disabled. All
12927 sub-metrics are collected when their base metric is collected.
12928 Collected values for any set of sub-metrics can be queried with
12929 <link to="IPerformanceCollector::queryMetricsData" />.
12930
12931 For example "CPU/Load/User:avg"
12932 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12933 "average" aggregate. An aggregate function is computed over all retained
12934 data. Valid aggregate functions are:
12935
12936 <ul>
12937 <li>avg -- average</li>
12938 <li>min -- minimum</li>
12939 <li>max -- maximum</li>
12940 </ul>
12941
12942 When setting up
12943 metric parameters, querying metric data, enabling or disabling metrics
12944 wildcards can be used in metric names to specify a subset of metrics. For
12945 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12946 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12947 values without aggregates <tt>*:</tt> can be used.
12948
12949 The valid names for base metrics are:
12950
12951 <ul>
12952 <li>CPU/Load</li>
12953 <li>CPU/MHz</li>
12954 <li>RAM/Usage</li>
12955 </ul>
12956
12957 The general sequence for collecting and retrieving the metrics is:
12958 <ul>
12959 <li>
12960 Obtain an instance of IPerformanceCollector with
12961 <link to="IVirtualBox::performanceCollector" />
12962 </li>
12963 <li>
12964 Allocate and populate an array with references to objects the metrics
12965 will be collected for. Use references to IHost and IMachine objects.
12966 </li>
12967 <li>
12968 Allocate and populate an array with base metric names the data will be
12969 collected for.
12970 </li>
12971 <li>
12972 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12973 metric data will be collected and stored.
12974 </li>
12975 <li>
12976 Wait for the data to get collected.
12977 </li>
12978 <li>
12979 Allocate and populate an array with references to objects the metric
12980 values will be queried for. You can re-use the object array used for
12981 setting base metrics.
12982 </li>
12983 <li>
12984 Allocate and populate an array with metric names the data will be
12985 collected for. Note that metric names differ from base metric names.
12986 </li>
12987 <li>
12988 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12989 have been collected so far are returned. Note that the values are still
12990 retained internally and data collection continues.
12991 </li>
12992 </ul>
12993
12994 For an example of usage refer to the following files in VirtualBox SDK:
12995 <ul>
12996 <li>
12997 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12998 </li>
12999 <li>
13000 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13001 </li>
13002 </ul>
13003 </desc>
13004
13005 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13006 <desc>
13007 Array of unique names of metrics.
13008
13009 This array represents all metrics supported by the performance
13010 collector. Individual objects do not necessarily support all of them.
13011 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13012 list of supported metrics for a particular object.
13013 </desc>
13014 </attribute>
13015
13016 <method name="getMetrics">
13017 <desc>
13018 Returns parameters of specified metrics for a set of objects.
13019 <note>
13020 @c Null metrics array means all metrics. @c Null object array means
13021 all existing objects.
13022 </note>
13023 </desc>
13024 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13025 <desc>
13026 Metric name filter. Currently, only a comma-separated list of metrics
13027 is supported.
13028 </desc>
13029 </param>
13030 <param name="objects" type="$unknown" dir="in" safearray="yes">
13031 <desc>
13032 Set of objects to return metric parameters for.
13033 </desc>
13034 </param>
13035 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13036 <desc>
13037 Array of returned metric parameters.
13038 </desc>
13039 </param>
13040 </method>
13041
13042 <method name="setupMetrics">
13043 <desc>
13044 Sets parameters of specified base metrics for a set of objects. Returns
13045 an array of <link to="IPerformanceMetric" /> describing the metrics have
13046 been affected.
13047 <note>
13048 @c Null or empty metric name array means all metrics. @c Null or empty
13049 object array means all existing objects. If metric name array contains
13050 a single element and object array contains many, the single metric
13051 name array element is applied to each object array element to form
13052 metric/object pairs.
13053 </note>
13054 </desc>
13055 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13056 <desc>
13057 Metric name filter. Comma-separated list of metrics with wildcard
13058 support.
13059 </desc>
13060 </param>
13061 <param name="objects" type="$unknown" dir="in" safearray="yes">
13062 <desc>
13063 Set of objects to setup metric parameters for.
13064 </desc>
13065 </param>
13066 <param name="period" type="unsigned long" dir="in">
13067 <desc>
13068 Time interval in seconds between two consecutive samples of performance
13069 data.
13070 </desc>
13071 </param>
13072 <param name="count" type="unsigned long" dir="in">
13073 <desc>
13074 Number of samples to retain in performance data history. Older samples
13075 get discarded.
13076 </desc>
13077 </param>
13078 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13079 <desc>
13080 Array of metrics that have been modified by the call to this method.
13081 </desc>
13082 </param>
13083 </method>
13084
13085 <method name="enableMetrics">
13086 <desc>
13087 Turns on collecting specified base metrics. Returns an array of
13088 <link to="IPerformanceMetric" /> describing the metrics have been
13089 affected.
13090 <note>
13091 @c Null or empty metric name array means all metrics. @c Null or empty
13092 object array means all existing objects. If metric name array contains
13093 a single element and object array contains many, the single metric
13094 name array element is applied to each object array element to form
13095 metric/object pairs.
13096 </note>
13097 </desc>
13098 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13099 <desc>
13100 Metric name filter. Comma-separated list of metrics with wildcard
13101 support.
13102 </desc>
13103 </param>
13104 <param name="objects" type="$unknown" dir="in" safearray="yes">
13105 <desc>
13106 Set of objects to enable metrics for.
13107 </desc>
13108 </param>
13109 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13110 <desc>
13111 Array of metrics that have been modified by the call to this method.
13112 </desc>
13113 </param>
13114 </method>
13115
13116 <method name="disableMetrics">
13117 <desc>
13118 Turns off collecting specified base metrics. Returns an array of
13119 <link to="IPerformanceMetric" /> describing the metrics have been
13120 affected.
13121 <note>
13122 @c Null or empty metric name array means all metrics. @c Null or empty
13123 object array means all existing objects. If metric name array contains
13124 a single element and object array contains many, the single metric
13125 name array element is applied to each object array element to form
13126 metric/object pairs.
13127 </note>
13128 </desc>
13129 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13130 <desc>
13131 Metric name filter. Comma-separated list of metrics with wildcard
13132 support.
13133 </desc>
13134 </param>
13135 <param name="objects" type="$unknown" dir="in" safearray="yes">
13136 <desc>
13137 Set of objects to disable metrics for.
13138 </desc>
13139 </param>
13140 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13141 <desc>
13142 Array of metrics that have been modified by the call to this method.
13143 </desc>
13144 </param>
13145 </method>
13146
13147 <method name="queryMetricsData">
13148 <desc>
13149 Queries collected metrics data for a set of objects.
13150
13151 The data itself and related metric information are returned in seven
13152 parallel and one flattened array of arrays. Elements of
13153 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13154 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13155 the same index describe one set of values corresponding to a single
13156 metric.
13157
13158 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13159 start and length of a sub-array is indicated by
13160 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13161 value for metric <tt>metricNames[i]</tt> is at
13162 <tt>returnData[returnIndices[i]]</tt>.
13163
13164 <note>
13165 @c Null or empty metric name array means all metrics. @c Null or empty
13166 object array means all existing objects. If metric name array contains
13167 a single element and object array contains many, the single metric
13168 name array element is applied to each object array element to form
13169 metric/object pairs.
13170 </note>
13171 <note>
13172 Data collection continues behind the scenes after call to
13173 @c queryMetricsData. The return data can be seen as the snapshot of
13174 the current state at the time of @c queryMetricsData call. The
13175 internally kept metric values are not cleared by the call. This makes
13176 possible querying different subsets of metrics or aggregates with
13177 subsequent calls. If periodic querying is needed it is highly
13178 suggested to query the values with @c interval*count period to avoid
13179 confusion. This way a completely new set of data values will be
13180 provided by each query.
13181 </note>
13182 </desc>
13183 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13184 <desc>
13185 Metric name filter. Comma-separated list of metrics with wildcard
13186 support.
13187 </desc>
13188 </param>
13189 <param name="objects" type="$unknown" dir="in" safearray="yes">
13190 <desc>
13191 Set of objects to query metrics for.
13192 </desc>
13193 </param>
13194 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13195 <desc>
13196 Names of metrics returned in @c returnData.
13197 </desc>
13198 </param>
13199 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13200 <desc>
13201 Objects associated with metrics returned in @c returnData.
13202 </desc>
13203 </param>
13204 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13205 <desc>
13206 Units of measurement for each returned metric.
13207 </desc>
13208 </param>
13209 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13210 <desc>
13211 Divisor that should be applied to return values in order to get
13212 floating point values. For example:
13213 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13214 will retrieve the floating point value of i-th sample of the first
13215 metric.
13216 </desc>
13217 </param>
13218 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13219 <desc>
13220 Sequence numbers of the first elements of value sequences of particular metrics
13221 returned in @c returnData. For aggregate metrics it is the sequence number of
13222 the sample the aggregate started calculation from.
13223 </desc>
13224 </param>
13225 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13226 <desc>
13227 Indices of the first elements of value sequences of particular metrics
13228 returned in @c returnData.
13229 </desc>
13230 </param>
13231 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13232 <desc>
13233 Lengths of value sequences of particular metrics.
13234 </desc>
13235 </param>
13236 <param name="returnData" type="long" dir="return" safearray="yes">
13237 <desc>
13238 Flattened array of all metric data containing sequences of values for
13239 each metric.
13240 </desc>
13241 </param>
13242 </method>
13243
13244 </interface>
13245
13246 <module name="VBoxSVC" context="LocalServer">
13247 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13248 namespace="virtualbox.org">
13249 <interface name="IVirtualBox" default="yes"/>
13250 </class>
13251 </module>
13252
13253 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13254 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13255 namespace="virtualbox.org">
13256 <interface name="ISession" default="yes"/>
13257 </class>
13258 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13259 namespace="virtualbox.org">
13260 <interface name="ILocalOwner" default="yes"/>
13261 <interface name="IVirtualBoxCallback"/>
13262 <interface name="IConsoleCallback"/>
13263 </class>
13264 </module>
13265
13266</library>
13267
13268</idl>
13269
13270<!-- 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