VirtualBox

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

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

API/Machine: clarify API docs, fix remaining code

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