VirtualBox

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

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

API/Medium: stub for resizing method

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