VirtualBox

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

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

API/Medium: new attribute to get the kind of medium (dvd/floppy/hard disk), plus error message fixes to use the right terminology.

  • Property svn:eol-style set to native
File size: 490.4 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;[discardSnapshot() ]-------------&gt; Discarding --+
577 | | [discardCurrentState()] |
578 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
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="Discarding" value="12">
681 <desc>
682 Snapshot of the machine is being discarded.
683 </desc>
684 </const>
685 <const name="SettingUp" value="13">
686 <desc>
687 Lengthy setup operation is in progress.
688 </desc>
689 </const>
690
691 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
692 <desc>
693 Pseudo-state: first online state (for use in relational expressions).
694 </desc>
695 </const>
696 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
697 <desc>
698 Pseudo-state: last online state (for use in relational expressions).
699 </desc>
700 </const>
701
702 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
703 <desc>
704 Pseudo-state: first transient state (for use in relational expressions).
705 </desc>
706 </const>
707 <const name="LastTransient" value="13" wsmap="suppress"> <!-- SettingUp -->
708 <desc>
709 Pseudo-state: last transient state (for use in relational expressions).
710 </desc>
711 </const>
712
713 </enum>
714
715 <enum
716 name="SessionState"
717 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
718 >
719 <desc>
720 Session state. This enumeration represents possible values of
721 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
722 attributes. See individual enumerator descriptions for the meaning for
723 every value.
724 </desc>
725
726 <const name="Null" value="0">
727 <desc>Null value (never used by the API).</desc>
728 </const>
729 <const name="Closed" value="1">
730 <desc>
731 The machine has no open sessions (<link to="IMachine::sessionState"/>);
732 the session is closed (<link to="ISession::state"/>)
733 </desc>
734 </const>
735 <const name="Open" value="2">
736 <desc>
737 The machine has an open direct session (<link to="IMachine::sessionState"/>);
738 the session is open (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Spawning" value="3">
742 <desc>
743 A new (direct) session is being opened for the machine
744 as a result of <link to="IVirtualBox::openRemoteSession"/>
745 call (<link to="IMachine::sessionState"/>);
746 the session is currently being opened
747 as a result of <link to="IVirtualBox::openRemoteSession"/>
748 call (<link to="ISession::state"/>)
749 </desc>
750 </const>
751 <const name="Closing" value="4">
752 <desc>
753 The direct session is being closed (<link to="IMachine::sessionState"/>);
754 the session is being closed (<link to="ISession::state"/>)
755 </desc>
756 </const>
757 </enum>
758
759 <enum
760 name="CpuPropertyType"
761 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
762 >
763 <desc>
764 Virtual CPU property type. This enumeration represents possible values of the
765 IMachine get- and setCpuProperty methods.
766 </desc>
767 <const name="Null" value="0">
768 <desc>Null value (never used by the API).</desc>
769 </const>
770 <const name="PAE" value="1">
771 <desc>
772 This setting determines whether VirtualBox will expose the Physical Address
773 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
774 is not available, it will not be reported.
775 </desc>
776 </const>
777 <const name="Synthetic" value="2">
778 <desc>
779 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
780 teleporting between host systems that differ significantly.
781 </desc>
782 </const>
783 </enum>
784
785
786 <enum
787 name="HWVirtExPropertyType"
788 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
789 >
790 <desc>
791 HWVirtEx property type. This enumeration represents possible values of the
792 IMachine get- and setHWVirtExProperty methods.
793 </desc>
794 <const name="Null" value="0">
795 <desc>Null value (never used by the API).</desc>
796 </const>
797 <const name="Enabled" value="1">
798 <desc>
799 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
800 they will not be used.
801 </desc>
802 </const>
803 <const name="Exclusive" value="2">
804 <desc>
805 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
806 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
807 </desc>
808 </const>
809 <const name="VPID" value="3">
810 <desc>
811 VT-x VPID boolean property. Note that in case this extension is not available,
812 it will not be used.
813 </desc>
814 </const>
815 <const name="NestedPaging" value="4">
816 <desc>
817 Nested Paging boolean property. Note that in case this extension is not available,
818 it will not be used.
819 </desc>
820 </const>
821 </enum>
822
823 <enum
824 name="SessionType"
825 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
826 >
827 <desc>
828 Session type. This enumeration represents possible values of the
829 <link to="ISession::type"/> attribute.
830 </desc>
831
832 <const name="Null" value="0">
833 <desc>Null value (never used by the API).</desc>
834 </const>
835 <const name="Direct" value="1">
836 <desc>
837 Direct session
838 (opened by <link to="IVirtualBox::openSession"/>)
839 </desc>
840 </const>
841 <const name="Remote" value="2">
842 <desc>
843 Remote session
844 (opened by <link to="IVirtualBox::openRemoteSession"/>)
845 </desc>
846 </const>
847 <const name="Existing" value="3">
848 <desc>
849 Existing session
850 (opened by <link to="IVirtualBox::openExistingSession"/>)
851 </desc>
852 </const>
853 </enum>
854
855 <enum
856 name="DeviceType"
857 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
858 >
859 <desc>
860 Device type.
861 </desc>
862 <const name="Null" value="0">
863 <desc>
864 Null value, may also mean "no device" (not allowed for
865 <link to="IConsole::getDeviceActivity"/>).
866 </desc>
867 </const>
868 <const name="Floppy" value="1">
869 <desc>Floppy device.</desc>
870 </const>
871 <const name="DVD" value="2">
872 <desc>CD/DVD-ROM device.</desc>
873 </const>
874 <const name="HardDisk" value="3">
875 <desc>Hard disk device.</desc>
876 </const>
877 <const name="Network" value="4">
878 <desc>Network device.</desc>
879 </const>
880 <const name="USB" value="5">
881 <desc>USB device.</desc>
882 </const>
883 <const name="SharedFolder" value="6">
884 <desc>Shared folder device.</desc>
885 </const>
886 </enum>
887
888 <enum
889 name="DeviceActivity"
890 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
891 >
892 <desc>
893 Device activity for <link to="IConsole::getDeviceActivity"/>.
894 </desc>
895
896 <const name="Null" value="0"/>
897 <const name="Idle" value="1"/>
898 <const name="Reading" value="2"/>
899 <const name="Writing" value="3"/>
900 </enum>
901
902 <enum
903 name="ClipboardMode"
904 uuid="33364716-4008-4701-8f14-be0fa3d62950"
905 >
906 <desc>
907 Host-Guest clipboard interchange mode.
908 </desc>
909
910 <const name="Disabled" value="0"/>
911 <const name="HostToGuest" value="1"/>
912 <const name="GuestToHost" value="2"/>
913 <const name="Bidirectional" value="3"/>
914 </enum>
915
916 <enum
917 name="Scope"
918 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
919 >
920 <desc>
921 Scope of the operation.
922
923 A generic enumeration used in various methods to define the action or
924 argument scope.
925 </desc>
926
927 <const name="Global" value="0"/>
928 <const name="Machine" value="1"/>
929 <const name="Session" value="2"/>
930 </enum>
931
932 <enum
933 name="GuestStatisticType"
934 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
935 >
936 <desc>
937 Statistics type for <link to="IGuest::getStatistic"/>.
938 </desc>
939
940 <const name="CPULoad_Idle" value="0">
941 <desc>
942 Idle CPU load (0-100%) for last interval.
943 </desc>
944 </const>
945 <const name="CPULoad_Kernel" value="1">
946 <desc>
947 Kernel CPU load (0-100%) for last interval.
948 </desc>
949 </const>
950 <const name="CPULoad_User" value="2">
951 <desc>
952 User CPU load (0-100%) for last interval.
953 </desc>
954 </const>
955 <const name="Threads" value="3">
956 <desc>
957 Total number of threads in the system.
958 </desc>
959 </const>
960 <const name="Processes" value="4">
961 <desc>
962 Total number of processes in the system.
963 </desc>
964 </const>
965 <const name="Handles" value="5">
966 <desc>
967 Total number of handles in the system.
968 </desc>
969 </const>
970 <const name="MemoryLoad" value="6">
971 <desc>
972 Memory load (0-100%).
973 </desc>
974 </const>
975 <const name="PhysMemTotal" value="7">
976 <desc>
977 Total physical memory in megabytes.
978 </desc>
979 </const>
980 <const name="PhysMemAvailable" value="8">
981 <desc>
982 Free physical memory in megabytes.
983 </desc>
984 </const>
985 <const name="PhysMemBalloon" value="9">
986 <desc>
987 Ballooned physical memory in megabytes.
988 </desc>
989 </const>
990 <const name="MemCommitTotal" value="10">
991 <desc>
992 Total amount of memory in the committed state in megabytes.
993 </desc>
994 </const>
995 <const name="MemKernelTotal" value="11">
996 <desc>
997 Total amount of memory used by the guest OS's kernel in megabytes.
998 </desc>
999 </const>
1000 <const name="MemKernelPaged" value="12">
1001 <desc>
1002 Total amount of paged memory used by the guest OS's kernel in megabytes.
1003 </desc>
1004 </const>
1005 <const name="MemKernelNonpaged" value="13">
1006 <desc>
1007 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1008 </desc>
1009 </const>
1010 <const name="MemSystemCache" value="14">
1011 <desc>
1012 Total amount of memory used by the guest OS's system cache in megabytes.
1013 </desc>
1014 </const>
1015 <const name="PageFileSize" value="15">
1016 <desc>
1017 Pagefile size in megabytes.
1018 </desc>
1019 </const>
1020 <const name="SampleNumber" value="16">
1021 <desc>
1022 Statistics sample number
1023 </desc>
1024 </const>
1025 <const name="MaxVal" value="17"/>
1026 </enum>
1027
1028 <enum
1029 name="BIOSBootMenuMode"
1030 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1031 >
1032 <desc>
1033 BIOS boot menu mode.
1034 </desc>
1035
1036 <const name="Disabled" value="0"/>
1037 <const name="MenuOnly" value="1"/>
1038 <const name="MessageAndMenu" value="2"/>
1039 </enum>
1040
1041 <enum
1042 name="ProcessorFeature"
1043 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1044 >
1045 <desc>
1046 CPU features.
1047 </desc>
1048
1049 <const name="HWVirtEx" value="0"/>
1050 <const name="PAE" value="1"/>
1051 <const name="LongMode" value="2"/>
1052 <const name="NestedPaging" value="3"/>
1053 </enum>
1054
1055 <enum
1056 name="FirmwareType"
1057 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1058 >
1059 <desc>
1060 Firmware type.
1061 </desc>
1062 <const name="BIOS" value="1">
1063 <desc>BIOS Firmware.</desc>
1064 </const>
1065 <const name="EFI" value="2">
1066 <desc>Efi firmware.</desc>
1067 </const>
1068 </enum>
1069
1070 <!--
1071 // IVirtualBoxErrorInfo
1072 /////////////////////////////////////////////////////////////////////////
1073 -->
1074
1075 <interface
1076 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1077 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1078 supportsErrorInfo="no"
1079 wsmap="managed"
1080 >
1081 <desc>
1082 The IVirtualBoxErrorInfo interface represents extended error information.
1083
1084 Extended error information can be set by VirtualBox components after
1085 unsuccessful or partially successful method invocation. This information
1086 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1087 and then shown to the client in addition to the plain 32-bit result code.
1088
1089 In MS COM, this interface extends the IErrorInfo interface,
1090 in XPCOM, it extends the nsIException interface. In both cases,
1091 it provides a set of common attributes to retrieve error
1092 information.
1093
1094 Sometimes invocation of some component's method may involve methods of
1095 other components that may also fail (independently of this method's
1096 failure), or a series of non-fatal errors may precede a fatal error that
1097 causes method failure. In cases like that, it may be desirable to preserve
1098 information about all errors happened during method invocation and deliver
1099 it to the caller. The <link to="#next"/> attribute is intended
1100 specifically for this purpose and allows to represent a chain of errors
1101 through a single IVirtualBoxErrorInfo object set after method invocation.
1102
1103 Note that errors are stored to a chain in the reverse order, i.e. the
1104 initial error object you query right after method invocation is the last
1105 error set by the callee, the object it points to in the @a next attribute
1106 is the previous error and so on, up to the first error (which is the last
1107 in the chain).
1108 </desc>
1109
1110 <attribute name="resultCode" type="long" readonly="yes">
1111 <desc>
1112 Result code of the error.
1113 Usually, it will be the same as the result code returned
1114 by the method that provided this error information, but not
1115 always. For example, on Win32, CoCreateInstance() will most
1116 likely return E_NOINTERFACE upon unsuccessful component
1117 instantiation attempt, but not the value the component factory
1118 returned. Value is typed 'long', not 'result',
1119 to make interface usable from scripting languages.
1120 <note>
1121 In MS COM, there is no equivalent.
1122 In XPCOM, it is the same as nsIException::result.
1123 </note>
1124 </desc>
1125 </attribute>
1126
1127 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1128 <desc>
1129 UUID of the interface that defined the error.
1130 <note>
1131 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1132 data type.
1133 In XPCOM, there is no equivalent.
1134 </note>
1135 </desc>
1136 </attribute>
1137
1138 <attribute name="component" type="wstring" readonly="yes">
1139 <desc>
1140 Name of the component that generated the error.
1141 <note>
1142 In MS COM, it is the same as IErrorInfo::GetSource.
1143 In XPCOM, there is no equivalent.
1144 </note>
1145 </desc>
1146 </attribute>
1147
1148 <attribute name="text" type="wstring" readonly="yes">
1149 <desc>
1150 Text description of the error.
1151 <note>
1152 In MS COM, it is the same as IErrorInfo::GetDescription.
1153 In XPCOM, it is the same as nsIException::message.
1154 </note>
1155 </desc>
1156 </attribute>
1157
1158 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1159 <desc>
1160 Next error object if there is any, or @c null otherwise.
1161 <note>
1162 In MS COM, there is no equivalent.
1163 In XPCOM, it is the same as nsIException::inner.
1164 </note>
1165 </desc>
1166 </attribute>
1167
1168 </interface>
1169
1170 <interface
1171 name="ILocalOwner" extends="$dispatched"
1172 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1173 >
1174 <desc>
1175 The ILocalOwner interface allows to register local objects
1176 (created without COM calls, but with new()).
1177 Once registered, calls to methods of such objects can be made
1178 from remote COM processes.
1179 The main usecase is the event callback implementation where
1180 API clients provide callback objects.
1181 </desc>
1182 <method name="setLocalObject">
1183 <desc>
1184 Set local object.
1185 </desc>
1186 <param name="object" type="$unknown" dir="in">
1187 <desc>Local object to forward requests to.
1188 If null, clears currently set local object.</desc>
1189 </param>
1190 </method>
1191 </interface>
1192
1193 <!--
1194 // IVirtualBox
1195 /////////////////////////////////////////////////////////////////////////
1196 -->
1197
1198 <interface
1199 name="IVirtualBoxCallback" extends="$unknown"
1200 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1201 wsmap="suppress"
1202 >
1203
1204 <method name="onMachineStateChange">
1205 <desc>
1206 The execution state of the given machine has changed.
1207 <see>IMachine::state</see>
1208 </desc>
1209 <param name="machineId" type="uuid" mod="string" dir="in">
1210 <desc>ID of the machine this event relates to.</desc>
1211 </param>
1212 <param name="state" type="MachineState" dir="in">
1213 <desc>New execution state.</desc>
1214 </param>
1215 </method>
1216
1217 <method name="onMachineDataChange">
1218 <desc>
1219 Any of the settings of the given machine has changed.
1220 </desc>
1221 <param name="machineId" type="uuid" mod="string" dir="in">
1222 <desc>ID of the machine this event relates to.</desc>
1223 </param>
1224 </method>
1225
1226 <method name="onExtraDataCanChange">
1227 <desc>
1228 Notification when someone tries to change extra data for
1229 either the given machine or (if @c null) global extra data.
1230 This gives the chance to veto against changes.
1231 </desc>
1232 <param name="machineId" type="uuid" mod="string" dir="in">
1233 <desc>
1234 ID of the machine this event relates to
1235 (@c null ID for global extra data change requests).
1236 </desc>
1237 </param>
1238 <param name="key" type="wstring" dir="in">
1239 <desc>
1240 Extra data key for the attempted write.
1241 </desc>
1242 </param>
1243 <param name="value" type="wstring" dir="in">
1244 <desc>
1245 Extra data value for the given key.
1246 </desc>
1247 </param>
1248 <param name="error" type="wstring" dir="out">
1249 <desc>
1250 Optional error message describing the reason of the
1251 veto (ignored if this notification returns @c true).
1252 </desc>
1253 </param>
1254 <param name="allowChange" type="boolean" dir="return">
1255 <desc>
1256 Flag to indicate whether the callee agrees (@c true)
1257 or vetoes against the change (@c false).
1258 </desc>
1259 </param>
1260 </method>
1261
1262 <method name="onExtraDataChange">
1263 <desc>
1264 Notification when machine specific or global extra data
1265 has changed.
1266 </desc>
1267 <param name="machineId" type="uuid" mod="string" dir="in">
1268 <desc>
1269 ID of the machine this event relates to.
1270 Null for global extra data changes.
1271 </desc>
1272 </param>
1273 <param name="key" type="wstring" dir="in">
1274 <desc>
1275 Extra data key that has changed.
1276 </desc>
1277 </param>
1278 <param name="value" type="wstring" dir="in">
1279 <desc>
1280 Extra data value for the given key.
1281 </desc>
1282 </param>
1283 </method>
1284
1285 <method name="onMediumRegistered">
1286 <desc>
1287 The given medium was registered or unregistered
1288 within this VirtualBox installation.
1289
1290 The @a mediumType parameter describes what type of
1291 medium the specified @a mediumId refers to. Possible
1292 values are:
1293
1294 <ul>
1295 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1296 that, if registered, can be obtained using the
1297 <link to="IVirtualBox::getHardDisk"/> call.</li>
1298 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1299 that, if registered, can be obtained using the
1300 <link to="IVirtualBox::getDVDImage"/> call.</li>
1301 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1302 that, if registered, can be obtained using the
1303 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1304 </ul>
1305
1306 Note that if this is a deregistration notification,
1307 there is no way to access the object representing the
1308 unregistered medium. It is supposed that the
1309 application will do required cleanup based on the
1310 @a mediumId value.
1311 </desc>
1312 <param name="mediumId" type="uuid" mod="string" dir="in">
1313 <desc>ID of the medium this event relates to.</desc>
1314 </param>
1315 <param name="mediumType" type="DeviceType" dir="in">
1316 <desc>Type of the medium this event relates to.</desc>
1317 </param>
1318 <param name="registered" type="boolean" dir="in">
1319 <desc>
1320 If @c true, the medium was registered, otherwise it was
1321 unregistered.
1322 </desc>
1323 </param>
1324 </method>
1325
1326 <method name="onMachineRegistered">
1327 <desc>
1328 The given machine was registered or unregistered
1329 within this VirtualBox installation.
1330 </desc>
1331 <param name="machineId" type="uuid" mod="string" dir="in">
1332 <desc>ID of the machine this event relates to.</desc>
1333 </param>
1334 <param name="registered" type="boolean" dir="in">
1335 <desc>
1336 If @c true, the machine was registered, otherwise it was
1337 unregistered.
1338 </desc>
1339 </param>
1340 </method>
1341
1342 <method name="onSessionStateChange">
1343 <desc>
1344 The state of the session for the given machine was changed.
1345 <see>IMachine::sessionState</see>
1346 </desc>
1347 <param name="machineId" type="uuid" mod="string" dir="in">
1348 <desc>ID of the machine this event relates to.</desc>
1349 </param>
1350 <param name="state" type="SessionState" dir="in">
1351 <desc>New session state.</desc>
1352 </param>
1353 </method>
1354
1355 <method name="onSnapshotTaken">
1356 <desc>
1357 A new snapshot of the machine has been taken.
1358 <see>ISnapshot</see>
1359 </desc>
1360 <param name="machineId" type="uuid" mod="string" dir="in">
1361 <desc>ID of the machine this event relates to.</desc>
1362 </param>
1363 <param name="snapshotId" type="uuid" mod="string" dir="in">
1364 <desc>ID of the new snapshot.</desc>
1365 </param>
1366 </method>
1367
1368 <method name="onSnapshotDiscarded">
1369 <desc>
1370 Snapshot of the given machine has been discarded.
1371
1372 <note>
1373 This notification is delivered <b>after</b> the snapshot
1374 object has been uninitialized on the server (so that any
1375 attempt to call its methods will return an error).
1376 </note>
1377
1378 <see>ISnapshot</see>
1379 </desc>
1380 <param name="machineId" type="uuid" mod="string" dir="in">
1381 <desc>ID of the machine this event relates to.</desc>
1382 </param>
1383 <param name="snapshotId" type="uuid" mod="string" dir="in">
1384 <desc>
1385 ID of the discarded snapshot. @c null means the current machine
1386 state has been discarded (restored from the current snapshot).
1387 </desc>
1388 </param>
1389 </method>
1390
1391 <method name="onSnapshotChange">
1392 <desc>
1393 Snapshot properties (name and/or description) have been changed.
1394 <see>ISnapshot</see>
1395 </desc>
1396 <param name="machineId" type="uuid" mod="string" dir="in">
1397 <desc>ID of the machine this event relates to.</desc>
1398 </param>
1399 <param name="snapshotId" type="uuid" mod="string" dir="in">
1400 <desc>ID of the changed snapshot.</desc>
1401 </param>
1402 </method>
1403
1404 <method name="onGuestPropertyChange">
1405 <desc>
1406 Notification when a guest property has changed.
1407 </desc>
1408 <param name="machineId" type="uuid" mod="string" dir="in">
1409 <desc>
1410 ID of the machine this event relates to.
1411 </desc>
1412 </param>
1413 <param name="name" type="wstring" dir="in">
1414 <desc>
1415 The name of the property that has changed.
1416 </desc>
1417 </param>
1418 <param name="value" type="wstring" dir="in">
1419 <desc>
1420 The new property value.
1421 </desc>
1422 </param>
1423 <param name="flags" type="wstring" dir="in">
1424 <desc>
1425 The new property flags.
1426 </desc>
1427 </param>
1428 </method>
1429
1430 </interface>
1431
1432 <interface
1433 name="IDHCPServer" extends="$unknown"
1434 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1435 wsmap="managed"
1436 >
1437 <desc>
1438 The IDHCPServer interface represents the vbox dhcp server configuration.
1439
1440 To enumerate all the dhcp servers on the host, use the
1441 <link to="IVirtualBox::DHCPServers"/> attribute.
1442 </desc>
1443
1444 <attribute name="enabled" type="boolean">
1445 <desc>
1446 specifies if the dhcp server is enabled
1447 </desc>
1448 </attribute>
1449
1450 <attribute name="IPAddress" type="wstring" readonly="yes">
1451 <desc>
1452 specifies server IP
1453 </desc>
1454 </attribute>
1455
1456 <attribute name="networkMask" type="wstring" readonly="yes">
1457 <desc>
1458 specifies server network mask
1459 </desc>
1460 </attribute>
1461
1462 <attribute name="networkName" type="wstring" readonly="yes">
1463 <desc>
1464 specifies internal network name the server is used for
1465 </desc>
1466 </attribute>
1467
1468 <attribute name="lowerIP" type="wstring" readonly="yes">
1469 <desc>
1470 specifies from IP adrres in server address range
1471 </desc>
1472 </attribute>
1473
1474 <attribute name="upperIP" type="wstring" readonly="yes">
1475 <desc>
1476 specifies to IP adrres in server address range
1477 </desc>
1478 </attribute>
1479
1480 <method name="setConfiguration">
1481 <desc>
1482 configures the server
1483 <result name="E_INVALIDARG">
1484 invalid configuration supplied
1485 </result>
1486 </desc>
1487 <param name="IPAddress" type="wstring" dir="in">
1488 <desc>
1489 server IP address
1490 </desc>
1491 </param>
1492 <param name="networkMask" type="wstring" dir="in">
1493 <desc>
1494 server network mask
1495 </desc>
1496 </param>
1497 <param name="FromIPAddress" type="wstring" dir="in">
1498 <desc>
1499 server From IP address for address range
1500 </desc>
1501 </param>
1502 <param name="ToIPAddress" type="wstring" dir="in">
1503 <desc>
1504 server To IP address for address range
1505 </desc>
1506 </param>
1507 </method>
1508
1509 <method name="start">
1510 <desc>
1511 Starts DHCP server process.
1512 <result name="E_FAIL">
1513 Failed to start the process.
1514 </result>
1515 </desc>
1516 <param name="networkName" type="wstring" dir="in">
1517 <desc>
1518 Name of internal network DHCP server should attach to.
1519 </desc>
1520 </param>
1521 <param name="trunkName" type="wstring" dir="in">
1522 <desc>
1523 Name of internal network trunk.
1524 </desc>
1525 </param>
1526 <param name="trunkType" type="wstring" dir="in">
1527 <desc>
1528 Type of internal network trunk.
1529 </desc>
1530 </param>
1531 </method>
1532
1533 <method name="stop">
1534 <desc>
1535 Stops DHCP server process.
1536 <result name="E_FAIL">
1537 Failed to stop the process.
1538 </result>
1539 </desc>
1540 </method>
1541 </interface>
1542
1543 <interface
1544 name="IVirtualBox" extends="$dispatched"
1545 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1546 wsmap="managed"
1547 >
1548 <desc>
1549 The IVirtualBox interface represents the main interface exposed by the
1550 product that provides virtual machine management.
1551
1552 An instance of IVirtualBox is required for the product to do anything
1553 useful. Even though the interface does not expose this, internally,
1554 IVirtualBox is implemented as a singleton and actually lives in the
1555 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1556 IVirtualBox can track the state of all virtual machines on a particular
1557 host, regardless of which frontend started them.
1558
1559 To enumerate all the virtual machines on the host, use the
1560 <link to="IVirtualBox::machines"/> attribute.
1561 </desc>
1562
1563 <attribute name="version" type="wstring" readonly="yes">
1564 <desc>
1565 A string representing the version number of the product. The
1566 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1567 last number represents the build number and will frequently change.
1568 </desc>
1569 </attribute>
1570
1571 <attribute name="revision" type="unsigned long" readonly="yes">
1572 <desc>
1573 The internal build revision number of the product.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="packageType" type="wstring" readonly="yes">
1578 <desc>
1579 A string representing the package type of this product. The
1580 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1581 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1582 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1583 this.
1584 </desc>
1585 </attribute>
1586
1587 <attribute name="homeFolder" type="wstring" readonly="yes">
1588 <desc>
1589 Full path to the directory where the global settings file,
1590 <tt>VirtualBox.xml</tt>, is stored.
1591
1592 In this version of VirtualBox, the value of this property is
1593 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1594 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1595 as determined by the host OS), and cannot be changed.
1596
1597 This path is also used as the base to resolve relative paths in
1598 places where relative paths are allowed (unless otherwise
1599 expressly indicated).
1600 </desc>
1601 </attribute>
1602
1603 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1604 <desc>
1605 Full name of the global settings file.
1606 The value of this property corresponds to the value of
1607 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1608 </desc>
1609 </attribute>
1610
1611 <attribute name="host" type="IHost" readonly="yes">
1612 <desc>Associated host object.</desc>
1613 </attribute>
1614
1615 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1616 <desc>Associated system information object.</desc>
1617 </attribute>
1618
1619 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1620 <desc>
1621 Array of machine objects registered within this VirtualBox instance.
1622 </desc>
1623 </attribute>
1624
1625 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1626 <desc>
1627 Array of medium objects known to this VirtualBox installation.
1628
1629 This array contains only base media. All differencing
1630 media of the given base medium can be enumerated using
1631 <link to="IMedium::children"/>.
1632 </desc>
1633 </attribute>
1634
1635 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1636 <desc>
1637 Array of CD/DVD image objects registered with this VirtualBox instance.
1638 </desc>
1639 </attribute>
1640
1641 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1642 <desc>
1643 Array of floppy image objects registered with this VirtualBox instance.
1644 </desc>
1645 </attribute>
1646
1647 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1648
1649 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1650
1651 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1652 <desc>
1653 Collection of global shared folders. Global shared folders are
1654 available to all virtual machines.
1655
1656 New shared folders are added to the collection using
1657 <link to="#createSharedFolder"/>. Existing shared folders can be
1658 removed using <link to="#removeSharedFolder"/>.
1659
1660 <note>
1661 In the current version of the product, global shared folders are not
1662 implemented and therefore this collection is always empty.
1663 </note>
1664 </desc>
1665 </attribute>
1666
1667 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1668 <desc>
1669 Associated performance collector object.
1670 </desc>
1671 </attribute>
1672
1673 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1674 <desc>
1675 dhcp server settings.
1676 </desc>
1677 </attribute>
1678
1679 <method name="createMachine">
1680 <desc>
1681 Creates a new virtual machine.
1682
1683 The new machine is created unregistered, with the initial configuration
1684 set according to the specified guest OS type. A typical sequence of
1685 actions to create a new virtual machine is as follows:
1686
1687 <ol>
1688 <li>
1689 Call this method to have a new machine created. The returned machine
1690 object will be "mutable" allowing to change any machine property.
1691 </li>
1692
1693 <li>
1694 Configure the machine using the appropriate attributes and methods.
1695 </li>
1696
1697 <li>
1698 Call <link to="IMachine::saveSettings" /> to write the settings
1699 to the machine's XML settings file. The configuration of the newly
1700 created machine will not be saved to disk until this method is
1701 called.
1702 </li>
1703
1704 <li>
1705 Call <link to="#registerMachine" /> to add the machine to the list
1706 of machines known to VirtualBox.
1707 </li>
1708 </ol>
1709
1710 You should specify valid name for the newly created machine when calling
1711 this method. See the <link to="IMachine::name"/> attribute description
1712 for more details about the machine name.
1713
1714 The specified guest OS type identifier must match an ID of one of known
1715 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1716 array.
1717
1718 Every machine has a <i>settings file</i> that is used to store
1719 the machine configuration. This file is stored in a directory called the
1720 <i>machine settings subfolder</i>. Both the settings subfolder and file
1721 will have a name that corresponds to the name of the virtual machine.
1722 You can specify where to create the machine setting subfolder using the
1723 @a baseFolder argument. The base folder can be absolute (full path) or
1724 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1725 directory</link>.
1726
1727 If @a baseFolder is a @c null or empty string (which is recommended), the
1728 <link to="ISystemProperties::defaultMachineFolder">default machine
1729 settings folder</link> will be used as a base folder for the created
1730 machine. Otherwise the given base folder will be used. In either case,
1731 the full path to the resulting settings file has the following
1732 structure:
1733 <pre>
1734 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1735 </pre>
1736
1737 Note that if the resulting settings file already exists, this method
1738 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1739
1740 Optionally, you may specify an UUID of to assign to the created machine.
1741 However, this is not recommended and you should normally pass an empty
1742 (@c null) UUID to this method so that a new UUID will be automatically
1743 generated for every created machine. You can use UUID
1744 00000000-0000-0000-0000-000000000000 as @c null value.
1745
1746 <note>
1747 There is no way to change the name of the settings file or
1748 subfolder of the created machine directly.
1749 </note>
1750
1751 <result name="VBOX_E_OBJECT_NOT_FOUND">
1752 @a osTypeId is invalid.
1753 </result>
1754 <result name="VBOX_E_FILE_ERROR">
1755 Resulting settings file name is invalid or the settings file already
1756 exists or could not be created due to an I/O error.
1757 </result>
1758 <result name="E_INVALIDARG">
1759 @a name is empty or @c null.
1760 </result>
1761 </desc>
1762
1763 <param name="name" type="wstring" dir="in">
1764 <desc>Machine name.</desc>
1765 </param>
1766 <param name="osTypeId" type="wstring" dir="in">
1767 <desc>Guest OS Type ID.</desc>
1768 </param>
1769 <param name="baseFolder" type="wstring" dir="in">
1770 <desc>Base machine folder (optional).</desc>
1771 </param>
1772 <param name="id" type="uuid" mod="string" dir="in">
1773 <desc>Machine UUID (optional).</desc>
1774 </param>
1775 <param name="machine" type="IMachine" dir="return">
1776 <desc>Created machine object.</desc>
1777 </param>
1778 </method>
1779
1780 <method name="createLegacyMachine">
1781 <desc>
1782 Creates a new virtual machine in "legacy" mode, using the specified
1783 settings file to store machine settings.
1784
1785 As opposed to machines created by <link to="#createMachine"/>,
1786 the settings file of the machine created in "legacy" mode is not
1787 automatically renamed when the machine name is changed -- it will always
1788 remain the same as specified in this method call.
1789
1790 The specified settings file name can be absolute (full path) or relative
1791 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1792 directory</link>. If the file name doesn't contain an extension, the
1793 default extension (.xml) will be appended.
1794
1795 Note that the configuration of the newly created machine is not
1796 saved to disk (and therefore no settings file is created)
1797 until <link to="IMachine::saveSettings"/> is called. If the
1798 specified settings file already exists, this method
1799 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1800
1801 See <link to="#createMachine"/> for more information.
1802
1803 @deprecated This method may be removed later. Use <link
1804 to="IVirtualBox::createMachine"/> instead.
1805
1806 <note>
1807 There is no way to change the name of the settings file
1808 of the machine created in "legacy" mode.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 @a osTypeId is invalid.
1813 </result>
1814 <result name="VBOX_E_FILE_ERROR">
1815 @a settingsFile is invalid or the settings file already exists or
1816 could not be created due to an I/O error.
1817 </result>
1818 <result name="E_INVALIDARG">
1819 @a name or @a settingsFile is empty or @c null.
1820 </result>
1821 </desc>
1822
1823 <param name="name" type="wstring" dir="in">
1824 <desc>Machine name.</desc>
1825 </param>
1826 <param name="osTypeId" type="wstring" dir="in">
1827 <desc>Machine OS Type ID.</desc>
1828 </param>
1829 <param name="settingsFile" type="wstring" dir="in">
1830 <desc>Name of the machine settings file.</desc>
1831 </param>
1832 <param name="id" type="uuid" mod="string" dir="in">
1833 <desc>Machine UUID (optional).</desc>
1834 </param>
1835 <param name="machine" type="IMachine" dir="return">
1836 <desc>Created machine object.</desc>
1837 </param>
1838 </method>
1839
1840 <method name="openMachine">
1841 <desc>
1842 Opens a virtual machine from the existing settings file.
1843 The opened machine remains unregistered until you call
1844 <link to="#registerMachine"/>.
1845
1846 The specified settings file name can be absolute
1847 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1848 VirtualBox home directory</link>. This file must exist
1849 and must be a valid machine settings file whose contents
1850 will be used to construct the machine object.
1851
1852 @deprecated Will be removed soon.
1853 <result name="VBOX_E_FILE_ERROR">
1854 Settings file name invalid, not found or sharing violation.
1855 </result>
1856 </desc>
1857 <param name="settingsFile" type="wstring" dir="in">
1858 <desc>
1859 Name of the machine settings file.
1860 </desc>
1861 </param>
1862 <param name="machine" type="IMachine" dir="return">
1863 <desc>Opened machine object.</desc>
1864 </param>
1865 <note>
1866 <link to="IMachine::settingsModified"/> will return
1867 @c false for the created machine, until any of machine settings
1868 are changed.
1869 </note>
1870 </method>
1871
1872 <method name="registerMachine">
1873 <desc>
1874
1875 Registers the machine previously created using
1876 <link to="#createMachine"/> or opened using
1877 <link to="#openMachine"/> within this VirtualBox installation. After
1878 successful method invocation, the
1879 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1880 to all registered callbacks.
1881
1882 <note>
1883 This method implicitly calls <link to="IMachine::saveSettings"/>
1884 to save all current machine settings before registering it.
1885 </note>
1886
1887 <result name="VBOX_E_OBJECT_NOT_FOUND">
1888 No matching virtual machine found.
1889 </result>
1890 <result name="VBOX_E_INVALID_OBJECT_STATE">
1891 Virtual machine was not created within this VirtualBox instance.
1892 </result>
1893
1894 </desc>
1895 <param name="machine" type="IMachine" dir="in"/>
1896 </method>
1897
1898 <method name="getMachine">
1899 <desc>
1900 Attempts to find a virtual machine given its UUID.
1901 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1902 instead.
1903
1904 <result name="VBOX_E_OBJECT_NOT_FOUND">
1905 Could not find registered machine matching @a id.
1906 </result>
1907
1908 </desc>
1909 <param name="id" type="uuid" mod="string" dir="in"/>
1910 <param name="machine" type="IMachine" dir="return"/>
1911 </method>
1912
1913 <method name="findMachine">
1914 <desc>
1915 Attempts to find a virtual machine given its name.
1916 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1917 instead.
1918
1919 <result name="VBOX_E_OBJECT_NOT_FOUND">
1920 Could not find registered machine matching @a name.
1921 </result>
1922
1923 </desc>
1924 <param name="name" type="wstring" dir="in"/>
1925 <param name="machine" type="IMachine" dir="return"/>
1926 </method>
1927
1928 <method name="unregisterMachine">
1929 <desc>
1930
1931 Unregisters the machine previously registered using
1932 <link to="#registerMachine"/>. After successful method invocation, the
1933 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1934 to all registered callbacks.
1935
1936 <note>
1937 The specified machine must not be in the Saved state, have an open
1938 (or a spawning) direct session associated with it, have snapshots or
1939 have hard disks attached.
1940 </note>
1941
1942 <note>
1943 This method implicitly calls <link to="IMachine::saveSettings"/> to
1944 save all current machine settings before unregistering it.
1945 </note>
1946
1947 <note>
1948 If the given machine is inaccessible (see
1949 <link to="IMachine::accessible"/>), it will be unregistered and
1950 fully uninitialized right afterwards. As a result, the returned
1951 machine object will be unusable and an attempt to call
1952 <b>any</b> method will return the "Object not ready" error.
1953 </note>
1954
1955 <result name="VBOX_E_OBJECT_NOT_FOUND">
1956 Could not find registered machine matching @a id.
1957 </result>
1958 <result name="VBOX_E_INVALID_VM_STATE">
1959 Machine is in Saved state.
1960 </result>
1961 <result name="VBOX_E_INVALID_OBJECT_STATE">
1962 Machine has snapshot or open session or hard disk attached.
1963 </result>
1964
1965 </desc>
1966 <param name="id" type="uuid" mod="string" dir="in">
1967 <desc>UUID of the machine to unregister.</desc>
1968 </param>
1969 <param name="machine" type="IMachine" dir="return">
1970 <desc>Unregistered machine object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="createAppliance">
1975 <desc>
1976 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1977 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1978 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1979 </desc>
1980 <param name="appliance" type="IAppliance" dir="return">
1981 <desc>New appliance.</desc>
1982 </param>
1983 </method>
1984
1985 <method name="createHardDisk">
1986 <desc>
1987 Creates a new base medium object that will use the given storage
1988 format and location for medium data.
1989
1990 Note that the actual storage unit is not created by this method. In
1991 order to do it, and before you are able to attach the created medium
1992 to virtual machines, you must call one of the following methods to
1993 allocate a format-specific storage unit at the specified location:
1994 <ul>
1995 <li><link to="IMedium::createBaseStorage"/></li>
1996 <li><link to="IMedium::createDiffStorage"/></li>
1997 </ul>
1998
1999 Some medium attributes, such as <link to="IMedium::id"/>, may
2000 remain uninitialized until the medium storage unit is successfully
2001 created by one of the above methods.
2002
2003 After the storage unit is successfully created, the medium gets
2004 remembered by this VirtualBox installation and will be accessible
2005 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2006 methods. Remembered base medium are also returned as part of
2007 the <link to="#hardDisks"/> array. See IMedium for more details.
2008
2009 The list of all storage formats supported by this VirtualBox
2010 installation can be obtained using
2011 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2012 attribute is empty or @c null then the default storage format
2013 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2014 be used for creating a storage unit of the medium.
2015
2016 Note that the format of the location string is storage format specific.
2017 See <link to="IMedium::location"/>, IMedium and
2018 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2019
2020 <result name="VBOX_E_OBJECT_NOT_FOUND">
2021 @a format identifier is invalid. See
2022 <link to="ISystemProperties::mediumFormats"/>.
2023 </result>
2024 <result name="VBOX_E_FILE_ERROR">
2025 @a location is a not valid file name (for file-based formats only).
2026 </result>
2027 </desc>
2028 <param name="format" type="wstring" dir="in">
2029 <desc>
2030 Identifier of the storage format to use for the new medium.
2031 </desc>
2032 </param>
2033 <param name="location" type="wstring" dir="in">
2034 <desc>
2035 Location of the storage unit for the new medium.
2036 </desc>
2037 </param>
2038 <param name="medium" type="IMedium" dir="return">
2039 <desc>Created medium object.</desc>
2040 </param>
2041 </method>
2042
2043 <method name="openHardDisk">
2044 <desc>
2045 Opens a medium from an existing location, optionally replacing
2046 the image UUID and/or parent UUID.
2047
2048 After the medium is successfully opened by this method, it gets
2049 remembered by (known to) this VirtualBox installation and will be
2050 accessible through <link to="#getHardDisk"/> and
2051 <link to="#findHardDisk"/> methods. Remembered base media
2052 are also returned as part of the <link to="#hardDisks"/> array and can
2053 be attached to virtual machines. See IMedium for more details.
2054
2055 If a differencing medium is to be opened by this method, the
2056 operation will succeed only if its parent medium and all ancestors,
2057 if any, are already known to this VirtualBox installation (for example,
2058 were opened by this method before).
2059
2060 This method tries to guess the storage format of the specified medium
2061 by reading medium data at the specified location.
2062
2063 If @a write is ReadWrite (which it should be), the image is opened for
2064 read/write access and must have according permissions, as VirtualBox
2065 may actually write status information into the disk's metadata sections.
2066
2067 Note that write access is required for all typical image usage in VirtualBox,
2068 since VirtualBox may need to write metadata such as a UUID into the image.
2069 The only exception is opening a source image temporarily for copying and
2070 cloning when the image will quickly be closed again.
2071
2072 Note that the format of the location string is storage format specific.
2073 See <link to="IMedium::location"/>, IMedium and
2074 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2075
2076 <result name="VBOX_E_FILE_ERROR">
2077 Invalid medium storage file location or could not find the medium
2078 at the specified location.
2079 </result>
2080 <result name="VBOX_E_IPRT_ERROR">
2081 Could not get medium storage format.
2082 </result>
2083 <result name="E_INVALIDARG">
2084 Invalid medium storage format.
2085 </result>
2086
2087 </desc>
2088 <param name="location" type="wstring" dir="in">
2089 <desc>
2090 Location of the storage unit that contains medium data in one of
2091 the supported storage formats.
2092 </desc>
2093 </param>
2094 <param name="accessMode" type="AccessMode" dir="in">
2095 <desc>
2096 Determines whether to open the image in read/write or read-only mode.
2097 </desc>
2098 </param>
2099 <param name="setImageId" type="boolean" dir="in">
2100 <desc>
2101 Select whether a new image UUID is set or not.
2102 </desc>
2103 </param>
2104 <param name="imageId" type="uuid" mod="string" dir="in">
2105 <desc>
2106 New UUID for the image. If an empty string is passed, then a new
2107 UUID is automatically created. Specifying a zero UUIDs is not valid.
2108 </desc>
2109 </param>
2110 <param name="setParentId" type="boolean" dir="in">
2111 <desc>
2112 Select whether a new parent UUID is set or not.
2113 </desc>
2114 </param>
2115 <param name="parentId" type="uuid" mod="string" dir="in">
2116 <desc>
2117 New parent UUID for the image. If an empty string is passed, then a
2118 new UUID is automatically created, provided @a setParentId is
2119 @c true. A zero UUID is valid.
2120 </desc>
2121 </param>
2122 <param name="medium" type="IMedium" dir="return">
2123 <desc>Opened medium object.</desc>
2124 </param>
2125 </method>
2126
2127 <method name="getHardDisk" const="yes">
2128 <desc>
2129 Returns a medium with the given UUID.
2130
2131 The medium with the given UUID must be known to this VirtualBox
2132 installation, i.e. it must be previously created by
2133 <link to="#createHardDisk"/> or opened by <link
2134 to="#openHardDisk"/>, or attached to some known virtual machine.
2135
2136 <result name="VBOX_E_OBJECT_NOT_FOUND">
2137 No medium object matching @a id found.
2138 </result>
2139
2140 </desc>
2141 <param name="id" type="uuid" mod="string" dir="in">
2142 <desc>UUID of the medium to look for.</desc>
2143 </param>
2144 <param name="medium" type="IMedium" dir="return">
2145 <desc>Found medium object.</desc>
2146 </param>
2147 </method>
2148
2149 <method name="findHardDisk">
2150 <desc>
2151 Returns a medium that uses the given location to store medium data.
2152
2153 The given medium must be known to this VirtualBox installation, i.e.
2154 it must be previously created by
2155 <link to="#createHardDisk"/> or opened by <link
2156 to="#openHardDisk"/>, or attached to some known virtual machine.
2157
2158 The search is done by comparing the value of the @a location argument to
2159 the <link to="IMedium::location"/> attribute of each known medium.
2160
2161 For locations represented by file names in the host's file system, the
2162 requested location can be a path relative to the
2163 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2164 only a file name without any path is given, the
2165 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2166 folder</link> will be prepended to the file name before searching. Note
2167 that on case sensitive file systems, a case sensitive comparison is
2168 performed, otherwise the case of symbols in the file path is ignored.
2169
2170 <result name="VBOX_E_OBJECT_NOT_FOUND">
2171 No medium object matching @a location found.
2172 </result>
2173
2174 </desc>
2175 <param name="location" type="wstring" dir="in">
2176 <desc>Location string to search for.</desc>
2177 </param>
2178 <param name="medium" type="IMedium" dir="return">
2179 <desc>Found medium object.</desc>
2180 </param>
2181 </method>
2182
2183 <method name="openDVDImage">
2184 <desc>
2185 Opens a CD/DVD image contained in the specified file of the supported
2186 format and assigns it the given UUID.
2187
2188 After the image is successfully opened by this method, it gets
2189 remembered by (known to) this VirtualBox installation and will be
2190 accessible through <link to="#getDVDImage"/> and
2191 <link to="#findDVDImage"/> methods. Remembered images are also
2192 returned as part of the <link to="#DVDImages"/> array and can be mounted
2193 to virtual machines. See IMedium for more details.
2194
2195 See <link to="IMedium::location"/> to get more details about the format
2196 of the location string.
2197
2198 <note>
2199 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2200 </note>
2201
2202 <result name="VBOX_E_FILE_ERROR">
2203 Invalid CD/DVD image file location or could not find the CD/DVD
2204 image at the specified location.
2205 </result>
2206 <result name="VBOX_E_INVALID_OBJECT_STATE">
2207 CD/DVD image already exists in the media registry.
2208 </result>
2209
2210 </desc>
2211 <param name="location" type="wstring" dir="in">
2212 <desc>
2213 Full path to the file that contains a valid CD/DVD image.
2214 </desc>
2215 </param>
2216 <param name="id" type="uuid" mod="string" dir="in">
2217 <desc>
2218 UUID to assign to the given image within this VirtualBox installation.
2219 If an empty (@c null) UUID is specified, the system will randomly
2220 generate a new UUID.
2221 </desc>
2222 </param>
2223 <param name="image" type="IMedium" dir="return">
2224 <desc>Opened CD/DVD image object.</desc>
2225 </param>
2226 </method>
2227
2228 <method name="getDVDImage">
2229 <desc>
2230 Returns a CD/DVD image with the given UUID.
2231
2232 The image with the given UUID must be known to this VirtualBox
2233 installation, i.e. it must be previously opened by <link
2234 to="#openDVDImage"/>, or mounted to some known virtual machine.
2235
2236 <result name="VBOX_E_OBJECT_NOT_FOUND">
2237 No matching DVD image found in the media registry.
2238 </result>
2239
2240 </desc>
2241 <param name="id" type="uuid" mod="string" dir="in">
2242 <desc>UUID of the image to look for.</desc>
2243 </param>
2244 <param name="image" type="IMedium" dir="return">
2245 <desc>Found CD/DVD image object.</desc>
2246 </param>
2247 </method>
2248
2249 <method name="findDVDImage">
2250 <desc>
2251 Returns a CD/DVD image with the given image location.
2252
2253 The image with the given UUID must be known to this VirtualBox
2254 installation, i.e. it must be previously opened by <link
2255 to="#openDVDImage"/>, or mounted to some known virtual machine.
2256
2257 The search is done by comparing the value of the @a location argument to
2258 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2259
2260 The requested location can be a path relative to the
2261 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2262 only a file name without any path is given, the
2263 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2264 folder</link> will be prepended to the file name before searching. Note
2265 that on case sensitive file systems, a case sensitive comparison is
2266 performed, otherwise the case in the file path is ignored.
2267
2268 <result name="VBOX_E_FILE_ERROR">
2269 Invalid image file location.
2270 </result>
2271 <result name="VBOX_E_OBJECT_NOT_FOUND">
2272 No matching DVD image found in the media registry.
2273 </result>
2274
2275 </desc>
2276 <param name="location" type="wstring" dir="in">
2277 <desc>CD/DVD image file path to look for.</desc>
2278 </param>
2279 <param name="image" type="IMedium" dir="return">
2280 <desc>Found CD/DVD image object.</desc>
2281 </param>
2282 </method>
2283
2284 <method name="openFloppyImage">
2285 <desc>
2286 Opens a floppy image contained in the specified file of the supported
2287 format and assigns it the given UUID.
2288
2289 After the image is successfully opened by this method, it gets
2290 remembered by (known to) this VirtualBox installation and will be
2291 accessible through <link to="#getFloppyImage"/> and
2292 <link to="#findFloppyImage"/> methods. Remembered images are also
2293 returned as part of the <link to="#floppyImages"/> array and can be
2294 mounted to virtual machines. See IMedium for more details.
2295
2296 See <link to="IMedium::location"/> to get more details about the format
2297 of the location string.
2298
2299 <result name="VBOX_E_FILE_ERROR">
2300 Invalid floppy image file location or could not find the floppy
2301 image at the specified location.
2302 </result>
2303 <result name="VBOX_E_INVALID_OBJECT_STATE">
2304 Floppy image already exists in the media registry.
2305 </result>
2306
2307 <note>
2308 Currently, only raw floppy images are supported by VirtualBox.
2309 </note>
2310 </desc>
2311 <param name="location" type="wstring" dir="in">
2312 <desc>
2313 Full path to the file that contains a valid floppy image.
2314 </desc>
2315 </param>
2316 <param name="id" type="uuid" mod="string" dir="in">
2317 <desc>
2318 UUID to assign to the given image file within this VirtualBox
2319 installation. If an empty (@c null) UUID is specified, the system will
2320 randomly generate a new UUID.
2321 </desc>
2322 </param>
2323 <param name="image" type="IMedium" dir="return">
2324 <desc>Opened floppy image object.</desc>
2325 </param>
2326 </method>
2327
2328 <method name="getFloppyImage">
2329 <desc>
2330 Returns a floppy image with the given UUID.
2331
2332 The image with the given UUID must be known to this VirtualBox
2333 installation, i.e. it must be previously opened by <link
2334 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2335
2336 <result name="VBOX_E_OBJECT_NOT_FOUND">
2337 No matching floppy image found in the media registry.
2338 </result>
2339
2340 </desc>
2341 <param name="id" type="uuid" mod="string" dir="in">
2342 <desc>UUID of the image to look for.</desc>
2343 </param>
2344 <param name="image" type="IMedium" dir="return">
2345 <desc>Found floppy image object.</desc>
2346 </param>
2347 </method>
2348
2349 <method name="findFloppyImage">
2350 <desc>
2351 Returns a floppy image with the given image location.
2352
2353 The image with the given UUID must be known to this VirtualBox
2354 installation, i.e. it must be previously opened by <link
2355 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2356
2357 The search is done by comparing the value of the @a location argument to
2358 the <link to="IMedium::location"/> attribute of each known floppy image.
2359
2360 The requested location can be a path relative to the
2361 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2362 only a file name without any path is given, the
2363 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2364 folder</link> will be prepended to the file name before searching. Note
2365 that on case sensitive file systems, a case sensitive comparison is
2366 performed, otherwise the case of symbols in the file path is ignored.
2367
2368 <result name="VBOX_E_FILE_ERROR">
2369 Invalid image file location.
2370 </result>
2371 <result name="VBOX_E_OBJECT_NOT_FOUND">
2372 No matching floppy image found in the media registry.
2373 </result>
2374
2375 </desc>
2376 <param name="location" type="wstring" dir="in">
2377 <desc>Floppy image file path to look for.</desc>
2378 </param>
2379 <param name="image" type="IMedium" dir="return">
2380 <desc>Found floppy image object.</desc>
2381 </param>
2382 </method>
2383
2384 <method name="getGuestOSType">
2385 <desc>
2386 Returns an object describing the specified guest OS type.
2387
2388 The requested guest OS type is specified using a string which is a
2389 mnemonic identifier of the guest operating system, such as
2390 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2391 particular virtual machine can be read or set using the
2392 <link to="IMachine::OSTypeId"/> attribute.
2393
2394 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2395 available guest OS type objects. Each object has an
2396 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2397 the guest OS this object describes.
2398
2399 <result name="E_INVALIDARG">
2400 @a id is not a valid Guest OS type.
2401 </result>
2402
2403 </desc>
2404 <param name="id" type="uuid" mod="string" dir="in">
2405 <desc>Guest OS type ID string.</desc>
2406 </param>
2407 <param name="type" type="IGuestOSType" dir="return">
2408 <desc>Guest OS type object.</desc>
2409 </param>
2410 </method>
2411
2412 <method name="createSharedFolder">
2413 <desc>
2414 Creates a new global shared folder by associating the given logical
2415 name with the given host path, adds it to the collection of shared
2416 folders and starts sharing it. Refer to the description of
2417 <link to="ISharedFolder"/> to read more about logical names.
2418 <note>
2419 In the current implementation, this operation is not
2420 implemented.
2421 </note>
2422 </desc>
2423 <param name="name" type="wstring" dir="in">
2424 <desc>Unique logical name of the shared folder.</desc>
2425 </param>
2426 <param name="hostPath" type="wstring" dir="in">
2427 <desc>Full path to the shared folder in the host file system.</desc>
2428 </param>
2429 <param name="writable" type="boolean" dir="in">
2430 <desc>Whether the share is writable or readonly</desc>
2431 </param>
2432 </method>
2433
2434 <method name="removeSharedFolder">
2435 <desc>
2436 Removes the global shared folder with the given name previously
2437 created by <link to="#createSharedFolder"/> from the collection of
2438 shared folders and stops sharing it.
2439 <note>
2440 In the current implementation, this operation is not
2441 implemented.
2442 </note>
2443 </desc>
2444 <param name="name" type="wstring" dir="in">
2445 <desc>Logical name of the shared folder to remove.</desc>
2446 </param>
2447 </method>
2448
2449 <method name="getExtraDataKeys">
2450 <desc>
2451 Returns an array representing the global extra data keys which currently
2452 have values defined.
2453 </desc>
2454 <param name="value" type="wstring" dir="return" safearray="yes">
2455 <desc>Array of extra data keys.</desc>
2456 </param>
2457 </method>
2458
2459 <method name="getExtraData">
2460 <desc>
2461 Returns associated global extra data.
2462
2463 If the requested data @a key does not exist, this function will
2464 succeed and return an empty string in the @a value argument.
2465
2466 <result name="VBOX_E_FILE_ERROR">
2467 Settings file not accessible.
2468 </result>
2469 <result name="VBOX_E_XML_ERROR">
2470 Could not parse the settings file.
2471 </result>
2472
2473 </desc>
2474 <param name="key" type="wstring" dir="in">
2475 <desc>Name of the data key to get.</desc>
2476 </param>
2477 <param name="value" type="wstring" dir="return">
2478 <desc>Value of the requested data key.</desc>
2479 </param>
2480 </method>
2481
2482 <method name="setExtraData">
2483 <desc>
2484 Sets associated global extra data.
2485
2486 If you pass @c null or empty string as a key @a value, the given @a key
2487 will be deleted.
2488
2489 <note>
2490 Before performing the actual data change, this method will ask all
2491 registered callbacks using the
2492 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2493 notification for a permission. If one of the callbacks refuses the
2494 new value, the change will not be performed.
2495 </note>
2496 <note>
2497 On success, the
2498 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2499 is called to inform all registered callbacks about a successful data
2500 change.
2501 </note>
2502
2503 <result name="VBOX_E_FILE_ERROR">
2504 Settings file not accessible.
2505 </result>
2506 <result name="VBOX_E_XML_ERROR">
2507 Could not parse the settings file.
2508 </result>
2509 <result name="E_ACCESSDENIED">
2510 Modification request refused.
2511 </result>
2512
2513 </desc>
2514 <param name="key" type="wstring" dir="in">
2515 <desc>Name of the data key to set.</desc>
2516 </param>
2517 <param name="value" type="wstring" dir="in">
2518 <desc>Value to assign to the key.</desc>
2519 </param>
2520 </method>
2521
2522 <method name="openSession">
2523 <desc>
2524 Opens a new direct session with the given virtual machine.
2525
2526 A direct session acts as a local lock on the given VM.
2527 There can be only one direct session open at a time for every
2528 virtual machine, protecting the VM from being manipulated by
2529 conflicting actions from different processes. Only after a
2530 direct session has been opened, one can change all VM settings
2531 and execute the VM in the process space of the session object.
2532
2533 Sessions therefore can be compared to mutex semaphores that
2534 lock a given VM for modification and execution.
2535 See <link to="ISession">ISession</link> for details.
2536
2537 <note>Unless you are writing a new VM frontend, you will not
2538 want to execute a VM in the current process. To spawn a new
2539 process that executes a VM, use
2540 <link to="IVirtualBox::openRemoteSession" />
2541 instead.</note>
2542
2543 Upon successful return, the session object can be used to
2544 get access to the machine and to the VM console.
2545
2546 In VirtualBox terminology, the machine becomes "mutable" after
2547 a session has been opened. Note that the "mutable" machine
2548 object, on which you may invoke IMachine methods to change its
2549 settings, will be a different object from the immutable IMachine
2550 objects returned by various IVirtualBox methods. To obtain a
2551 mutable IMachine object (upon which you can invoke settings methods),
2552 use the <link to="ISession::machine" /> attribute.
2553
2554 One must always call <link to="ISession::close" /> to release the
2555 lock on the machine, or the machine's state will eventually be
2556 set to "Aborted".
2557
2558 In other words, to change settings on a machine, the following
2559 sequence is typically performed:
2560
2561 <ol>
2562 <li>Call this method (openSession) to have a machine locked for
2563 the current session.</li>
2564
2565 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2566
2567 <li>Change the settings of the machine.</li>
2568
2569 <li>Call <link to="IMachine::saveSettings" />.</li>
2570
2571 <li>Close the session by calling <link to="ISession::close"/>.</li>
2572 </ol>
2573
2574 <result name="E_UNEXPECTED">
2575 Virtual machine not registered.
2576 </result>
2577 <result name="E_ACCESSDENIED">
2578 Process not started by OpenRemoteSession.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No matching virtual machine found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_VM_ERROR">
2587 Failed to assign machine to session.
2588 </result>
2589
2590 </desc>
2591 <param name="session" type="ISession" dir="in">
2592 <desc>
2593 Session object that will represent the opened session after
2594 successful method invocation. This object must not represent
2595 the already open session.
2596 <note>
2597 This session will be automatically closed if the
2598 VirtualBox server is terminated for some reason.
2599 </note>
2600 </desc>
2601 </param>
2602 <param name="machineId" type="uuid" mod="string" dir="in">
2603 <desc>ID of the virtual machine to open a session with.</desc>
2604 </param>
2605 </method>
2606
2607 <method name="openRemoteSession">
2608 <desc>
2609 Spawns a new process that executes a virtual machine (called a
2610 "remote session").
2611
2612 Opening a remote session causes the VirtualBox server to start a new
2613 process that opens a direct session with the given VM. As a result, the
2614 VM is locked by that direct session in the new process, preventing
2615 conflicting changes from other processes. Since sessions act as locks
2616 that prevent conflicting changes, one cannot open a remote session
2617 for a VM that already has another open session (direct or remote), or
2618 is currently in the process of opening one (see <link
2619 to="IMachine::sessionState"/>).
2620
2621 While the remote session still provides some level of control over the
2622 VM execution to the caller (using the <link to="IConsole" /> interface),
2623 not all VM settings are available for modification within the remote
2624 session context.
2625
2626 This operation can take some time (a new VM is started in a new process,
2627 for which memory and other resources need to be set up). Because of this,
2628 an <link to="IProgress" /> is returned to allow the caller to wait for this
2629 asynchronous operation to be completed. Until then, the remote session
2630 object remains in the closed state, and accessing the machine or its
2631 console through it is invalid. It is recommended to use
2632 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2633 completion.
2634
2635 As with all <link to="ISession" /> objects, it is recommended to call
2636 <link to="ISession::close" /> on the local session object once openRemoteSession()
2637 has been called. However, the session's state (see <link to="ISession::state" />)
2638 will not return to "Closed" until the remote session has also closed (i.e.
2639 until the VM is no longer running). In that case, however, the state of
2640 the session will automatically change back to "Closed".
2641
2642 Currently supported session types (values of the @a type
2643 argument) are:
2644 <ul>
2645 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2646 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2647 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2648 </ul>
2649
2650 The @a environment argument is a string containing definitions of
2651 environment variables in the following format:
2652 @code
2653 NAME[=VALUE]\n
2654 NAME[=VALUE]\n
2655 ...
2656 @endcode
2657 where <tt>\\n</tt> is the new line character. These environment
2658 variables will be appended to the environment of the VirtualBox server
2659 process. If an environment variable exists both in the server process
2660 and in this list, the value from this list takes precedence over the
2661 server's variable. If the value of the environment variable is
2662 omitted, this variable will be removed from the resulting environment.
2663 If the environment string is @c null or empty, the server environment
2664 is inherited by the started process as is.
2665
2666 <see>openExistingSession</see>
2667
2668 <result name="E_UNEXPECTED">
2669 Virtual machine not registered.
2670 </result>
2671 <result name="E_INVALIDARG">
2672 Invalid session type @a type.
2673 </result>
2674 <result name="VBOX_E_OBJECT_NOT_FOUND">
2675 No machine matching @a machineId found.
2676 </result>
2677 <result name="VBOX_E_INVALID_OBJECT_STATE">
2678 Session already open or being opened.
2679 </result>
2680 <result name="VBOX_E_IPRT_ERROR">
2681 Launching process for machine failed.
2682 </result>
2683 <result name="VBOX_E_VM_ERROR">
2684 Failed to assign machine to session.
2685 </result>
2686
2687 </desc>
2688 <param name="session" type="ISession" dir="in">
2689 <desc>
2690 Session object that will represent the opened remote session
2691 after successful method invocation (this object must not
2692 represent an already open session).
2693 </desc>
2694 </param>
2695 <param name="machineId" type="uuid" mod="string" dir="in">
2696 <desc>ID of the virtual machine to open a session with.</desc>
2697 </param>
2698 <param name="type" type="wstring" dir="in">
2699 <desc>
2700 Type of the remote session (case sensitive).
2701 </desc>
2702 </param>
2703 <param name="environment" type="wstring" dir="in">
2704 <desc>
2705 Environment to pass to the opened session.
2706 </desc>
2707 </param>
2708 <param name="progress" type="IProgress" dir="return">
2709 <desc>Progress object to track the operation completion.</desc>
2710 </param>
2711 </method>
2712
2713 <method name="openExistingSession">
2714 <desc>
2715 Opens a new remote session with the virtual machine for
2716 which a direct session is already open.
2717
2718 The remote session provides some level of control over the VM
2719 execution (using the IConsole interface) to the caller; however,
2720 within the remote session context, not all VM settings are available
2721 for modification.
2722
2723 As opposed to <link to="#openRemoteSession"/>, the number of
2724 remote sessions opened this way is not limited by the API
2725
2726 <note>
2727 It is an error to open a remote session with the machine that
2728 doesn't have an open direct session.
2729 </note>
2730
2731 <result name="E_UNEXPECTED">
2732 Virtual machine not registered.
2733 </result>
2734 <result name="VBOX_E_OBJECT_NOT_FOUND">
2735 No machine matching @a machineId found.
2736 </result>
2737 <result name="VBOX_E_INVALID_OBJECT_STATE">
2738 Session already open or being opened.
2739 </result>
2740 <result name="VBOX_E_INVALID_SESSION_STATE">
2741 Direct session state not Open.
2742 </result>
2743 <result name="VBOX_E_VM_ERROR">
2744 Failed to get console object from direct session or assign
2745 machine to session.
2746 </result>
2747
2748 <see>openRemoteSession</see>
2749 </desc>
2750 <param name="session" type="ISession" dir="in">
2751 <desc>
2752 Session object that will represent the open remote session
2753 after successful method invocation. This object must not
2754 represent an already open session.
2755 <note>
2756 This session will be automatically closed when the peer
2757 (direct) session dies or gets closed.
2758 </note>
2759 </desc>
2760 </param>
2761 <param name="machineId" type="uuid" mod="string" dir="in">
2762 <desc>ID of the virtual machine to open a session with.</desc>
2763 </param>
2764 </method>
2765
2766 <method name="registerCallback">
2767 <desc>
2768 Registers a new global VirtualBox callback. The methods of the given
2769 callback object will be called by VirtualBox when an appropriate
2770 event occurs.
2771
2772 <result name="E_INVALIDARG">
2773 A @c null callback cannot be registered.
2774 </result>
2775
2776 </desc>
2777 <param name="callback" type="IVirtualBoxCallback" dir="in">
2778 <desc>Callback object to register.</desc>
2779 </param>
2780 </method>
2781
2782 <method name="unregisterCallback">
2783 <desc>
2784 Unregisters the previously registered global VirtualBox callback.
2785
2786 <result name="E_INVALIDARG">
2787 Specified @a callback not registered.
2788 </result>
2789
2790 </desc>
2791 <param name="callback" type="IVirtualBoxCallback" dir="in">
2792 <desc>Callback object to unregister.</desc>
2793 </param>
2794 </method>
2795
2796 <method name="waitForPropertyChange">
2797 <desc>
2798 Blocks the caller until any of the properties represented by the
2799 @a what argument changes the value or until the given timeout interval
2800 expires.
2801
2802 The @a what argument is a comma separated list of property masks that
2803 describe properties the caller is interested in. The property mask is
2804 a string in the following format:
2805
2806 <pre>
2807 [[group.]subgroup.]name
2808 </pre>
2809
2810 where @c name is the property name and @c group, @c subgroup are zero
2811 or more property group specifiers. Each element (group or name) in
2812 the property mask may be either a Latin string or an asterisk symbol
2813 (@c "*") which is used to match any string for the given element. A
2814 property mask that doesn't contain asterisk symbols represents a
2815 single fully qualified property name.
2816
2817 Groups in the fully qualified property name go from more generic (the
2818 left-most part) to more specific (the right-most part). The first
2819 element is usually a name of the object the property belongs to. The
2820 second element may be either a property name, or a child object name,
2821 or an index if the preceding element names an object which is one of
2822 many objects of the same type. This way, property names form a
2823 hierarchy of properties. Here are some examples of property names:
2824
2825 <table>
2826 <tr>
2827 <td><tt>VirtualBox.version</tt></td>
2828 <td><link to="IVirtualBox::version"/> property</td>
2829 </tr>
2830 <tr>
2831 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2832 <td><link to="IMachine::name"/> property of the machine with the
2833 given UUID</td>
2834 </tr>
2835 </table>
2836
2837 Most property names directly correspond to the properties of objects
2838 (components) provided by the VirtualBox library and may be used to
2839 track changes to these properties. However, there may be
2840 pseudo-property names that don't correspond to any existing object's
2841 property directly, as well as there may be object properties that
2842 don't have a corresponding property name that is understood by this
2843 method, and therefore changes to such properties cannot be
2844 tracked. See individual object's property descriptions to get a
2845 fully qualified property name that can be used with this method (if
2846 any).
2847
2848 There is a special property mask @c "*" (i.e. a string consisting of a
2849 single asterisk symbol) that can be used to match all properties.
2850 Below are more examples of property masks:
2851
2852 <table>
2853 <tr>
2854 <td><tt>VirtualBox.*</tt></td>
2855 <td>Track all properties of the VirtualBox object</td>
2856 </tr>
2857 <tr>
2858 <td><tt>Machine.*.name</tt></td>
2859 <td>Track changes to the <link to="IMachine::name"/> property of
2860 all registered virtual machines</td>
2861 </tr>
2862 </table>
2863
2864 <note>
2865 This function is not implemented in the current version of the
2866 product.
2867 </note>
2868 </desc>
2869 <param name="what" type="wstring" dir="in">
2870 <desc>Comma separated list of property masks.</desc>
2871 </param>
2872 <param name="timeout" type="unsigned long" dir="in">
2873 <desc>
2874 Wait timeout in milliseconds.
2875 Specify -1 for an indefinite wait.
2876 </desc>
2877 </param>
2878 <param name="changed" type="wstring" dir="out">
2879 <desc>
2880 Comma separated list of properties that have been changed and caused
2881 this method to return to the caller.
2882 </desc>
2883 </param>
2884 <param name="values" type="wstring" dir="out">
2885 <desc>Reserved, not currently used.</desc>
2886 </param>
2887 </method>
2888
2889 <!--method name="createDHCPServerForInterface">
2890 <desc>
2891 Creates a dhcp server settings to be used for the given interface
2892 <result name="E_INVALIDARG">
2893 Host network interface @a name already exists.
2894 </result>
2895 </desc>
2896 <param name="interface" type="IHostNetworkInterface" dir="in">
2897 <desc>Network Interface</desc>
2898 </param>
2899 <param name="server" type="IDHCPServer" dir="out">
2900 <desc>Dhcp server settings</desc>
2901 </param>
2902 </method-->
2903
2904 <method name="createDHCPServer">
2905 <desc>
2906 Creates a dhcp server settings to be used for the given internal network name
2907 <result name="E_INVALIDARG">
2908 Host network interface @a name already exists.
2909 </result>
2910 </desc>
2911 <param name="name" type="wstring" dir="in">
2912 <desc>server name</desc>
2913 </param>
2914 <param name="server" type="IDHCPServer" dir="return">
2915 <desc>Dhcp server settings</desc>
2916 </param>
2917 </method>
2918
2919 <method name="findDHCPServerByNetworkName">
2920 <desc>
2921 Searches a dhcp server settings to be used for the given internal network name
2922 <result name="E_INVALIDARG">
2923 Host network interface @a name already exists.
2924 </result>
2925
2926 </desc>
2927 <param name="name" type="wstring" dir="in">
2928 <desc>server name</desc>
2929 </param>
2930 <param name="server" type="IDHCPServer" dir="return">
2931 <desc>Dhcp server settings</desc>
2932 </param>
2933 </method>
2934
2935 <!--method name="findDHCPServerForInterface">
2936 <desc>
2937 Searches a dhcp server settings to be used for the given interface
2938 <result name="E_INVALIDARG">
2939 Host network interface @a name already exists.
2940 </result>
2941 </desc>
2942 <param name="interface" type="IHostNetworkInterface" dir="in">
2943 <desc>Network Interface</desc>
2944 </param>
2945 <param name="server" type="IDHCPServer" dir="out">
2946 <desc>Dhcp server settings</desc>
2947 </param>
2948 </method-->
2949
2950 <method name="removeDHCPServer">
2951 <desc>
2952 Removes the dhcp server settings
2953 <result name="E_INVALIDARG">
2954 Host network interface @a name already exists.
2955 </result>
2956 </desc>
2957 <param name="server" type="IDHCPServer" dir="in">
2958 <desc>Dhcp server settings to be removed</desc>
2959 </param>
2960 </method>
2961
2962 </interface>
2963
2964 <!--
2965 // IVFSExplorer
2966 /////////////////////////////////////////////////////////////////////////
2967 -->
2968
2969 <enum
2970 name="VFSType"
2971 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2972 >
2973 <desc>
2974 Virtual file systems supported by VFSExplorer.
2975 </desc>
2976
2977 <const name="File" value="1" />
2978 <const name="Cloud" value="2" />
2979 <const name="S3" value="3" />
2980 <const name="WebDav" value="4" />
2981 </enum>
2982
2983 <enum
2984 name="VFSFileType"
2985 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2986 >
2987 <desc>
2988 File types known by VFSExplorer.
2989 </desc>
2990
2991 <const name="Unknown" value="1" />
2992 <const name="Fifo" value="2" />
2993 <const name="DevChar" value="3" />
2994 <const name="Directory" value="4" />
2995 <const name="DevBlock" value="5" />
2996 <const name="File" value="6" />
2997 <const name="SymLink" value="7" />
2998 <const name="Socket" value="8" />
2999 <const name="WhiteOut" value="9" />
3000 </enum>
3001
3002 <interface
3003 name="IVFSExplorer" extends="$unknown"
3004 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3005 wsmap="managed"
3006 >
3007 <desc>
3008 The VFSExplorer interface unifies access to different file system
3009 types. This includes local file systems as well remote file systems like
3010 S3. For a list of supported types see <link to="VFSType" />.
3011 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3012 </desc>
3013
3014 <attribute name="path" type="wstring" readonly="yes">
3015 <desc>Returns the current path in the virtual file system.</desc>
3016 </attribute>
3017
3018 <attribute name="type" type="VFSType" readonly="yes">
3019 <desc>Returns the file system type which is currently in use.</desc>
3020 </attribute>
3021
3022 <method name="update">
3023 <desc>Updates the internal list of files/directories from the
3024 current directory level. Use <link to="#entryList" /> to get the full list
3025 after a call to this method.</desc>
3026
3027 <param name="aProgress" type="IProgress" dir="return">
3028 <desc>Progress object to track the operation completion.</desc>
3029 </param>
3030 </method>
3031
3032 <method name="cd">
3033 <desc>Change the current directory level.</desc>
3034
3035 <param name="aDir" type="wstring" dir="in">
3036 <desc>The name of the directory to go in.</desc>
3037 </param>
3038
3039 <param name="aProgress" type="IProgress" dir="return">
3040 <desc>Progress object to track the operation completion.</desc>
3041 </param>
3042 </method>
3043
3044 <method name="cdUp">
3045 <desc>Go one directory upwards from the current directory level.</desc>
3046
3047 <param name="aProgress" type="IProgress" dir="return">
3048 <desc>Progress object to track the operation completion.</desc>
3049 </param>
3050 </method>
3051
3052 <method name="entryList">
3053 <desc>Returns a list of files/directories after a call to <link
3054 to="#update" />. The user is responsible for keeping this internal
3055 list up do date.</desc>
3056
3057 <param name="aNames" type="wstring" safearray="yes" dir="out">
3058 <desc>The list of names for the entries.</desc>
3059 </param>
3060
3061 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3062 <desc>The list of types for the entries.</desc>
3063 </param>
3064 </method>
3065
3066 <method name="exists">
3067 <desc>Checks if the given file list exists in the current directory
3068 level.</desc>
3069
3070 <param name="aNames" type="wstring" safearray="yes" dir="in">
3071 <desc>The names to check.</desc>
3072 </param>
3073
3074 <param name="aExists" type="wstring" safearray="yes" dir="return">
3075 <desc>The names which exist.</desc>
3076 </param>
3077 </method>
3078
3079 <method name="remove">
3080 <desc>Deletes the given files in the current directory level.</desc>
3081
3082 <param name="aNames" type="wstring" safearray="yes" dir="in">
3083 <desc>The names to remove.</desc>
3084 </param>
3085
3086 <param name="aProgress" type="IProgress" dir="return">
3087 <desc>Progress object to track the operation completion.</desc>
3088 </param>
3089 </method>
3090
3091 </interface>
3092
3093 <!--
3094 // IAppliance
3095 /////////////////////////////////////////////////////////////////////////
3096 -->
3097
3098 <interface
3099 name="IAppliance" extends="$unknown"
3100 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3101 wsmap="managed"
3102 >
3103 <desc>
3104 Represents a platform-independent appliance in OVF format. An instance of this is returned
3105 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3106 appliances with VirtualBox.
3107
3108 The OVF standard suggests two different physical file formats:
3109
3110 <ol>
3111 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3112 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3113 this descriptor file references other files, as OVF appliances distributed as a set of
3114 files most likely do, those files must be in the same directory as the descriptor file.</li>
3115
3116 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3117 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3118 files and optionally other files.
3119
3120 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3121 be added with a later version.</li>
3122 </ol>
3123
3124 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3125 <link to="IMachine" /> involves the following sequence of API calls:
3126
3127 <ol>
3128 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3129 </li>
3130
3131 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3132 would like to import. So long as this file is syntactically valid, this will succeed
3133 and return an instance of IAppliance that contains the parsed data from the OVF file.
3134 </li>
3135
3136 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3137 contents of the IAppliance attributes accordingly. These can be inspected by a
3138 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3139 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3140 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3141 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3142 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3143 The GUI can then give the user the option to confirm and/or change these suggestions.
3144 </li>
3145
3146 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3147 virtual system to override the suggestions made by the interpret() routine.
3148 </li>
3149
3150 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3151 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3152 virtual system descriptions.
3153 </li>
3154 </ol>
3155
3156 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3157
3158 <ol>
3159 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3160 an empty IAppliance object.
3161 </li>
3162
3163 <li>For each machine you would like to export, call <link to="IMachine::export" />
3164 with the IAppliance object you just created. This creates an instance of
3165 <link to="IVirtualSystemDescription" /> inside the appliance.
3166 </li>
3167
3168 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3169 virtual system to override the suggestions made by the export() routine.
3170 </li>
3171
3172 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3173 file written.</li>
3174 </ol>
3175
3176 </desc>
3177
3178 <attribute name="path" type="wstring" readonly="yes">
3179 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3180 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3181 <link to="#write" /> (for export).
3182 This attribute is empty until one of these methods has been called.
3183 </desc>
3184 </attribute>
3185
3186 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3187 <desc>
3188 Array of virtual disk definitions. One such description exists for each
3189 disk definition in the OVF; each string array item represents one such piece of
3190 disk information, with the information fields separated by tab (\\t) characters.
3191
3192 The caller should be prepared for additional fields being appended to
3193 this string in future versions of VirtualBox and therefore check for
3194 the number of tabs in the strings returned.
3195
3196 In the current version, the following eight fields are returned per string
3197 in the array:
3198
3199 <ol>
3200 <li>Disk ID (unique string identifier given to disk)</li>
3201
3202 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3203
3204 <li>Populated size (optional unsigned integer indicating the current size of the
3205 disk; can be approximate; -1 if unspecified)</li>
3206
3207 <li>Format (string identifying the disk format, typically
3208 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3209
3210 <li>Reference (where to find the disk image, typically a file name; if empty,
3211 then the disk should be created on import)</li>
3212
3213 <li>Image size (optional unsigned integer indicating the size of the image,
3214 which need not necessarily be the same as the values specified above, since
3215 the image may be compressed or sparse; -1 if not specified)</li>
3216
3217 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3218 presently unsupported and always -1)</li>
3219
3220 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3221 </ol>
3222 </desc>
3223 </attribute>
3224
3225 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3226 <desc> Array of virtual system descriptions. One such description is created
3227 for each virtual system found in the OVF.
3228 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3229 (for export) has been called.
3230 </desc>
3231 </attribute>
3232
3233 <method name="read">
3234 <desc>
3235 Reads an OVF file into the appliance object.
3236
3237 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3238 mere fact that this method returns successfully does not mean that VirtualBox supports all
3239 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3240 </desc>
3241 <param name="file" type="wstring" dir="in">
3242 <desc>
3243 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3244 on whether the appliance is distributed as a set of files or as a single file, respectively).
3245 </desc>
3246 </param>
3247 <param name="aProgress" type="IProgress" dir="return">
3248 <desc></desc>
3249 </param>
3250 </method>
3251
3252 <method name="interpret">
3253 <desc>
3254 Interprets the OVF data that was read when the appliance was constructed. After
3255 calling this method, one can inspect the
3256 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3257 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3258 the appliance.
3259
3260 Calling this method is the second step of importing an appliance into VirtualBox;
3261 see <link to="IAppliance" /> for an overview.
3262
3263 After calling this method, one should call <link to="#getWarnings" /> to find out
3264 if problems were encountered during the processing which might later lead to
3265 errors.
3266 </desc>
3267 </method>
3268
3269 <method name="importMachines">
3270 <desc>
3271 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3272 and other interfaces that match the information contained in the appliance as
3273 closely as possible, as represented by the import instructions in the
3274 <link to="#virtualSystemDescriptions" /> array.
3275
3276 Calling this method is the final step of importing an appliance into VirtualBox;
3277 see <link to="IAppliance" /> for an overview.
3278
3279 Since importing the appliance will most probably involve copying and converting
3280 disk images, which can take a long time, this method operates asynchronously and
3281 returns an IProgress object to allow the caller to monitor the progress.
3282 </desc>
3283
3284 <param name="aProgress" type="IProgress" dir="return">
3285 <desc></desc>
3286 </param>
3287 </method>
3288
3289 <method name="createVFSExplorer">
3290 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3291
3292 <param name="aUri" type="wstring" dir="in">
3293 <desc>The URI describing the file system to use.</desc>
3294 </param>
3295
3296 <param name="aExplorer" type="IVFSExplorer" dir="return">
3297 <desc></desc>
3298 </param>
3299 </method>
3300
3301 <method name="write">
3302 <desc>
3303 Writes the contents of the appliance exports into a new OVF file.
3304
3305 Calling this method is the final step of exporting an appliance from VirtualBox;
3306 see <link to="IAppliance" /> for an overview.
3307
3308 Since exporting the appliance will most probably involve copying and converting
3309 disk images, which can take a long time, this method operates asynchronously and
3310 returns an IProgress object to allow the caller to monitor the progress.
3311 </desc>
3312 <param name="format" type="wstring" dir="in">
3313 <desc>
3314 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3315 future versions of VirtualBox may support additional formats.
3316 </desc>
3317 </param>
3318 <param name="path" type="wstring" dir="in">
3319 <desc>
3320 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3321 on whether the appliance is distributed as a set of files or as a single file, respectively).
3322 </desc>
3323 </param>
3324 <param name="aProgress" type="IProgress" dir="return">
3325 <desc>Progress object to track the operation completion.</desc>
3326 </param>
3327 </method>
3328
3329 <method name="getWarnings">
3330 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3331
3332 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3333 <desc></desc>
3334 </param>
3335 </method>
3336
3337 </interface>
3338
3339 <enum
3340 name="VirtualSystemDescriptionType"
3341 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3342 >
3343 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3344 a configuration value.</desc>
3345
3346 <const name="Ignore" value="1" />
3347 <const name="OS" value="2" />
3348 <const name="Name" value="3" />
3349 <const name="Product" value="4" />
3350 <const name="Vendor" value="5" />
3351 <const name="Version" value="6" />
3352 <const name="ProductUrl" value="7" />
3353 <const name="VendorUrl" value="8" />
3354 <const name="Description" value="9" />
3355 <const name="License" value="10" />
3356 <const name="Miscellaneous" value="11" />
3357 <const name="CPU" value="12" />
3358 <const name="Memory" value="13" />
3359 <const name="HardDiskControllerIDE" value="14" />
3360 <const name="HardDiskControllerSATA" value="15" />
3361 <const name="HardDiskControllerSCSI" value="16" />
3362 <const name="HardDiskImage" value="17" />
3363 <const name="Floppy" value="18" />
3364 <const name="CDROM" value="19" />
3365 <const name="NetworkAdapter" value="20" />
3366 <const name="USBController" value="21" />
3367 <const name="SoundCard" value="22" />
3368
3369 </enum>
3370
3371 <enum
3372 name="VirtualSystemDescriptionValueType"
3373 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3374 >
3375 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3376 type to fetch.</desc>
3377
3378 <const name="Reference" value="1" />
3379 <const name="Original" value="2" />
3380 <const name="Auto" value="3" />
3381 <const name="ExtraConfig" value="4" />
3382
3383 </enum>
3384
3385 <interface
3386 name="IVirtualSystemDescription" extends="$unknown"
3387 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3388 wsmap="managed"
3389 >
3390
3391 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3392 After <link to="IAppliance::interpret" /> has been called, that array contains
3393 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3394 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3395 into VirtualBox.
3396 </desc>
3397
3398 <attribute name="count" type="unsigned long" readonly="yes">
3399 <desc>Return the number of virtual system description entries.</desc>
3400 </attribute>
3401
3402 <method name="getDescription">
3403 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3404 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3405
3406 The list below identifies the value sets that are possible depending on the
3407 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3408 the array item with the same index in aOvfValues[] will contain the original value as contained
3409 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3410 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3411 the aExtraConfigValues[] array item may also be used.
3412
3413 <ul>
3414 <li>
3415 "OS": the guest operating system type. There must be exactly one such array item on import. The
3416 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3417 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3418 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3419 </li>
3420 <li>
3421 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3422 if none is present on import, then an automatic name will be created from the operating system
3423 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3424 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3425 <link to="IMachine" /> name that does not exist yet.
3426 </li>
3427 <li>
3428 "Description": an arbitrary description.
3429 </li>
3430 <li>
3431 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3432 code to display such a license for agreement; the Main API does not enforce any such policy.
3433 </li>
3434 <li>
3435 Miscellaneous: reserved for future use.
3436 </li>
3437 <li>
3438 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3439 </li>
3440 <li>
3441 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3442 is present on import, then VirtualBox will set a meaningful default based on the operating system
3443 type.
3444 </li>
3445 <li>
3446 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3447 has no value in aOvfValues[] or aVBoxValues[].
3448 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3449 type can use to specify which hard disk controller a virtual disk should be connected to.
3450 </li>
3451 <li>
3452 "HarddiskControllerSATA": an SATA 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 be used as with IDE controllers (see above).
3455 </li>
3456 <li>
3457 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3458 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3459 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3460 </li>
3461 <li>
3462 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3463 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3464
3465 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3466 a path since the image file should be in the same location as the OVF file itself), whereas the
3467 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3468 hard disk image. This means that on import the image will be copied and converted from the
3469 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3470 On import, the target image will also be registered with VirtualBox.
3471
3472 The matching item in the aExtraConfigValues[] array must contain a string of the following
3473 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3474 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3475 the image to. That number must be the index of an array item with one of the hard disk controller
3476 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3477 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3478 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3479 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3480 </li>
3481 <li>
3482 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3483 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3484 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3485 </li>
3486 <li>
3487 "USBController": a USB controller. There can be at most one such item. If and only if such an
3488 item ispresent, USB support will be enabled for the new virtual machine.
3489 </li>
3490 <li>
3491 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3492 present, sound support will be enabled for the new virtual machine. Note that the virtual
3493 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3494 may be different from the virtual soundcard expected by the appliance.
3495 </li>
3496 </ul>
3497
3498 </desc>
3499
3500 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3501 <desc></desc>
3502 </param>
3503
3504 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3505 <desc></desc>
3506 </param>
3507
3508 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3509 <desc></desc>
3510 </param>
3511
3512 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3513 <desc></desc>
3514 </param>
3515
3516 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3517 <desc></desc>
3518 </param>
3519
3520 </method>
3521
3522 <method name="getDescriptionByType">
3523 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3524 should be returned.</desc>
3525
3526 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3531 <desc></desc>
3532 </param>
3533
3534 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3535 <desc></desc>
3536 </param>
3537
3538 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3539 <desc></desc>
3540 </param>
3541
3542 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3543 <desc></desc>
3544 </param>
3545
3546 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3547 <desc></desc>
3548 </param>
3549
3550 </method>
3551
3552 <method name="getValuesByType">
3553 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3554 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3555 values.</desc>
3556
3557 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3558 <desc></desc>
3559 </param>
3560
3561 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3562 <desc></desc>
3563 </param>
3564
3565 <param name="aValues" type="wstring" dir="return" safearray="yes">
3566 <desc></desc>
3567 </param>
3568
3569 </method>
3570
3571 <method name="setFinalValues">
3572 <desc>
3573 This method allows the appliance's user to change the configuration for the virtual
3574 system descriptions. For each array item returned from <link to="#getDescription" />,
3575 you must pass in one boolean value and one configuration value.
3576
3577 Each item in the boolean array determines whether the particular configuration item
3578 should be enabled.
3579 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3580 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3581 and SoundCard.
3582
3583 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3584 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3585 the configuration remains unchanged. Please see the documentation for getDescription()
3586 for valid configuration values for the individual array item types. If the
3587 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3588 </desc>
3589
3590 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3591 <desc></desc>
3592 </param>
3593
3594 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3595 <desc></desc>
3596 </param>
3597
3598 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3599 <desc></desc>
3600 </param>
3601 </method>
3602
3603 <method name="addDescription">
3604 <desc>
3605 This method adds an additional description entry to the stack of already
3606 available descriptions for this virtual system. This is handy for writing
3607 values which aren't directly supported by VirtualBox. One example would
3608 be the License type of <link to="VirtualSystemDescriptionType" />.
3609 </desc>
3610
3611 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3612 <desc></desc>
3613 </param>
3614
3615 <param name="aVBoxValue" type="wstring" dir="in">
3616 <desc></desc>
3617 </param>
3618
3619 <param name="aExtraConfigValue" type="wstring" dir="in">
3620 <desc></desc>
3621 </param>
3622 </method>
3623 </interface>
3624
3625
3626 <!--
3627 // IMachine
3628 /////////////////////////////////////////////////////////////////////////
3629 -->
3630
3631 <interface
3632 name="IInternalMachineControl" extends="$unknown"
3633 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3634 internal="yes"
3635 wsmap="suppress"
3636 >
3637 <method name="setRemoveSavedState">
3638 <desc>
3639 Updates the flag whether saved state is removed on a machine state
3640 change from Saved to PoweredOff.
3641 </desc>
3642 <param name="aRemove" type="boolean" dir="in"/>
3643 </method>
3644
3645 <method name="updateState">
3646 <desc>
3647 Updates the VM state.
3648 <note>
3649 This operation will also update the settings file with
3650 the correct information about the saved state file
3651 and delete this file from disk when appropriate.
3652 </note>
3653 </desc>
3654 <param name="state" type="MachineState" dir="in"/>
3655 </method>
3656
3657 <method name="getIPCId">
3658 <param name="id" type="wstring" dir="return"/>
3659 </method>
3660
3661 <method name="runUSBDeviceFilters">
3662 <desc>
3663 Asks the server to run USB devices filters of the associated
3664 machine against the given USB device and tell if there is
3665 a match.
3666 <note>
3667 Intended to be used only for remote USB devices. Local
3668 ones don't require to call this method (this is done
3669 implicitly by the Host and USBProxyService).
3670 </note>
3671 </desc>
3672 <param name="device" type="IUSBDevice" dir="in"/>
3673 <param name="matched" type="boolean" dir="out"/>
3674 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3675 </method>
3676
3677 <method name="captureUSBDevice">
3678 <desc>
3679 Requests a capture of the given host USB device.
3680 When the request is completed, the VM process will
3681 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3682 notification.
3683 </desc>
3684 <param name="id" type="uuid" mod="string" dir="in"/>
3685 </method>
3686
3687 <method name="detachUSBDevice">
3688 <desc>
3689 Notification that a VM is going to detach (@a done = @c false) or has
3690 already detached (@a done = @c true) the given USB device.
3691 When the @a done = @c true request is completed, the VM process will
3692 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3693 notification.
3694 <note>
3695 In the @a done = @c true case, the server must run its own filters
3696 and filters of all VMs but this one on the detached device
3697 as if it were just attached to the host computer.
3698 </note>
3699 </desc>
3700 <param name="id" type="uuid" mod="string" dir="in"/>
3701 <param name="done" type="boolean" dir="in"/>
3702 </method>
3703
3704 <method name="autoCaptureUSBDevices">
3705 <desc>
3706 Requests a capture all matching USB devices attached to the host.
3707 When the request is completed, the VM process will
3708 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3709 notification per every captured device.
3710 </desc>
3711 </method>
3712
3713 <method name="detachAllUSBDevices">
3714 <desc>
3715 Notification that a VM that is being powered down. The done
3716 parameter indicates whether which stage of the power down
3717 we're at. When @a done = @c false the VM is announcing its
3718 intentions, while when @a done = @c true the VM is reporting
3719 what it has done.
3720 <note>
3721 In the @a done = @c true case, the server must run its own filters
3722 and filters of all VMs but this one on all detach devices as
3723 if they were just attached to the host computer.
3724 </note>
3725 </desc>
3726 <param name="done" type="boolean" dir="in"/>
3727 </method>
3728
3729 <method name="onSessionEnd">
3730 <desc>
3731 Triggered by the given session object when the session is about
3732 to close normally.
3733 </desc>
3734 <param name="session" type="ISession" dir="in">
3735 <desc>Session that is being closed</desc>
3736 </param>
3737 <param name="progress" type="IProgress" dir="return">
3738 <desc>
3739 Used to wait until the corresponding machine is actually
3740 dissociated from the given session on the server.
3741 Returned only when this session is a direct one.
3742 </desc>
3743 </param>
3744 </method>
3745
3746 <method name="beginSavingState">
3747 <desc>
3748 Called by the VM process to inform the server it wants to
3749 save the current state and stop the VM execution.
3750 </desc>
3751 <param name="progress" type="IProgress" dir="in">
3752 <desc>
3753 Progress object created by the VM process to wait until
3754 the state is saved.
3755 </desc>
3756 </param>
3757 <param name="stateFilePath" type="wstring" dir="out">
3758 <desc>
3759 File path the VM process must save the execution state to.
3760 </desc>
3761 </param>
3762 </method>
3763
3764 <method name="endSavingState">
3765 <desc>
3766 Called by the VM process to inform the server that saving
3767 the state previously requested by #beginSavingState is either
3768 successfully finished or there was a failure.
3769
3770 <result name="VBOX_E_FILE_ERROR">
3771 Settings file not accessible.
3772 </result>
3773 <result name="VBOX_E_XML_ERROR">
3774 Could not parse the settings file.
3775 </result>
3776
3777 </desc>
3778
3779 <param name="success" type="boolean" dir="in">
3780 <desc>@c true to indicate success and @c false otherwise.
3781 </desc>
3782 </param>
3783 </method>
3784
3785 <method name="adoptSavedState">
3786 <desc>
3787 Gets called by IConsole::adoptSavedState.
3788 <result name="VBOX_E_FILE_ERROR">
3789 Invalid saved state file path.
3790 </result>
3791 </desc>
3792 <param name="savedStateFile" type="wstring" dir="in">
3793 <desc>Path to the saved state file to adopt.</desc>
3794 </param>
3795 </method>
3796
3797 <method name="beginTakingSnapshot">
3798 <desc>
3799 Called from the VM process to request from the server to perform the
3800 server-side actions of creating a snapshot (creating differencing images
3801 and the snapshot object).
3802
3803 <result name="VBOX_E_FILE_ERROR">
3804 Settings file not accessible.
3805 </result>
3806 <result name="VBOX_E_XML_ERROR">
3807 Could not parse the settings file.
3808 </result>
3809 </desc>
3810 <param name="initiator" type="IConsole" dir="in">
3811 <desc>The console object that initiated this call.</desc>
3812 </param>
3813 <param name="name" type="wstring" dir="in">
3814 <desc>Snapshot name.</desc>
3815 </param>
3816 <param name="description" type="wstring" dir="in">
3817 <desc>Snapshot description.</desc>
3818 </param>
3819 <param name="consoleProgress" type="IProgress" dir="in">
3820 <desc>
3821 Progress object created by the VM process tracking the
3822 snapshot's progress. This has the following sub-operations:
3823 <ul>
3824 <li>setting up (weight 1);</li>
3825 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3826 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3827 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3828 <li>finishing up (weight 1)</li>
3829 </ul>
3830 </desc>
3831 </param>
3832 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3833 <desc>
3834 Whether this is an online snapshot (i.e. the machine is running).
3835 </desc>
3836 </param>
3837 <param name="stateFilePath" type="wstring" dir="out">
3838 <desc>
3839 File path the VM process must save the execution state to.
3840 </desc>
3841 </param>
3842 </method>
3843
3844 <method name="endTakingSnapshot">
3845 <desc>
3846 Called by the VM process to inform the server that the snapshot
3847 previously requested by #beginTakingSnapshot is either
3848 successfully taken or there was a failure.
3849 </desc>
3850
3851 <param name="success" type="boolean" dir="in">
3852 <desc>@c true to indicate success and @c false otherwise</desc>
3853 </param>
3854 </method>
3855
3856 <method name="discardSnapshot">
3857 <desc>
3858 Gets called by IConsole::discardSnapshot.
3859 <result name="VBOX_E_INVALID_OBJECT_STATE">
3860 Snapshot has more than one child snapshot.
3861 </result>
3862 </desc>
3863 <param name="initiator" type="IConsole" dir="in">
3864 <desc>The console object that initiated this call.</desc>
3865 </param>
3866 <param name="id" type="uuid" mod="string" dir="in">
3867 <desc>UUID of the snapshot to discard.</desc>
3868 </param>
3869 <param name="machineState" type="MachineState" dir="out">
3870 <desc>New machine state after this operation is started.</desc>
3871 </param>
3872 <param name="progress" type="IProgress" dir="return">
3873 <desc>Progress object to track the operation completion.</desc>
3874 </param>
3875 </method>
3876
3877 <method name="discardCurrentState">
3878 <desc>
3879 Gets called by IConsole::discardCurrentState.
3880 <result name="VBOX_E_INVALID_OBJECT_STATE">
3881 Virtual machine does not have any snapshot.
3882 </result>
3883 </desc>
3884 <param name="initiator" type="IConsole" dir="in">
3885 <desc>The console object that initiated this call.</desc>
3886 </param>
3887 <param name="machineState" type="MachineState" dir="out">
3888 <desc>New machine state after this operation is started.</desc>
3889 </param>
3890 <param name="progress" type="IProgress" dir="return">
3891 <desc>Progress object to track the operation completion.</desc>
3892 </param>
3893 </method>
3894
3895 <method name="discardCurrentSnapshotAndState">
3896 <desc>
3897 Gets called by IConsole::discardCurrentSnapshotAndState.
3898 <result name="VBOX_E_INVALID_OBJECT_STATE">
3899 Virtual machine does not have any snapshot.
3900 </result>
3901 </desc>
3902 <param name="initiator" type="IConsole" dir="in">
3903 <desc>The console object that initiated this call.</desc>
3904 </param>
3905 <param name="machineState" type="MachineState" dir="out">
3906 <desc>New machine state after this operation is started.</desc>
3907 </param>
3908 <param name="progress" type="IProgress" dir="return">
3909 <desc>Progress object to track the operation completion.</desc>
3910 </param>
3911 </method>
3912
3913 <method name="pullGuestProperties">
3914 <desc>
3915 Get the list of the guest properties matching a set of patterns along
3916 with their values, time stamps and flags and give responsibility for
3917 managing properties to the console.
3918 </desc>
3919 <param name="name" type="wstring" dir="out" safearray="yes">
3920 <desc>
3921 The names of the properties returned.
3922 </desc>
3923 </param>
3924 <param name="value" type="wstring" dir="out" safearray="yes">
3925 <desc>
3926 The values of the properties returned. The array entries match the
3927 corresponding entries in the @a name array.
3928 </desc>
3929 </param>
3930 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3931 <desc>
3932 The time stamps of the properties returned. The array entries match
3933 the corresponding entries in the @a name array.
3934 </desc>
3935 </param>
3936 <param name="flags" type="wstring" dir="out" safearray="yes">
3937 <desc>
3938 The flags of the properties returned. The array entries match the
3939 corresponding entries in the @a name array.
3940 </desc>
3941 </param>
3942 </method>
3943
3944 <method name="pushGuestProperties">
3945 <desc>
3946 Set the list of the guest properties matching a set of patterns along
3947 with their values, time stamps and flags and return responsibility for
3948 managing properties to IMachine.
3949 </desc>
3950 <param name="name" type="wstring" dir="in" safearray="yes">
3951 <desc>
3952 The names of the properties.
3953 </desc>
3954 </param>
3955 <param name="value" type="wstring" dir="in" safearray="yes">
3956 <desc>
3957 The values of the properties. The array entries match the
3958 corresponding entries in the @a name array.
3959 </desc>
3960 </param>
3961 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3962 <desc>
3963 The time stamps of the properties. The array entries match
3964 the corresponding entries in the @a name array.
3965 </desc>
3966 </param>
3967 <param name="flags" type="wstring" dir="in" safearray="yes">
3968 <desc>
3969 The flags of the properties. The array entries match the
3970 corresponding entries in the @a name array.
3971 </desc>
3972 </param>
3973 </method>
3974 <method name="pushGuestProperty">
3975 <desc>
3976 Update a single guest property in IMachine.
3977 </desc>
3978 <param name="name" type="wstring" dir="in">
3979 <desc>
3980 The name of the property to be updated.
3981 </desc>
3982 </param>
3983 <param name="value" type="wstring" dir="in">
3984 <desc>
3985 The value of the property.
3986 </desc>
3987 </param>
3988 <param name="timestamp" type="unsigned long long" dir="in">
3989 <desc>
3990 The timestamp of the property.
3991 </desc>
3992 </param>
3993 <param name="flags" type="wstring" dir="in">
3994 <desc>
3995 The flags of the property.
3996 </desc>
3997 </param>
3998 </method>
3999
4000 <method name="lockMedia">
4001 <desc>
4002 Locks all media attached to the machine for writing and parents of
4003 attached differencing media (if any) for reading. This operation is
4004 atomic so that if it fails no media is actually locked.
4005
4006 This method is intended to be called when the machine is in Starting or
4007 Restoring state. The locked media will be automatically unlocked when
4008 the machine is powered off or crashed.
4009 </desc>
4010 </method>
4011 </interface>
4012
4013 <interface
4014 name="IBIOSSettings" extends="$unknown"
4015 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4016 wsmap="managed"
4017 >
4018 <desc>
4019 The IBIOSSettings interface represents BIOS settings of the virtual
4020 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4021 </desc>
4022 <attribute name="logoFadeIn" type="boolean">
4023 <desc>Fade in flag for BIOS logo animation.</desc>
4024 </attribute>
4025
4026 <attribute name="logoFadeOut" type="boolean">
4027 <desc>Fade out flag for BIOS logo animation.</desc>
4028 </attribute>
4029
4030 <attribute name="logoDisplayTime" type="unsigned long">
4031 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4032 </attribute>
4033
4034 <attribute name="logoImagePath" type="wstring">
4035 <desc>Local file system path for external BIOS image.</desc>
4036 </attribute>
4037
4038 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4039 <desc>Mode of the BIOS boot device menu.</desc>
4040 </attribute>
4041
4042 <attribute name="ACPIEnabled" type="boolean">
4043 <desc>ACPI support flag.</desc>
4044 </attribute>
4045
4046 <attribute name="IOAPICEnabled" type="boolean">
4047 <desc>
4048 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4049 and support IRQs above 15.
4050 </desc>
4051 </attribute>
4052
4053 <attribute name="timeOffset" type="long long">
4054 <desc>
4055 Offset in milliseconds from the host system time. This allows for
4056 guests running with a different system date/time than the host.
4057 It is equivalent to setting the system date/time in the BIOS except
4058 it is not an absolute value but a relative one. Guest Additions
4059 time synchronization honors this offset.
4060 </desc>
4061 </attribute>
4062
4063 <attribute name="PXEDebugEnabled" type="boolean">
4064 <desc>
4065 PXE debug logging flag. If set, VirtualBox will write extensive
4066 PXE trace information to the release log.
4067 </desc>
4068 </attribute>
4069
4070 </interface>
4071
4072 <interface
4073 name="IMachine" extends="$unknown"
4074 uuid="d867a463-0f78-4ec7-a876-8da001464537"
4075 wsmap="managed"
4076 >
4077 <desc>
4078 The IMachine interface represents a virtual machine, or guest, created
4079 in VirtualBox.
4080
4081 This interface is used in two contexts. First of all, a collection of
4082 objects implementing this interface is stored in the
4083 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4084 machines that are currently registered with this VirtualBox
4085 installation. Also, once a session has been opened for the given virtual
4086 machine (e.g. the virtual machine is running), the machine object
4087 associated with the open session can be queried from the session object;
4088 see <link to="ISession"/> for details.
4089
4090 The main role of this interface is to expose the settings of the virtual
4091 machine and provide methods to change various aspects of the virtual
4092 machine's configuration. For machine objects stored in the
4093 <link to="IVirtualBox::machines"/> collection, all attributes are
4094 read-only unless explicitly stated otherwise in individual attribute
4095 and method descriptions. In order to change a machine setting, a session
4096 for this machine must be opened using one of
4097 <link to="IVirtualBox::openSession"/>,
4098 <link to="IVirtualBox::openRemoteSession"/> or
4099 <link to="IVirtualBox::openExistingSession"/> methods. After the
4100 session has been successfully opened, a mutable machine object needs to
4101 be queried from the session object and then the desired settings changes
4102 can be applied to the returned object using IMachine attributes and
4103 methods. See the <link to="ISession"/> interface description for more
4104 information about sessions.
4105
4106 Note that IMachine does not provide methods to control virtual machine
4107 execution (such as start the machine, or power it down) -- these methods
4108 are grouped in a separate interface called <link to="IConsole" />.
4109
4110 <see>ISession, IConsole</see>
4111 </desc>
4112
4113 <attribute name="parent" type="IVirtualBox" readonly="yes">
4114 <desc>Associated parent object.</desc>
4115 </attribute>
4116
4117 <attribute name="accessible" type="boolean" readonly="yes">
4118 <desc>
4119 Whether this virtual machine is currently accessible or not.
4120
4121 A machine is always deemed accessible unless it is registered <i>and</i>
4122 its settings file cannot be read or parsed (either because the file itself
4123 is unavailable or has invalid XML contents).
4124
4125 Every time this property is read, the accessibility state of
4126 this machine is re-evaluated. If the returned value is @c false,
4127 the <link to="#accessError"/> property may be used to get the
4128 detailed error information describing the reason of
4129 inaccessibility, including XML error messages.
4130
4131 When the machine is inaccessible, only the following properties
4132 can be used on it:
4133 <ul>
4134 <li><link to="#parent"/></li>
4135 <li><link to="#id"/></li>
4136 <li><link to="#settingsFilePath"/></li>
4137 <li><link to="#accessible"/></li>
4138 <li><link to="#accessError"/></li>
4139 </ul>
4140
4141 An attempt to access any other property or method will return
4142 an error.
4143
4144 The only possible action you can perform on an inaccessible
4145 machine is to unregister it using the
4146 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4147 for the accessibility state once more by querying this
4148 property).
4149
4150 <note>
4151 In the current implementation, once this property returns
4152 @c true, the machine will never become inaccessible
4153 later, even if its settings file cannot be successfully
4154 read/written any more (at least, until the VirtualBox
4155 server is restarted). This limitation may be removed in
4156 future releases.
4157 </note>
4158 </desc>
4159 </attribute>
4160
4161 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4162 <desc>
4163 Error information describing the reason of machine
4164 inaccessibility.
4165
4166 Reading this property is only valid after the last call to
4167 <link to="#accessible"/> returned @c false (i.e. the
4168 machine is currently unaccessible). Otherwise, a @c null
4169 IVirtualBoxErrorInfo object will be returned.
4170 </desc>
4171 </attribute>
4172
4173 <attribute name="name" type="wstring">
4174 <desc>
4175 Name of the virtual machine.
4176
4177 Besides being used for human-readable identification purposes
4178 everywhere in VirtualBox, the virtual machine name is also used
4179 as a name of the machine's settings file and as a name of the
4180 subdirectory this settings file resides in. Thus, every time you
4181 change the value of this property, the settings file will be
4182 renamed once you call <link to="#saveSettings"/> to confirm the
4183 change. The containing subdirectory will be also renamed, but
4184 only if it has exactly the same name as the settings file
4185 itself prior to changing this property (for backward compatibility
4186 with previous API releases). The above implies the following
4187 limitations:
4188 <ul>
4189 <li>The machine name cannot be empty.</li>
4190 <li>The machine name can contain only characters that are valid
4191 file name characters according to the rules of the file
4192 system used to store VirtualBox configuration.</li>
4193 <li>You cannot have two or more machines with the same name
4194 if they use the same subdirectory for storing the machine
4195 settings files.</li>
4196 <li>You cannot change the name of the machine if it is running,
4197 or if any file in the directory containing the settings file
4198 is being used by another running machine or by any other
4199 process in the host operating system at a time when
4200 <link to="#saveSettings"/> is called.
4201 </li>
4202 </ul>
4203 If any of the above limitations are hit, <link to="#saveSettings"/>
4204 will return an appropriate error message explaining the exact
4205 reason and the changes you made to this machine will not be
4206 saved.
4207 <note>
4208 For "legacy" machines created using the
4209 <link to="IVirtualBox::createLegacyMachine"/> call,
4210 the above naming limitations do not apply because the
4211 machine name does not affect the settings file name.
4212 The settings file name remains the same as it was specified
4213 during machine creation and never changes.
4214 </note>
4215 </desc>
4216 </attribute>
4217
4218 <attribute name="description" type="wstring">
4219 <desc>
4220 Description of the virtual machine.
4221
4222 The description attribute can contain any text and is
4223 typically used to describe the hardware and software
4224 configuration of the virtual machine in detail (i.e. network
4225 settings, versions of the installed software and so on).
4226 </desc>
4227 </attribute>
4228
4229 <attribute name="id" type="uuid" mod="string" readonly="yes">
4230 <desc>UUID of the virtual machine.</desc>
4231 </attribute>
4232
4233 <attribute name="OSTypeId" type="wstring">
4234 <desc>
4235 User-defined identifier of the Guest OS type.
4236 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4237 an IGuestOSType object representing details about the given
4238 Guest OS type.
4239 <note>
4240 This value may differ from the value returned by
4241 <link to="IGuest::OSTypeId"/> if Guest Additions are
4242 installed to the guest OS.
4243 </note>
4244 </desc>
4245 </attribute>
4246
4247 <attribute name="HardwareVersion" type="wstring">
4248 <desc>Hardware version identifier. Internal use only for now.</desc>
4249 </attribute>
4250
4251 <attribute name="CPUCount" type="unsigned long">
4252 <desc>Number of virtual CPUs in the VM.</desc>
4253 </attribute>
4254
4255 <attribute name="memorySize" type="unsigned long">
4256 <desc>System memory size in megabytes.</desc>
4257 </attribute>
4258
4259 <attribute name="memoryBalloonSize" type="unsigned long">
4260 <desc>Initial memory balloon size in megabytes.</desc>
4261 </attribute>
4262
4263 <attribute name="statisticsUpdateInterval" type="unsigned long">
4264 <desc>Initial interval to update guest statistics in seconds.</desc>
4265 </attribute>
4266
4267 <attribute name="VRAMSize" type="unsigned long">
4268 <desc>Video memory size in megabytes.</desc>
4269 </attribute>
4270
4271 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4272 <desc>
4273 This setting determines whether VirtualBox allows this machine to make
4274 use of the 3D graphics support available on the host.</desc>
4275 </attribute>
4276
4277 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4278 <desc>
4279 This setting determines whether VirtualBox allows this machine to make
4280 use of the 2D video acceleration support available on the host.</desc>
4281 </attribute>
4282
4283 <attribute name="monitorCount" type="unsigned long">
4284 <desc>
4285 Number of virtual monitors.
4286 <note>
4287 Only effective on Windows XP and later guests with
4288 Guest Additions installed.
4289 </note>
4290 </desc>
4291 </attribute>
4292
4293 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4294 <desc>Object containing all BIOS settings.</desc>
4295 </attribute>
4296
4297 <attribute name="firmwareType" type="FirmwareType">
4298 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4299 bootstrap in this VM.</desc>
4300 </attribute>
4301
4302 <attribute name="snapshotFolder" type="wstring">
4303 <desc>
4304 Full path to the directory used to store snapshot data
4305 (differencing media and saved state files) of this machine.
4306
4307 The initial value of this property is
4308 <tt>&lt;</tt><link to="#settingsFilePath">
4309 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4310 <link to="#id">machine_uuid</link>
4311 <tt>&gt;</tt>.
4312
4313 Currently, it is an error to try to change this property on
4314 a machine that has snapshots (because this would require to
4315 move possibly large files to a different location).
4316 A separate method will be available for this purpose later.
4317
4318 <note>
4319 Setting this property to @c null or to an empty string will restore
4320 the initial value.
4321 </note>
4322 <note>
4323 When setting this property, the specified path can be
4324 absolute (full path) or relative to the directory where the
4325 <link to="#settingsFilePath">machine settings file</link>
4326 is located. When reading this property, a full path is
4327 always returned.
4328 </note>
4329 <note>
4330 The specified path may not exist, it will be created
4331 when necessary.
4332 </note>
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4337 <desc>VRDP server object.</desc>
4338 </attribute>
4339
4340 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4341 <desc>Array of media attached to this machine.</desc>
4342 </attribute>
4343
4344 <attribute name="USBController" type="IUSBController" readonly="yes">
4345 <desc>
4346 Associated USB controller object.
4347
4348 <note>
4349 If USB functionality is not available in the given edition of
4350 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4351 </note>
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4356 <desc>Associated audio adapter, always present.</desc>
4357 </attribute>
4358
4359 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4360 <desc>Array of storage controllers attached to this machine.</desc>
4361 </attribute>
4362
4363 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4364 <desc>
4365 Full name of the file containing machine settings data.
4366 </desc>
4367 </attribute>
4368
4369 <attribute name="settingsModified" type="boolean" readonly="yes">
4370 <desc>
4371 Whether the settings of this machine have been modified
4372 (but neither yet saved nor discarded).
4373 <note>
4374 Reading this property is only valid on instances returned
4375 by <link to="ISession::machine"/> and on new machines
4376 created by <link to="IVirtualBox::createMachine"/> or opened
4377 by <link to="IVirtualBox::openMachine"/> but not
4378 yet registered, or on unregistered machines after calling
4379 <link to="IVirtualBox::unregisterMachine"/>. For all other
4380 cases, the settings can never be modified.
4381 </note>
4382 <note>
4383 For newly created unregistered machines, the value of this
4384 property is always @c true until <link to="#saveSettings"/>
4385 is called (no matter if any machine settings have been
4386 changed after the creation or not). For opened machines
4387 the value is set to @c false (and then follows to normal rules).
4388 </note>
4389 </desc>
4390 </attribute>
4391
4392 <attribute name="sessionState" type="SessionState" readonly="yes">
4393 <desc>Current session state for this machine.</desc>
4394 </attribute>
4395
4396 <attribute name="sessionType" type="wstring" readonly="yes">
4397 <desc>
4398 Type of the session. If <link to="#sessionState"/> is
4399 SessionSpawning or SessionOpen, this attribute contains the
4400 same value as passed to the
4401 <link to="IVirtualBox::openRemoteSession"/> method in the
4402 @a type parameter. If the session was opened directly using
4403 <link to="IVirtualBox::openSession"/>, or if
4404 <link to="#sessionState"/> is SessionClosed, the value of this
4405 attribute is an empty string.
4406 </desc>
4407 </attribute>
4408
4409 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4410 <desc>
4411 Identifier of the session process. This attribute contains the
4412 platform-dependent identifier of the process that has opened a
4413 direct session for this machine using the
4414 <link to="IVirtualBox::openSession"/> call. The returned value
4415 is only valid if <link to="#sessionState"/> is SessionOpen or
4416 SessionClosing (i.e. a session is currently open or being
4417 closed) by the time this property is read.
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="state" type="MachineState" readonly="yes">
4422 <desc>Current execution state of this machine.</desc>
4423 </attribute>
4424
4425 <attribute name="lastStateChange" type="long long" readonly="yes">
4426 <desc>
4427 Time stamp of the last execution state change,
4428 in milliseconds since 1970-01-01 UTC.
4429 </desc>
4430 </attribute>
4431
4432 <attribute name="stateFilePath" type="wstring" readonly="yes">
4433 <desc>
4434 Full path to the file that stores the execution state of
4435 the machine when it is in the <link to="MachineState_Saved"/> state.
4436 <note>
4437 When the machine is not in the Saved state, this attribute is
4438 an empty string.
4439 </note>
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="logFolder" type="wstring" readonly="yes">
4444 <desc>
4445 Full path to the folder that stores a set of rotated log files
4446 recorded during machine execution. The most recent log file is
4447 named <tt>VBox.log</tt>, the previous log file is
4448 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4449 in the current version).
4450 </desc>
4451 </attribute>
4452
4453 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4454 <desc>
4455 Current snapshot of this machine. This is @c null if the machine
4456 currently has no snapshots. Otherwise, this is always the last snapshot
4457 in the current implementation; see <link to="ISnapshot"/> for details.
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4462 <desc>
4463 Number of snapshots taken on this machine. Zero means the
4464 machine doesn't have any snapshots.
4465 </desc>
4466 </attribute>
4467
4468 <attribute name="currentStateModified" type="boolean" readonly="yes">
4469 <desc>
4470 Returns @c true if the current state of the machine is not
4471 identical to the state stored in the current snapshot.
4472
4473 The current state is identical to the current snapshot right
4474 after one of the following calls are made:
4475 <ul>
4476 <li><link to="IConsole::discardCurrentState"/> or
4477 <link to="IConsole::discardCurrentSnapshotAndState"/>
4478 </li>
4479 <li><link to="IConsole::takeSnapshot"/> (issued on a
4480 powered off or saved machine, for which
4481 <link to="#settingsModified"/> returns @c false)
4482 </li>
4483 <li><link to="IMachine::setCurrentSnapshot"/>
4484 </li>
4485 </ul>
4486
4487 The current state remains identical until one of the following
4488 happens:
4489 <ul>
4490 <li>settings of the machine are changed</li>
4491 <li>the saved state is discarded</li>
4492 <li>the current snapshot is discarded</li>
4493 <li>an attempt to execute the machine is made</li>
4494 </ul>
4495
4496 <note>
4497 For machines that don't have snapshots, this property is
4498 always @c false.
4499 </note>
4500 </desc>
4501 </attribute>
4502
4503 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4504 <desc>
4505 Collection of shared folders for this machine (permanent shared
4506 folders). These folders are shared automatically at machine startup
4507 and available only to the guest OS installed within this machine.
4508
4509 New shared folders are added to the collection using
4510 <link to="#createSharedFolder"/>. Existing shared folders can be
4511 removed using <link to="#removeSharedFolder"/>.
4512 </desc>
4513 </attribute>
4514
4515 <attribute name="clipboardMode" type="ClipboardMode">
4516 <desc>
4517 Synchronization mode between the host OS clipboard
4518 and the guest OS clipboard.
4519 </desc>
4520 </attribute>
4521
4522 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4523 <desc>
4524 A comma-separated list of simple glob patterns. Changes to guest
4525 properties whose name matches one of the patterns will generate an
4526 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4527 </desc>
4528 </attribute>
4529
4530 <attribute name="teleporterEnabled" type="boolean">
4531 <desc>
4532 When set to @a true, the virtual machine becomes a target teleporter
4533 the next time it is powered on. This can only set to @a true when the
4534 VM is in the @a PoweredOff or @a Aborted state.
4535
4536 This property is automatically set to @a false when the VM is powered
4537 on.
4538 </desc>
4539 </attribute>
4540
4541 <attribute name="teleporterPort" type="unsigned long">
4542 <desc>
4543 The TCP port the target teleporter will listen for incoming
4544 teleportations on.
4545
4546 0 means the port is automatically selected upon power on. The actual
4547 value can be read from this property while the machine is waiting for
4548 incoming teleportations.
4549 </desc>
4550 </attribute>
4551
4552 <attribute name="teleporterAddress" type="wstring">
4553 <desc>
4554 The address the target teleporter will listen on. If set to an empty
4555 string, it will listen on all addresses.
4556 </desc>
4557 </attribute>
4558
4559 <attribute name="teleporterPassword" type="wstring">
4560 <desc>
4561 The password the to check for on the target teleporter. This is just a
4562 very basic measure to prevent simple hacks and operators accidentally
4563 beaming a virtual machine to the wrong place.
4564 </desc>
4565 </attribute>
4566
4567 <method name="setBootOrder">
4568 <desc>
4569 Puts the given device to the specified position in
4570 the boot order.
4571
4572 To indicate that no device is associated with the given position,
4573 <link to="DeviceType_Null"/> should be used.
4574
4575 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4576
4577 <result name="E_INVALIDARG">
4578 Boot @a position out of range.
4579 </result>
4580 <result name="E_NOTIMPL">
4581 Booting from USB @a device currently not supported.
4582 </result>
4583
4584 </desc>
4585 <param name="position" type="unsigned long" dir="in">
4586 <desc>
4587 Position in the boot order (@c 1 to the total number of
4588 devices the machine can boot from, as returned by
4589 <link to="ISystemProperties::maxBootPosition"/>).
4590 </desc>
4591 </param>
4592 <param name="device" type="DeviceType" dir="in">
4593 <desc>
4594 The type of the device used to boot at the given position.
4595 </desc>
4596 </param>
4597 </method>
4598
4599 <method name="getBootOrder" const="yes">
4600 <desc>
4601 Returns the device type that occupies the specified
4602 position in the boot order.
4603
4604 @todo [remove?]
4605 If the machine can have more than one device of the returned type
4606 (such as hard disks), then a separate method should be used to
4607 retrieve the individual device that occupies the given position.
4608
4609 If here are no devices at the given position, then
4610 <link to="DeviceType_Null"/> is returned.
4611
4612 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4613
4614 <result name="E_INVALIDARG">
4615 Boot @a position out of range.
4616 </result>
4617
4618 </desc>
4619 <param name="position" type="unsigned long" dir="in">
4620 <desc>
4621 Position in the boot order (@c 1 to the total number of
4622 devices the machine can boot from, as returned by
4623 <link to="ISystemProperties::maxBootPosition"/>).
4624 </desc>
4625 </param>
4626 <param name="device" type="DeviceType" dir="return">
4627 <desc>
4628 Device at the given position.
4629 </desc>
4630 </param>
4631 </method>
4632
4633 <method name="attachDevice">
4634 <desc>
4635 Attaches a device and optionally mounts a medium to the given storage
4636 controller (<link to="IStorageController" />, identified by @a name),
4637 at the indicated port and device.
4638
4639 This method is intended for managing storage devices in general (it works
4640 for both fixed and removable media). For storage devices supporting removable
4641 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4642 for changing the media while the machine is running.
4643
4644 For the IDE bus, the @a controllerPort parameter can be either
4645 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4646 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4647 to specify the master or the slave device, respectively. (In the
4648 default configuration of virtual machines, the secondary master is
4649 used for a CD/DVD drive.)
4650
4651 For an SATA controller, @a controllerPort must be a number ranging
4652 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4653 be a number ranging from @c 0 to @c 15.
4654
4655 For both SCSI and SATA, the @a device parameter is unused and must
4656 be @c 0.
4657
4658 For fixed media such as hard disks, the given medium cannot be NULL. It may
4659 be NULL for removable media such as DVDs and floppies.
4660
4661 After calling this returns successfully, a new instance of
4662 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4663 attachments (<link to="IMachine::mediumAttachments"/>).
4664
4665 The specified device slot must not have another disk attached to it, or
4666 this method will fail.
4667
4668 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4669 information about attaching media.
4670
4671 <note>
4672 You cannot attach a hard disk to a running machine. Also, you cannot
4673 attach a hard disk to a newly created machine until this machine's
4674 settings are saved to disk using <link to="#saveSettings"/>.
4675 </note>
4676 <note>
4677 If the medium is being attached indirectly, a new differencing medium
4678 will implicitly be created for it and attached instead. If the
4679 changes made to the machine settings (including this indirect
4680 attachment) are later cancelled using <link to="#discardSettings"/>,
4681 this implicitly created differencing medium will implicitly
4682 be deleted.
4683 </note>
4684
4685 <result name="E_INVALIDARG">
4686 SATA device, SATA port, IDE port or IDE slot out of range.
4687 </result>
4688 <result name="VBOX_E_INVALID_OBJECT_STATE">
4689 Attempt to attach medium to an unregistered virtual machine.
4690 </result>
4691 <result name="VBOX_E_INVALID_VM_STATE">
4692 Invalid machine state.
4693 </result>
4694 <result name="VBOX_E_OBJECT_IN_USE">
4695 Hard disk already attached to this or another virtual machine.
4696 </result>
4697
4698 </desc>
4699 <param name="name" type="wstring" dir="in">
4700 <desc>Name of the storage controller to attach the device to.</desc>
4701 </param>
4702 <param name="controllerPort" type="long" dir="in">
4703 <desc>Port to attach the device to.</desc>
4704 </param>
4705 <param name="device" type="long" dir="in">
4706 <desc>Device slot in the given port to attach the device to.</desc>
4707 </param>
4708 <param name="type" type="DeviceType" dir="in">
4709 <desc>Device type of the attached device.</desc>
4710 </param>
4711 <param name="id" type="uuid" mod="string" dir="in">
4712 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4713 medium.</desc>
4714 </param>
4715 </method>
4716
4717 <method name="detachDevice">
4718 <desc>
4719 Detaches the device attached to a device slot of the specified bus.
4720
4721 Detaching the device from the virtual machine is deferred. This means
4722 that the medium remains associated with the machine when this method
4723 returns and gets actually de-associated only after a successful
4724 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4725 for more detailed information about attaching media.
4726
4727 <note>
4728 You cannot detach the hard disk from a running machine.
4729 </note>
4730 <note>
4731 Detaching differencing media implicitly created by <link
4732 to="#attachDevice"/> for the indirect attachment using this
4733 method will <b>not</b> implicitly delete them. The
4734 <link to="IMedium::deleteStorage"/> operation should be
4735 explicitly performed by the caller after the medium is successfully
4736 detached and the settings are saved with
4737 <link to="#saveSettings"/>, if it is the desired action.
4738 </note>
4739
4740 <result name="VBOX_E_INVALID_VM_STATE">
4741 Attempt to detach medium from a running virtual machine.
4742 </result>
4743 <result name="VBOX_E_OBJECT_NOT_FOUND">
4744 No medium attached to given slot/bus.
4745 </result>
4746 <result name="VBOX_E_NOT_SUPPORTED">
4747 Hard disk format does not support storage deletion.
4748 </result>
4749
4750 </desc>
4751 <param name="name" type="wstring" dir="in">
4752 <desc>Name of the storage controller to detach the medium from.</desc>
4753 </param>
4754 <param name="controllerPort" type="long" dir="in">
4755 <desc>Port number to detach the medium from.</desc>
4756 </param>
4757 <param name="device" type="long" dir="in">
4758 <desc>Device slot number to detach the medium from.</desc>
4759 </param>
4760 </method>
4761
4762 <method name="mountMedium">
4763 <desc>
4764 Mounts a medium (<link to="IMedium" />, identified
4765 by the given UUID @a id) to the given storage controller
4766 (<link to="IStorageController" />, identified by @a name),
4767 at the indicated port and device. The device must already exist;
4768 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4769
4770 This method is intended only for managing removable media, where the
4771 device is fixed but media is changeable at runtime (such as DVDs
4772 and floppies). It cannot be used for fixed media such as hard disks.
4773
4774 The @a controllerPort and @a device parameters specify the device slot and
4775 have have the same meaning as with <link to="IMachine::attachDevice" />.
4776
4777 The specified device slot can have a medium mounted, which will be
4778 unmounted first. Specifying a NULL medium does just an unmount.
4779
4780 See <link to="IMedium"/> for more detailed information about
4781 attaching media.
4782
4783 <result name="E_INVALIDARG">
4784 SATA device, SATA port, IDE port or IDE slot out of range.
4785 </result>
4786 <result name="VBOX_E_INVALID_OBJECT_STATE">
4787 Attempt to attach medium to an unregistered virtual machine.
4788 </result>
4789 <result name="VBOX_E_INVALID_VM_STATE">
4790 Invalid machine state.
4791 </result>
4792 <result name="VBOX_E_OBJECT_IN_USE">
4793 Medium already attached to this or another virtual machine.
4794 </result>
4795
4796 </desc>
4797 <param name="name" type="wstring" dir="in">
4798 <desc>Name of the storage controller to attach the medium to.</desc>
4799 </param>
4800 <param name="controllerPort" type="long" dir="in">
4801 <desc>Port to attach the medium to.</desc>
4802 </param>
4803 <param name="device" type="long" dir="in">
4804 <desc>Device slot in the given port to attach the medium to.</desc>
4805 </param>
4806 <param name="id" type="uuid" mod="string" dir="in">
4807 <desc>UUID of the medium to attach.</desc>
4808 </param>
4809 </method>
4810
4811 <method name="getMedium" const="yes">
4812 <desc>
4813 Returns the virtual medium attached to a device slot of the specified
4814 bus.
4815
4816 Note that if the medium was indirectly attached by
4817 <link to="#mountMedium"/> to the given device slot then this
4818 method will return not the same object as passed to the
4819 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4820 more detailed information about mounting a medium.
4821
4822 <result name="VBOX_E_OBJECT_NOT_FOUND">
4823 No medium attached to given slot/bus.
4824 </result>
4825
4826 </desc>
4827 <param name="name" type="wstring" dir="in">
4828 <desc>Name of the storage controller the medium is attached to.</desc>
4829 </param>
4830 <param name="controllerPort" type="long" dir="in">
4831 <desc>Port to query.</desc>
4832 </param>
4833 <param name="device" type="long" dir="in">
4834 <desc>Device slot in the given port to query.</desc>
4835 </param>
4836 <param name="medium" type="IMedium" dir="return">
4837 <desc>Attached medium object.</desc>
4838 </param>
4839 </method>
4840
4841 <method name="getMediumAttachmentsOfController" const="yes">
4842 <desc>
4843 Returns an array of medium attachments which are attached to the
4844 the controller with the given name.
4845
4846 <result name="VBOX_E_OBJECT_NOT_FOUND">
4847 A storage controller with given name doesn't exist.
4848 </result>
4849 </desc>
4850 <param name="name" type="wstring" dir="in"/>
4851 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4852 </method>
4853
4854 <method name="getMediumAttachment" const="yes">
4855 <desc>
4856 Returns a medium attachment which corresponds to the controller with
4857 the given name, on the given port and device slot.
4858
4859 <result name="VBOX_E_OBJECT_NOT_FOUND">
4860 No attachment exists for the given controller/port/device combination.
4861 </result>
4862 </desc>
4863 <param name="name" type="wstring" dir="in"/>
4864 <param name="controllerPort" type="long" dir="in"/>
4865 <param name="device" type="long" dir="in"/>
4866 <param name="attachment" type="IMediumAttachment" dir="return"/>
4867 </method>
4868
4869 <method name="getNetworkAdapter" const="yes">
4870 <desc>
4871 Returns the network adapter associated with the given slot.
4872 Slots are numbered sequentially, starting with zero. The total
4873 number of adapters per machine is defined by the
4874 <link to="ISystemProperties::networkAdapterCount"/> property,
4875 so the maximum slot number is one less than that property's value.
4876
4877 <result name="E_INVALIDARG">
4878 Invalid @a slot number.
4879 </result>
4880
4881 </desc>
4882 <param name="slot" type="unsigned long" dir="in"/>
4883 <param name="adapter" type="INetworkAdapter" dir="return"/>
4884 </method>
4885
4886 <method name="addStorageController">
4887 <desc>
4888 Adds a new storage controller (SCSI or SATA controller) to the
4889 machine and returns it as an instance of
4890 <link to="IStorageController" />.
4891
4892 @a name identifies the controller for subsequent calls such as
4893 <link to="#getStorageControllerByName" />,
4894 <link to="#removeStorageController" />,
4895 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4896
4897 After the controller has been added, you can set its exact
4898 type by setting the <link to="IStorageController::controllerType" />.
4899
4900 <result name="VBOX_E_OBJECT_IN_USE">
4901 A storage controller with given name exists already.
4902 </result>
4903 <result name="E_INVALIDARG">
4904 Invalid @a controllerType.
4905 </result>
4906 </desc>
4907 <param name="name" type="wstring" dir="in"/>
4908 <param name="connectionType" type="StorageBus" dir="in"/>
4909 <param name="controller" type="IStorageController" dir="return"/>
4910 </method>
4911
4912 <method name="getStorageControllerByName" const="yes">
4913 <desc>
4914 Returns a storage controller with the given name.
4915
4916 <result name="VBOX_E_OBJECT_NOT_FOUND">
4917 A storage controller with given name doesn't exist.
4918 </result>
4919 </desc>
4920 <param name="name" type="wstring" dir="in"/>
4921 <param name="storageController" type="IStorageController" dir="return"/>
4922 </method>
4923
4924 <method name="removeStorageController">
4925 <desc>
4926 Removes a storage controller from the machine.
4927
4928 <result name="VBOX_E_OBJECT_NOT_FOUND">
4929 A storage controller with given name doesn't exist.
4930 </result>
4931 </desc>
4932 <param name="name" type="wstring" dir="in"/>
4933 </method>
4934
4935 <method name="getSerialPort" const="yes">
4936 <desc>
4937 Returns the serial port associated with the given slot.
4938 Slots are numbered sequentially, starting with zero. The total
4939 number of serial ports per machine is defined by the
4940 <link to="ISystemProperties::serialPortCount"/> property,
4941 so the maximum slot number is one less than that property's value.
4942
4943 <result name="E_INVALIDARG">
4944 Invalid @a slot number.
4945 </result>
4946
4947 </desc>
4948 <param name="slot" type="unsigned long" dir="in"/>
4949 <param name="port" type="ISerialPort" dir="return"/>
4950 </method>
4951
4952 <method name="getParallelPort" const="yes">
4953 <desc>
4954 Returns the parallel port associated with the given slot.
4955 Slots are numbered sequentially, starting with zero. The total
4956 number of parallel ports per machine is defined by the
4957 <link to="ISystemProperties::parallelPortCount"/> property,
4958 so the maximum slot number is one less than that property's value.
4959
4960 <result name="E_INVALIDARG">
4961 Invalid @a slot number.
4962 </result>
4963
4964 </desc>
4965 <param name="slot" type="unsigned long" dir="in"/>
4966 <param name="port" type="IParallelPort" dir="return"/>
4967 </method>
4968
4969 <method name="getExtraDataKeys">
4970 <desc>
4971 Returns an array representing the machine-specific extra data keys
4972 which currently have values defined.
4973 </desc>
4974 <param name="value" type="wstring" dir="return" safearray="yes">
4975 <desc>Array of extra data keys.</desc>
4976 </param>
4977 </method>
4978
4979 <method name="getExtraData">
4980 <desc>
4981 Returns associated machine-specific extra data.
4982
4983 If the requested data @a key does not exist, this function will
4984 succeed and return an empty string in the @a value argument.
4985
4986 <result name="VBOX_E_FILE_ERROR">
4987 Settings file not accessible.
4988 </result>
4989 <result name="VBOX_E_XML_ERROR">
4990 Could not parse the settings file.
4991 </result>
4992
4993 </desc>
4994 <param name="key" type="wstring" dir="in">
4995 <desc>Name of the data key to get.</desc>
4996 </param>
4997 <param name="value" type="wstring" dir="return">
4998 <desc>Value of the requested data key.</desc>
4999 </param>
5000 </method>
5001
5002 <method name="setExtraData">
5003 <desc>
5004 Sets associated machine-specific extra data.
5005
5006 If you pass @c null or an empty string as a key @a value, the given
5007 @a key will be deleted.
5008
5009 <note>
5010 Before performing the actual data change, this method will ask all
5011 registered callbacks using the
5012 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5013 notification for a permission. If one of the callbacks refuses the
5014 new value, the change will not be performed.
5015 </note>
5016 <note>
5017 On success, the
5018 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5019 is called to inform all registered callbacks about a successful data
5020 change.
5021 </note>
5022 <note>
5023 This method can be called outside the machine session and therefore
5024 it's a caller's responsibility to handle possible race conditions
5025 when several clients change the same key at the same time.
5026 </note>
5027
5028 <result name="VBOX_E_FILE_ERROR">
5029 Settings file not accessible.
5030 </result>
5031 <result name="VBOX_E_XML_ERROR">
5032 Could not parse the settings file.
5033 </result>
5034
5035 </desc>
5036 <param name="key" type="wstring" dir="in">
5037 <desc>Name of the data key to set.</desc>
5038 </param>
5039 <param name="value" type="wstring" dir="in">
5040 <desc>Value to assign to the key.</desc>
5041 </param>
5042 </method>
5043
5044 <method name="getCpuProperty" const="yes">
5045 <desc>
5046 Returns the virtual CPU boolean value of the specified property.
5047
5048 <result name="E_INVALIDARG">
5049 Invalid property.
5050 </result>
5051
5052 </desc>
5053 <param name="property" type="CpuPropertyType" dir="in">
5054 <desc>
5055 Property type to query.
5056 </desc>
5057 </param>
5058 <param name="value" type="boolean" dir="return">
5059 <desc>
5060 Property value.
5061 </desc>
5062 </param>
5063 </method>
5064
5065 <method name="setCpuProperty">
5066 <desc>
5067 Sets the virtual CPU boolean value of the specified property.
5068
5069 <result name="E_INVALIDARG">
5070 Invalid property.
5071 </result>
5072
5073 </desc>
5074 <param name="property" type="CpuPropertyType" dir="in">
5075 <desc>
5076 Property type to query.
5077 </desc>
5078 </param>
5079 <param name="value" type="boolean" dir="in">
5080 <desc>
5081 Property value.
5082 </desc>
5083 </param>
5084 </method>
5085
5086 <method name="getHWVirtExProperty" const="yes">
5087 <desc>
5088 Returns the HWVirtEx boolean value of the specified property.
5089
5090 <result name="E_INVALIDARG">
5091 Invalid property.
5092 </result>
5093
5094 </desc>
5095 <param name="property" type="HWVirtExPropertyType" dir="in">
5096 <desc>
5097 Property type to query.
5098 </desc>
5099 </param>
5100 <param name="value" type="boolean" dir="return">
5101 <desc>
5102 Property value.
5103 </desc>
5104 </param>
5105 </method>
5106
5107 <method name="setHWVirtExProperty">
5108 <desc>
5109 Sets the HWVirtEx boolean value of the specified property.
5110
5111 <result name="E_INVALIDARG">
5112 Invalid property.
5113 </result>
5114
5115 </desc>
5116 <param name="property" type="HWVirtExPropertyType" dir="in">
5117 <desc>
5118 Property type to query.
5119 </desc>
5120 </param>
5121 <param name="value" type="boolean" dir="in">
5122 <desc>
5123 Property value.
5124 </desc>
5125 </param>
5126 </method>
5127
5128 <method name="saveSettings">
5129 <desc>
5130 Saves any changes to machine settings made since the session
5131 has been opened or a new machine has been created, or since the
5132 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5133 For registered machines, new settings become visible to all
5134 other VirtualBox clients after successful invocation of this
5135 method.
5136 <note>
5137 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5138 notification event after the configuration has been successfully
5139 saved (only for registered machines).
5140 </note>
5141 <note>
5142 Calling this method is only valid on instances returned
5143 by <link to="ISession::machine"/> and on new machines
5144 created by <link to="IVirtualBox::createMachine"/> but not
5145 yet registered, or on unregistered machines after calling
5146 <link to="IVirtualBox::unregisterMachine"/>.
5147 </note>
5148
5149 <result name="VBOX_E_FILE_ERROR">
5150 Settings file not accessible.
5151 </result>
5152 <result name="VBOX_E_XML_ERROR">
5153 Could not parse the settings file.
5154 </result>
5155 <result name="E_ACCESSDENIED">
5156 Modification request refused.
5157 </result>
5158
5159 </desc>
5160 </method>
5161
5162 <method name="discardSettings">
5163 <desc>
5164 Discards any changes to the machine settings made since the session
5165 has been opened or since the last call to <link to="#saveSettings"/>
5166 or <link to="#discardSettings"/>.
5167 <note>
5168 Calling this method is only valid on instances returned
5169 by <link to="ISession::machine"/> and on new machines
5170 created by <link to="IVirtualBox::createMachine"/> or
5171 opened by <link to="IVirtualBox::openMachine"/> but not
5172 yet registered, or on unregistered machines after calling
5173 <link to="IVirtualBox::unregisterMachine"/>.
5174 </note>
5175
5176 <result name="VBOX_E_INVALID_VM_STATE">
5177 Virtual machine is not mutable.
5178 </result>
5179
5180 </desc>
5181 </method>
5182
5183 <method name="deleteSettings">
5184 <desc>
5185 Deletes the settings file of this machine from disk.
5186 The machine must not be registered in order for this operation
5187 to succeed.
5188 <note>
5189 <link to="#settingsModified"/> will return @c true after this
5190 method successfully returns.
5191 </note>
5192 <note>
5193 Calling this method is only valid on instances returned
5194 by <link to="ISession::machine"/> and on new machines
5195 created by <link to="IVirtualBox::createMachine"/> or
5196 opened by <link to="IVirtualBox::openMachine"/> but not
5197 yet registered, or on unregistered machines after calling
5198 <link to="IVirtualBox::unregisterMachine"/>.
5199 </note>
5200 <note>
5201 The deleted machine settings file can be restored (saved again)
5202 by calling <link to="#saveSettings"/>.
5203 </note>
5204
5205 <result name="VBOX_E_INVALID_VM_STATE">
5206 Cannot delete settings of a registered machine or
5207 machine not mutable.
5208 </result>
5209 <result name="VBOX_E_IPRT_ERROR">
5210 Could not delete the settings file.
5211 </result>
5212
5213 </desc>
5214 </method>
5215
5216 <method name="export">
5217 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5218 steps required to export VirtualBox machines to OVF.
5219 </desc>
5220
5221 <param name="aAppliance" type="IAppliance" dir="in">
5222 <desc>Appliance to export this machine to.</desc>
5223 </param>
5224 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5225 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5226 </param>
5227 </method >
5228
5229 <method name="getSnapshot">
5230 <desc>
5231 Returns a snapshot of this machine with the given UUID.
5232 A @c null UUID can be used to obtain the first snapshot
5233 taken on this machine. This is useful if you want to traverse
5234 the whole tree of snapshots starting from the root.
5235
5236 <result name="VBOX_E_OBJECT_NOT_FOUND">
5237 Virtual machine has no snapshots or snapshot not found.
5238 </result>
5239
5240 </desc>
5241 <param name="id" type="uuid" mod="string" dir="in">
5242 <desc>UUID of the snapshot to get</desc>
5243 </param>
5244 <param name="snapshot" type="ISnapshot" dir="return">
5245 <desc>Snapshot object with the given UUID.</desc>
5246 </param>
5247 </method>
5248
5249 <method name="findSnapshot">
5250 <desc>
5251 Returns a snapshot of this machine with the given name.
5252
5253 <result name="VBOX_E_OBJECT_NOT_FOUND">
5254 Virtual machine has no snapshots or snapshot not found.
5255 </result>
5256
5257 </desc>
5258 <param name="name" type="wstring" dir="in">
5259 <desc>Name of the snapshot to find</desc>
5260 </param>
5261 <param name="snapshot" type="ISnapshot" dir="return">
5262 <desc>Snapshot object with the given name.</desc>
5263 </param>
5264 </method>
5265
5266 <method name="setCurrentSnapshot">
5267 <desc>
5268 Sets the current snapshot of this machine.
5269 <note>
5270 In the current implementation, this operation is not
5271 implemented.
5272 </note>
5273 </desc>
5274 <param name="id" type="uuid" mod="string" dir="in">
5275 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5276 </param>
5277 </method>
5278
5279 <method name="createSharedFolder">
5280 <desc>
5281 Creates a new permanent shared folder by associating the given logical
5282 name with the given host path, adds it to the collection of shared
5283 folders and starts sharing it. Refer to the description of
5284 <link to="ISharedFolder"/> to read more about logical names.
5285
5286 <result name="VBOX_E_OBJECT_IN_USE">
5287 Shared folder already exists.
5288 </result>
5289 <result name="VBOX_E_FILE_ERROR">
5290 Shared folder @a hostPath not accessible.
5291 </result>
5292
5293 </desc>
5294 <param name="name" type="wstring" dir="in">
5295 <desc>Unique logical name of the shared folder.</desc>
5296 </param>
5297 <param name="hostPath" type="wstring" dir="in">
5298 <desc>Full path to the shared folder in the host file system.</desc>
5299 </param>
5300 <param name="writable" type="boolean" dir="in">
5301 <desc>Whether the share is writable or readonly</desc>
5302 </param>
5303 </method>
5304
5305 <method name="removeSharedFolder">
5306 <desc>
5307 Removes the permanent shared folder with the given name previously
5308 created by <link to="#createSharedFolder"/> from the collection of
5309 shared folders and stops sharing it.
5310
5311 <result name="VBOX_E_INVALID_VM_STATE">
5312 Virtual machine is not mutable.
5313 </result>
5314 <result name="VBOX_E_OBJECT_NOT_FOUND">
5315 Shared folder @a name does not exist.
5316 </result>
5317
5318 </desc>
5319 <param name="name" type="wstring" dir="in">
5320 <desc>Logical name of the shared folder to remove.</desc>
5321 </param>
5322 </method>
5323
5324 <method name="canShowConsoleWindow">
5325 <desc>
5326 Returns @c true if the VM console process can activate the
5327 console window and bring it to foreground on the desktop of
5328 the host PC.
5329 <note>
5330 This method will fail if a session for this machine is not
5331 currently open.
5332 </note>
5333
5334 <result name="VBOX_E_INVALID_VM_STATE">
5335 Machine session is not open.
5336 </result>
5337
5338 </desc>
5339 <param name="canShow" type="boolean" dir="return">
5340 <desc>
5341 @c true if the console window can be shown and @c false otherwise.
5342 </desc>
5343 </param>
5344 </method>
5345
5346 <method name="showConsoleWindow">
5347 <desc>
5348 Activates the console window and brings it to foreground on
5349 the desktop of the host PC. Many modern window managers on
5350 many platforms implement some sort of focus stealing
5351 prevention logic, so that it may be impossible to activate
5352 a window without the help of the currently active
5353 application. In this case, this method will return a non-zero
5354 identifier that represents the top-level window of the VM
5355 console process. The caller, if it represents a currently
5356 active process, is responsible to use this identifier (in a
5357 platform-dependent manner) to perform actual window
5358 activation.
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="winId" type="unsigned long long" dir="return">
5370 <desc>
5371 Platform-dependent identifier of the top-level VM console
5372 window, or zero if this method has performed all actions
5373 necessary to implement the <i>show window</i> semantics for
5374 the given platform and/or VirtualBox front-end.
5375 </desc>
5376 </param>
5377 </method>
5378
5379 <method name="getGuestProperty">
5380 <desc>
5381 Reads an entry from the machine's guest property store.
5382
5383 <result name="VBOX_E_INVALID_VM_STATE">
5384 Machine session is not open.
5385 </result>
5386
5387 </desc>
5388 <param name="name" type="wstring" dir="in">
5389 <desc>
5390 The name of the property to read.
5391 </desc>
5392 </param>
5393 <param name="value" type="wstring" dir="out">
5394 <desc>
5395 The value of the property. If the property does not exist then this
5396 will be empty.
5397 </desc>
5398 </param>
5399 <param name="timestamp" type="unsigned long long" dir="out">
5400 <desc>
5401 The time at which the property was last modified, as seen by the
5402 server process.
5403 </desc>
5404 </param>
5405 <param name="flags" type="wstring" dir="out">
5406 <desc>
5407 Additional property parameters, passed as a comma-separated list of
5408 "name=value" type entries.
5409 </desc>
5410 </param>
5411 </method>
5412
5413 <method name="getGuestPropertyValue">
5414 <desc>
5415 Reads a value from the machine's guest property store.
5416
5417 <result name="VBOX_E_INVALID_VM_STATE">
5418 Machine session is not open.
5419 </result>
5420
5421 </desc>
5422 <param name="property" type="wstring" dir="in">
5423 <desc>
5424 The name of the property to read.
5425 </desc>
5426 </param>
5427 <param name="value" type="wstring" dir="return">
5428 <desc>
5429 The value of the property. If the property does not exist then this
5430 will be empty.
5431 </desc>
5432 </param>
5433 </method>
5434
5435 <method name="getGuestPropertyTimestamp">
5436 <desc>
5437 Reads a property timestamp from the machine's guest property store.
5438
5439 <result name="VBOX_E_INVALID_VM_STATE">
5440 Machine session is not open.
5441 </result>
5442
5443 </desc>
5444 <param name="property" type="wstring" dir="in">
5445 <desc>
5446 The name of the property to read.
5447 </desc>
5448 </param>
5449 <param name="value" type="unsigned long long" dir="return">
5450 <desc>
5451 The timestamp. If the property does not exist then this will be
5452 empty.
5453 </desc>
5454 </param>
5455 </method>
5456
5457 <method name="setGuestProperty">
5458 <desc>
5459 Sets, changes or deletes an entry in the machine's guest property
5460 store.
5461
5462 <result name="E_ACCESSDENIED">
5463 Property cannot be changed.
5464 </result>
5465 <result name="E_INVALIDARG">
5466 Invalid @a flags.
5467 </result>
5468 <result name="VBOX_E_INVALID_VM_STATE">
5469 Virtual machine is not mutable or session not open.
5470 </result>
5471 <result name="VBOX_E_INVALID_OBJECT_STATE">
5472 Cannot set transient property when machine not running.
5473 </result>
5474
5475 </desc>
5476 <param name="property" type="wstring" dir="in">
5477 <desc>
5478 The name of the property to set, change or delete.
5479 </desc>
5480 </param>
5481 <param name="value" type="wstring" dir="in">
5482 <desc>
5483 The new value of the property to set, change or delete. If the
5484 property does not yet exist and value is non-empty, it will be
5485 created. If the value is @c null or empty, the property will be
5486 deleted if it exists.
5487 </desc>
5488 </param>
5489 <param name="flags" type="wstring" dir="in">
5490 <desc>
5491 Additional property parameters, passed as a comma-separated list of
5492 "name=value" type entries.
5493 </desc>
5494 </param>
5495 </method>
5496
5497 <method name="setGuestPropertyValue">
5498 <desc>
5499 Sets, changes or deletes a value in the machine's guest property
5500 store. The flags field will be left unchanged or created empty for a
5501 new property.
5502
5503 <result name="E_ACCESSDENIED">
5504 Property cannot be changed.
5505 </result>
5506 <result name="VBOX_E_INVALID_VM_STATE">
5507 Virtual machine is not mutable or session not open.
5508 </result>
5509 <result name="VBOX_E_INVALID_OBJECT_STATE">
5510 Cannot set transient property when machine not running.
5511 </result>
5512 </desc>
5513
5514 <param name="property" type="wstring" dir="in">
5515 <desc>
5516 The name of the property to set, change or delete.
5517 </desc>
5518 </param>
5519 <param name="value" type="wstring" dir="in">
5520 <desc>
5521 The new value of the property to set, change or delete. If the
5522 property does not yet exist and value is non-empty, it will be
5523 created. If the value is @c null or empty, the property will be
5524 deleted if it exists.
5525 </desc>
5526 </param>
5527 </method>
5528
5529 <method name="enumerateGuestProperties">
5530 <desc>
5531 Return a list of the guest properties matching a set of patterns along
5532 with their values, time stamps and flags.
5533 </desc>
5534 <param name="patterns" type="wstring" dir="in">
5535 <desc>
5536 The patterns to match the properties against, separated by '|'
5537 characters. If this is empty or @c null, all properties will match.
5538 </desc>
5539 </param>
5540 <param name="name" type="wstring" dir="out" safearray="yes">
5541 <desc>
5542 The names of the properties returned.
5543 </desc>
5544 </param>
5545 <param name="value" type="wstring" dir="out" safearray="yes">
5546 <desc>
5547 The values of the properties returned. The array entries match the
5548 corresponding entries in the @a name array.
5549 </desc>
5550 </param>
5551 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5552 <desc>
5553 The time stamps of the properties returned. The array entries match
5554 the corresponding entries in the @a name array.
5555 </desc>
5556 </param>
5557 <param name="flags" type="wstring" dir="out" safearray="yes">
5558 <desc>
5559 The flags of the properties returned. The array entries match the
5560 corresponding entries in the @a name array.
5561 </desc>
5562 </param>
5563 </method>
5564</interface>
5565
5566 <!--
5567 // IConsole
5568 /////////////////////////////////////////////////////////////////////////
5569 -->
5570
5571 <interface
5572 name="IConsoleCallback" extends="$unknown"
5573 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5574 wsmap="suppress"
5575 >
5576
5577 <desc>
5578 This interface is used by a client of the Main API that need to
5579 be notified of events. For example, a graphical user interface
5580 can use this to learn about machine state changes so they can
5581 update the list of virtual machines without having to rely
5582 on polling.
5583
5584 Whenever relevant events occur in VirtualBox, the callbacks in
5585 objects of this interface are called. In order for this to be
5586 useful, a client needs to create its own subclass that implements
5587 this interface in which the methods for the relevant callbacks
5588 are overridden. An instance of this subclass interface can then
5589 be passed to <link to="IConsole::registerCallback" />.
5590 </desc>
5591
5592 <method name="onMousePointerShapeChange">
5593 <desc>
5594 Notification when the guest mouse pointer shape has
5595 changed. The new shape data is given.
5596 </desc>
5597 <param name="visible" type="boolean" dir="in">
5598 <desc>
5599 Flag whether the pointer is visible.
5600 </desc>
5601 </param>
5602 <param name="alpha" type="boolean" dir="in">
5603 <desc>
5604 Flag whether the pointer has an alpha channel.
5605 </desc>
5606 </param>
5607 <param name="xHot" type="unsigned long" dir="in">
5608 <desc>
5609 The pointer hot spot x coordinate.
5610 </desc>
5611 </param>
5612 <param name="yHot" type="unsigned long" dir="in">
5613 <desc>
5614 The pointer hot spot y coordinate.
5615 </desc>
5616 </param>
5617 <param name="width" type="unsigned long" dir="in">
5618 <desc>
5619 Width of the pointer shape in pixels.
5620 </desc>
5621 </param>
5622 <param name="height" type="unsigned long" dir="in">
5623 <desc>
5624 Height of the pointer shape in pixels.
5625 </desc>
5626 </param>
5627 <param name="shape" type="octet" mod="ptr" dir="in">
5628 <desc>
5629 Address of the shape buffer.
5630
5631 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5632 followed by a 32-bpp XOR (color) mask.
5633
5634 For pointers without alpha channel the XOR mask pixels are 32
5635 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5636 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5637
5638 An AND mask is used for pointers with alpha channel, so if the
5639 callback does not support alpha, the pointer could be
5640 displayed as a normal color pointer.
5641
5642 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5643 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5644 height</tt>. The padding bits at the end of each scanline are
5645 undefined.
5646
5647 The XOR mask follows the AND mask on the next 4-byte aligned
5648 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5649 Bytes in the gap between the AND and the XOR mask are undefined.
5650 The XOR mask scanlines have no gap between them and the size of
5651 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5652
5653 <note>
5654 If @a shape is 0, only the pointer visibility is changed.
5655 </note>
5656 </desc>
5657 </param>
5658 </method>
5659
5660 <method name="onMouseCapabilityChange">
5661 <desc>
5662 Notification when the mouse capabilities reported by the
5663 guest have changed. The new capabilities are passed.
5664 </desc>
5665 <param name="supportsAbsolute" type="boolean" dir="in"/>
5666 <param name="needsHostCursor" type="boolean" dir="in"/>
5667 </method>
5668
5669 <method name="onKeyboardLedsChange">
5670 <desc>
5671 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5672 to alter the state of the keyboard LEDs.
5673 </desc>
5674 <param name="numLock" type="boolean" dir="in"/>
5675 <param name="capsLock" type="boolean" dir="in"/>
5676 <param name="scrollLock" type="boolean" dir="in"/>
5677 </method>
5678
5679 <method name="onStateChange">
5680 <desc>
5681 Notification when the execution state of the machine has changed.
5682 The new state will be given.
5683 </desc>
5684 <param name="state" type="MachineState" dir="in"/>
5685 </method>
5686
5687 <method name="onAdditionsStateChange">
5688 <desc>
5689 Notification when a Guest Additions property changes.
5690 Interested callees should query IGuest attributes to
5691 find out what has changed.
5692 </desc>
5693 </method>
5694
5695 <method name="onNetworkAdapterChange">
5696 <desc>
5697 Notification when a property of one of the
5698 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5699 changes. Interested callees should use INetworkAdapter methods and
5700 attributes to find out what has changed.
5701 </desc>
5702 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5703 <desc>Network adapter that is subject to change.</desc>
5704 </param>
5705 </method>
5706
5707 <method name="onSerialPortChange">
5708 <desc>
5709 Notification when a property of one of the
5710 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5711 Interested callees should use ISerialPort methods and attributes
5712 to find out what has changed.
5713 </desc>
5714 <param name="serialPort" type="ISerialPort" dir="in">
5715 <desc>Serial port that is subject to change.</desc>
5716 </param>
5717 </method>
5718
5719 <method name="onParallelPortChange">
5720 <desc>
5721 Notification when a property of one of the
5722 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5723 changes. Interested callees should use ISerialPort methods and
5724 attributes to find out what has changed.
5725 </desc>
5726 <param name="parallelPort" type="IParallelPort" dir="in">
5727 <desc>Parallel port that is subject to change.</desc>
5728 </param>
5729 </method>
5730
5731 <method name="onStorageControllerChange">
5732 <desc>
5733 Notification when a property of one of the
5734 virtual <link to="IMachine::storageControllers">storage controllers</link>
5735 changes. Interested callees should query the corresponding collections
5736 to find out what has changed.
5737 </desc>
5738 </method>
5739
5740 <method name="onMediumChange">
5741 <desc>
5742 Notification when a
5743 <link to="IMachine::mediumAttachments">medium attachment</link>
5744 changes.
5745 </desc>
5746 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5747 <desc>Medium attachment that is subject to change.</desc>
5748 </param>
5749 </method>
5750
5751 <method name="onVRDPServerChange">
5752 <desc>
5753 Notification when a property of the
5754 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5755 Interested callees should use IVRDPServer methods and attributes to
5756 find out what has changed.
5757 </desc>
5758 </method>
5759
5760 <method name="onRemoteDisplayInfoChange">
5761 <desc>
5762 Notification when the status of the VRDP server changes. Interested callees
5763 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5764 attributes to find out what is the current status.
5765 </desc>
5766 </method>
5767
5768 <method name="onUSBControllerChange">
5769 <desc>
5770 Notification when a property of the virtual
5771 <link to="IMachine::USBController">USB controller</link> changes.
5772 Interested callees should use IUSBController methods and attributes to
5773 find out what has changed.
5774 </desc>
5775 </method>
5776
5777 <method name="onUSBDeviceStateChange">
5778 <desc>
5779 Notification when a USB device is attached to or detached from
5780 the virtual USB controller.
5781
5782 This notification is sent as a result of the indirect
5783 request to attach the device because it matches one of the
5784 machine USB filters, or as a result of the direct request
5785 issued by <link to="IConsole::attachUSBDevice"/> or
5786 <link to="IConsole::detachUSBDevice"/>.
5787
5788 This notification is sent in case of both a succeeded and a
5789 failed request completion. When the request succeeds, the
5790 @a error parameter is @c null, and the given device has been
5791 already added to (when @a attached is @c true) or removed from
5792 (when @a attached is @c false) the collection represented by
5793 <link to="IConsole::USBDevices"/>. On failure, the collection
5794 doesn't change and the @a error parameter represents the error
5795 message describing the failure.
5796
5797 </desc>
5798 <param name="device" type="IUSBDevice" dir="in">
5799 <desc>Device that is subject to state change.</desc>
5800 </param>
5801 <param name="attached" type="boolean" dir="in">
5802 <desc>
5803 @c true if the device was attached and @c false otherwise.
5804 </desc>
5805 </param>
5806 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5807 <desc>
5808 @c null on success or an error message object on failure.
5809 </desc>
5810 </param>
5811 </method>
5812
5813 <method name="onSharedFolderChange">
5814 <desc>
5815 Notification when a shared folder is added or removed.
5816 The @a scope argument defines one of three scopes:
5817 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5818 (<link to="Scope_Global">Global</link>),
5819 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5820 the machine (<link to="Scope_Machine">Machine</link>) or <link
5821 to="IConsole::sharedFolders">transient shared folders</link> of the
5822 machine (<link to="Scope_Session">Session</link>). Interested callees
5823 should use query the corresponding collections to find out what has
5824 changed.
5825 </desc>
5826 <param name="scope" type="Scope" dir="in">
5827 <desc>Scope of the notification.</desc>
5828 </param>
5829 </method>
5830
5831 <method name="onRuntimeError">
5832 <desc>
5833 Notification when an error happens during the virtual
5834 machine execution.
5835
5836 There are three kinds of runtime errors:
5837 <ul>
5838 <li><i>fatal</i></li>
5839 <li><i>non-fatal with retry</i></li>
5840 <li><i>non-fatal warnings</i></li>
5841 </ul>
5842
5843 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5844 to @c true. In case of fatal errors, the virtual machine
5845 execution is always paused before calling this notification, and
5846 the notification handler is supposed either to immediately save
5847 the virtual machine state using <link to="IConsole::saveState"/>
5848 or power it off using <link to="IConsole::powerDown"/>.
5849 Resuming the execution can lead to unpredictable results.
5850
5851 <b>Non-fatal</b> errors and warnings are indicated by the
5852 @a fatal parameter set to @c false. If the virtual machine
5853 is in the Paused state by the time the error notification is
5854 received, it means that the user can <i>try to resume</i> the machine
5855 execution after attempting to solve the problem that caused the
5856 error. In this case, the notification handler is supposed
5857 to show an appropriate message to the user (depending on the
5858 value of the @a id parameter) that offers several actions such
5859 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5860 wants to retry, the notification handler should continue
5861 the machine execution using the <link to="IConsole::resume"/>
5862 call. If the machine execution is not Paused during this
5863 notification, then it means this notification is a <i>warning</i>
5864 (for example, about a fatal condition that can happen very soon);
5865 no immediate action is required from the user, the machine
5866 continues its normal execution.
5867
5868 Note that in either case the notification handler
5869 <b>must not</b> perform any action directly on a thread
5870 where this notification is called. Everything it is allowed to
5871 do is to post a message to another thread that will then talk
5872 to the user and take the corresponding action.
5873
5874 Currently, the following error identifiers are known:
5875 <ul>
5876 <li><tt>"HostMemoryLow"</tt></li>
5877 <li><tt>"HostAudioNotResponding"</tt></li>
5878 <li><tt>"VDIStorageFull"</tt></li>
5879 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5880 </ul>
5881
5882 <note>
5883 This notification is not designed to be implemented by
5884 more than one callback at a time. If you have multiple
5885 IConsoleCallback instances registered on the given
5886 IConsole object, make sure you simply do nothing but
5887 return @c S_OK from all but one of them that does actual
5888 user notification and performs necessary actions.
5889 </note>
5890
5891 </desc>
5892 <param name="fatal" type="boolean" dir="in">
5893 <desc>Whether the error is fatal or not</desc>
5894 </param>
5895 <param name="id" type="wstring" dir="in">
5896 <desc>Error identifier</desc>
5897 </param>
5898 <param name="message" type="wstring" dir="in">
5899 <desc>Optional error message</desc>
5900 </param>
5901 </method>
5902
5903 <method name="onCanShowWindow">
5904 <desc>
5905 Notification when a call to
5906 <link to="IMachine::canShowConsoleWindow"/> is made by a
5907 front-end to check if a subsequent call to
5908 <link to="IMachine::showConsoleWindow"/> can succeed.
5909
5910 The callee should give an answer appropriate to the current
5911 machine state in the @a canShow argument. This answer must
5912 remain valid at least until the next
5913 <link to="IConsole::state">machine state</link> change.
5914
5915 <note>
5916 This notification is not designed to be implemented by
5917 more than one callback at a time. If you have multiple
5918 IConsoleCallback instances registered on the given
5919 IConsole object, make sure you simply do nothing but
5920 return @c true and @c S_OK from all but one of them that
5921 actually manages console window activation.
5922 </note>
5923 </desc>
5924 <param name="canShow" type="boolean" dir="return">
5925 <desc>
5926 @c true if the console window can be shown and @c false otherwise.
5927 </desc>
5928 </param>
5929 </method>
5930
5931 <method name="onShowWindow">
5932 <desc>
5933 Notification when a call to
5934 <link to="IMachine::showConsoleWindow"/>
5935 requests the console window to be activated and brought to
5936 foreground on the desktop of the host PC.
5937
5938 This notification should cause the VM console process to
5939 perform the requested action as described above. If it is
5940 impossible to do it at a time of this notification, this
5941 method should return a failure.
5942
5943 Note that many modern window managers on many platforms
5944 implement some sort of focus stealing prevention logic, so
5945 that it may be impossible to activate a window without the
5946 help of the currently active application (which is supposedly
5947 an initiator of this notification). In this case, this method
5948 must return a non-zero identifier that represents the
5949 top-level window of the VM console process. The caller, if it
5950 represents a currently active process, is responsible to use
5951 this identifier (in a platform-dependent manner) to perform
5952 actual window activation.
5953
5954 This method must set @a winId to zero if it has performed all
5955 actions necessary to complete the request and the console
5956 window is now active and in foreground, to indicate that no
5957 further action is required on the caller's side.
5958
5959 <note>
5960 This notification is not designed to be implemented by
5961 more than one callback at a time. If you have multiple
5962 IConsoleCallback instances registered on the given
5963 IConsole object, make sure you simply do nothing but
5964 return @c S_OK from all but one of them that actually
5965 manages console window activation.
5966 </note>
5967 </desc>
5968 <param name="winId" type="unsigned long long" dir="return">
5969 <desc>
5970 Platform-dependent identifier of the top-level VM console
5971 window, or zero if this method has performed all actions
5972 necessary to implement the <i>show window</i> semantics for
5973 the given platform and/or this VirtualBox front-end.
5974 </desc>
5975 </param>
5976 </method>
5977
5978 </interface>
5979
5980 <interface
5981 name="IRemoteDisplayInfo" extends="$unknown"
5982 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5983 wsmap="struct"
5984 >
5985 <desc>
5986 Contains information about the remote display (VRDP) capabilities and status.
5987 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5988 </desc>
5989
5990 <attribute name="active" type="boolean" readonly="yes">
5991 <desc>
5992 Whether the remote display connection is active.
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="port" type="long" readonly="yes">
5997 <desc>
5998 VRDP server port number. If this property is equal to <tt>0</tt>, then
5999 the VRDP server failed to start, usually because there are no free TCP
6000 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6001 server has not yet been started.
6002 </desc>
6003 </attribute>
6004
6005 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6006 <desc>
6007 How many times a client connected.
6008 </desc>
6009 </attribute>
6010
6011 <attribute name="beginTime" type="long long" readonly="yes">
6012 <desc>
6013 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6014 </desc>
6015 </attribute>
6016
6017 <attribute name="endTime" type="long long" readonly="yes">
6018 <desc>
6019 When the last connection was terminated or the current time, if
6020 connection is still active, in milliseconds since 1970-01-01 UTC.
6021 </desc>
6022 </attribute>
6023
6024 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6025 <desc>
6026 How many bytes were sent in last or current, if still active, connection.
6027 </desc>
6028 </attribute>
6029
6030 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6031 <desc>
6032 How many bytes were sent in all connections.
6033 </desc>
6034 </attribute>
6035
6036 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6037 <desc>
6038 How many bytes were received in last or current, if still active, connection.
6039 </desc>
6040 </attribute>
6041
6042 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6043 <desc>
6044 How many bytes were received in all connections.
6045 </desc>
6046 </attribute>
6047
6048 <attribute name="user" type="wstring" readonly="yes">
6049 <desc>
6050 Login user name supplied by the client.
6051 </desc>
6052 </attribute>
6053
6054 <attribute name="domain" type="wstring" readonly="yes">
6055 <desc>
6056 Login domain name supplied by the client.
6057 </desc>
6058 </attribute>
6059
6060 <attribute name="clientName" type="wstring" readonly="yes">
6061 <desc>
6062 The client name supplied by the client.
6063 </desc>
6064 </attribute>
6065
6066 <attribute name="clientIP" type="wstring" readonly="yes">
6067 <desc>
6068 The IP address of the client.
6069 </desc>
6070 </attribute>
6071
6072 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6073 <desc>
6074 The client software version number.
6075 </desc>
6076 </attribute>
6077
6078 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6079 <desc>
6080 Public key exchange method used when connection was established.
6081 Values: 0 - RDP4 public key exchange scheme.
6082 1 - X509 certificates were sent to client.
6083 </desc>
6084 </attribute>
6085
6086 </interface>
6087
6088 <interface
6089 name="IConsole" extends="$unknown"
6090 uuid="03312360-0364-4b7a-ad71-1a8450133774"
6091 wsmap="managed"
6092 >
6093 <desc>
6094 The IConsole interface represents an interface to control virtual
6095 machine execution.
6096
6097 The console object that implements the IConsole interface is obtained
6098 from a session object after the session for the given machine has been
6099 opened using one of <link to="IVirtualBox::openSession"/>,
6100 <link to="IVirtualBox::openRemoteSession"/> or
6101 <link to="IVirtualBox::openExistingSession"/> methods.
6102
6103 Methods of the IConsole interface allow the caller to query the current
6104 virtual machine execution state, pause the machine or power it down, save
6105 the machine state or take a snapshot, attach and detach removable media
6106 and so on.
6107
6108 <see>ISession</see>
6109 </desc>
6110
6111 <attribute name="machine" type="IMachine" readonly="yes">
6112 <desc>
6113 Machine object this console is sessioned with.
6114 <note>
6115 This is a convenience property, it has the same value as
6116 <link to="ISession::machine"/> of the corresponding session
6117 object.
6118 </note>
6119 </desc>
6120 </attribute>
6121
6122 <attribute name="state" type="MachineState" readonly="yes">
6123 <desc>
6124 Current execution state of the machine.
6125 <note>
6126 This property always returns the same value as the corresponding
6127 property of the IMachine object this console is sessioned with.
6128 For the process that owns (executes) the VM, this is the
6129 preferable way of querying the VM state, because no IPC
6130 calls are made.
6131 </note>
6132 </desc>
6133 </attribute>
6134
6135 <attribute name="guest" type="IGuest" readonly="yes">
6136 <desc>Guest object.</desc>
6137 </attribute>
6138
6139 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6140 <desc>
6141 Virtual keyboard object.
6142 <note>
6143 If the machine is not running, any attempt to use
6144 the returned object will result in an error.
6145 </note>
6146 </desc>
6147 </attribute>
6148
6149 <attribute name="mouse" type="IMouse" readonly="yes">
6150 <desc>
6151 Virtual mouse object.
6152 <note>
6153 If the machine is not running, any attempt to use
6154 the returned object will result in an error.
6155 </note>
6156 </desc>
6157 </attribute>
6158
6159 <attribute name="display" type="IDisplay" readonly="yes">
6160 <desc>Virtual display object.
6161 <note>
6162 If the machine is not running, any attempt to use
6163 the returned object will result in an error.
6164 </note>
6165 </desc>
6166 </attribute>
6167
6168 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6169 <desc>Debugging interface.</desc>
6170 </attribute>
6171
6172 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6173 <desc>
6174 Collection of USB devices currently attached to the virtual
6175 USB controller.
6176 <note>
6177 The collection is empty if the machine is not running.
6178 </note>
6179 </desc>
6180 </attribute>
6181
6182 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6183 <desc>
6184 List of USB devices currently attached to the remote VRDP client.
6185 Once a new device is physically attached to the remote host computer,
6186 it appears in this list and remains there until detached.
6187 </desc>
6188 </attribute>
6189
6190 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6191 <desc>
6192 Collection of shared folders for the current session. These folders
6193 are called transient shared folders because they are available to the
6194 guest OS running inside the associated virtual machine only for the
6195 duration of the session (as opposed to
6196 <link to="IMachine::sharedFolders"/> which represent permanent shared
6197 folders). When the session is closed (e.g. the machine is powered down),
6198 these folders are automatically discarded.
6199
6200 New shared folders are added to the collection using
6201 <link to="#createSharedFolder"/>. Existing shared folders can be
6202 removed using <link to="#removeSharedFolder"/>.
6203 </desc>
6204 </attribute>
6205
6206 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6207 <desc>
6208 Interface that provides information on Remote Display (VRDP) connection.
6209 </desc>
6210 </attribute>
6211
6212 <method name="powerUp">
6213 <desc>
6214 Starts the virtual machine execution using the current machine
6215 state (that is, its current execution state, current settings and
6216 current hard disks).
6217
6218 If the machine is powered off or aborted, the execution will
6219 start from the beginning (as if the real hardware were just
6220 powered on).
6221
6222 If the machine is in the <link to="MachineState_Saved"/> state,
6223 it will continue its execution the point where the state has
6224 been saved.
6225
6226 <note>
6227 Unless you are trying to write a new VirtualBox front-end that
6228 performs direct machine execution (like the VirtualBox or VBoxSDL
6229 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6230 session opened by <link to="IVirtualBox::openSession"/> and use this
6231 session only to change virtual machine settings. If you simply want to
6232 start virtual machine execution using one of the existing front-ends
6233 (for example the VirtualBox GUI or headless server), simply use
6234 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6235 power up the machine automatically for you.
6236 </note>
6237
6238 <see>#saveState</see>
6239 <result name="VBOX_E_INVALID_VM_STATE">
6240 Virtual machine already running.
6241 </result>
6242 <result name="VBOX_E_HOST_ERROR">
6243 Host interface does not exist or name not set.
6244 </result>
6245 <result name="VBOX_E_FILE_ERROR">
6246 Invalid saved state file.
6247 </result>
6248 </desc>
6249 <param name="progress" type="IProgress" dir="return">
6250 <desc>Progress object to track the operation completion.</desc>
6251 </param>
6252 </method>
6253
6254 <method name="powerUpPaused">
6255 <desc>
6256 Identical to powerUp except that the VM will enter the
6257 <link to="MachineState_Paused"/> state, instead of
6258 <link to="MachineState_Running"/>.
6259
6260 <see>#powerUp</see>
6261 <result name="VBOX_E_INVALID_VM_STATE">
6262 Virtual machine already running.
6263 </result>
6264 <result name="VBOX_E_HOST_ERROR">
6265 Host interface does not exist or name not set.
6266 </result>
6267 <result name="VBOX_E_FILE_ERROR">
6268 Invalid saved state file.
6269 </result>
6270 </desc>
6271 <param name="progress" type="IProgress" dir="return">
6272 <desc>Progress object to track the operation completion.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="powerDown">
6277 <desc>
6278 Initiates the power down procedure to stop the virtual machine
6279 execution.
6280
6281 The completion of the power down procedure is tracked using the returned
6282 IProgress object. After the operation is complete, the machine will go
6283 to the PoweredOff state.
6284 <result name="VBOX_E_INVALID_VM_STATE">
6285 Virtual machine must be Running, Paused or Stuck to be powered down.
6286 </result>
6287 </desc>
6288 <param name="progress" type="IProgress" dir="return">
6289 <desc>Progress object to track the operation completion.</desc>
6290 </param>
6291 </method>
6292
6293 <method name="reset">
6294 <desc>Resets the virtual machine.
6295 <result name="VBOX_E_INVALID_VM_STATE">
6296 Virtual machine not in Running state.
6297 </result>
6298 <result name="VBOX_E_VM_ERROR">
6299 Virtual machine error in reset operation.
6300 </result>
6301 </desc>
6302 </method>
6303
6304 <method name="pause">
6305 <desc>Pauses the virtual machine execution.
6306 <result name="VBOX_E_INVALID_VM_STATE">
6307 Virtual machine not in Running state.
6308 </result>
6309 <result name="VBOX_E_VM_ERROR">
6310 Virtual machine error in suspend operation.
6311 </result>
6312 </desc>
6313 </method>
6314
6315 <method name="resume">
6316 <desc>Resumes the virtual machine execution.
6317 <result name="VBOX_E_INVALID_VM_STATE">
6318 Virtual machine not in Paused state.
6319 </result>
6320 <result name="VBOX_E_VM_ERROR">
6321 Virtual machine error in resume operation.
6322 </result>
6323 </desc>
6324 </method>
6325
6326 <method name="powerButton">
6327 <desc>Sends the ACPI power button event to the guest.
6328 <result name="VBOX_E_INVALID_VM_STATE">
6329 Virtual machine not in Running state.
6330 </result>
6331 <result name="VBOX_E_PDM_ERROR">
6332 Controlled power off failed.
6333 </result>
6334 </desc>
6335 </method>
6336
6337 <method name="sleepButton">
6338 <desc>Sends the ACPI sleep button event to the guest.
6339 <result name="VBOX_E_INVALID_VM_STATE">
6340 Virtual machine not in Running state.
6341 </result>
6342 <result name="VBOX_E_PDM_ERROR">
6343 Sending sleep button event failed.
6344 </result>
6345 </desc>
6346 </method>
6347
6348 <method name="getPowerButtonHandled">
6349 <desc>Checks if the last power button event was handled by guest.
6350 <result name="VBOX_E_PDM_ERROR">
6351 Checking if the event was handled by the guest OS failed.
6352 </result>
6353 </desc>
6354 <param name="handled" type="boolean" dir="return"/>
6355 </method>
6356
6357 <method name="getGuestEnteredACPIMode">
6358 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6359 G1 (sleeping). If this method returns @c false, the guest will
6360 most likely not respond to external ACPI events.
6361 <result name="VBOX_E_INVALID_VM_STATE">
6362 Virtual machine not in Running state.
6363 </result>
6364 </desc>
6365 <param name="entered" type="boolean" dir="return"/>
6366 </method>
6367
6368 <method name="saveState">
6369 <desc>
6370 Saves the current execution state of a running virtual machine
6371 and stops its execution.
6372
6373 After this operation completes, the machine will go to the
6374 Saved state. Next time it is powered up, this state will
6375 be restored and the machine will continue its execution from
6376 the place where it was saved.
6377
6378 This operation differs from taking a snapshot to the effect
6379 that it doesn't create new differencing media. Also, once
6380 the machine is powered up from the state saved using this method,
6381 the saved state is deleted, so it will be impossible to return
6382 to this state later.
6383
6384 <note>
6385 On success, this method implicitly calls
6386 <link to="IMachine::saveSettings"/> to save all current machine
6387 settings (including runtime changes to the DVD medium, etc.).
6388 Together with the impossibility to change any VM settings when it is
6389 in the Saved state, this guarantees adequate hardware
6390 configuration of the machine when it is restored from the saved
6391 state file.
6392 </note>
6393
6394 <note>
6395 The machine must be in the Running or Paused state, otherwise
6396 the operation will fail.
6397 </note>
6398 <result name="VBOX_E_INVALID_VM_STATE">
6399 Virtual machine state neither Running nor Paused.
6400 </result>
6401 <result name="VBOX_E_FILE_ERROR">
6402 Failed to create directory for saved state file.
6403 </result>
6404
6405 <see><link to="#takeSnapshot"/></see>
6406 </desc>
6407 <param name="progress" type="IProgress" dir="return">
6408 <desc>Progress object to track the operation completion.</desc>
6409 </param>
6410 </method>
6411
6412 <method name="adoptSavedState">
6413 <desc>
6414 Associates the given saved state file to the virtual machine.
6415
6416 On success, the machine will go to the Saved state. Next time it is
6417 powered up, it will be restored from the adopted saved state and
6418 continue execution from the place where the saved state file was
6419 created.
6420
6421 The specified saved state file path may be absolute or relative to the
6422 folder the VM normally saves the state to (usually,
6423 <link to="IMachine::snapshotFolder"/>).
6424
6425 <note>
6426 It's a caller's responsibility to make sure the given saved state
6427 file is compatible with the settings of this virtual machine that
6428 represent its virtual hardware (memory size, hard disk configuration
6429 etc.). If there is a mismatch, the behavior of the virtual machine
6430 is undefined.
6431 </note>
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine state neither PoweredOff nor Aborted.
6434 </result>
6435 </desc>
6436 <param name="savedStateFile" type="wstring" dir="in">
6437 <desc>Path to the saved state file to adopt.</desc>
6438 </param>
6439 </method>
6440
6441 <method name="forgetSavedState">
6442 <desc>
6443 Forgets the saved state of the virtual machine previously created
6444 by <link to="#saveState"/>. Next time the machine is powered up, a
6445 clean boot will occur. If @a remove is @c true the saved state file
6446 is deleted.
6447 <note>
6448 This operation is equivalent to resetting or powering off
6449 the machine without doing a proper shutdown in the guest OS.
6450 </note>
6451 <result name="VBOX_E_INVALID_VM_STATE">
6452 Virtual machine not in state Saved.
6453 </result>
6454 </desc>
6455 <param name="remove" type="boolean" dir="in">
6456 <desc>If @c true remove the saved state file.</desc>
6457 </param>
6458 </method>
6459
6460 <method name="getDeviceActivity">
6461 <desc>
6462 Gets the current activity type of a given device or device group.
6463 <result name="E_INVALIDARG">
6464 Invalid device type.
6465 </result>
6466 </desc>
6467 <param name="type" type="DeviceType" dir="in"/>
6468 <param name="activity" type="DeviceActivity" dir="return"/>
6469 </method>
6470
6471 <method name="attachUSBDevice">
6472 <desc>
6473 Attaches a host USB device with the given UUID to the
6474 USB controller of the virtual machine.
6475
6476 The device needs to be in one of the following states:
6477 <link to="USBDeviceState_Busy"/>,
6478 <link to="USBDeviceState_Available"/> or
6479 <link to="USBDeviceState_Held"/>,
6480 otherwise an error is immediately returned.
6481
6482 When the device state is
6483 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6484 be returned if the host computer refuses to release it for some reason.
6485
6486 <see>IUSBController::deviceFilters, USBDeviceState</see>
6487 <result name="VBOX_E_INVALID_VM_STATE">
6488 Virtual machine state neither Running nor Paused.
6489 </result>
6490 <result name="VBOX_E_PDM_ERROR">
6491 Virtual machine does not have a USB controller.
6492 </result>
6493 </desc>
6494 <param name="id" type="uuid" mod="string" dir="in">
6495 <desc>UUID of the host USB device to attach.</desc>
6496 </param>
6497 </method>
6498
6499 <method name="detachUSBDevice">
6500 <desc>
6501 Detaches an USB device with the given UUID from the USB controller
6502 of the virtual machine.
6503
6504 After this method succeeds, the VirtualBox server re-initiates
6505 all USB filters as if the device were just physically attached
6506 to the host, but filters of this machine are ignored to avoid
6507 a possible automatic re-attachment.
6508
6509 <see>IUSBController::deviceFilters, USBDeviceState</see>
6510
6511 <result name="VBOX_E_PDM_ERROR">
6512 Virtual machine does not have a USB controller.
6513 </result>
6514 <result name="E_INVALIDARG">
6515 USB device not attached to this virtual machine.
6516 </result>
6517 </desc>
6518 <param name="id" type="uuid" mod="string" dir="in">
6519 <desc>UUID of the USB device to detach.</desc>
6520 </param>
6521 <param name="device" type="IUSBDevice" dir="return">
6522 <desc>Detached USB device.</desc>
6523 </param>
6524 </method>
6525
6526 <method name="findUSBDeviceByAddress">
6527 <desc>
6528 Searches for a USB device with the given host address.
6529
6530 <result name="VBOX_E_OBJECT_NOT_FOUND">
6531 Given @c name does not correspond to any USB device.
6532 </result>
6533
6534 <see>IUSBDevice::address</see>
6535 </desc>
6536 <param name="name" type="wstring" dir="in">
6537 <desc>
6538 Address of the USB device (as assigned by the host) to
6539 search for.
6540 </desc>
6541 </param>
6542 <param name="device" type="IUSBDevice" dir="return">
6543 <desc>Found USB device object.</desc>
6544 </param>
6545 </method>
6546
6547 <method name="findUSBDeviceById">
6548 <desc>
6549 Searches for a USB device with the given UUID.
6550
6551 <result name="VBOX_E_OBJECT_NOT_FOUND">
6552 Given @c id does not correspond to any USB device.
6553 </result>
6554
6555 <see>IUSBDevice::id</see>
6556 </desc>
6557 <param name="id" type="uuid" mod="string" dir="in">
6558 <desc>UUID of the USB device to search for.</desc>
6559 </param>
6560 <param name="device" type="IUSBDevice" dir="return">
6561 <desc>Found USB device object.</desc>
6562 </param>
6563 </method>
6564
6565 <method name="createSharedFolder">
6566 <desc>
6567 Creates a transient new shared folder by associating the given logical
6568 name with the given host path, adds it to the collection of shared
6569 folders and starts sharing it. Refer to the description of
6570 <link to="ISharedFolder"/> to read more about logical names.
6571
6572 <result name="VBOX_E_INVALID_VM_STATE">
6573 Virtual machine in Saved state or currently changing state.
6574 </result>
6575 <result name="VBOX_E_FILE_ERROR">
6576 Shared folder already exists or not accessible.
6577 </result>
6578 </desc>
6579 <param name="name" type="wstring" dir="in">
6580 <desc>Unique logical name of the shared folder.</desc>
6581 </param>
6582 <param name="hostPath" type="wstring" dir="in">
6583 <desc>Full path to the shared folder in the host file system.</desc>
6584 </param>
6585 <param name="writable" type="boolean" dir="in">
6586 <desc>Whether the share is writable or readonly</desc>
6587 </param>
6588 </method>
6589
6590 <method name="removeSharedFolder">
6591 <desc>
6592 Removes a transient shared folder with the given name previously
6593 created by <link to="#createSharedFolder"/> from the collection of
6594 shared folders and stops sharing it.
6595 <result name="VBOX_E_INVALID_VM_STATE">
6596 Virtual machine in Saved state or currently changing state.
6597 </result>
6598 <result name="VBOX_E_FILE_ERROR">
6599 Shared folder does not exists.
6600 </result>
6601 </desc>
6602 <param name="name" type="wstring" dir="in">
6603 <desc>Logical name of the shared folder to remove.</desc>
6604 </param>
6605 </method>
6606
6607 <method name="takeSnapshot">
6608 <desc>
6609 Saves the current execution state
6610 and all settings of the machine and creates differencing images
6611 for all normal (non-independent) media.
6612 See <link to="ISnapshot" /> for an introduction to snapshots.
6613
6614 This method can be called for a PoweredOff, Saved (see
6615 <link to="#saveState"/>), Running or
6616 Paused virtual machine. When the machine is PoweredOff, an
6617 offline snapshot is created. When the machine is Running a live
6618 snapshot is created, and an online snapshot is is created when Paused.
6619
6620 The taken snapshot is always based on the
6621 <link to="IMachine::currentSnapshot">current snapshot</link>
6622 of the associated virtual machine and becomes a new current snapshot.
6623
6624 <note>
6625 This method implicitly calls <link to="IMachine::saveSettings"/> to
6626 save all current machine settings before taking an offline snapshot.
6627 </note>
6628
6629 <result name="VBOX_E_INVALID_VM_STATE">
6630 Virtual machine currently changing state.
6631 </result>
6632 </desc>
6633 <param name="name" type="wstring" dir="in">
6634 <desc>Short name for the snapshot.</desc>
6635 </param>
6636 <param name="description" type="wstring" dir="in">
6637 <desc>Optional description of the snapshot.</desc>
6638 </param>
6639 <param name="progress" type="IProgress" dir="return">
6640 <desc>Progress object to track the operation completion.</desc>
6641 </param>
6642 </method>
6643
6644 <method name="discardSnapshot">
6645 <desc>
6646 Starts discarding the specified snapshot asynchronously.
6647 See <link to="ISnapshot" /> for an introduction to snapshots.
6648
6649 The execution state
6650 and settings of the associated machine stored in the snapshot
6651 will be deleted. The contents of all differencing media of
6652 this snapshot will be merged with the contents of their
6653 dependent child media to keep the disks valid (in other
6654 words, all changes represented by media being discarded
6655 will be propagated to their child medium). After that, this
6656 snapshot's differencing medium will be deleted. The parent
6657 of this snapshot will become a new parent for all its child
6658 snapshots.
6659
6660 If the discarded snapshot is the current one, its parent
6661 snapshot will become a new current snapshot. The current machine
6662 state is not directly affected in this case, except that
6663 currently attached differencing media based on media
6664 of the discarded snapshot will be also merged as described
6665 above.
6666
6667 If the discarded snapshot is the first one (the root snapshot)
6668 and it has exactly one child snapshot, this child snapshot will
6669 become the first snapshot after discarding. If there are no
6670 children at all (i.e. the first snapshot is the only snapshot of
6671 the machine), both the current and the first snapshot of the
6672 machine will be set to @c null. In all other cases, the first
6673 snapshot cannot be discarded.
6674
6675 You cannot discard the snapshot if it
6676 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6677 media that have differencing media based on them. Snapshots of
6678 such kind can be discarded only when every normal medium has either
6679 no children at all or exactly one child. In the former case, the normal
6680 medium simply becomes unused (i.e. not attached to any VM). In the
6681 latter case, it receives all the changes stored in the child medium,
6682 and then it replaces the child medium in the configuration of the
6683 corresponding snapshot or machine.
6684
6685 Also, you cannot discard the snapshot if it stores media
6686 (of any type) having differencing child media that belong
6687 to other machines. Such snapshots can be only discarded after
6688 you discard all snapshots of other machines containing "foreign"
6689 child disks, or detach these "foreign" child disks from machines
6690 they are attached to.
6691
6692 One particular example of the snapshot storing normal media
6693 is the first snapshot of a virtual machine that had normal media
6694 attached when taking the snapshot. Be careful when
6695 discarding such snapshots because this implicitly commits
6696 changes (made since the snapshot being discarded has been taken)
6697 to normal media (as described above), which may be not what
6698 you want.
6699
6700 The virtual machine is put to
6701 the <link to="MachineState_Discarding">Discarding</link> state until
6702 the discard operation is completed.
6703
6704 <note>
6705 The machine must not be running, otherwise the operation
6706 will fail.
6707 </note>
6708
6709 <note>
6710 Child media of all normal media of the discarded snapshot
6711 must be accessible (see <link to="IMedium::state"/>) for this
6712 operation to succeed. In particular, this means that all virtual
6713 machines, whose media are directly or indirectly based on the
6714 media of discarded snapshot, must be powered off.
6715 </note>
6716 <note>
6717 Merging medium contents can be very time and disk space
6718 consuming, if these disks are big in size and have many
6719 children. However, if the snapshot being discarded is the last
6720 (head) snapshot on the branch, the operation will be rather
6721 quick.
6722 </note>
6723 <note>
6724 Note that discarding the current snapshot
6725 will implicitly call <link to="IMachine::saveSettings"/> to
6726 make all current machine settings permanent.
6727 </note>
6728 <result name="VBOX_E_INVALID_VM_STATE">
6729 Virtual machine is running.
6730 </result>
6731 </desc>
6732 <param name="id" type="uuid" mod="string" dir="in">
6733 <desc>UUID of the snapshot to discard.</desc>
6734 </param>
6735 <param name="progress" type="IProgress" dir="return">
6736 <desc>Progress object to track the operation completion.</desc>
6737 </param>
6738 </method>
6739
6740 <method name="discardCurrentState">
6741 <desc>
6742 Starts resetting the machine's current state to the state contained
6743 in the current snapshot, asynchronously. All current settings of the
6744 machine will be reset and changes stored in differencing media
6745 will be lost.
6746 See <link to="ISnapshot" /> for an introduction to snapshots.
6747
6748 After this operation is successfully completed, new empty differencing
6749 media are created for all normal media of the machine.
6750
6751 If the current snapshot of the machine is an online snapshot, the
6752 machine will go to the <link to="MachineState_Saved"> saved
6753 state</link>, so that the next time it is powered on, the execution
6754 state will be restored from the current snapshot.
6755
6756 <note>
6757 The machine must not be running, otherwise the operation will fail.
6758 </note>
6759
6760 <note>
6761 If the machine state is <link to="MachineState_Saved">Saved</link>
6762 prior to this operation, the saved state file will be implicitly
6763 discarded (as if <link to="IConsole::forgetSavedState"/> were
6764 called).
6765 </note>
6766
6767 <result name="VBOX_E_INVALID_VM_STATE">
6768 Virtual machine is running.
6769 </result>
6770 </desc>
6771 <param name="progress" type="IProgress" dir="return">
6772 <desc>Progress object to track the operation completion.</desc>
6773 </param>
6774 </method>
6775
6776 <method name="discardCurrentSnapshotAndState">
6777 <desc>
6778
6779 This method is equivalent to
6780 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6781 (currentSnapshot.id(), progress) followed by
6782 <link to="IConsole::discardCurrentState"/>.
6783
6784 As a result, the machine will be fully restored from the
6785 snapshot preceding the current snapshot, while both the current
6786 snapshot and the current machine state will be discarded.
6787
6788 If the current snapshot is the first snapshot of the machine (i.e. it
6789 has the only snapshot), the current machine state will be
6790 discarded <b>before</b> discarding the snapshot. In other words, the
6791 machine will be restored from its last snapshot, before discarding
6792 it. This differs from performing a single
6793 <link to="IConsole::discardSnapshot"/> call (note that no
6794 <link to="IConsole::discardCurrentState"/> will be possible after it)
6795 to the effect that the latter will preserve the current state instead of
6796 discarding it.
6797
6798 Unless explicitly mentioned otherwise, all remarks and
6799 limitations of the above two methods also apply to this method.
6800
6801 <note>
6802 The machine must not be running, otherwise the operation
6803 will fail.
6804 </note>
6805
6806 <note>
6807 If the machine state is <link to="MachineState_Saved">Saved</link>
6808 prior to this operation, the saved state file will be implicitly
6809 discarded (as if <link to="#forgetSavedState"/> were
6810 called).
6811 </note>
6812
6813 <note>
6814 This method is more efficient than calling both of the above
6815 methods separately: it requires less IPC calls and provides
6816 a single progress object.
6817 </note>
6818
6819 <result name="VBOX_E_INVALID_VM_STATE">
6820 Virtual machine is running.
6821 </result>
6822 </desc>
6823 <param name="progress" type="IProgress" dir="return">
6824 <desc>Progress object to track the operation completion.</desc>
6825 </param>
6826 </method>
6827
6828 <method name="teleport">
6829 <desc>
6830 Teleport the VM to a different host machine or process.
6831
6832 TODO explain the details.
6833
6834 <result name="VBOX_E_INVALID_VM_STATE">
6835 Virtual machine not running or paused.
6836 </result>
6837 </desc>
6838 <param name="hostname" type="wstring" dir="in">
6839 <desc>The name or IP of the host to teleport to.</desc>
6840 </param>
6841 <param name="tcpport" type="unsigned long" dir="in">
6842 <desc>The TCP port to connect to (1..65535).</desc>
6843 </param>
6844 <param name="password" type="wstring" dir="in">
6845 <desc>The password.</desc>
6846 </param>
6847 <param name="progress" type="IProgress" dir="return">
6848 <desc>Progress object to track the operation completion.</desc>
6849 </param>
6850 </method>
6851
6852 <method name="registerCallback">
6853 <desc>
6854 Registers a new console callback on this instance. The methods of the
6855 callback interface will be called by this instance when the appropriate
6856 event occurs.
6857 </desc>
6858 <param name="callback" type="IConsoleCallback" dir="in"/>
6859 </method>
6860
6861 <method name="unregisterCallback">
6862 <desc>
6863 Unregisters the console callback previously registered using
6864 <link to="#registerCallback"/>.
6865 <result name="E_INVALIDARG">
6866 Given @a callback handler is not registered.
6867 </result>
6868 </desc>
6869 <param name="callback" type="IConsoleCallback" dir="in"/>
6870 </method>
6871 </interface>
6872
6873 <!--
6874 // IHost
6875 /////////////////////////////////////////////////////////////////////////
6876 -->
6877
6878 <enum
6879 name="HostNetworkInterfaceMediumType"
6880 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6881 >
6882 <desc>
6883 Type of encapsulation. Ethernet encapsulation includes both wired and
6884 wireless Ethernet connections.
6885 <see>IHostNetworkInterface</see>
6886 </desc>
6887
6888 <const name="Unknown" value="0">
6889 <desc>
6890 The type of interface cannot be determined.
6891 </desc>
6892 </const>
6893 <const name="Ethernet" value="1">
6894 <desc>
6895 Ethernet frame encapsulation.
6896 </desc>
6897 </const>
6898 <const name="PPP" value="2">
6899 <desc>
6900 Point-to-point protocol encapsulation.
6901 </desc>
6902 </const>
6903 <const name="SLIP" value="3">
6904 <desc>
6905 Serial line IP encapsulation.
6906 </desc>
6907 </const>
6908 </enum>
6909
6910 <enum
6911 name="HostNetworkInterfaceStatus"
6912 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6913 >
6914 <desc>
6915 Current status of the interface.
6916 <see>IHostNetworkInterface</see>
6917 </desc>
6918
6919 <const name="Unknown" value="0">
6920 <desc>
6921 The state of interface cannot be determined.
6922 </desc>
6923 </const>
6924 <const name="Up" value="1">
6925 <desc>
6926 The interface is fully operational.
6927 </desc>
6928 </const>
6929 <const name="Down" value="2">
6930 <desc>
6931 The interface is not functioning.
6932 </desc>
6933 </const>
6934 </enum>
6935
6936 <enum
6937 name="HostNetworkInterfaceType"
6938 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6939 >
6940 <desc>
6941 Network interface type.
6942 </desc>
6943 <const name="Bridged" value="1"/>
6944 <const name="HostOnly" value="2"/>
6945 </enum>
6946
6947 <interface
6948 name="IHostNetworkInterface" extends="$unknown"
6949 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6950 wsmap="managed"
6951 >
6952 <desc>
6953 Represents one of host's network interfaces. IP V6 address and network
6954 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6955 separated by colons.
6956 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6957 </desc>
6958 <attribute name="name" type="wstring" readonly="yes">
6959 <desc>Returns the host network interface name.</desc>
6960 </attribute>
6961
6962 <attribute name="id" type="uuid" mod="string" readonly="yes">
6963 <desc>Returns the interface UUID.</desc>
6964 </attribute>
6965
6966 <attribute name="networkName" type="wstring" readonly="yes">
6967 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6968 </attribute>
6969
6970 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6971 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6972 </attribute>
6973
6974 <attribute name="IPAddress" type="wstring" readonly="yes">
6975 <desc>Returns the IP V4 address of the interface.</desc>
6976 </attribute>
6977
6978 <attribute name="networkMask" type="wstring" readonly="yes">
6979 <desc>Returns the network mask of the interface.</desc>
6980 </attribute>
6981
6982 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6983 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6984 </attribute>
6985
6986 <attribute name="IPV6Address" type="wstring" readonly="yes">
6987 <desc>Returns the IP V6 address of the interface.</desc>
6988 </attribute>
6989
6990 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6991 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6992 </attribute>
6993
6994 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6995 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6996 </attribute>
6997
6998 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6999 <desc>Type of protocol encapsulation used.</desc>
7000 </attribute>
7001
7002 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7003 <desc>Status of the interface.</desc>
7004 </attribute>
7005
7006 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7007 <desc>specifies the host interface type.</desc>
7008 </attribute>
7009
7010 <method name="enableStaticIpConfig">
7011 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7012 <param name="IPAddress" type="wstring" dir="in">
7013 <desc>
7014 IP address.
7015 </desc>
7016 </param>
7017 <param name="networkMask" type="wstring" dir="in">
7018 <desc>
7019 network mask.
7020 </desc>
7021 </param>
7022 </method>
7023
7024 <method name="enableStaticIpConfigV6">
7025 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7026 <param name="IPV6Address" type="wstring" dir="in">
7027 <desc>
7028 IP address.
7029 </desc>
7030 </param>
7031 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7032 <desc>
7033 network mask.
7034 </desc>
7035 </param>
7036 </method>
7037
7038 <method name="enableDynamicIpConfig">
7039 <desc>enables the dynamic IP configuration.</desc>
7040 </method>
7041
7042 <method name="dhcpRediscover">
7043 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7044 </method>
7045
7046 </interface>
7047
7048 <interface
7049 name="IHost" extends="$unknown"
7050 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7051 wsmap="managed"
7052 >
7053 <desc>
7054 The IHost interface represents the physical machine that this VirtualBox
7055 installation runs on.
7056
7057 An object implementing this interface is returned by the
7058 <link to="IVirtualBox::host" /> attribute. This interface contains
7059 read-only information about the host's physical hardware (such as what
7060 processors and disks are available, what the host operating system is,
7061 and so on) and also allows for manipulating some of the host's hardware,
7062 such as global USB device filters and host interface networking.
7063
7064 </desc>
7065 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7066 <desc>List of DVD drives available on the host.</desc>
7067 </attribute>
7068
7069 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7070 <desc>List of floppy drives available on the host.</desc>
7071 </attribute>
7072
7073 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7074 <desc>
7075 List of USB devices currently attached to the host.
7076 Once a new device is physically attached to the host computer,
7077 it appears in this list and remains there until detached.
7078
7079 <note>
7080 If USB functionality is not available in the given edition of
7081 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7082 </note>
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7087 <desc>
7088 List of USB device filters in action.
7089 When a new device is physically attached to the host computer,
7090 filters from this list are applied to it (in order they are stored
7091 in the list). The first matched filter will determine the
7092 <link to="IHostUSBDeviceFilter::action">action</link>
7093 performed on the device.
7094
7095 Unless the device is ignored by these filters, filters of all
7096 currently running virtual machines
7097 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7098
7099 <note>
7100 If USB functionality is not available in the given edition of
7101 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7102 </note>
7103
7104 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7105 </desc>
7106 </attribute>
7107
7108 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7109 <desc>List of host network interfaces currently defined on the host.</desc>
7110 </attribute>
7111
7112 <attribute name="processorCount" type="unsigned long" readonly="yes">
7113 <desc>Number of (logical) CPUs installed in the host system.</desc>
7114 </attribute>
7115
7116 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7117 <desc>Number of (logical) CPUs online in the host system.</desc>
7118 </attribute>
7119
7120 <method name="getProcessorSpeed">
7121 <desc>Query the (approximate) maximum speed of a specified host CPU in
7122 Megahertz.
7123 </desc>
7124 <param name="cpuId" type="unsigned long" dir="in">
7125 <desc>
7126 Identifier of the CPU.
7127 </desc>
7128 </param>
7129 <param name="speed" type="unsigned long" dir="return">
7130 <desc>
7131 Speed value. 0 is returned if value is not known or @a cpuId is
7132 invalid.
7133 </desc>
7134 </param>
7135 </method>
7136
7137 <method name="getProcessorFeature">
7138 <desc>Query whether a CPU feature is supported or not.</desc>
7139 <param name="feature" type="ProcessorFeature" dir="in">
7140 <desc>
7141 CPU Feature identifier.
7142 </desc>
7143 </param>
7144 <param name="supported" type="boolean" dir="return">
7145 <desc>
7146 Feature is supported or not.
7147 </desc>
7148 </param>
7149 </method>
7150
7151 <method name="getProcessorDescription">
7152 <desc>Query the model string of a specified host CPU.
7153 </desc>
7154 <param name="cpuId" type="unsigned long" dir="in">
7155 <desc>
7156 Identifier of the CPU.
7157 </desc>
7158 </param>
7159 <param name="description" type="wstring" dir="return">
7160 <desc>
7161 Model string. An empty string is returned if value is not known or
7162 @a cpuId is invalid.
7163 </desc>
7164 </param>
7165 </method>
7166
7167 <attribute name="memorySize" type="unsigned long" readonly="yes">
7168 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7169 </attribute>
7170
7171 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7172 <desc>Available system memory in the host system.</desc>
7173 </attribute>
7174
7175 <attribute name="operatingSystem" type="wstring" readonly="yes">
7176 <desc>Name of the host system's operating system.</desc>
7177 </attribute>
7178
7179 <attribute name="OSVersion" type="wstring" readonly="yes">
7180 <desc>Host operating system's version string.</desc>
7181 </attribute>
7182
7183 <attribute name="UTCTime" type="long long" readonly="yes">
7184 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7185 </attribute>
7186
7187 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7188 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7189 </attribute>
7190
7191 <method name="createHostOnlyNetworkInterface">
7192 <desc>
7193 Creates a new adapter for Host Only Networking.
7194 <result name="E_INVALIDARG">
7195 Host network interface @a name already exists.
7196 </result>
7197 </desc>
7198 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7199 <desc>
7200 Created host interface object.
7201 </desc>
7202 </param>
7203 <param name="progress" type="IProgress" dir="return">
7204 <desc>
7205 Progress object to track the operation completion.
7206 </desc>
7207 </param>
7208 </method>
7209
7210 <method name="removeHostOnlyNetworkInterface">
7211 <desc>
7212 Removes the given Host Only Networking interface.
7213 <result name="VBOX_E_OBJECT_NOT_FOUND">
7214 No host network interface matching @a id found.
7215 </result>
7216 </desc>
7217 <param name="id" type="uuid" mod="string" dir="in">
7218 <desc>
7219 Adapter GUID.
7220 </desc>
7221 </param>
7222 <param name="progress" type="IProgress" dir="return">
7223 <desc>
7224 Progress object to track the operation completion.
7225 </desc>
7226 </param>
7227 </method>
7228
7229 <method name="createUSBDeviceFilter">
7230 <desc>
7231 Creates a new USB device filter. All attributes except
7232 the filter name are set to empty (any match),
7233 <i>active</i> is @c false (the filter is not active).
7234
7235 The created filter can be added to the list of filters using
7236 <link to="#insertUSBDeviceFilter"/>.
7237
7238 <see>#USBDeviceFilters</see>
7239 </desc>
7240 <param name="name" type="wstring" dir="in">
7241 <desc>
7242 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7243 for more info.
7244 </desc>
7245 </param>
7246 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7247 <desc>Created filter object.</desc>
7248 </param>
7249 </method>
7250
7251 <method name="insertUSBDeviceFilter">
7252 <desc>
7253 Inserts the given USB device to the specified position
7254 in the list of filters.
7255
7256 Positions are numbered starting from @c 0. If the specified
7257 position is equal to or greater than the number of elements in
7258 the list, the filter is added at the end of the collection.
7259
7260 <note>
7261 Duplicates are not allowed, so an attempt to insert a
7262 filter already in the list is an error.
7263 </note>
7264 <note>
7265 If USB functionality is not available in the given edition of
7266 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7267 </note>
7268
7269 <see>#USBDeviceFilters</see>
7270
7271 <result name="VBOX_E_INVALID_OBJECT_STATE">
7272 USB device filter is not created within this VirtualBox instance.
7273 </result>
7274 <result name="E_INVALIDARG">
7275 USB device filter already in list.
7276 </result>
7277
7278 </desc>
7279 <param name="position" type="unsigned long" dir="in">
7280 <desc>Position to insert the filter to.</desc>
7281 </param>
7282 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7283 <desc>USB device filter to insert.</desc>
7284 </param>
7285 </method>
7286
7287 <method name="removeUSBDeviceFilter">
7288 <desc>
7289 Removes a USB device filter from the specified position in the
7290 list of filters.
7291
7292 Positions are numbered starting from @c 0. Specifying a
7293 position equal to or greater than the number of elements in
7294 the list will produce an error.
7295
7296 <note>
7297 If USB functionality is not available in the given edition of
7298 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7299 </note>
7300
7301 <see>#USBDeviceFilters</see>
7302
7303 <result name="E_INVALIDARG">
7304 USB device filter list empty or invalid @a position.
7305 </result>
7306
7307 </desc>
7308 <param name="position" type="unsigned long" dir="in">
7309 <desc>Position to remove the filter from.</desc>
7310 </param>
7311 </method>
7312
7313 <method name="findHostDVDDrive">
7314 <desc>
7315 Searches for a host DVD drive with the given @c name.
7316
7317 <result name="VBOX_E_OBJECT_NOT_FOUND">
7318 Given @c name does not correspond to any host drive.
7319 </result>
7320
7321 </desc>
7322 <param name="name" type="wstring" dir="in">
7323 <desc>Name of the host drive to search for</desc>
7324 </param>
7325 <param name="drive" type="IMedium" dir="return">
7326 <desc>Found host drive object</desc>
7327 </param>
7328 </method>
7329
7330 <method name="findHostFloppyDrive">
7331 <desc>
7332 Searches for a host floppy drive with the given @c name.
7333
7334 <result name="VBOX_E_OBJECT_NOT_FOUND">
7335 Given @c name does not correspond to any host floppy drive.
7336 </result>
7337
7338 </desc>
7339 <param name="name" type="wstring" dir="in">
7340 <desc>Name of the host floppy drive to search for</desc>
7341 </param>
7342 <param name="drive" type="IMedium" dir="return">
7343 <desc>Found host floppy drive object</desc>
7344 </param>
7345 </method>
7346
7347 <method name="findHostNetworkInterfaceByName">
7348 <desc>
7349 Searches through all host network interfaces for an interface with
7350 the given @c name.
7351 <note>
7352 The method returns an error if the given @c name does not
7353 correspond to any host network interface.
7354 </note>
7355 </desc>
7356 <param name="name" type="wstring" dir="in">
7357 <desc>Name of the host network interface to search for.</desc>
7358 </param>
7359 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7360 <desc>Found host network interface object.</desc>
7361 </param>
7362 </method>
7363 <method name="findHostNetworkInterfaceById">
7364 <desc>
7365 Searches through all host network interfaces for an interface with
7366 the given GUID.
7367 <note>
7368 The method returns an error if the given GUID does not
7369 correspond to any host network interface.
7370 </note>
7371 </desc>
7372 <param name="id" type="uuid" mod="string" dir="in">
7373 <desc>GUID of the host network interface to search for.</desc>
7374 </param>
7375 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7376 <desc>Found host network interface object.</desc>
7377 </param>
7378 </method>
7379 <method name="findHostNetworkInterfacesOfType">
7380 <desc>
7381 Searches through all host network interfaces and returns a list of interfaces of the specified type
7382 </desc>
7383 <param name="type" type="HostNetworkInterfaceType" dir="in">
7384 <desc>type of the host network interfaces to search for.</desc>
7385 </param>
7386 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7387 <desc>Found host network interface objects.</desc>
7388 </param>
7389 </method>
7390
7391 <method name="findUSBDeviceById">
7392 <desc>
7393 Searches for a USB device with the given UUID.
7394
7395 <result name="VBOX_E_OBJECT_NOT_FOUND">
7396 Given @c id does not correspond to any USB device.
7397 </result>
7398
7399 <see>IHostUSBDevice::id</see>
7400 </desc>
7401 <param name="id" type="uuid" mod="string" dir="in">
7402 <desc>UUID of the USB device to search for.</desc>
7403 </param>
7404 <param name="device" type="IHostUSBDevice" dir="return">
7405 <desc>Found USB device object.</desc>
7406 </param>
7407 </method>
7408
7409 <method name="findUSBDeviceByAddress">
7410 <desc>
7411 Searches for a USB device with the given host address.
7412
7413 <result name="VBOX_E_OBJECT_NOT_FOUND">
7414 Given @c name does not correspond to any USB device.
7415 </result>
7416
7417 <see>IHostUSBDevice::address</see>
7418 </desc>
7419 <param name="name" type="wstring" dir="in">
7420 <desc>
7421 Address of the USB device (as assigned by the host) to
7422 search for.
7423 </desc>
7424 </param>
7425 <param name="device" type="IHostUSBDevice" dir="return">
7426 <desc>Found USB device object.</desc>
7427 </param>
7428 </method>
7429
7430 </interface>
7431
7432 <!--
7433 // ISystemProperties
7434 /////////////////////////////////////////////////////////////////////////
7435 -->
7436
7437 <interface
7438 name="ISystemProperties"
7439 extends="$unknown"
7440 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7441 wsmap="managed"
7442 >
7443 <desc>
7444 The ISystemProperties interface represents global properties of the given
7445 VirtualBox installation.
7446
7447 These properties define limits and default values for various attributes
7448 and parameters. Most of the properties are read-only, but some can be
7449 changed by a user.
7450 </desc>
7451
7452 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7453 <desc>Minimum guest system memory in Megabytes.</desc>
7454 </attribute>
7455
7456 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7457 <desc>Maximum guest system memory in Megabytes.</desc>
7458 </attribute>
7459
7460 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7461 <desc>Minimum guest video memory in Megabytes.</desc>
7462 </attribute>
7463
7464 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7465 <desc>Maximum guest video memory in Megabytes.</desc>
7466 </attribute>
7467
7468 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7469 <desc>Minimum CPU count.</desc>
7470 </attribute>
7471
7472 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7473 <desc>Maximum CPU count.</desc>
7474 </attribute>
7475
7476 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7477 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7478 </attribute>
7479
7480 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7481 <desc>
7482 Number of network adapters associated with every
7483 <link to="IMachine"/> instance.
7484 </desc>
7485 </attribute>
7486
7487 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7488 <desc>
7489 Number of serial ports associated with every
7490 <link to="IMachine"/> instance.
7491 </desc>
7492 </attribute>
7493
7494 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7495 <desc>
7496 Number of parallel ports associated with every
7497 <link to="IMachine"/> instance.
7498 </desc>
7499 </attribute>
7500
7501 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7502 <desc>
7503 Maximum device position in the boot order. This value corresponds
7504 to the total number of devices a machine can boot from, to make it
7505 possible to include all possible devices to the boot list.
7506 <see><link to="IMachine::setBootOrder"/></see>
7507 </desc>
7508 </attribute>
7509
7510 <attribute name="defaultMachineFolder" type="wstring">
7511 <desc>
7512 Full path to the default directory used to create new or open
7513 existing machines when a settings file name contains no
7514 path.
7515
7516 The initial value of this property is
7517 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7518 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7519
7520 <note>
7521 Setting this property to @c null or an empty string will restore the
7522 initial value.
7523 </note>
7524 <note>
7525 When settings this property, the specified path can be
7526 absolute (full path) or relative
7527 to the <link to="IVirtualBox::homeFolder">
7528 VirtualBox home directory</link>.
7529 When reading this property, a full path is
7530 always returned.
7531 </note>
7532 <note>
7533 The specified path may not exist, it will be created
7534 when necessary.
7535 </note>
7536
7537 <see>
7538 <link to="IVirtualBox::createMachine"/>,
7539 <link to="IVirtualBox::openMachine"/>
7540 </see>
7541 </desc>
7542 </attribute>
7543
7544 <attribute name="defaultHardDiskFolder" type="wstring">
7545 <desc>
7546 Full path to the default directory used to create new or open existing
7547 virtual disks.
7548
7549 This path is used when the storage unit of a hard disk is a regular file
7550 in the host's file system and only a file name that contains no path is
7551 given.
7552
7553 The initial value of this property is
7554 <tt>&lt;</tt>
7555 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7556 <tt>&gt;/HardDisks</tt>.
7557
7558 <note>
7559 Setting this property to @c null or empty string will restore the
7560 initial value.
7561 </note>
7562 <note>
7563 When settings this property, the specified path can be relative
7564 to the
7565 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7566 absolute. When reading this property, a full path is
7567 always returned.
7568 </note>
7569 <note>
7570 The specified path may not exist, it will be created
7571 when necessary.
7572 </note>
7573
7574 <see>
7575 IMedium,
7576 <link to="IVirtualBox::createHardDisk"/>,
7577 <link to="IVirtualBox::openHardDisk"/>,
7578 <link to="IMedium::location"/>
7579 </see>
7580 </desc>
7581 </attribute>
7582
7583 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7584 <desc>
7585 List of all medium storage formats supported by this VirtualBox
7586 installation.
7587
7588 Keep in mind that the medium format identifier
7589 (<link to="IMediumFormat::id"/>) used in other API calls like
7590 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7591 medium format is a case-insensitive string. This means that, for
7592 example, all of the following strings:
7593 <pre>
7594 "VDI"
7595 "vdi"
7596 "VdI"</pre>
7597 refer to the same medium format.
7598
7599 Note that the virtual medium framework is backend-based, therefore
7600 the list of supported formats depends on what backends are currently
7601 installed.
7602
7603 <see>
7604 <link to="IMediumFormat"/>,
7605 </see>
7606 </desc>
7607 </attribute>
7608
7609 <attribute name="defaultHardDiskFormat" type="wstring">
7610 <desc>
7611 Identifier of the default medium format used by VirtualBox.
7612
7613 The medium format set by this attribute is used by VirtualBox
7614 when the medium format was not specified explicitly. One example is
7615 <link to="IVirtualBox::createHardDisk"/> with the empty
7616 format argument. A more complex example is implicit creation of
7617 differencing media when taking a snapshot of a virtual machine:
7618 this operation will try to use a format of the parent medium first
7619 and if this format does not support differencing media the default
7620 format specified by this argument will be used.
7621
7622 The list of supported medium formats may be obtained by the
7623 <link to="#mediaFormats"/> call. Note that the default medium
7624 format must have a capability to create differencing media;
7625 otherwise operations that create media implicitly may fail
7626 unexpectedly.
7627
7628 The initial value of this property is <tt>"VDI"</tt> in the current
7629 version of the VirtualBox product, but may change in the future.
7630
7631 <note>
7632 Setting this property to @c null or empty string will restore the
7633 initial value.
7634 </note>
7635
7636 <see>
7637 <link to="#mediaFormats"/>,
7638 <link to="IMediumFormat::id"/>,
7639 <link to="IVirtualBox::createHardDisk"/>
7640 </see>
7641 </desc>
7642 </attribute>
7643
7644 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7645 <desc>
7646 Library that provides authentication for VRDP clients. The library
7647 is used if a virtual machine's authentication type is set to "external"
7648 in the VM RemoteDisplay configuration.
7649
7650 The system library extension (".DLL" or ".so") must be omitted.
7651 A full path can be specified; if not, then the library must reside on the
7652 system's default library path.
7653
7654 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7655 of that name in one of the default VirtualBox library directories.
7656
7657 For details about VirtualBox authentication libraries and how to implement
7658 them, please refer to the VirtualBox manual.
7659
7660 <note>
7661 Setting this property to @c null or empty string will restore the
7662 initial value.
7663 </note>
7664 </desc>
7665 </attribute>
7666
7667 <attribute name="webServiceAuthLibrary" type="wstring">
7668 <desc>
7669 Library that provides authentication for webservice clients. The library
7670 is used if a virtual machine's authentication type is set to "external"
7671 in the VM RemoteDisplay configuration and will be called from
7672 within the <link to="IWebsessionManager::logon" /> implementation.
7673
7674 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7675 there is no per-VM setting for this, as the webservice is a global
7676 resource (if it is running). Only for this setting (for the webservice),
7677 setting this value to a literal <tt>"null"</tt> string disables authentication,
7678 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7679 no matter what user name and password are supplied.
7680
7681 The initial value of this property is <tt>"VRDPAuth"</tt>,
7682 meaning that the webservice will use the same authentication
7683 library that is used by default for VBoxVRDP (again, see
7684 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7685 The format and calling convention of authentication libraries
7686 is the same for the webservice as it is for VBoxVRDP.
7687
7688 <note>
7689 Setting this property to @c null or empty string will restore the
7690 initial value.
7691 </note>
7692 </desc>
7693 </attribute>
7694
7695 <attribute name="LogHistoryCount" type="unsigned long">
7696 <desc>
7697 This value specifies how many old release log files are kept.
7698 </desc>
7699 </attribute>
7700
7701 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7702 <desc>This value hold the default audio driver for the current
7703 system.</desc>
7704 </attribute>
7705
7706 <method name="getMaxDevicesPerPortForStorageBus">
7707 <desc>Returns the maximum number of devices which can be attached to a port
7708 for the given storage bus.</desc>
7709
7710 <param name="bus" type="StorageBus" dir="in">
7711 <desc>The storage bus type to get the value for.</desc>
7712 </param>
7713
7714 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7715 <desc>The maximum number of devices which can eb attached to the port for the given
7716 storage bus.</desc>
7717 </param>
7718 </method>
7719
7720 <method name="getMinPortCountForStorageBus">
7721 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7722
7723 <param name="bus" type="StorageBus" dir="in">
7724 <desc>The storage bus type to get the value for.</desc>
7725 </param>
7726
7727 <param name="minPortCount" type="unsigned long" dir="return">
7728 <desc>The minimum number of ports for the given storage bus.</desc>
7729 </param>
7730 </method>
7731
7732 <method name="getMaxPortCountForStorageBus">
7733 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7734
7735 <param name="bus" type="StorageBus" dir="in">
7736 <desc>The storage bus type to get the value for.</desc>
7737 </param>
7738
7739 <param name="maxPortCount" type="unsigned long" dir="return">
7740 <desc>The maximum number of ports for the given storage bus.</desc>
7741 </param>
7742 </method>
7743
7744 <method name="getMaxInstancesOfStorageBus">
7745 <desc>Returns the maximum number of storage bus instances which
7746 can be configured for each VM. This corresponds to the number of
7747 storage controllers one can have.</desc>
7748
7749 <param name="bus" type="StorageBus" dir="in">
7750 <desc>The storage bus type to get the value for.</desc>
7751 </param>
7752
7753 <param name="maxInstances" type="unsigned long" dir="return">
7754 <desc>The maximum number of instances for the given storage bus.</desc>
7755 </param>
7756 </method>
7757 </interface>
7758
7759 <!--
7760 // IGuest
7761 /////////////////////////////////////////////////////////////////////////
7762 -->
7763
7764 <interface
7765 name="IGuestOSType" extends="$unknown"
7766 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7767 wsmap="struct"
7768 >
7769 <desc>
7770 </desc>
7771
7772 <attribute name="familyId" type="wstring" readonly="yes">
7773 <desc>Guest OS family identifier string.</desc>
7774 </attribute>
7775
7776 <attribute name="familyDescription" type="wstring" readonly="yes">
7777 <desc>Human readable description of the guest OS family.</desc>
7778 </attribute>
7779
7780 <attribute name="id" type="wstring" readonly="yes">
7781 <desc>Guest OS identifier string.</desc>
7782 </attribute>
7783
7784 <attribute name="description" type="wstring" readonly="yes">
7785 <desc>Human readable description of the guest OS.</desc>
7786 </attribute>
7787
7788 <attribute name="is64Bit" type="boolean" readonly="yes">
7789 <desc>Returns @c true if the given OS is 64-bit</desc>
7790 </attribute>
7791
7792 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7793 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7794 </attribute>
7795
7796 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7797 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7798 </attribute>
7799
7800 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7801 <desc>Recommended RAM size in Megabytes.</desc>
7802 </attribute>
7803
7804 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7805 <desc>Recommended video RAM size in Megabytes.</desc>
7806 </attribute>
7807
7808 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7809 <desc>Recommended hard disk size in Megabytes.</desc>
7810 </attribute>
7811
7812 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7813 <desc>Returns recommended network adapter for this OS type.</desc>
7814 </attribute>
7815 </interface>
7816
7817 <interface
7818 name="IGuest" extends="$unknown"
7819 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7820 wsmap="managed"
7821 >
7822 <desc>
7823 The IGuest interface represents information about the operating system
7824 running inside the virtual machine. Used in
7825 <link to="IConsole::guest"/>.
7826
7827 IGuest provides information about the guest operating system, whether
7828 Guest Additions are installed and other OS-specific virtual machine
7829 properties.
7830 </desc>
7831
7832 <attribute name="OSTypeId" type="wstring" readonly="yes">
7833 <desc>
7834 Identifier of the Guest OS type as reported by the Guest
7835 Additions.
7836 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7837 an IGuestOSType object representing details about the given
7838 Guest OS type.
7839 <note>
7840 If Guest Additions are not installed, this value will be
7841 the same as <link to="IMachine::OSTypeId"/>.
7842 </note>
7843 </desc>
7844 </attribute>
7845
7846 <attribute name="additionsActive" type="boolean" readonly="yes">
7847 <desc>
7848 Flag whether the Guest Additions are installed and active
7849 in which case their version will be returned by the
7850 <link to="#additionsVersion"/> property.
7851 </desc>
7852 </attribute>
7853
7854 <attribute name="additionsVersion" type="wstring" readonly="yes">
7855 <desc>
7856 Version of the Guest Additions (3 decimal numbers separated
7857 by dots) or empty when the Additions are not installed. The
7858 Additions may also report a version but yet not be active as
7859 the version might be refused by VirtualBox (incompatible) or
7860 other failures occurred.
7861 </desc>
7862 </attribute>
7863
7864 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7865 <desc>
7866 Flag whether seamless guest display rendering (seamless desktop
7867 integration) is supported.
7868 </desc>
7869 </attribute>
7870
7871 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7872 <desc>
7873 Flag whether the guest is in graphics mode. If it is not, then
7874 seamless rendering will not work, resize hints are not immediately
7875 acted on and guest display resizes are probably not initiated by
7876 the guest additions.
7877 </desc>
7878 </attribute>
7879
7880 <attribute name="memoryBalloonSize" type="unsigned long">
7881 <desc>Guest system memory balloon size in megabytes.</desc>
7882 </attribute>
7883
7884 <attribute name="statisticsUpdateInterval" type="unsigned long">
7885 <desc>Interval to update guest statistics in seconds.</desc>
7886 </attribute>
7887
7888 <method name="setCredentials">
7889 <desc>
7890 Store login credentials that can be queried by guest operating
7891 systems with Additions installed. The credentials are transient
7892 to the session and the guest may also choose to erase them. Note
7893 that the caller cannot determine whether the guest operating system
7894 has queried or made use of the credentials.
7895
7896 <result name="VBOX_E_VM_ERROR">
7897 VMM device is not available.
7898 </result>
7899
7900 </desc>
7901 <param name="userName" type="wstring" dir="in">
7902 <desc>User name string, can be empty</desc>
7903 </param>
7904 <param name="password" type="wstring" dir="in">
7905 <desc>Password string, can be empty</desc>
7906 </param>
7907 <param name="domain" type="wstring" dir="in">
7908 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7909 </param>
7910 <param name="allowInteractiveLogon" type="boolean" dir="in">
7911 <desc>
7912 Flag whether the guest should alternatively allow the user to
7913 interactively specify different credentials. This flag might
7914 not be supported by all versions of the Additions.
7915 </desc>
7916 </param>
7917 </method>
7918
7919 <method name="getStatistic">
7920 <desc>
7921 Query specified guest statistics as reported by the VirtualBox Additions.
7922 </desc>
7923 <param name="cpuId" type="unsigned long" dir="in">
7924 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7925 </param>
7926 <param name="statistic" type="GuestStatisticType" dir="in">
7927 <desc>Statistic type.</desc>
7928 </param>
7929 <param name="statVal" type="unsigned long" dir="return">
7930 <desc>Statistics value</desc>
7931 </param>
7932 </method>
7933
7934 </interface>
7935
7936
7937 <!--
7938 // IProgress
7939 /////////////////////////////////////////////////////////////////////////
7940 -->
7941
7942 <interface
7943 name="IProgress" extends="$unknown"
7944 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7945 wsmap="managed"
7946 >
7947 <desc>
7948 The IProgress interface is used to track and control
7949 asynchronous tasks within VirtualBox.
7950
7951 An instance of this is returned every time VirtualBox starts
7952 an asynchronous task (in other words, a separate thread) which
7953 continues to run after a method call returns. For example,
7954 <link to="IConsole::saveState" />, which saves the state of
7955 a running virtual machine, can take a long time to complete.
7956 To be able to display a progress bar, a user interface such as
7957 the VirtualBox graphical user interface can use the IProgress
7958 object returned by that method.
7959
7960 Note that IProgress is a "read-only" interface in the sense
7961 that only the VirtualBox internals behind the Main API can
7962 create and manipulate progress objects, whereas client code
7963 can only use the IProgress object to monitor a task's
7964 progress and, if <link to="#cancelable" /> is @c true,
7965 cancel the task by calling <link to="#cancel" />.
7966
7967 A task represented by IProgress consists of either one or
7968 several sub-operations that run sequentially, one by one (see
7969 <link to="#operation" /> and <link to="#operationCount" />).
7970 Every operation is identified by a number (starting from 0)
7971 and has a separate description.
7972
7973 You can find the individual percentage of completion of the current
7974 operation in <link to="#operationPercent" /> and the
7975 percentage of completion of the task as a whole
7976 in <link to="#percent" />.
7977
7978 Similarly, you can wait for the completion of a particular
7979 operation via <link to="#waitForOperationCompletion" /> or
7980 for the completion of the whole task via
7981 <link to="#waitForCompletion" />.
7982 </desc>
7983
7984 <attribute name="id" type="uuid" mod="string" readonly="yes">
7985 <desc>ID of the task.</desc>
7986 </attribute>
7987
7988 <attribute name="description" type="wstring" readonly="yes">
7989 <desc>Description of the task.</desc>
7990 </attribute>
7991
7992 <attribute name="initiator" type="$unknown" readonly="yes">
7993 <desc>Initiator of the task.</desc>
7994 </attribute>
7995
7996 <attribute name="cancelable" type="boolean" readonly="yes">
7997 <desc>Whether the task can be interrupted.</desc>
7998 </attribute>
7999
8000 <attribute name="percent" type="unsigned long" readonly="yes">
8001 <desc>
8002 Current progress value of the task as a whole, in percent.
8003 This value depends on how many operations are already complete.
8004 Returns 100 if <link to="#completed" /> is @c true.
8005 </desc>
8006 </attribute>
8007
8008 <attribute name="timeRemaining" type="long" readonly="yes">
8009 <desc>
8010 Estimated remaining time until the task completes, in
8011 seconds. Returns 0 once the task has completed; returns -1
8012 if the remaining time cannot be computed, in particular if
8013 the current progress is 0.
8014
8015 Even if a value is returned, the estimate will be unreliable
8016 for low progress values. It will become more reliable as the
8017 task progresses; it is not recommended to display an ETA
8018 before at least 20% of a task have completed.
8019 </desc>
8020 </attribute>
8021
8022 <attribute name="completed" type="boolean" readonly="yes">
8023 <desc>Whether the task has been completed.</desc>
8024 </attribute>
8025
8026 <attribute name="canceled" type="boolean" readonly="yes">
8027 <desc>Whether the task has been canceled.</desc>
8028 </attribute>
8029
8030 <attribute name="resultCode" type="long" readonly="yes">
8031 <desc>
8032 Result code of the progress task.
8033 Valid only if <link to="#completed"/> is @c true.
8034 </desc>
8035 </attribute>
8036
8037 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8038 <desc>
8039 Extended information about the unsuccessful result of the
8040 progress operation. May be @c null if no extended information
8041 is available.
8042 Valid only if <link to="#completed"/> is @c true and
8043 <link to="#resultCode"/> indicates a failure.
8044 </desc>
8045 </attribute>
8046
8047 <attribute name="operationCount" type="unsigned long" readonly="yes">
8048 <desc>
8049 Number of sub-operations this task is divided into.
8050 Every task consists of at least one suboperation.
8051 </desc>
8052 </attribute>
8053
8054 <attribute name="operation" type="unsigned long" readonly="yes">
8055 <desc>Number of the sub-operation being currently executed.</desc>
8056 </attribute>
8057
8058 <attribute name="operationDescription" type="wstring" readonly="yes">
8059 <desc>
8060 Description of the sub-operation being currently executed.
8061 </desc>
8062 </attribute>
8063
8064 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8065 <desc>Progress value of the current sub-operation only, in percent.</desc>
8066 </attribute>
8067
8068 <method name="setCurrentOperationProgress">
8069 <desc>Internal method, not to be called externally.</desc>
8070 <param name="percent" type="unsigned long" dir="in" />
8071 </method>
8072 <method name="setNextOperation">
8073 <desc>Internal method, not to be called externally.</desc>
8074 <param name="nextOperationDescription" type="wstring" dir="in" />
8075 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8076 </method>
8077
8078 <method name="waitForCompletion">
8079 <desc>
8080 Waits until the task is done (including all sub-operations)
8081 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8082
8083 <result name="VBOX_E_IPRT_ERROR">
8084 Failed to wait for task completion.
8085 </result>
8086 </desc>
8087
8088 <param name="timeout" type="long" dir="in">
8089 <desc>
8090 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8091 </desc>
8092 </param>
8093 </method>
8094
8095 <method name="waitForOperationCompletion">
8096 <desc>
8097 Waits until the given operation is done with a given timeout in
8098 milliseconds; specify -1 for an indefinite wait.
8099
8100 <result name="VBOX_E_IPRT_ERROR">
8101 Failed to wait for operation completion.
8102 </result>
8103
8104 </desc>
8105 <param name="operation" type="unsigned long" dir="in">
8106 <desc>
8107 Number of the operation to wait for.
8108 Must be less than <link to="#operationCount"/>.
8109 </desc>
8110 </param>
8111 <param name="timeout" type="long" dir="in">
8112 <desc>
8113 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8114 </desc>
8115 </param>
8116 </method>
8117
8118 <method name="cancel">
8119 <desc>
8120 Cancels the task.
8121 <note>
8122 If <link to="#cancelable"/> is @c false, then this method will fail.
8123 </note>
8124
8125 <result name="VBOX_E_INVALID_OBJECT_STATE">
8126 Operation cannot be canceled.
8127 </result>
8128
8129 </desc>
8130 </method>
8131
8132 </interface>
8133
8134
8135 <!--
8136 // ISnapshot
8137 /////////////////////////////////////////////////////////////////////////
8138 -->
8139
8140 <interface
8141 name="ISnapshot" extends="$unknown"
8142 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8143 wsmap="managed"
8144 >
8145 <desc>
8146 The ISnapshot interface represents a snapshot of the virtual
8147 machine.
8148
8149 Together with the differencing media that are created
8150 when a snapshot is taken, a machine can be brought back to
8151 the exact state it was in when the snapshot was taken.
8152
8153 The ISnapshot interface has no methods, only attributes; snapshots
8154 are controlled through methods of the <link to="IConsole" /> interface
8155 which also manage the media associated with the snapshot.
8156 The following operations exist:
8157
8158 <ul>
8159 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8160 by creating new, empty differencing images for the machine's
8161 media and saving the VM settings and (if the VM is running)
8162 the current VM state in the snapshot.
8163
8164 The differencing images will then receive all data written to
8165 the machine's media, while their parent (base) images
8166 remain unmodified after the snapshot has been taken (see
8167 <link to="IMedium" /> for details about differencing images).
8168 This simplifies restoring a machine to the state of a snapshot:
8169 only the differencing images need to be deleted.
8170
8171 The current machine state is not changed by taking a snapshot.
8172 If the machine is running, it will resume execution after the
8173 snapshot has been taken.
8174 </li>
8175
8176 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8177 a previous snapshot. This resets the machine's state to that of
8178 the previous snapshot by deleting the differencing image of each
8179 of the machine's media and setting the machine's settings
8180 and state to the state that was saved in the snapshot (if any).
8181
8182 This destroys the machine's current state.
8183 </li>
8184
8185 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8186 without affecting the current machine state.
8187
8188 This does not change the machine, but instead frees the resources
8189 allocated when the snapshot was taken: the settings and machine state
8190 is deleted (if any), and the snapshot's differencing image for each
8191 of the machine's media gets merged with its parent image.
8192
8193 Neither the current machine state nor other snapshots are affected
8194 by this operation, except that parent disk images will be modified
8195 to contain the disk data associated with the snapshot being deleted.
8196 </li>
8197
8198 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8199 this completely reverts the virtual machine to the state it was in
8200 before the current snapshot has been taken. Effectively, this goes
8201 back to the state before the current snapshot, which might be
8202 an earlier snapshot.
8203
8204 The current state, as well as the current snapshot, are lost.
8205 </li>
8206 </ul>
8207
8208 Each snapshot contains the settings of the virtual machine (hardware
8209 configuration etc.). In addition, if the machine was running when the
8210 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8211 the current VM state is saved in the snapshot (similarly to what happens
8212 when a VM's state is saved). The snapshot is then said to
8213 be <i>online</i> because when restoring it, the VM will be running.
8214
8215 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8216 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8217
8218 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8219 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8220 it then contains a so-called "zero execution state", representing a
8221 machine that is powered off.
8222
8223 <h3>Snapshot branches and the "current" snapshot</h3>
8224
8225 Snapshots can be chained, whereby every next snapshot is based on the
8226 previous one. This chaining is related to medium branching
8227 (see the <link to="IMedium"/> description) in that every time
8228 a new snapshot is created, a new differencing medium is implicitly
8229 created for all normal media attached to the machine.
8230
8231 Each virtual machine has a "current snapshot", identified by
8232 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8233 to the last snapshot in the chain. In a future version of VirtualBox,
8234 it will be possible to reset a machine's current state to that of an
8235 earlier snapshot without discarding the current state so that it will be
8236 possible to create alternative snapshot paths in a snapshot tree.
8237
8238 In the current implementation, multiple snapshot branches within one
8239 virtual machine are not allowed. Every machine has a single branch,
8240 and <link to="IConsole::takeSnapshot"/> operation adds a new
8241 snapshot to the top of that branch.
8242 </desc>
8243
8244 <attribute name="id" type="uuid" mod="string" readonly="yes">
8245 <desc>UUID of the snapshot.</desc>
8246 </attribute>
8247
8248 <attribute name="name" type="wstring">
8249 <desc>Short name of the snapshot.</desc>
8250 </attribute>
8251
8252 <attribute name="description" type="wstring">
8253 <desc>Optional description of the snapshot.</desc>
8254 </attribute>
8255
8256 <attribute name="timeStamp" type="long long" readonly="yes">
8257 <desc>
8258 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8259 </desc>
8260 </attribute>
8261
8262 <attribute name="online" type="boolean" readonly="yes">
8263 <desc>
8264 @c true if this snapshot is an online snapshot and @c false otherwise.
8265
8266 When this attribute is @c true, the
8267 <link to="IMachine::stateFilePath"/> attribute of the
8268 <link to="#machine"/> object associated with this snapshot
8269 will point to the saved state file. Otherwise, it will be
8270 an empty string.
8271 </desc>
8272 </attribute>
8273
8274 <attribute name="machine" type="IMachine" readonly="yes">
8275 <desc>
8276 Virtual machine this snapshot is taken on. This object
8277 stores all settings the machine had when taking this snapshot.
8278 <note>
8279 The returned machine object is immutable, i.e. no
8280 any settings can be changed.
8281 </note>
8282 </desc>
8283 </attribute>
8284
8285 <attribute name="parent" type="ISnapshot" readonly="yes">
8286 <desc>
8287 Parent snapshot (a snapshot this one is based on), or
8288 @c null if the snapshot has no parent.
8289 </desc>
8290 </attribute>
8291
8292 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8293 <desc>
8294 Child snapshots (all snapshots having this one as a parent).
8295 <note>
8296 In the current implementation, there can be only one
8297 child snapshot, or no children at all, meaning this is the
8298 last (head) snapshot.
8299 </note>
8300 </desc>
8301 </attribute>
8302
8303 </interface>
8304
8305
8306 <!--
8307 // IMedium
8308 /////////////////////////////////////////////////////////////////////////
8309 -->
8310
8311 <enum
8312 name="MediumState"
8313 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8314 >
8315 <desc>
8316 Virtual medium state.
8317 <see>IMedium</see>
8318 </desc>
8319
8320 <const name="NotCreated" value="0">
8321 <desc>
8322 Associated medium storage does not exist (either was not created yet or
8323 was deleted).
8324 </desc>
8325 </const>
8326 <const name="Created" value="1">
8327 <desc>
8328 Associated storage exists and accessible.
8329 </desc>
8330 </const>
8331 <const name="LockedRead" value="2">
8332 <desc>
8333 Medium is locked for reading, no data modification is possible.
8334 </desc>
8335 </const>
8336 <const name="LockedWrite" value="3">
8337 <desc>
8338 Medium is locked for writing, no concurrent data reading or modification
8339 is possible.
8340 </desc>
8341 </const>
8342 <const name="Inaccessible" value="4">
8343 <desc>
8344 Associated medium storage is not accessible.
8345 </desc>
8346 </const>
8347 <const name="Creating" value="5">
8348 <desc>
8349 Associated medium storage is being created.
8350 </desc>
8351 </const>
8352 <const name="Deleting" value="6">
8353 <desc>
8354 Associated medium storage is being deleted.
8355 </desc>
8356 </const>
8357 </enum>
8358
8359 <enum
8360 name="MediumType"
8361 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8362 >
8363 <desc>
8364 Virtual medium type.
8365 <see>IMedium</see>
8366 </desc>
8367
8368 <const name="Normal" value="0">
8369 <desc>
8370 Normal medium (attached directly or indirectly, preserved
8371 when taking snapshots).
8372 </desc>
8373 </const>
8374 <const name="Immutable" value="1">
8375 <desc>
8376 Immutable medium (attached indirectly, changes are wiped out
8377 after powering off the virtual machine).
8378 </desc>
8379 </const>
8380 <const name="Writethrough" value="2">
8381 <desc>
8382 Write through medium (attached directly, ignored when
8383 taking snapshots).
8384 </desc>
8385 </const>
8386 </enum>
8387
8388 <enum
8389 name="MediumVariant"
8390 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8391 >
8392 <desc>
8393 Virtual medium image variant. More than one flag may be set.
8394 <see>IMedium</see>
8395 </desc>
8396
8397 <const name="Standard" value="0">
8398 <desc>
8399 No particular variant requested, results in using the backend default.
8400 </desc>
8401 </const>
8402 <const name="VmdkSplit2G" value="0x01">
8403 <desc>
8404 VMDK image split in chunks of less than 2GByte.
8405 </desc>
8406 </const>
8407 <const name="VmdkStreamOptimized" value="0x04">
8408 <desc>
8409 VMDK streamOptimized image. Special import/export format which is
8410 read-only/append-only.
8411 </desc>
8412 </const>
8413 <const name="VmdkESX" value="0x08">
8414 <desc>
8415 VMDK format variant used on ESX products.
8416 </desc>
8417 </const>
8418 <const name="Fixed" value="0x10000">
8419 <desc>
8420 Fixed image. Only allowed for base images.
8421 </desc>
8422 </const>
8423 <const name="Diff" value="0x20000">
8424 <desc>
8425 Fixed image. Only allowed for base images.
8426 </desc>
8427 </const>
8428 </enum>
8429
8430 <interface
8431 name="IMediumAttachment" extends="$unknown"
8432 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8433 wsmap="struct"
8434 >
8435 <desc>
8436 The IMediumAttachment interface represents the attachment
8437 of a storage medium to a virtual machine. Each machine contains
8438 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8439
8440 Each medium attachment specifies a storage controller as well as a port
8441 and device number. Fixed media (hard disks) will always also specify
8442 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8443 image or images that represent the virtual hard disk. For removeable media,
8444 the IMedia instance is optional; it can be NULL if no media is mounted (see
8445 <link to="IMachine::mountMedium" />).
8446 </desc>
8447
8448 <attribute name="medium" type="IMedium" readonly="yes">
8449 <desc>Medium object associated with this attachment; it
8450 can be NULL for removable devices.</desc>
8451 </attribute>
8452
8453 <attribute name="controller" type="wstring" readonly="yes">
8454 <desc>Name of the storage controller of this attachment; this
8455 refers to one of the controllers in <link to="IMachine::storageControllers" />
8456 by name.</desc>
8457 </attribute>
8458
8459 <attribute name="port" type="long" readonly="yes">
8460 <desc>Port number of this attachment.</desc>
8461 </attribute>
8462
8463 <attribute name="device" type="long" readonly="yes">
8464 <desc>Device slot number of this attachment.</desc>
8465 </attribute>
8466
8467 <attribute name="type" type="DeviceType" readonly="yes">
8468 <desc>Device type of this attachment.</desc>
8469 </attribute>
8470
8471 <attribute name="passthrough" type="boolean" readonly="no">
8472 <desc>Pass I/O requests through to a device on the host.</desc>
8473 </attribute>
8474
8475 </interface>
8476
8477 <interface
8478 name="IMedium" extends="$unknown"
8479 uuid="ad3cdc5b-28ce-4390-8273-ca2068a217c5"
8480 wsmap="managed"
8481 >
8482 <desc>
8483 The IMedium interface represents virtual storage for a machine's
8484 hard disks, CD/DVD or floppy drives. It will typically represent
8485 a disk image on the host, for example a VDI or VMDK file representing
8486 a virtual hard disk, or an ISO or RAW file representing virtual
8487 removable media, but can also point to a network location (e.g.
8488 for iSCSI targets).
8489
8490 Instances of IMedium are connected to virtual machines by way of
8491 medium attachments (see <link to="IMediumAttachment" />), which link
8492 the storage medium to a particular device slot of a storage controller
8493 of the virtual machine.
8494 In the VirtualBox API, virtual storage is therefore always represented
8495 by the following chain of object links:
8496
8497 <ul>
8498 <li><link to="IMachine::storageControllers"/> contains an array of
8499 storage controllers (IDE, SATA, SCSI or a floppy controller;
8500 these are instances of <link to="IStorageController"/>).</li>
8501 <li><link to="IMachine::mediumAttachments"/> contains an array of
8502 medium attachments (instances of <link to="IMediumAttachment"/>),
8503 each containing the name of a storage controller from the above
8504 array, a port/device specification, and an instance of
8505 IMedium representing the medium storage (image file). For removable
8506 media, the storage medium is optional; a medium attachment with no
8507 medium represents a CD/DVD or floppy drive with no medium inserted.
8508 By contrast, hard disk attachments will always have an IMedium
8509 object attached.</li>
8510 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8511 computer or a network resource) that holds actual data. The location of
8512 the storage unit is represented by the <link to="#location"/> attribute.
8513 The value of this attribute is medium type dependent.</li>
8514 </ul>
8515
8516 Existing media are opened using the following methods, depending on the
8517 media type:
8518 <ul>
8519 <li><link to="IVirtualBox::openHardDisk"/></li>
8520 <li><link to="IVirtualBox::openDVDImage"/></li>
8521 <li><link to="IVirtualBox::openFloppyImage"/></li>
8522 </ul>
8523
8524 New hard disk media can be created with the VirtualBox API using the
8525 <link to="IVirtualBox::createHardDisk"/> method.
8526
8527 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8528 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8529 type in a regular file.
8530
8531 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8532 drive; in that case the <link to="#id" /> attribute contains the UUID of
8533 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8534
8535 <h3>Known media</h3>
8536
8537 When an existing medium is opened for the first time, it is automatically
8538 remembered by the given VirtualBox installation or, in other words, becomes
8539 a <i>known medium</i>. Known media are stored in the media
8540 registry transparently maintained by VirtualBox and stored in settings
8541 files so that this registry is preserved when VirtualBox is not running.
8542
8543 Newly created virtual media are remembered only when the associated
8544 storage unit is actually created.
8545
8546 All known media can be enumerated using
8547 <link to="IVirtualBox::hardDisks"/>,
8548 <link to="IVirtualBox::DVDImages"/> and
8549 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8550 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8551 and similar methods or by location using
8552 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8553
8554 Only known media can be attached to virtual machines.
8555
8556 Removing known media from the media registry is performed when the given
8557 medium is closed using the <link to="#close"/> method or when its
8558 associated storage unit is deleted.
8559
8560 <h3>Accessibility checks</h3>
8561
8562 The given medium (with the created storage unit) is considered to be
8563 <i>accessible</i> when its storage unit can be read. In that case, the
8564 <link to="#state"/> attribute has a value of "Created".
8565 When the storage unit cannot be read (for example, because it is located on
8566 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8567 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8568 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8569 obtained by reading the <link to="#lastAccessError"/> attribute.
8570
8571 A new accessibility check is performed each time the <link to="#state"/>
8572 attribute is read. This check may take long time (several seconds or even
8573 minutes, depending on the storage unit location and format), and will
8574 block the calling thread until finished. For this reason, it is recommended
8575 to never read this attribute on the main UI thread to avoid making the UI
8576 unresponsive.
8577
8578 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8579 created for the first time), all known media are in the
8580 <link to="MediumState_Inaccessible"/> state but the value of the <link
8581 to="#lastAccessError"/> attribute is an empty string because no actual
8582 accessibility check is made on startup. This is done to make the
8583 VirtualBox object ready for serving requests as
8584 fast as possible and let the end-user application decide if it needs to
8585 check media accessibility right away or not.
8586
8587 <h3>Hard disk types</h3>
8588
8589 There are three types of hard disk images (see <link to="MediumType" />):
8590 "normal", "immutable" and "writethrough", represented by the
8591 <link to="#type"/> attribute. The type of the hard disk defines how the
8592 hard disk is attached to a virtual machine and what happens when a
8593 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8594 attached hard disk is taken.
8595
8596 All hard disks can be also divided in two groups: <i>base</i> hard
8597 disks and <i>differencing</i> hard disks. A base hard disk contains all
8598 sectors of the hard disk data in its own storage and therefore can be
8599 used independently. On the contrary, a differencing hard disk is a
8600 "delta" to some other disk and contains only those sectors which differ
8601 from that other disk, which is then called a <i>parent</i>. The differencing
8602 hard disk is said to be <i>linked to</i> that parent.
8603 The parent may be itself a differencing image, thus forming a chain of
8604 linked hard disks. The last element in that chain
8605 must always be a base medium. Note that several differencing
8606 hard disks may be linked to the same parent hard disk.
8607
8608 Differencing hard disks can be distinguished from base hard disks by
8609 querying the <link to="#parent"/> attribute: base hard disks do not have
8610 parents they would depend on, so the value of this attribute is always
8611 @c null for them. Using this attribute, it is possible to walk up
8612 the hard disk tree (from the child hard disk to its parent). It is also
8613 possible to walk down the tree using the <link to="#children"/>
8614 attribute.
8615
8616 Note that the type of all differencing hard disks is
8617 <link to="MediumType_Normal" />; all other values are
8618 meaningless for them. Base hard disks may be of any type.
8619
8620 <h3>Creating hard disks</h3>
8621
8622 New base hard disks are created using
8623 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8624 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8625 disks are usually implicitly created by VirtualBox when needed but may
8626 also be created explicitly using <link to="#createDiffStorage"/>.
8627
8628 After the hard disk is successfully created (including the storage unit)
8629 or opened, it becomes a known hard disk (remembered in the internal media
8630 registry). Known hard disks can be attached to a virtual machine, accessed
8631 through <link to="IVirtualBox::getHardDisk"/> and
8632 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8633 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8634
8635 The following methods, besides <link to="IMedium::close"/>,
8636 automatically remove the hard disk from the media registry:
8637 <ul>
8638 <li><link to="#deleteStorage"/></li>
8639 <li><link to="#mergeTo"/></li>
8640 </ul>
8641
8642 If the storage unit of the hard disk is a regular file in the host's
8643 file system then the rules stated in the description of the
8644 <link to="IMedium::location"/> attribute apply when setting its value. In
8645 addition, a plain file name without any path may be given, in which case
8646 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8647 folder</link> will be prepended to it.
8648
8649 <h4>Automatic composition of the file name part</h4>
8650
8651 Another extension to the <link to="IMedium::location"/> attribute is that
8652 there is a possibility to cause VirtualBox to compose a unique value for
8653 the file name part of the location using the UUID of the hard disk. This
8654 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8655 e.g. before the storage unit is created, and works as follows. You set the
8656 value of the <link to="IMedium::location"/> attribute to a location
8657 specification which only contains the path specification but not the file
8658 name part and ends with either a forward slash or a backslash character.
8659 In response, VirtualBox will generate a new UUID for the hard disk and
8660 compose the file name using the following pattern:
8661 <pre>
8662 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8663 </pre>
8664 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8665 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8666 is the default extension for the storage format of this hard disk. After
8667 that, you may call any of the methods that create a new hard disk storage
8668 unit and they will use the generated UUID and file name.
8669
8670 <h3>Attaching Hard Disks</h3>
8671
8672 Hard disks are attached to virtual machines using the
8673 <link to="IMachine::attachDevice"/> method and detached using the
8674 <link to="IMachine::detachDevice"/> method. Depending on their
8675 <link to="#type"/>, hard disks are attached either
8676 <i>directly</i> or <i>indirectly</i>.
8677
8678 When a hard disk is being attached directly, it is associated with the
8679 virtual machine and used for hard disk operations when the machine is
8680 running. When a hard disk is being attached indirectly, a new differencing
8681 hard disk linked to it is implicitly created and this differencing hard
8682 disk is associated with the machine and used for hard disk operations.
8683 This also means that if <link to="IMachine::attachDevice"/> performs
8684 a direct attachment then the same hard disk will be returned in response
8685 to the subsequent <link to="IMachine::getMedium"/> call; however if
8686 an indirect attachment is performed then
8687 <link to="IMachine::getMedium"/> will return the implicitly created
8688 differencing hard disk, not the original one passed to <link
8689 to="IMachine::attachDevice"/>. In detail:
8690
8691 <ul>
8692 <li><b>Normal base</b> hard disks that do not have children (i.e.
8693 differencing hard disks linked to them) and that are not already
8694 attached to virtual machines in snapshots are attached <b>directly</b>.
8695 Otherwise, they are attached <b>indirectly</b> because having
8696 dependent children or being part of the snapshot makes it impossible
8697 to modify hard disk contents without breaking the integrity of the
8698 dependent party. The <link to="#readOnly"/> attribute allows to
8699 quickly determine the kind of the attachment for the given hard
8700 disk. Note that if a normal base hard disk is to be indirectly
8701 attached to a virtual machine with snapshots then a special
8702 procedure called <i>smart attachment</i> is performed (see below).</li>
8703 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8704 they are attached <b>directly</b> if they do not have children and are
8705 not attached to virtual machines in snapshots, and <b>indirectly</b>
8706 otherwise. Note that the smart attachment procedure is never performed
8707 for differencing hard disks.</li>
8708 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8709 they are designed to be non-writable. If an immutable hard disk is
8710 attached to a virtual machine with snapshots then a special
8711 procedure called smart attachment is performed (see below).</li>
8712 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8713 also as designed. This also means that writethrough hard disks cannot
8714 have other hard disks linked to them at all.</li>
8715 </ul>
8716
8717 Note that the same hard disk, regardless of its type, may be attached to
8718 more than one virtual machine at a time. In this case, the machine that is
8719 started first gains exclusive access to the hard disk and attempts to
8720 start other machines having this hard disk attached will fail until the
8721 first machine is powered down.
8722
8723 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8724 that the given hard disk remains associated with the given machine after a
8725 successful <link to="IMachine::detachDevice"/> call until
8726 <link to="IMachine::saveSettings"/> is called to save all changes to
8727 machine settings to disk. This deferring is necessary to guarantee that
8728 the hard disk configuration may be restored at any time by a call to
8729 <link to="IMachine::discardSettings"/> before the settings
8730 are saved (committed).
8731
8732 Note that if <link to="IMachine::discardSettings"/> is called after
8733 indirectly attaching some hard disks to the machine but before a call to
8734 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8735 all differencing hard disks implicitly created by
8736 <link to="IMachine::attachDevice"/> for these indirect attachments.
8737 Such implicitly created hard disks will also be immediately deleted when
8738 detached explicitly using the <link to="IMachine::detachDevice"/>
8739 call if it is made before <link to="IMachine::saveSettings"/>. This
8740 implicit deletion is safe because newly created differencing hard
8741 disks do not contain any user data.
8742
8743 However, keep in mind that detaching differencing hard disks that were
8744 implicitly created by <link to="IMachine::attachDevice"/>
8745 before the last <link to="IMachine::saveSettings"/> call will
8746 <b>not</b> implicitly delete them as they may already contain some data
8747 (for example, as a result of virtual machine execution). If these hard
8748 disks are no more necessary, the caller can always delete them explicitly
8749 using <link to="#deleteStorage"/> after they are actually de-associated
8750 from this machine by the <link to="IMachine::saveSettings"/> call.
8751
8752 <h3>Smart Attachment</h3>
8753
8754 When normal base or immutable hard disks are indirectly attached to a
8755 virtual machine then some additional steps are performed to make sure the
8756 virtual machine will have the most recent "view" of the hard disk being
8757 attached. These steps include walking through the machine's snapshots
8758 starting from the current one and going through ancestors up to the first
8759 snapshot. Hard disks attached to the virtual machine in all
8760 of the encountered snapshots are checked whether they are descendants of
8761 the given normal base or immutable hard disk. The first found child (which
8762 is the differencing hard disk) will be used instead of the normal base or
8763 immutable hard disk as a parent for creating a new differencing hard disk
8764 that will be actually attached to the machine. And only if no descendants
8765 are found or if the virtual machine does not have any snapshots then the
8766 normal base or immutable hard disk will be used itself as a parent for
8767 this differencing hard disk.
8768
8769 It is easier to explain what smart attachment does using the
8770 following example:
8771 <pre>
8772BEFORE attaching B.vdi: AFTER attaching B.vdi:
8773
8774Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8775 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8776 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8777 Snapshot 4 (none) Snapshot 4 (none)
8778 CurState (none) CurState (D3->D2.vdi)
8779
8780 NOT
8781 ...
8782 CurState (D3->B.vdi)
8783 </pre>
8784 The first column is the virtual machine configuration before the base hard
8785 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8786 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8787 mean that the hard disk that is actually attached to the machine is a
8788 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8789 another hard disk, <tt>B.vdi</tt>.
8790
8791 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8792 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8793 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8794 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8795 it cannot be attached directly and needs an indirect attachment (i.e.
8796 implicit creation of a new differencing hard disk). Due to the smart
8797 attachment procedure, the new differencing hard disk
8798 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8799 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8800 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8801 machine.
8802
8803 Note that if there is more than one descendant hard disk of the given base
8804 hard disk found in a snapshot, and there is an exact device, channel and
8805 bus match, then this exact match will be used. Otherwise, the youngest
8806 descendant will be picked up.
8807
8808 There is one more important aspect of the smart attachment procedure which
8809 is not related to snapshots at all. Before walking through the snapshots
8810 as described above, the backup copy of the current list of hard disk
8811 attachment is searched for descendants. This backup copy is created when
8812 the hard disk configuration is changed for the first time after the last
8813 <link to="IMachine::saveSettings"/> call and used by
8814 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8815 changes. When such a descendant is found in this backup copy, it will be
8816 simply re-attached back, without creating a new differencing hard disk for
8817 it. This optimization is necessary to make it possible to re-attach the
8818 base or immutable hard disk to a different bus, channel or device slot
8819 without losing the contents of the differencing hard disk actually
8820 attached to the machine in place of it.
8821 </desc>
8822
8823 <attribute name="id" type="uuid" mod="string" readonly="yes">
8824 <desc>
8825 UUID of the medium. For a newly created medium, this value is a randomly
8826 generated UUID.
8827
8828 <note>
8829 For media in one of MediumState_NotCreated, MediumState_Creating or
8830 MediumState_Deleting states, the value of this property is undefined
8831 and will most likely be an empty UUID.
8832 </note>
8833 </desc>
8834 </attribute>
8835
8836 <attribute name="description" type="wstring">
8837 <desc>
8838 Optional description of the medium. For a newly created medium the value
8839 of this attribute is an empty string.
8840
8841 Medium types that don't support this attribute will return E_NOTIMPL in
8842 attempt to get or set this attribute's value.
8843
8844 <note>
8845 For some storage types, reading this attribute may return an outdated
8846 (last known) value when <link to="#state"/> is <link
8847 to="MediumState_Inaccessible"/> or <link
8848 to="MediumState_LockedWrite"/> because the value of this attribute is
8849 stored within the storage unit itself. Also note that changing the
8850 attribute value is not possible in such case, as well as when the
8851 medium is the <link to="MediumState_LockedRead"/> state.
8852 </note>
8853 </desc>
8854 </attribute>
8855
8856 <attribute name="state" type="MediumState" readonly="yes">
8857 <desc>
8858 Current medium state. Inspect <link to="MediumState"/> values for details.
8859
8860 Reading this attribute may take a long time because an accessibility
8861 check of the storage unit is performed each time the attribute is read.
8862 This check may cause a significant delay if the storage unit of the
8863 given medium is, for example, a file located on a network share which is
8864 not currently accessible due to connectivity problems -- the call will
8865 not return until a timeout interval defined by the host OS for this
8866 operation expires.
8867
8868 If the last known state of the medium is <link to="MediumState_Created"/>
8869 and the accessibility check fails then the state would be set to
8870 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8871 may be used to get more details about the failure. If the state of the
8872 medium is <link to="MediumState_LockedRead"/> or
8873 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8874 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8875 accessibility check in this case.
8876
8877 Note that not all medium states are applicable to all medium types.
8878 </desc>
8879 </attribute>
8880
8881 <attribute name="location" type="wstring">
8882 <desc>
8883 Location of the storage unit holding medium data.
8884
8885 The format of the location string is medium type specific. For medium
8886 types using regular files in a host's file system, the location
8887 string is the full file name.
8888
8889 Some medium types may support changing the storage unit location by
8890 simply changing the value of this property. If this operation is not
8891 supported, the implementation will return E_NOTIMPL in attempt to set
8892 this attribute's value.
8893
8894 When setting a value of the location attribute which is a regular file
8895 in the host's file system, the given file name may be either relative to
8896 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8897 absolute. Note that if the given location specification does not contain
8898 the file extension part then a proper default extension will be
8899 automatically appended by the implementation depending on the medium type.
8900 </desc>
8901 </attribute>
8902
8903 <attribute name="name" type="wstring" readonly="yes">
8904 <desc>
8905 Name of the storage unit holding medium data.
8906
8907 The returned string is a short version of the <link to="#location"/>
8908 attribute that is suitable for representing the medium in situations
8909 where the full location specification is too long (such as lists
8910 and comboboxes in GUI frontends). This string is also used by frontends
8911 to sort the media list alphabetically when needed.
8912
8913 For example, for locations that are regular files in the host's file
8914 system, the value of this attribute is just the file name (+ extension),
8915 without the path specification.
8916
8917 Note that as opposed to the <link to="#location"/> attribute, the name
8918 attribute will not necessary be unique for a list of media of the
8919 given type and format.
8920 </desc>
8921 </attribute>
8922
8923 <attribute name="deviceType" type="DeviceType" readonly="yes">
8924 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8925 medium.</desc>
8926 </attribute>
8927
8928 <attribute name="hostDrive" type="boolean" readonly="yes">
8929 <desc>True if this corresponds to a drive on the host.</desc>
8930 </attribute>
8931
8932 <attribute name="size" type="unsigned long long" readonly="yes">
8933 <desc>
8934 Physical size of the storage unit used to hold medium data (in bytes).
8935
8936 <note>
8937 For media whose <link to="#state"/> is <link
8938 to="MediumState_Inaccessible"/>, the value of this property is the
8939 last known size. For <link to="MediumState_NotCreated"/> media,
8940 the returned value is zero.
8941 </note>
8942 </desc>
8943 </attribute>
8944
8945 <attribute name="format" type="wstring" readonly="yes">
8946 <desc>
8947 Storage format of this medium.
8948
8949 The value of this attribute is a string that specifies a backend used to
8950 store hard disk data. The storage format is defined when you create a
8951 new hard disk or automatically detected when you open an existing hard
8952 disk medium, and cannot be changed later.
8953
8954 The list of all storage formats supported by this VirtualBox
8955 installation can be obtained using
8956 <link to="ISystemProperties::mediumFormats"/>.
8957 </desc>
8958 </attribute>
8959
8960 <attribute name="type" type="MediumType">
8961 <desc>
8962 Type (role) of this hard disk.
8963
8964 The following constraints apply when changing the value of this
8965 attribute:
8966 <ul>
8967 <li>If a hard disk is attached to a virtual machine (either in the
8968 current state or in one of the snapshots), its type cannot be
8969 changed.
8970 </li>
8971 <li>As long as the hard disk has children, its type cannot be set
8972 to <link to="MediumType_Writethrough"/>.
8973 </li>
8974 <li>The type of all differencing hard disks is
8975 <link to="MediumType_Normal"/> and cannot be changed.
8976 </li>
8977 </ul>
8978
8979 The type of a newly created or opened hard disk is set to
8980 <link to="MediumType_Normal"/>.
8981 </desc>
8982 </attribute>
8983
8984 <attribute name="parent" type="IMedium" readonly="yes">
8985 <desc>
8986 Parent of this hard disk (a hard disk this hard disk is directly based
8987 on).
8988
8989 Only differencing hard disks have parents. For base (non-differencing)
8990 hard disks, @c null is returned.
8991 </desc>
8992 </attribute>
8993
8994 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8995 <desc>
8996 Children of this hard disk (all differencing hard disks directly based
8997 on this hard disk). A @c null array is returned if this hard disk
8998 does not have any children.
8999 </desc>
9000 </attribute>
9001
9002 <attribute name="base" type="IMedium" readonly="yes">
9003 <desc>
9004 Base medium of this medium.
9005
9006 If this is a differencing medium, its base hard disk is the medium
9007 the given hard disk branch starts from. For all other types of hard
9008 disks, this property returns the hard disk object itself (i.e. the same
9009 object this property is read on).
9010 </desc>
9011 </attribute>
9012
9013 <attribute name="readOnly" type="boolean" readonly="yes">
9014 <desc>
9015 Returns @c true if this hard disk is read-only and @c false otherwise.
9016
9017 A hard disk is considered to be read-only when its contents cannot be
9018 modified without breaking the integrity of other parties that depend on
9019 this hard disk such as its child hard disks or snapshots of virtual
9020 machines where this hard disk is attached to these machines. If there
9021 are no children and no such snapshots then there is no dependency and
9022 the hard disk is not read-only.
9023
9024 The value of this attribute can be used to determine the kind of the
9025 attachment that will take place when attaching this hard disk to a
9026 virtual machine. If the value is @c false then the hard disk will
9027 be attached directly. If the value is @c true then the hard disk
9028 will be attached indirectly by creating a new differencing child hard
9029 disk for that. See the interface description for more information.
9030
9031 Note that all <link to="MediumType_Immutable">Immutable</link> hard
9032 disks are always read-only while all
9033 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
9034 always not.
9035
9036 <note>
9037 The read-only condition represented by this attribute is related to
9038 the hard disk type and usage, not to the current
9039 <link to="IMedium::state">medium state</link> and not to the read-only
9040 state of the storage unit.
9041 </note>
9042 </desc>
9043 </attribute>
9044
9045 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9046 <desc>
9047 Logical size of this hard disk (in megabytes), as reported to the
9048 guest OS running inside the virtual machine this disk is
9049 attached to. The logical size is defined when the hard disk is created
9050 and cannot be changed later.
9051
9052 <note>
9053 Reading this property on a differencing hard disk will return the size
9054 of its <link to="#base"/> medium.
9055 </note>
9056 <note>
9057 For hard disks whose state is <link to="#state"/> is <link
9058 to="MediumState_Inaccessible"/>, the value of this property is the
9059 last known logical size. For <link to="MediumaState_NotCreated"/> hard
9060 disks, the returned value is zero.
9061 </note>
9062 </desc>
9063 </attribute>
9064
9065 <attribute name="autoReset" type="boolean">
9066 <desc>
9067 Whether this differencing hard disk will be automatically reset each
9068 time a virtual machine it is attached to is powered up.
9069
9070 See <link to="#reset()"/> for more information about resetting
9071 differencing hard disks.
9072
9073 <note>
9074 Reading this property on a base (non-differencing) hard disk will
9075 always @c false. Changing the value of this property in this
9076 case is not supported.
9077 </note>
9078
9079 <result name="VBOX_E_NOT_SUPPORTED">
9080 This is not a differencing hard disk (when changing the attribute
9081 value).
9082 </result>
9083 </desc>
9084 </attribute>
9085
9086 <attribute name="lastAccessError" type="wstring" readonly="yes">
9087 <desc>
9088 Text message that represents the result of the last accessibility
9089 check.
9090
9091 Accessibility checks are performed each time the <link to="#state"/>
9092 attribute is read. An empty string is returned if the last
9093 accessibility check was successful. A non-empty string indicates a
9094 failure and should normally describe a reason of the failure (for
9095 example, a file read error).
9096 </desc>
9097 </attribute>
9098
9099 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9100 <desc>
9101 Array of UUIDs of all machines this medium is attached to.
9102
9103 A @c null array is returned if this medium is not attached to any
9104 machine or to any machine's snapshot.
9105
9106 <note>
9107 The returned array will include a machine even if this medium is not
9108 attached to that machine in the current state but attached to it in
9109 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9110 details.
9111 </note>
9112 </desc>
9113 </attribute>
9114
9115 <method name="getSnapshotIds">
9116 <desc>
9117 Returns an array of UUIDs of all snapshots of the given machine where
9118 this medium is attached to.
9119
9120 If the medium is attached to the machine in the current state, then the
9121 first element in the array will always be the ID of the queried machine
9122 (i.e. the value equal to the @c machineId argument), followed by
9123 snapshot IDs (if any).
9124
9125 If the medium is not attached to the machine in the current state, then
9126 the array will contain only snapshot IDs.
9127
9128 The returned array may be @c null if this medium is not attached
9129 to the given machine at all, neither in the current state nor in one of
9130 the snapshots.
9131 </desc>
9132 <param name="machineId" type="uuid" mod="string" dir="in">
9133 <desc>
9134 UUID of the machine to query.
9135 </desc>
9136 </param>
9137 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9138 <desc>
9139 Array of snapshot UUIDs of the given machine using this medium.
9140 </desc>
9141 </param>
9142 </method>
9143
9144 <method name="lockRead">
9145 <desc>
9146 Locks this medium for reading.
9147
9148 The read lock is shared: many clients can simultaneously lock the
9149 same medium for reading unless it is already locked for writing (see
9150 <link to="#lockWrite"/>) in which case an error is returned.
9151
9152 When the medium is locked for reading, it cannot be modified
9153 from within VirtualBox. This means that any method that changes
9154 the properties of this medium or contents of the storage unit
9155 will return an error (unless explicitly stated otherwise) and
9156 that an attempt to start a virtual machine that wants to modify
9157 the medium will also fail.
9158
9159 When the virtual machine is started up, it locks for reading all
9160 media it uses in read-only mode. If some medium cannot be locked
9161 for reading, the startup procedure will fail.
9162
9163 The medium locked for reading must be unlocked using the <link
9164 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9165 can be nested and must be followed by the same number of paired
9166 <link to="#unlockRead"/> calls.
9167
9168 This method sets the medium state to <link
9169 to="MediumState_LockedRead" /> on success. The state prior to
9170 this call must be <link to="MediumState_Created" />,
9171 <link to="MediumState_Inaccessible" /> or
9172 <link to="MediumState_LockedRead" />.
9173 As you can see, an inaccessible medium can be locked too. This is
9174 not an error; this method performs a logical lock that prevents
9175 modifications of this medium through the VirtualBox API, not a
9176 physical lock of the underlying storage unit.
9177
9178 This method returns the current state of the medium
9179 <b>before</b> the operation.
9180
9181 <result name="VBOX_E_INVALID_OBJECT_STATE">
9182 Invalid medium state (e.g. not created, locked, inaccessible,
9183 creating, deleting).
9184 </result>
9185
9186 </desc>
9187 <param name="state" type="MediumState" dir="return">
9188 <desc>
9189 State of the medium after the operation.
9190 </desc>
9191 </param>
9192 </method>
9193
9194 <method name="unlockRead">
9195 <desc>
9196 Cancels the read lock previously set by <link to="#lockRead"/>.
9197
9198 For both, success and failure, this method returns the current state
9199 of the medium <b>after</b> the operation.
9200
9201 See <link to="#lockRead"/> for more details.
9202
9203 <result name="VBOX_E_INVALID_OBJECT_STATE">
9204 Medium not locked for reading.
9205 </result>
9206
9207 </desc>
9208 <param name="state" type="MediumState" dir="return">
9209 <desc>
9210 State of the medium after the operation.
9211 </desc>
9212 </param>
9213 </method>
9214
9215 <method name="lockWrite">
9216 <desc>
9217 Locks this medium for writing.
9218
9219 The write lock, as opposed to <link to="#lockRead"/>, is
9220 exclusive: there may be only one client holding a write lock
9221 and there may be no read locks while the write lock is held.
9222
9223 When the medium is locked for writing, it cannot be modified
9224 from within VirtualBox and it is not guaranteed that the values
9225 of its properties are up-to-date. Any method that changes the
9226 properties of this medium or contents of the storage unit will
9227 return an error (unless explicitly stated otherwise) and an
9228 attempt to start a virtual machine wanting to modify or to
9229 read the medium will fail.
9230
9231 When the virtual machine is started up, it locks for writing all
9232 media it uses to write data to. If any medium could not be locked
9233 for writing, the startup procedure will fail.
9234
9235 The medium locked for writing must be unlocked using the <link
9236 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9237 can <b>not</b> be nested and must be followed by a<link
9238 to="#unlockWrite"/> call before the next lockWrite call.
9239
9240 This method sets the medium state to <link to="MediumState_LockedWrite" />
9241 on success. The state prior to this call must be <link to="MediumState_Created"/>
9242 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9243 medium can be locked too. This is not an error; this method
9244 performs a logical lock preventing modifications of this
9245 medium through the VirtualBox API, not a physical lock of the
9246 underlying storage unit.
9247
9248 For both, success and failure, this method returns the current
9249 state of the medium <b>before</b> the operation.
9250
9251 <result name="VBOX_E_INVALID_OBJECT_STATE">
9252 Invalid medium state (e.g. not created, locked, inaccessible,
9253 creating, deleting).
9254 </result>
9255
9256 </desc>
9257 <param name="state" type="MediumState" dir="return">
9258 <desc>
9259 State of the medium after the operation.
9260 </desc>
9261 </param>
9262 </method>
9263
9264 <method name="unlockWrite">
9265 <desc>
9266 Cancels the write lock previously set by <link to="#lockWrite"/>.
9267
9268 For both, success and failure, this method returns the current
9269 state of the medium <b>after</b> the operation.
9270
9271 See <link to="#lockWrite"/> for more details.
9272
9273 <result name="VBOX_E_INVALID_OBJECT_STATE">
9274 Medium not locked for writing.
9275 </result>
9276
9277 </desc>
9278 <param name="state" type="MediumState" dir="return">
9279 <desc>
9280 State of the medium after the operation.
9281 </desc>
9282 </param>
9283 </method>
9284
9285 <method name="close">
9286 <desc>
9287 Closes this medium.
9288
9289 The medium must not be attached to any known virtual machine
9290 and must not have any known child media, otherwise the
9291 operation will fail.
9292
9293 When the medium is successfully closed, it gets removed from
9294 the list of remembered media, but its storage unit is not
9295 deleted. In particular, this means that this medium can be
9296 later opened again using the <link
9297 to="IVirtualBox::openHardDisk"/> call.
9298
9299 Note that after this method successfully returns, the given medium
9300 object becomes uninitialized. This means that any attempt
9301 to call any of its methods or attributes will fail with the
9302 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9303
9304 <result name="VBOX_E_INVALID_OBJECT_STATE">
9305 Invalid medium state (other than not created, created or
9306 inaccessible).
9307 </result>
9308 <result name="VBOX_E_OBJECT_IN_USE">
9309 Medium attached to virtual machine.
9310 </result>
9311 <result name="VBOX_E_FILE_ERROR">
9312 Settings file not accessible.
9313 </result>
9314 <result name="VBOX_E_XML_ERROR">
9315 Could not parse the settings file.
9316 </result>
9317
9318 </desc>
9319 </method>
9320
9321 <!-- storage methods -->
9322
9323 <method name="getProperty">
9324 <desc>
9325 Returns the value of the custom hard disk property with the given name.
9326
9327 The list of all properties supported by the given hard disk format can
9328 be obtained with <link to="IMediumFormat::describeProperties"/>.
9329
9330 Note that if this method returns an empty string in @a value, the
9331 requested property is supported but currently not assigned any value.
9332
9333 <result name="VBOX_E_OBJECT_NOT_FOUND">
9334 Requested property does not exist (not supported by the format).
9335 </result>
9336 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9337 </desc>
9338 <param name="name" type="wstring" dir="in">
9339 <desc>Name of the property to get.</desc>
9340 </param>
9341 <param name="value" type="wstring" dir="return">
9342 <desc>Current property value.</desc>
9343 </param>
9344 </method>
9345
9346 <method name="setProperty">
9347 <desc>
9348 Sets the value of the custom hard disk property with the given name.
9349
9350 The list of all properties supported by the given hard disk format can
9351 be obtained with <link to="IMediumFormat::describeProperties"/>.
9352
9353 Note that setting the property value to @c null or an empty string is
9354 equivalent to deleting the existing value. A default value (if it is
9355 defined for this property) will be used by the format backend in this
9356 case.
9357
9358 <result name="VBOX_E_OBJECT_NOT_FOUND">
9359 Requested property does not exist (not supported by the format).
9360 </result>
9361 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9362 </desc>
9363 <param name="name" type="wstring" dir="in">
9364 <desc>Name of the property to set.</desc>
9365 </param>
9366 <param name="value" type="wstring" dir="in">
9367 <desc>Property value to set.</desc>
9368 </param>
9369 </method>
9370
9371 <method name="getProperties">
9372 <desc>
9373 Returns values for a group of properties in one call.
9374
9375 The names of the properties to get are specified using the @a names
9376 argument which is a list of comma-separated property names or
9377 an empty string if all properties are to be returned. Note that currently
9378 the value of this argument is ignored and the method always returns all
9379 existing properties.
9380
9381 The list of all properties supported by the given hard disk format can
9382 be obtained with <link to="IMediumFormat::describeProperties"/>.
9383
9384 The method returns two arrays, the array of property names corresponding
9385 to the @a names argument and the current values of these properties.
9386 Both arrays have the same number of elements with each elemend at the
9387 given index in the first array corresponds to an element at the same
9388 index in the second array.
9389
9390 Note that for properties that do not have assigned values,
9391 an empty string is returned at the appropriate index in the
9392 @a returnValues array.
9393
9394 </desc>
9395 <param name="names" type="wstring" dir="in">
9396 <desc>
9397 Names of properties to get.
9398 </desc>
9399 </param>
9400 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9401 <desc>Names of returned properties.</desc>
9402 </param>
9403 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9404 <desc>Values of returned properties.</desc>
9405 </param>
9406 </method>
9407
9408 <method name="setProperties">
9409 <desc>
9410 Sets values for a group of properties in one call.
9411
9412 The names of the properties to set are passed in the @a names
9413 array along with the new values for them in the @a values array. Both
9414 arrays have the same number of elements with each elemend at the given
9415 index in the first array corresponding to an element at the same index
9416 in the second array.
9417
9418 If there is at least one property name in @a names that is not valid,
9419 the method will fail before changing the values of any other properties
9420 from the @a names array.
9421
9422 Using this method over <link to="#setProperty"/> is preferred if you
9423 need to set several properties at once since it will result into less
9424 IPC calls.
9425
9426 The list of all properties supported by the given hard disk format can
9427 be obtained with <link to="IMediumFormat::describeProperties"/>.
9428
9429 Note that setting the property value to @c null or an empty string is
9430 equivalent to deleting the existing value. A default value (if it is
9431 defined for this property) will be used by the format backend in this
9432 case.
9433 </desc>
9434 <param name="names" type="wstring" safearray="yes" dir="in">
9435 <desc>Names of properties to set.</desc>
9436 </param>
9437 <param name="values" type="wstring" safearray="yes" dir="in">
9438 <desc>Values of properties to set.</desc>
9439 </param>
9440 </method>
9441
9442 <!-- storage methods -->
9443
9444 <method name="createBaseStorage">
9445 <desc>
9446 Starts creating a hard disk storage unit (fixed/dynamic, according
9447 to the variant flags) in in the background. The previous storage unit
9448 created for this object, if any, must first be deleted using
9449 <link to="#deleteStorage"/>, otherwise the operation will fail.
9450
9451 Before the operation starts, the hard disk is placed in
9452 <link to="MediumState_Creating"/> state. If the create operation
9453 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9454 state.
9455
9456 After the returned progress object reports that the operation has
9457 successfully completed, the medium state will be set to <link
9458 to="MediumState_Created"/>, the hard disk will be remembered by this
9459 VirtualBox installation and may be attached to virtual machines.
9460
9461 <result name="VBOX_E_NOT_SUPPORTED">
9462 The variant of storage creation operation is not supported. See <link
9463 to="IMediumFormat::capabilities"/>.
9464 </result>
9465 </desc>
9466 <param name="logicalSize" type="unsigned long long" dir="in">
9467 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9468 </param>
9469 <param name="variant" type="MediumVariant" dir="in">
9470 <desc>Exact image variant which should be created.</desc>
9471 </param>
9472 <param name="progress" type="IProgress" dir="return">
9473 <desc>Progress object to track the operation completion.</desc>
9474 </param>
9475 </method>
9476
9477 <method name="deleteStorage">
9478 <desc>
9479 Starts deleting the storage unit of this hard disk.
9480
9481 The hard disk must not be attached to any known virtual machine and must
9482 not have any known child hard disks, otherwise the operation will fail.
9483 It will also fail if there is no storage unit to delete or if deletion
9484 is already in progress, or if the hard disk is being in use (locked for
9485 read or for write) or inaccessible. Therefore, the only valid state for
9486 this operation to succeed is <link to="MediumState_Created"/>.
9487
9488 Before the operation starts, the hard disk is placed to
9489 <link to="MediumState_Deleting"/> state and gets removed from the list
9490 of remembered hard disks (media registry). If the delete operation
9491 fails, the medium will be remembered again and placed back to
9492 <link to="MediumState_Created"/> state.
9493
9494 After the returned progress object reports that the operation is
9495 complete, the medium state will be set to
9496 <link to="MediumState_NotCreated"/> and you will be able to use one of
9497 the storage creation methods to create it again.
9498
9499 <see>#close()</see>
9500
9501 <result name="VBOX_E_OBJECT_IN_USE">
9502 Hard disk is attached to a virtual machine.
9503 </result>
9504 <result name="VBOX_E_NOT_SUPPORTED">
9505 Storage deletion is not allowed because neither of storage creation
9506 operations are supported. See
9507 <link to="IMediumFormat::capabilities"/>.
9508 </result>
9509
9510 <note>
9511 If the deletion operation fails, it is not guaranteed that the storage
9512 unit still exists. You may check the <link to="IMedium::state"/> value
9513 to answer this question.
9514 </note>
9515 </desc>
9516 <param name="progress" type="IProgress" dir="return">
9517 <desc>Progress object to track the operation completion.</desc>
9518 </param>
9519 </method>
9520
9521 <!-- diff methods -->
9522
9523 <method name="createDiffStorage">
9524 <desc>
9525 Starts creating an empty differencing storage unit based on this hard
9526 disk in the format and at the location defined by the @a target
9527 argument.
9528
9529 The target hard disk must be in <link to="MediumState_NotCreated"/>
9530 state (i.e. must not have an existing storage unit). Upon successful
9531 completion, this operation will set the type of the target hard disk to
9532 <link to="MediumType_Normal"/> and create a storage unit necessary to
9533 represent the differencing hard disk data in the given format (according
9534 to the storage format of the target object).
9535
9536 After the returned progress object reports that the operation is
9537 successfully complete, the target hard disk gets remembered by this
9538 VirtualBox installation and may be attached to virtual machines.
9539
9540 <note>
9541 The hard disk will be set to <link to="MediumState_LockedRead"/>
9542 state for the duration of this operation.
9543 </note>
9544 <result name="VBOX_E_OBJECT_IN_USE">
9545 Hard disk not in @c NotCreated state.
9546 </result>
9547 </desc>
9548 <param name="target" type="IMedium" dir="in">
9549 <desc>Target hard disk.</desc>
9550 </param>
9551 <param name="variant" type="MediumVariant" dir="in">
9552 <desc>Exact image variant which should be created.</desc>
9553 </param>
9554 <param name="progress" type="IProgress" dir="return">
9555 <desc>Progress object to track the operation completion.</desc>
9556 </param>
9557 </method>
9558
9559 <method name="mergeTo">
9560 <desc>
9561 Starts merging the contents of this hard disk and all intermediate
9562 differencing hard disks in the chain to the given target hard disk.
9563
9564 The target hard disk must be either a descendant of this hard disk or
9565 its ancestor (otherwise this method will immediately return a failure).
9566 It follows that there are two logical directions of the merge operation:
9567 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9568 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9569 chain:
9570
9571 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9572
9573 Here, calling this method on the <tt>Base</tt> hard disk object with
9574 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9575 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9576 merge. Note that in both cases the contents of the resulting hard disk
9577 will be the same, the only difference is the hard disk object that takes
9578 the result of the merge operation. In case of the forward merge in the
9579 above example, the result will be written to <tt>Diff_2</tt>; in case of
9580 the backward merge, the result will be written to <tt>Base</tt>. In
9581 other words, the result of the operation is always stored in the target
9582 hard disk.
9583
9584 Upon successful operation completion, the storage units of all hard
9585 disks in the chain between this (source) hard disk and the target hard
9586 disk, including the source hard disk itself, will be automatically
9587 deleted and the relevant hard disk objects (including this hard disk)
9588 will become uninitialized. This means that any attempt to call any of
9589 their methods or attributes will fail with the
9590 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9591 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9592 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9593 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9594 disk itself since it will no longer be based on any other hard disk.
9595
9596 Considering the above, all of the following conditions must be met in
9597 order for the merge operation to succeed:
9598 <ul>
9599 <li>
9600 Neither this (source) hard disk nor any intermediate
9601 differencing hard disk in the chain between it and the target
9602 hard disk is attached to any virtual machine.
9603 </li>
9604 <li>
9605 Neither the source hard disk nor the target hard disk is an
9606 <link to="MediumType_Immutable"/> hard disk.
9607 </li>
9608 <li>
9609 The part of the hard disk tree from the source hard disk to the
9610 target hard disk is a linear chain, i.e. all hard disks in this
9611 chain have exactly one child which is the next hard disk in this
9612 chain. The only exception from this rule is the target hard disk in
9613 the forward merge operation; it is allowed to have any number of
9614 child hard disks because the merge operation will hot change its
9615 logical contents (as it is seen by the guest OS or by children).
9616 </li>
9617 <li>
9618 None of the involved hard disks are in
9619 <link to="MediumState_LockedRead"/> or
9620 <link to="MediumState_LockedWrite"/> state.
9621 </li>
9622 </ul>
9623
9624 <note>
9625 This (source) hard disk and all intermediates will be placed to <link
9626 to="MediumState_Deleting"/> state and the target hard disk will be
9627 placed to <link to="MediumState_LockedWrite"/> state and for the
9628 duration of this operation.
9629 </note>
9630 </desc>
9631 <param name="targetId" type="uuid" mod="string" dir="in">
9632 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9633 </param>
9634 <param name="progress" type="IProgress" dir="return">
9635 <desc>Progress object to track the operation completion.</desc>
9636 </param>
9637 </method>
9638
9639 <!-- clone method -->
9640
9641 <method name="cloneTo">
9642 <desc>
9643 Starts creating a clone of this hard disk in the format and at the
9644 location defined by the @a target argument.
9645
9646 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9647 state (i.e. must not have an existing storage unit) or in
9648 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9649 big enough to hold the data or else the copy will be partial). Upon
9650 successful completion, the cloned hard disk will contain exactly the
9651 same sector data as the hard disk being cloned, except that in the
9652 first case a new UUID for the clone will be randomly generated, and in
9653 the second case the UUID will remain unchanged.
9654
9655 The @a parent argument defines which hard disk will be the parent
9656 of the clone. Passing a @c null reference indicates that the clone will
9657 be a base image, i.e. completely independent. It is possible to specify
9658 an arbitrary hard disk for this parameter, including the parent of the
9659 hard disk which is being cloned. Even cloning to a child of the source
9660 hard disk is possible. Note that when cloning to an existing image, the
9661 @a parent irgument is ignored.
9662
9663 After the returned progress object reports that the operation is
9664 successfully complete, the target hard disk gets remembered by this
9665 VirtualBox installation and may be attached to virtual machines.
9666
9667 <note>
9668 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9669 state for the duration of this operation.
9670 </note>
9671 <result name="E_NOTIMPL">
9672 The specified cloning variant is not supported at the moment.
9673 </result>
9674 </desc>
9675 <param name="target" type="IMedium" dir="in">
9676 <desc>Target hard disk.</desc>
9677 </param>
9678 <param name="variant" type="MediumVariant" dir="in">
9679 <desc>Exact image variant which should be created.</desc>
9680 </param>
9681 <param name="parent" type="IMedium" dir="in">
9682 <desc>Parent of the cloned hard disk.</desc>
9683 </param>
9684 <param name="progress" type="IProgress" dir="return">
9685 <desc>Progress object to track the operation completion.</desc>
9686 </param>
9687 </method>
9688
9689 <!-- other methods -->
9690
9691 <method name="compact">
9692 <desc>
9693 Starts compacting of this hard disk. This means that the disk is
9694 transformed into a possibly more compact storage representation.
9695 This potentially creates temporary images, which can require a
9696 substantial amount of additional disk space.
9697
9698 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9699 state and all its parent hard disks (if any) will be placed to
9700 <link to="MediumState_LockedRead"/> state for the duration of this
9701 operation.
9702
9703 Please note that the results can be either returned straight away,
9704 or later as the result of the background operation via the object
9705 returned via the @a progress parameter.
9706
9707 <result name="VBOX_E_NOT_SUPPORTED">
9708 Hard disk format does not support compacting (but potentially
9709 needs it).
9710 </result>
9711 </desc>
9712 <param name="progress" type="IProgress" dir="return">
9713 <desc>Progress object to track the operation completion.</desc>
9714 </param>
9715 </method>
9716
9717 <method name="reset">
9718 <desc>
9719 Starts erasing the contents of this differencing hard disk.
9720
9721 This operation will reset the differencing hard disk to its initial
9722 state when it does not contain any sector data and any read operation is
9723 redirected to its parent hard disk.
9724
9725 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9726 for the duration of this operation.
9727
9728 <result name="VBOX_E_NOT_SUPPORTED">
9729 This is not a differencing hard disk.
9730 </result>
9731 <result name="VBOX_E_INVALID_OBJECT_STATE">
9732 Hard disk is not in <link to="MediumState_Created"/> or
9733 <link to="MediumState_Inaccessible"/> state.
9734 </result>
9735 </desc>
9736 <param name="progress" type="IProgress" dir="return">
9737 <desc>Progress object to track the operation completion.</desc>
9738 </param>
9739 </method>
9740
9741 </interface>
9742
9743
9744 <!--
9745 // IMediumFormat
9746 /////////////////////////////////////////////////////////////////////////
9747 -->
9748
9749 <enum
9750 name="DataType"
9751 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9752 >
9753 <const name="Int32" value="0"/>
9754 <const name="Int8" value="1"/>
9755 <const name="String" value="2"/>
9756 </enum>
9757
9758 <enum
9759 name="DataFlags"
9760 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9761 >
9762 <const name="None" value="0x00"/>
9763 <const name="Mandatory" value="0x01"/>
9764 <const name="Expert" value="0x02"/>
9765 <const name="Array" value="0x04"/>
9766 <const name="FlagMask" value="0x07"/>
9767 </enum>
9768
9769 <enum
9770 name="MediumFormatCapabilities"
9771 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9772 >
9773 <desc>
9774 Hard disk format capability flags.
9775 </desc>
9776
9777 <const name="Uuid" value="0x01">
9778 <desc>
9779 Supports UUIDs as expected by VirtualBox code.
9780 </desc>
9781 </const>
9782
9783 <const name="CreateFixed" value="0x02">
9784 <desc>
9785 Supports creating fixed size images, allocating all space instantly.
9786 </desc>
9787 </const>
9788
9789 <const name="CreateDynamic" value="0x04">
9790 <desc>
9791 Supports creating dynamically growing images, allocating space on
9792 demand.
9793 </desc>
9794 </const>
9795
9796 <const name="CreateSplit2G" value="0x08">
9797 <desc>
9798 Supports creating images split in chunks of a bit less than 2 GBytes.
9799 </desc>
9800 </const>
9801
9802 <const name="Differencing" value="0x10">
9803 <desc>
9804 Supports being used as a format for differencing media (see <link
9805 to="IMedium::createDiffStorage"/>).
9806 </desc>
9807 </const>
9808
9809 <const name="Asynchronous" value="0x20">
9810 <desc>
9811 Supports asynchronous I/O operations for at least some configurations.
9812 </desc>
9813 </const>
9814
9815 <const name="File" value="0x40">
9816 <desc>
9817 The format backend operates on files (the <link to="IMedium::location"/>
9818 attribute of the medium specifies a file used to store medium
9819 data; for a list of supported file extensions see
9820 <link to="IMediumFormat::fileExtensions"/>).
9821 </desc>
9822 </const>
9823
9824 <const name="Properties" value="0x80">
9825 <desc>
9826 The format backend uses the property interface to configure the storage
9827 location and properties (the <link to="IMediumFormat::describeProperties"/>
9828 method is used to get access to properties supported by the given medium format).
9829 </desc>
9830 </const>
9831
9832 <const name="CapabilityMask" value="0xFF"/>
9833 </enum>
9834
9835 <interface
9836 name="IMediumFormat" extends="$unknown"
9837 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9838 wsmap="managed"
9839 >
9840 <desc>
9841 The IMediumFormat interface represents a medium format.
9842
9843 Each medium format has an associated backend which is used to handle
9844 media stored in this format. This interface provides information
9845 about the properties of the associated backend.
9846
9847 Each medium format is identified by a string represented by the
9848 <link to="#id"/> attribute. This string is used in calls like
9849 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9850 format.
9851
9852 The list of all supported medium formats can be obtained using
9853 <link to="ISystemProperties::mediaFormats"/>.
9854
9855 <see>IMedium</see>
9856 </desc>
9857
9858 <attribute name="id" type="wstring" readonly="yes">
9859 <desc>
9860 Identifier of this format.
9861
9862 The format identifier is a non-@c null non-empty ASCII string. Note that
9863 this string is case-insensitive. This means that, for example, all of
9864 the following strings:
9865 <pre>
9866 "VDI"
9867 "vdi"
9868 "VdI"</pre>
9869 refer to the same medium format.
9870
9871 This string is used in methods of other interfaces where it is necessary
9872 to specify a medium format, such as
9873 <link to="IVirtualBox::createHardDisk"/>.
9874 </desc>
9875 </attribute>
9876
9877 <attribute name="name" type="wstring" readonly="yes">
9878 <desc>
9879 Human readable description of this format.
9880
9881 Mainly for use in file open dialogs.
9882 </desc>
9883 </attribute>
9884
9885 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9886 <desc>
9887 Array of strings containing the supported file extensions.
9888
9889 The first extension in the array is the extension preferred by the
9890 backend. It is recommended to use this extension when specifying a
9891 location of the storage unit for a new medium.
9892
9893 Note that some backends do not work on files, so this array may be
9894 empty.
9895
9896 <see>IMediumFormat::capabilities</see>
9897 </desc>
9898 </attribute>
9899
9900 <attribute name="capabilities" type="unsigned long" readonly="yes">
9901 <desc>
9902 Capabilities of the format as a set of bit flags.
9903
9904 For the meaning of individual capability flags see
9905 <link to="MediumFormatCapabilities"/>.
9906 </desc>
9907 </attribute>
9908
9909 <method name="describeProperties">
9910 <desc>
9911 Returns several arrays describing the properties supported by this
9912 format.
9913
9914 An element with the given index in each array describes one
9915 property. Thus, the number of elements in each returned array is the
9916 same and corresponds to the number of supported properties.
9917
9918 The returned arrays are filled in only if the
9919 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9920 All arguments must be non-@c null.
9921
9922 <see>DataType</see>
9923 <see>DataFlags</see>
9924 </desc>
9925
9926 <param name="names" type="wstring" safearray="yes" dir="out">
9927 <desc>Array of property names.</desc>
9928 </param>
9929 <param name="description" type="wstring" safearray="yes" dir="out">
9930 <desc>Array of property descriptions.</desc>
9931 </param>
9932 <param name="types" type="DataType" safearray="yes" dir="out">
9933 <desc>Array of property types.</desc>
9934 </param>
9935 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9936 <desc>Array of property flags.</desc>
9937 </param>
9938 <param name="defaults" type="wstring" safearray="yes" dir="out">
9939 <desc>Array of default property values.</desc>
9940 </param>
9941 </method>
9942
9943 </interface>
9944
9945
9946 <!--
9947 // IKeyboard
9948 /////////////////////////////////////////////////////////////////////////
9949 -->
9950
9951 <interface
9952 name="IKeyboard" extends="$unknown"
9953 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9954 wsmap="managed"
9955 >
9956 <desc>
9957 The IKeyboard interface represents the virtual machine's keyboard. Used
9958 in <link to="IConsole::keyboard"/>.
9959
9960 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9961 to the virtual machine.
9962
9963 </desc>
9964 <method name="putScancode">
9965 <desc>Sends a scancode to the keyboard.
9966
9967 <result name="VBOX_E_IPRT_ERROR">
9968 Could not send scan code to virtual keyboard.
9969 </result>
9970
9971 </desc>
9972 <param name="scancode" type="long" dir="in"/>
9973 </method>
9974
9975 <method name="putScancodes">
9976 <desc>Sends an array of scancodes to the keyboard.
9977
9978 <result name="VBOX_E_IPRT_ERROR">
9979 Could not send all scan codes to virtual keyboard.
9980 </result>
9981
9982 </desc>
9983 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9984 <param name="codesStored" type="unsigned long" dir="return"/>
9985 </method>
9986
9987 <method name="putCAD">
9988 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9989 function is nothing special, it is just a convenience function
9990 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9991
9992 <result name="VBOX_E_IPRT_ERROR">
9993 Could not send all scan codes to virtual keyboard.
9994 </result>
9995
9996 </desc>
9997 </method>
9998
9999 </interface>
10000
10001
10002 <!--
10003 // IMouse
10004 /////////////////////////////////////////////////////////////////////////
10005 -->
10006
10007 <enum
10008 name="MouseButtonState"
10009 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10010 >
10011 <desc>
10012 Mouse button state.
10013 </desc>
10014
10015 <const name="LeftButton" value="0x01"/>
10016 <const name="RightButton" value="0x02"/>
10017 <const name="MiddleButton" value="0x04"/>
10018 <const name="WheelUp" value="0x08"/>
10019 <const name="WheelDown" value="0x10"/>
10020 <const name="XButton1" value="0x20"/>
10021 <const name="XButton2" value="0x40"/>
10022 <const name="MouseStateMask" value="0x7F"/>
10023 </enum>
10024
10025 <interface
10026 name="IMouse" extends="$unknown"
10027 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10028 wsmap="managed"
10029 >
10030 <desc>
10031 The IMouse interface represents the virtual machine's mouse. Used in
10032 <link to="IConsole::mouse"/>.
10033
10034 Through this interface, the virtual machine's virtual mouse can be
10035 controlled.
10036 </desc>
10037
10038 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10039 <desc>
10040 Whether the guest OS supports absolute mouse pointer positioning
10041 or not.
10042 <note>
10043 VirtualBox Guest Tools need to be installed to the guest OS
10044 in order to enable absolute mouse positioning support.
10045 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10046 callback to be instantly informed about changes of this attribute
10047 during virtual machine execution.
10048 </note>
10049 <see><link to="#putMouseEventAbsolute"/></see>
10050 </desc>
10051 </attribute>
10052
10053 <method name="putMouseEvent">
10054 <desc>
10055 Initiates a mouse event using relative pointer movements
10056 along x and y axis.
10057
10058 <result name="E_ACCESSDENIED">
10059 Console not powered up.
10060 </result>
10061 <result name="VBOX_E_IPRT_ERROR">
10062 Could not send mouse event to virtual mouse.
10063 </result>
10064
10065 </desc>
10066
10067 <param name="dx" type="long" dir="in">
10068 <desc>
10069 Amount of pixels the mouse should move to the right.
10070 Negative values move the mouse to the left.
10071 </desc>
10072 </param>
10073 <param name="dy" type="long" dir="in">
10074 <desc>
10075 Amount of pixels the mouse should move downwards.
10076 Negative values move the mouse upwards.
10077 </desc>
10078 </param>
10079 <param name="dz" type="long" dir="in">
10080 <desc>
10081 Amount of mouse wheel moves.
10082 Positive values describe clockwise wheel rotations,
10083 negative values describe counterclockwise rotations.
10084 </desc>
10085 </param>
10086 <param name="dw" type="long" dir="in">
10087 <desc>
10088 Amount of horizontal mouse wheel moves.
10089 Positive values describe a movement to the left,
10090 negative values describe a movement to the right.
10091 </desc>
10092 </param>
10093 <param name="buttonState" type="long" dir="in">
10094 <desc>
10095 The current state of mouse buttons. Every bit represents
10096 a mouse button as follows:
10097 <table>
10098 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10099 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10100 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10101 </table>
10102 A value of <tt>1</tt> means the corresponding button is pressed.
10103 otherwise it is released.
10104 </desc>
10105 </param>
10106 </method>
10107
10108 <method name="putMouseEventAbsolute">
10109 <desc>
10110 Positions the mouse pointer using absolute x and y coordinates.
10111 These coordinates are expressed in pixels and
10112 start from <tt>[1,1]</tt> which corresponds to the top left
10113 corner of the virtual display.
10114
10115 <result name="E_ACCESSDENIED">
10116 Console not powered up.
10117 </result>
10118 <result name="VBOX_E_IPRT_ERROR">
10119 Could not send mouse event to virtual mouse.
10120 </result>
10121
10122 <note>
10123 This method will have effect only if absolute mouse
10124 positioning is supported by the guest OS.
10125 </note>
10126
10127 <see><link to="#absoluteSupported"/></see>
10128 </desc>
10129
10130 <param name="x" type="long" dir="in">
10131 <desc>
10132 X coordinate of the pointer in pixels, starting from @c 1.
10133 </desc>
10134 </param>
10135 <param name="y" type="long" dir="in">
10136 <desc>
10137 Y coordinate of the pointer in pixels, starting from @c 1.
10138 </desc>
10139 </param>
10140 <param name="dz" type="long" dir="in">
10141 <desc>
10142 Amount of mouse wheel moves.
10143 Positive values describe clockwise wheel rotations,
10144 negative values describe counterclockwise rotations.
10145 </desc>
10146 </param>
10147 <param name="dw" type="long" dir="in">
10148 <desc>
10149 Amount of horizontal mouse wheel moves.
10150 Positive values describe a movement to the left,
10151 negative values describe a movement to the right.
10152 </desc>
10153 </param>
10154 <param name="buttonState" type="long" dir="in">
10155 <desc>
10156 The current state of mouse buttons. Every bit represents
10157 a mouse button as follows:
10158 <table>
10159 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10160 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10161 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10162 </table>
10163 A value of @c 1 means the corresponding button is pressed.
10164 otherwise it is released.
10165 </desc>
10166 </param>
10167 </method>
10168
10169 </interface>
10170
10171 <!--
10172 // IDisplay
10173 /////////////////////////////////////////////////////////////////////////
10174 -->
10175
10176 <enum
10177 name="FramebufferPixelFormat"
10178 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10179 >
10180 <desc>
10181 Format of the video memory buffer. Constants represented by this enum can
10182 be used to test for particular values of <link
10183 to="IFramebuffer::pixelFormat"/>. See also <link
10184 to="IFramebuffer::requestResize"/>.
10185
10186 See also www.fourcc.org for more information about FOURCC pixel formats.
10187 </desc>
10188
10189 <const name="Opaque" value="0">
10190 <desc>
10191 Unknown buffer format (the user may not assume any particular format of
10192 the buffer).
10193 </desc>
10194 </const>
10195 <const name="FOURCC_RGB" value="0x32424752">
10196 <desc>
10197 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10198 bit layout).
10199 </desc>
10200 </const>
10201 </enum>
10202
10203 <interface
10204 name="IFramebuffer" extends="$unknown"
10205 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10206 wsmap="suppress"
10207 >
10208 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10209 <desc>Address of the start byte of the frame buffer.</desc>
10210 </attribute>
10211
10212 <attribute name="width" type="unsigned long" readonly="yes">
10213 <desc>Frame buffer width, in pixels.</desc>
10214 </attribute>
10215
10216 <attribute name="height" type="unsigned long" readonly="yes">
10217 <desc>Frame buffer height, in pixels.</desc>
10218 </attribute>
10219
10220 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10221 <desc>
10222 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10223 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10224 are: 8, 15, 16, 24 and 32.
10225 </desc>
10226 </attribute>
10227
10228 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10229 <desc>
10230 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10231 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10232 size of the scan line must be aligned to 32 bits.
10233 </desc>
10234 </attribute>
10235
10236 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10237 <desc>
10238 Frame buffer pixel format. It's either one of the values defined by <link
10239 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10240 <note>
10241 This attribute must never return <link
10242 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10243 <link to="#address"/> points to must be always known.
10244 </note>
10245 </desc>
10246 </attribute>
10247
10248 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10249 <desc>
10250 Defines whether this frame buffer uses the virtual video card's memory
10251 buffer (guest VRAM) directly or not. See <link
10252 to="IFramebuffer::requestResize"/> for more information.
10253 </desc>
10254 </attribute>
10255
10256 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10257 <desc>
10258 Hint from the frame buffer about how much of the standard
10259 screen height it wants to use for itself. This information is
10260 exposed to the guest through the VESA BIOS and VMMDev interface
10261 so that it can use it for determining its video mode table. It
10262 is not guaranteed that the guest respects the value.
10263 </desc>
10264 </attribute>
10265
10266 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10267 <desc>
10268 An alpha-blended overlay which is superposed over the frame buffer.
10269 The initial purpose is to allow the display of icons providing
10270 information about the VM state, including disk activity, in front
10271 ends which do not have other means of doing that. The overlay is
10272 designed to controlled exclusively by IDisplay. It has no locking
10273 of its own, and any changes made to it are not guaranteed to be
10274 visible until the affected portion of IFramebuffer is updated. The
10275 overlay can be created lazily the first time it is requested. This
10276 attribute can also return @c null to signal that the overlay is not
10277 implemented.
10278 </desc>
10279 </attribute>
10280
10281 <attribute name="winId" type="unsigned long long" readonly="yes">
10282 <desc>
10283 Platform-dependent identifier of the window where context of this
10284 frame buffer is drawn, or zero if there's no such window.
10285 </desc>
10286 </attribute>
10287
10288 <method name="lock">
10289 <desc>
10290 Locks the frame buffer.
10291 Gets called by the IDisplay object where this frame buffer is
10292 bound to.
10293 </desc>
10294 </method>
10295
10296 <method name="unlock">
10297 <desc>
10298 Unlocks the frame buffer.
10299 Gets called by the IDisplay object where this frame buffer is
10300 bound to.
10301 </desc>
10302 </method>
10303
10304 <method name="notifyUpdate">
10305 <desc>
10306 Informs about an update.
10307 Gets called by the display object where this buffer is
10308 registered.
10309 </desc>
10310 <param name="x" type="unsigned long" dir="in"/>
10311 <param name="y" type="unsigned long" dir="in"/>
10312 <param name="width" type="unsigned long" dir="in"/>
10313 <param name="height" type="unsigned long" dir="in"/>
10314 </method>
10315
10316 <method name="requestResize">
10317 <desc>
10318 Requests a size and pixel format change.
10319
10320 There are two modes of working with the video buffer of the virtual
10321 machine. The <i>indirect</i> mode implies that the IFramebuffer
10322 implementation allocates a memory buffer for the requested display mode
10323 and provides it to the virtual machine. In <i>direct</i> mode, the
10324 IFramebuffer implementation uses the memory buffer allocated and owned
10325 by the virtual machine. This buffer represents the video memory of the
10326 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10327 usually faster because the implementation gets a raw pointer to the
10328 guest VRAM buffer which it can directly use for visualizing the contents
10329 of the virtual display, as opposed to the indirect mode where the
10330 contents of guest VRAM are copied to the memory buffer provided by
10331 the implementation every time a display update occurs.
10332
10333 It is important to note that the direct mode is really fast only when
10334 the implementation uses the given guest VRAM buffer directly, for
10335 example, by blitting it to the window representing the virtual machine's
10336 display, which saves at least one copy operation comparing to the
10337 indirect mode. However, using the guest VRAM buffer directly is not
10338 always possible: the format and the color depth of this buffer may be
10339 not supported by the target window, or it may be unknown (opaque) as in
10340 case of text or non-linear multi-plane VGA video modes. In this case,
10341 the indirect mode (that is always available) should be used as a
10342 fallback: when the guest VRAM contents are copied to the
10343 implementation-provided memory buffer, color and format conversion is
10344 done automatically by the underlying code.
10345
10346 The @a pixelFormat parameter defines whether the direct mode is
10347 available or not. If @a pixelFormat is <link
10348 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10349 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10350 @a bytesPerLine parameters must be ignored and the implementation must use
10351 the indirect mode (where it provides its own buffer in one of the
10352 supported formats). In all other cases, @a pixelFormat together with
10353 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10354 buffer pointed to by the @a VRAM parameter and the implementation is
10355 free to choose which mode to use. To indicate that this frame buffer uses
10356 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10357 attribute must return @c true and <link to="#address"/> must
10358 return exactly the same address that is passed in the @a VRAM parameter
10359 of this method; otherwise it is assumed that the indirect strategy is
10360 chosen.
10361
10362 The @a width and @a height parameters represent the size of the
10363 requested display mode in both modes. In case of indirect mode, the
10364 provided memory buffer should be big enough to store data of the given
10365 display mode. In case of direct mode, it is guaranteed that the given
10366 @a VRAM buffer contains enough space to represent the display mode of the
10367 given size. Note that this frame buffer's <link to="#width"/> and <link
10368 to="#height"/> attributes must return exactly the same values as
10369 passed to this method after the resize is completed (see below).
10370
10371 The @a finished output parameter determines if the implementation has
10372 finished resizing the frame buffer or not. If, for some reason, the
10373 resize cannot be finished immediately during this call, @a finished
10374 must be set to @c false, and the implementation must call
10375 <link to="IDisplay::resizeCompleted"/> after it has returned from
10376 this method as soon as possible. If @a finished is @c false, the
10377 machine will not call any frame buffer methods until
10378 <link to="IDisplay::resizeCompleted"/> is called.
10379
10380 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10381 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10382 this frame buffer must return exactly the same values as specified in the
10383 parameters of this method, after the resize is completed. If the
10384 indirect mode is chosen, these attributes must return values describing
10385 the format of the implementation's own memory buffer <link
10386 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10387 value must always correlate with <link to="#pixelFormat"/>. Note that
10388 the <link to="#pixelFormat"/> attribute must never return <link
10389 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10390
10391 <note>
10392 This method is called by the IDisplay object under the
10393 <link to="#lock"/> provided by this IFramebuffer
10394 implementation. If this method returns @c false in @a finished, then
10395 this lock is not released until
10396 <link to="IDisplay::resizeCompleted"/> is called.
10397 </note>
10398 </desc>
10399 <param name="screenId" type="unsigned long" dir="in">
10400 <desc>
10401 Logical screen number. Must be used in the corresponding call to
10402 <link to="IDisplay::resizeCompleted"/> if this call is made.
10403 </desc>
10404 </param>
10405 <param name="pixelFormat" type="unsigned long" dir="in">
10406 <desc>
10407 Pixel format of the memory buffer pointed to by @a VRAM.
10408 See also <link to="FramebufferPixelFormat"/>.
10409 </desc>
10410 </param>
10411 <param name="VRAM" type="octet" mod="ptr" dir="in">
10412 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10413 </param>
10414 <param name="bitsPerPixel" type="unsigned long" dir="in">
10415 <desc>Color depth, bits per pixel.</desc>
10416 </param>
10417 <param name="bytesPerLine" type="unsigned long" dir="in">
10418 <desc>Size of one scan line, in bytes.</desc>
10419 </param>
10420 <param name="width" type="unsigned long" dir="in">
10421 <desc>Width of the guest display, in pixels.</desc>
10422 </param>
10423 <param name="height" type="unsigned long" dir="in">
10424 <desc>Height of the guest display, in pixels.</desc>
10425 </param>
10426 <param name="finished" type="boolean" dir="return">
10427 <desc>
10428 Can the VM start using the new frame buffer immediately
10429 after this method returns or it should wait for
10430 <link to="IDisplay::resizeCompleted"/>.
10431 </desc>
10432 </param>
10433 </method>
10434
10435 <method name="videoModeSupported">
10436 <desc>
10437 Returns whether the frame buffer implementation is willing to
10438 support a given video mode. In case it is not able to render
10439 the video mode (or for some reason not willing), it should
10440 return @c false. Usually this method is called when the guest
10441 asks the VMM device whether a given video mode is supported
10442 so the information returned is directly exposed to the guest.
10443 It is important that this method returns very quickly.
10444 </desc>
10445 <param name="width" type="unsigned long" dir="in"/>
10446 <param name="height" type="unsigned long" dir="in"/>
10447 <param name="bpp" type="unsigned long" dir="in"/>
10448 <param name="supported" type="boolean" dir="return"/>
10449 </method>
10450
10451 <method name="getVisibleRegion">
10452 <desc>
10453 Returns the visible region of this frame buffer.
10454
10455 If the @a rectangles parameter is @c null then the value of the
10456 @a count parameter is ignored and the number of elements necessary to
10457 describe the current visible region is returned in @a countCopied.
10458
10459 If @a rectangles is not @c null but @a count is less
10460 than the required number of elements to store region data, the method
10461 will report a failure. If @a count is equal or greater than the
10462 required number of elements, then the actual number of elements copied
10463 to the provided array will be returned in @a countCopied.
10464
10465 <note>
10466 The address of the provided array must be in the process space of
10467 this IFramebuffer object.
10468 </note>
10469 <note>
10470 Method not yet implemented.
10471 </note>
10472 </desc>
10473 <param name="rectangles" type="octet" mod="ptr" dir="in">
10474 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10475 </param>
10476 <param name="count" type="unsigned long" dir="in">
10477 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10478 </param>
10479 <param name="countCopied" type="unsigned long" dir="return">
10480 <desc>Number of elements copied to the @a rectangles array.</desc>
10481 </param>
10482 </method>
10483
10484 <method name="setVisibleRegion">
10485 <desc>
10486 Suggests a new visible region to this frame buffer. This region
10487 represents the area of the VM display which is a union of regions of
10488 all top-level windows of the guest operating system running inside the
10489 VM (if the Guest Additions for this system support this
10490 functionality). This information may be used by the frontends to
10491 implement the seamless desktop integration feature.
10492
10493 <note>
10494 The address of the provided array must be in the process space of
10495 this IFramebuffer object.
10496 </note>
10497 <note>
10498 The IFramebuffer implementation must make a copy of the provided
10499 array of rectangles.
10500 </note>
10501 <note>
10502 Method not yet implemented.
10503 </note>
10504 </desc>
10505 <param name="rectangles" type="octet" mod="ptr" dir="in">
10506 <desc>Pointer to the @c RTRECT array.</desc>
10507 </param>
10508 <param name="count" type="unsigned long" dir="in">
10509 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10510 </param>
10511 </method>
10512
10513 <method name="processVHWACommand">
10514 <desc>
10515 Posts a Video HW Acceleration Command to the frame buffer for processing.
10516 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10517 are posted from quest to the host to be processed by the host hardware.
10518
10519 <note>
10520 The address of the provided command must be in the process space of
10521 this IFramebuffer object.
10522 </note>
10523 </desc>
10524
10525 <param name="command" type="octet" mod="ptr" dir="in">
10526 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10527 </param>
10528 </method>
10529
10530 </interface>
10531
10532 <interface
10533 name="IFramebufferOverlay" extends="IFramebuffer"
10534 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10535 wsmap="suppress"
10536 >
10537 <desc>
10538 The IFramebufferOverlay interface represents an alpha blended overlay
10539 for displaying status icons above an IFramebuffer. It is always created
10540 not visible, so that it must be explicitly shown. It only covers a
10541 portion of the IFramebuffer, determined by its width, height and
10542 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10543 that order) format, and may be written to directly. Do re-read the
10544 width though, after setting it, as it may be adjusted (increased) to
10545 make it more suitable for the front end.
10546 </desc>
10547 <attribute name="x" type="unsigned long" readonly="yes">
10548 <desc>X position of the overlay, relative to the frame buffer.</desc>
10549 </attribute>
10550
10551 <attribute name="y" type="unsigned long" readonly="yes">
10552 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10553 </attribute>
10554
10555 <attribute name="visible" type="boolean" readonly="no">
10556 <desc>
10557 Whether the overlay is currently visible.
10558 </desc>
10559 </attribute>
10560
10561 <attribute name="alpha" type="unsigned long" readonly="no">
10562 <desc>
10563 The global alpha value for the overlay. This may or may not be
10564 supported by a given front end.
10565 </desc>
10566 </attribute>
10567
10568 <method name="move">
10569 <desc>
10570 Changes the overlay's position relative to the IFramebuffer.
10571 </desc>
10572 <param name="x" type="unsigned long" dir="in"/>
10573 <param name="y" type="unsigned long" dir="in"/>
10574 </method>
10575
10576 </interface>
10577
10578 <interface
10579 name="IDisplay" extends="$unknown"
10580 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10581 wsmap="managed"
10582 >
10583 <desc>
10584 The IDisplay interface represents the virtual machine's display.
10585
10586 The object implementing this interface is contained in each
10587 <link to="IConsole::display"/> attribute and represents the visual
10588 output of the virtual machine.
10589
10590 The virtual display supports pluggable output targets represented by the
10591 IFramebuffer interface. Examples of the output target are a window on
10592 the host computer or an RDP session's display on a remote computer.
10593 </desc>
10594 <attribute name="width" type="unsigned long" readonly="yes">
10595 <desc>Current display width.</desc>
10596 </attribute>
10597
10598 <attribute name="height" type="unsigned long" readonly="yes">
10599 <desc>Current display height.</desc>
10600 </attribute>
10601
10602 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10603 <desc>
10604 Current guest display color depth. Note that this may differ
10605 from <link to="IFramebuffer::bitsPerPixel"/>.
10606 </desc>
10607 </attribute>
10608
10609 <method name="setFramebuffer">
10610 <desc>
10611 Sets the framebuffer for given screen.
10612 </desc>
10613 <param name="screenId" type="unsigned long" dir="in"/>
10614 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10615 </method>
10616
10617 <method name="getFramebuffer">
10618 <desc>
10619 Queries the framebuffer for given screen.
10620 </desc>
10621 <param name="screenId" type="unsigned long" dir="in"/>
10622 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10623 <param name="xOrigin" type="long" dir="out"/>
10624 <param name="yOrigin" type="long" dir="out"/>
10625 </method>
10626
10627 <method name="setVideoModeHint">
10628 <desc>
10629 Asks VirtualBox to request the given video mode from
10630 the guest. This is just a hint and it cannot be guaranteed
10631 that the requested resolution will be used. Guest Additions
10632 are required for the request to be seen by guests. The caller
10633 should issue the request and wait for a resolution change and
10634 after a timeout retry.
10635
10636 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10637 parameters means that the corresponding values should be taken from the
10638 current video mode (i.e. left unchanged).
10639
10640 If the guest OS supports multi-monitor configuration then the @a display
10641 parameter specifies the number of the guest display to send the hint to:
10642 @c 0 is the primary display, @c 1 is the first secondary and
10643 so on. If the multi-monitor configuration is not supported, @a display
10644 must be @c 0.
10645
10646 <result name="E_INVALIDARG">
10647 The @a display is not associated with any monitor.
10648 </result>
10649
10650 </desc>
10651 <param name="width" type="unsigned long" dir="in"/>
10652 <param name="height" type="unsigned long" dir="in"/>
10653 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10654 <param name="display" type="unsigned long" dir="in"/>
10655 </method>
10656
10657 <method name="setSeamlessMode">
10658 <desc>
10659 Enables or disables seamless guest display rendering (seamless desktop
10660 integration) mode.
10661 <note>
10662 Calling this method has no effect if <link
10663 to="IGuest::supportsSeamless"/> returns @c false.
10664 </note>
10665 </desc>
10666 <param name="enabled" type="boolean" dir="in"/>
10667 </method>
10668
10669 <method name="takeScreenShot">
10670 <desc>
10671 Takes a screen shot of the requested size and copies it to the
10672 32-bpp buffer allocated by the caller and pointed to by @a address.
10673
10674 <note>This API can be used only by the COM/XPCOM C++ API as it
10675 requires pointer support. Use <link to="#takeScreenShotSlow" />
10676 with other language bindings.
10677 </note>
10678
10679 <result name="E_NOTIMPL">
10680 Feature not implemented.
10681 </result>
10682 <result name="VBOX_E_IPRT_ERROR">
10683 Could not take a screenshot.
10684 </result>
10685
10686 </desc>
10687 <param name="address" type="octet" mod="ptr" dir="in"/>
10688 <param name="width" type="unsigned long" dir="in"/>
10689 <param name="height" type="unsigned long" dir="in"/>
10690 </method>
10691
10692 <method name="takeScreenShotSlow">
10693 <desc>
10694 Takes a guest screen shot of the requested size and returns it as
10695 an array of bytes in uncompressed 32-bit ARGB format.
10696 This API is slow, but could be the only option to get guest screenshot
10697 for scriptable languages not allowed to manipulate with addresses
10698 directly.
10699
10700 <result name="E_NOTIMPL">
10701 Feature not implemented.
10702 </result>
10703 <result name="VBOX_E_IPRT_ERROR">
10704 Could not take a screenshot.
10705 </result>
10706 </desc>
10707 <param name="width" type="unsigned long" dir="in">
10708 <desc>
10709 Desired image width.
10710 </desc>
10711 </param>
10712 <param name="height" type="unsigned long" dir="in">
10713 <desc>
10714 Desired image height.
10715 </desc>
10716 </param>
10717 <param name="screenData" type="octet" dir="return" safearray="yes">
10718 <desc>
10719 Array with resulting screen data.
10720 </desc>
10721 </param>
10722 </method>
10723
10724 <method name="drawToScreen">
10725 <desc>
10726 Draws a 32-bpp image of the specified size from the given buffer
10727 to the given point on the VM display.
10728
10729 <result name="E_NOTIMPL">
10730 Feature not implemented.
10731 </result>
10732 <result name="VBOX_E_IPRT_ERROR">
10733 Could not draw to screen.
10734 </result>
10735
10736 </desc>
10737 <param name="address" type="octet" mod="ptr" dir="in"/>
10738 <param name="x" type="unsigned long" dir="in"/>
10739 <param name="y" type="unsigned long" dir="in"/>
10740 <param name="width" type="unsigned long" dir="in"/>
10741 <param name="height" type="unsigned long" dir="in"/>
10742 </method>
10743
10744 <method name="invalidateAndUpdate">
10745 <desc>
10746 Does a full invalidation of the VM display and instructs the VM
10747 to update it.
10748
10749 <result name="VBOX_E_IPRT_ERROR">
10750 Could not invalidate and update screen.
10751 </result>
10752
10753 </desc>
10754 </method>
10755
10756 <method name="resizeCompleted">
10757 <desc>
10758 Signals that a framebuffer has completed the resize operation.
10759
10760 <result name="VBOX_E_NOT_SUPPORTED">
10761 Operation only valid for external frame buffers.
10762 </result>
10763
10764 </desc>
10765 <param name="screenId" type="unsigned long" dir="in"/>
10766 </method>
10767
10768 <method name="updateCompleted">
10769 <desc>
10770 Signals that a framebuffer has completed the update operation.
10771
10772 <result name="VBOX_E_NOT_SUPPORTED">
10773 Operation only valid for external frame buffers.
10774 </result>
10775
10776 </desc>
10777 </method>
10778
10779 <method name="completeVHWACommand">
10780 <desc>
10781 Signals that the Video HW Acceleration command has completed.
10782 </desc>
10783
10784 <param name="command" type="octet" mod="ptr" dir="in">
10785 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10786 </param>
10787 </method>
10788
10789 </interface>
10790
10791 <!--
10792 // INetworkAdapter
10793 /////////////////////////////////////////////////////////////////////////
10794 -->
10795
10796 <enum
10797 name="NetworkAttachmentType"
10798 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10799 >
10800 <desc>
10801 Network attachment type.
10802 </desc>
10803
10804 <const name="Null" value="0">
10805 <desc>Null value, also means "not attached".</desc>
10806 </const>
10807 <const name="NAT" value="1"/>
10808 <const name="Bridged" value="2"/>
10809 <const name="Internal" value="3"/>
10810 <const name="HostOnly" value="4"/>
10811 </enum>
10812
10813 <enum
10814 name="NetworkAdapterType"
10815 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10816 >
10817 <desc>
10818 Network adapter type.
10819 </desc>
10820
10821 <const name="Null" value="0">
10822 <desc>Null value (never used by the API).</desc>
10823 </const>
10824 <const name="Am79C970A" value="1">
10825 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10826 </const>
10827 <const name="Am79C973" value="2">
10828 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10829 </const>
10830 <const name="I82540EM" value="3">
10831 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10832 </const>
10833 <const name="I82543GC" value="4">
10834 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10835 </const>
10836 <const name="I82545EM" value="5">
10837 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10838 </const>
10839 <const name="Virtio" value="6">
10840 <desc>Virtio network device.</desc>
10841 </const>
10842 </enum>
10843
10844 <interface
10845 name="INetworkAdapter" extends="$unknown"
10846 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10847 wsmap="managed"
10848 >
10849 <desc>
10850 Represents a virtual network adapter that is attached to a virtual machine.
10851 Each virtual machine has a fixed number of network adapter slots with one
10852 instance of this attached to each of them. Call
10853 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10854 is attached to a given slot in a given machine.
10855
10856 Each network adapter can be in one of five attachment modes, which are
10857 represented by the <link to="NetworkAttachmentType" /> enumeration;
10858 see the <link to="#attachmentType" /> attribute.
10859 </desc>
10860
10861 <attribute name="adapterType" type="NetworkAdapterType">
10862 <desc>
10863 Type of the virtual network adapter. Depending on this value,
10864 VirtualBox will provide a different virtual network hardware
10865 to the guest.
10866 </desc>
10867 </attribute>
10868
10869 <attribute name="slot" type="unsigned long" readonly="yes">
10870 <desc>
10871 Slot number this adapter is plugged into. Corresponds to
10872 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10873 to obtain this instance.
10874 </desc>
10875 </attribute>
10876
10877 <attribute name="enabled" type="boolean">
10878 <desc>
10879 Flag whether the network adapter is present in the
10880 guest system. If disabled, the virtual guest hardware will
10881 not contain this network adapter. Can only be changed when
10882 the VM is not running.
10883 </desc>
10884 </attribute>
10885
10886 <attribute name="MACAddress" type="wstring">
10887 <desc>
10888 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10889 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10890 </desc>
10891 </attribute>
10892
10893 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10894
10895 <attribute name="hostInterface" type="wstring">
10896 <desc>
10897 Name of the host network interface the VM is attached to.
10898 </desc>
10899 </attribute>
10900
10901 <attribute name="internalNetwork" type="wstring">
10902 <desc>
10903 Name of the internal network the VM is attached to.
10904 </desc>
10905 </attribute>
10906
10907 <attribute name="NATNetwork" type="wstring">
10908 <desc>
10909 Name of the NAT network the VM is attached to.
10910 </desc>
10911 </attribute>
10912
10913 <attribute name="cableConnected" type="boolean">
10914 <desc>
10915 Flag whether the adapter reports the cable as connected or not.
10916 It can be used to report offline situations to a VM.
10917 </desc>
10918 </attribute>
10919
10920 <attribute name="lineSpeed" type="unsigned long">
10921 <desc>
10922 Line speed reported by custom drivers, in units of 1 kbps.
10923 </desc>
10924 </attribute>
10925
10926 <attribute name="traceEnabled" type="boolean">
10927 <desc>
10928 Flag whether network traffic from/to the network card should be traced.
10929 Can only be toggled when the VM is turned off.
10930 </desc>
10931 </attribute>
10932
10933 <attribute name="traceFile" type="wstring">
10934 <desc>
10935 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10936 will be used.
10937 </desc>
10938 </attribute>
10939
10940 <method name="attachToNAT">
10941 <desc>
10942 Attach the network adapter to the Network Address Translation (NAT) interface.
10943 </desc>
10944 </method>
10945
10946 <method name="attachToBridgedInterface">
10947 <desc>
10948 Attach the network adapter to a bridged host interface.
10949 </desc>
10950 </method>
10951
10952 <method name="attachToInternalNetwork">
10953 <desc>
10954 Attach the network adapter to an internal network.
10955 </desc>
10956 </method>
10957
10958 <method name="attachToHostOnlyInterface">
10959 <desc>
10960 Attach the network adapter to the host-only network.
10961 </desc>
10962 </method>
10963
10964 <method name="detach">
10965 <desc>
10966 Detach the network adapter
10967 </desc>
10968 </method>
10969 </interface>
10970
10971
10972 <!--
10973 // ISerialPort
10974 /////////////////////////////////////////////////////////////////////////
10975 -->
10976
10977 <enum
10978 name="PortMode"
10979 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10980 >
10981 <desc>
10982 The PortMode enumeration represents possible communication modes for
10983 the virtual serial port device.
10984 </desc>
10985
10986 <const name="Disconnected" value="0">
10987 <desc>Virtual device is not attached to any real host device.</desc>
10988 </const>
10989 <const name="HostPipe" value="1">
10990 <desc>Virtual device is attached to a host pipe.</desc>
10991 </const>
10992 <const name="HostDevice" value="2">
10993 <desc>Virtual device is attached to a host device.</desc>
10994 </const>
10995 <const name="RawFile" value="3">
10996 <desc>Virtual device is attached to a raw file.</desc>
10997 </const>
10998 </enum>
10999
11000 <interface
11001 name="ISerialPort" extends="$unknown"
11002 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11003 wsmap="managed"
11004 >
11005
11006 <desc>
11007 The ISerialPort interface represents the virtual serial port device.
11008
11009 The virtual serial port device acts like an ordinary serial port
11010 inside the virtual machine. This device communicates to the real
11011 serial port hardware in one of two modes: host pipe or host device.
11012
11013 In host pipe mode, the #path attribute specifies the path to the pipe on
11014 the host computer that represents a serial port. The #server attribute
11015 determines if this pipe is created by the virtual machine process at
11016 machine startup or it must already exist before starting machine
11017 execution.
11018
11019 In host device mode, the #path attribute specifies the name of the
11020 serial port device on the host computer.
11021
11022 There is also a third communication mode: the disconnected mode. In this
11023 mode, the guest OS running inside the virtual machine will be able to
11024 detect the serial port, but all port write operations will be discarded
11025 and all port read operations will return no data.
11026
11027 <see>IMachine::getSerialPort</see>
11028 </desc>
11029
11030 <attribute name="slot" type="unsigned long" readonly="yes">
11031 <desc>
11032 Slot number this serial port is plugged into. Corresponds to
11033 the value you pass to <link to="IMachine::getSerialPort"/>
11034 to obtain this instance.
11035 </desc>
11036 </attribute>
11037
11038 <attribute name="enabled" type="boolean">
11039 <desc>
11040 Flag whether the serial port is enabled. If disabled,
11041 the serial port will not be reported to the guest OS.
11042 </desc>
11043 </attribute>
11044
11045 <attribute name="IOBase" type="unsigned long">
11046 <desc>Base I/O address of the serial port.</desc>
11047 </attribute>
11048
11049 <attribute name="IRQ" type="unsigned long">
11050 <desc>IRQ number of the serial port.</desc>
11051 </attribute>
11052
11053 <attribute name="hostMode" type="PortMode">
11054 <desc>
11055 How is this port connected to the host.
11056 <note>
11057 Changing this attribute may fail if the conditions for
11058 <link to="#path"/> are not met.
11059 </note>
11060 </desc>
11061 </attribute>
11062
11063 <attribute name="server" type="boolean">
11064 <desc>
11065 Flag whether this serial port acts as a server (creates a new pipe on
11066 the host) or as a client (uses the existing pipe). This attribute is
11067 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11068 </desc>
11069 </attribute>
11070
11071 <attribute name="path" type="wstring">
11072 <desc>
11073 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11074 PortMode_HostPipe, or the host serial device name when
11075 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11076 cases, setting a @c null or empty string as the attribute's value
11077 is an error. Otherwise, the value of this property is ignored.
11078 </desc>
11079 </attribute>
11080
11081 </interface>
11082
11083 <!--
11084 // IParallelPort
11085 /////////////////////////////////////////////////////////////////////////
11086 -->
11087
11088 <interface
11089 name="IParallelPort" extends="$unknown"
11090 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11091 wsmap="managed"
11092 >
11093
11094 <desc>
11095 The IParallelPort interface represents the virtual parallel port device.
11096
11097 The virtual parallel port device acts like an ordinary parallel port
11098 inside the virtual machine. This device communicates to the real
11099 parallel port hardware using the name of the parallel device on the host
11100 computer specified in the #path attribute.
11101
11102 Each virtual parallel port device is assigned a base I/O address and an
11103 IRQ number that will be reported to the guest operating system and used
11104 to operate the given parallel port from within the virtual machine.
11105
11106 <see>IMachine::getParallelPort</see>
11107 </desc>
11108
11109 <attribute name="slot" type="unsigned long" readonly="yes">
11110 <desc>
11111 Slot number this parallel port is plugged into. Corresponds to
11112 the value you pass to <link to="IMachine::getParallelPort"/>
11113 to obtain this instance.
11114 </desc>
11115 </attribute>
11116
11117 <attribute name="enabled" type="boolean">
11118 <desc>
11119 Flag whether the parallel port is enabled. If disabled,
11120 the parallel port will not be reported to the guest OS.
11121 </desc>
11122 </attribute>
11123
11124 <attribute name="IOBase" type="unsigned long">
11125 <desc>Base I/O address of the parallel port.</desc>
11126 </attribute>
11127
11128 <attribute name="IRQ" type="unsigned long">
11129 <desc>IRQ number of the parallel port.</desc>
11130 </attribute>
11131
11132 <attribute name="path" type="wstring">
11133 <desc>
11134 Host parallel device name. If this parallel port is enabled, setting a
11135 @c null or an empty string as this attribute's value will result into
11136 an error.
11137 </desc>
11138 </attribute>
11139
11140 </interface>
11141
11142
11143 <!--
11144 // IMachineDebugger
11145 /////////////////////////////////////////////////////////////////////////
11146 -->
11147
11148 <interface
11149 name="IMachineDebugger" extends="$unknown"
11150 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11151 wsmap="suppress"
11152 >
11153 <method name="resetStats">
11154 <desc>
11155 Reset VM statistics.
11156 </desc>
11157 <param name="pattern" type="wstring" dir="in">
11158 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11159 </param>
11160 </method>
11161
11162 <method name="dumpStats">
11163 <desc>
11164 Dumps VM statistics.
11165 </desc>
11166 <param name="pattern" type="wstring" dir="in">
11167 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11168 </param>
11169 </method>
11170
11171 <method name="getStats">
11172 <desc>
11173 Get the VM statistics in a XMLish format.
11174 </desc>
11175 <param name="pattern" type="wstring" dir="in">
11176 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11177 </param>
11178 <param name="withDescriptions" type="boolean" dir="in">
11179 <desc>Whether to include the descriptions.</desc>
11180 </param>
11181 <param name="stats" type="wstring" dir="out">
11182 <desc>The XML document containing the statistics.</desc>
11183 </param>
11184 </method>
11185
11186 <method name="injectNMI">
11187 <desc>
11188 Inject an NMI into a running VT-x/AMD-V VM.
11189 </desc>
11190 </method>
11191
11192 <attribute name="singlestep" type="boolean">
11193 <desc>Switch for enabling singlestepping.</desc>
11194 </attribute>
11195
11196 <attribute name="recompileUser" type="boolean">
11197 <desc>Switch for forcing code recompilation for user mode code.</desc>
11198 </attribute>
11199
11200 <attribute name="recompileSupervisor" type="boolean">
11201 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11202 </attribute>
11203
11204 <attribute name="PATMEnabled" type="boolean">
11205 <desc>Switch for enabling and disabling the PATM component.</desc>
11206 </attribute>
11207
11208 <attribute name="CSAMEnabled" type="boolean">
11209 <desc>Switch for enabling and disabling the CSAM component.</desc>
11210 </attribute>
11211
11212 <attribute name="logEnabled" type="boolean">
11213 <desc>Switch for enabling and disabling logging.</desc>
11214 </attribute>
11215
11216 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11217 <desc>
11218 Flag indicating whether the VM is currently making use of CPU hardware
11219 virtualization extensions.
11220 </desc>
11221 </attribute>
11222
11223 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11224 <desc>
11225 Flag indicating whether the VM is currently making use of the nested paging
11226 CPU hardware virtualization extension.
11227 </desc>
11228 </attribute>
11229
11230 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11231 <desc>
11232 Flag indicating whether the VM is currently making use of the VPID
11233 VT-x extension.
11234 </desc>
11235 </attribute>
11236
11237 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11238 <desc>
11239 Flag indicating whether the VM is currently making use of the Physical
11240 Address Extension CPU feature.
11241 </desc>
11242 </attribute>
11243
11244 <attribute name="virtualTimeRate" type="unsigned long">
11245 <desc>
11246 The rate at which the virtual time runs expressed as a percentage.
11247 The accepted range is 2% to 20000%.
11248 </desc>
11249 </attribute>
11250
11251 <!-- @todo method for setting log flags, groups and destination! -->
11252
11253 <attribute name="VM" type="unsigned long long" readonly="yes">
11254 <desc>
11255 Gets the VM handle. This is only for internal use while
11256 we carve the details of this interface.
11257 </desc>
11258 </attribute>
11259
11260 </interface>
11261
11262 <!--
11263 // IUSBController
11264 /////////////////////////////////////////////////////////////////////////
11265 -->
11266
11267 <interface
11268 name="IUSBController" extends="$unknown"
11269 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11270 wsmap="managed"
11271 >
11272 <attribute name="enabled" type="boolean">
11273 <desc>
11274 Flag whether the USB controller is present in the
11275 guest system. If disabled, the virtual guest hardware will
11276 not contain any USB controller. Can only be changed when
11277 the VM is powered off.
11278 </desc>
11279 </attribute>
11280
11281 <attribute name="enabledEhci" type="boolean">
11282 <desc>
11283 Flag whether the USB EHCI controller is present in the
11284 guest system. If disabled, the virtual guest hardware will
11285 not contain a USB EHCI controller. Can only be changed when
11286 the VM is powered off.
11287 </desc>
11288 </attribute>
11289
11290 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11291 <desc>
11292 USB standard version which the controller implements.
11293 This is a BCD which means that the major version is in the
11294 high byte and minor version is in the low byte.
11295 </desc>
11296 </attribute>
11297
11298 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11299 <desc>
11300 List of USB device filters associated with the machine.
11301
11302 If the machine is currently running, these filters are activated
11303 every time a new (supported) USB device is attached to the host
11304 computer that was not ignored by global filters
11305 (<link to="IHost::USBDeviceFilters"/>).
11306
11307 These filters are also activated when the machine is powered up.
11308 They are run against a list of all currently available USB
11309 devices (in states
11310 <link to="USBDeviceState_Available"/>,
11311 <link to="USBDeviceState_Busy"/>,
11312 <link to="USBDeviceState_Held"/>) that were not previously
11313 ignored by global filters.
11314
11315 If at least one filter matches the USB device in question, this
11316 device is automatically captured (attached to) the virtual USB
11317 controller of this machine.
11318
11319 <see>IUSBDeviceFilter, ::IUSBController</see>
11320 </desc>
11321 </attribute>
11322
11323 <method name="createDeviceFilter">
11324 <desc>
11325 Creates a new USB device filter. All attributes except
11326 the filter name are set to empty (any match),
11327 <i>active</i> is @c false (the filter is not active).
11328
11329 The created filter can then be added to the list of filters using
11330 <link to="#insertDeviceFilter"/>.
11331
11332 <result name="VBOX_E_INVALID_VM_STATE">
11333 The virtual machine is not mutable.
11334 </result>
11335
11336 <see>#deviceFilters</see>
11337 </desc>
11338 <param name="name" type="wstring" dir="in">
11339 <desc>
11340 Filter name. See <link to="IUSBDeviceFilter::name"/>
11341 for more info.
11342 </desc>
11343 </param>
11344 <param name="filter" type="IUSBDeviceFilter" dir="return">
11345 <desc>Created filter object.</desc>
11346 </param>
11347 </method>
11348
11349 <method name="insertDeviceFilter">
11350 <desc>
11351 Inserts the given USB device to the specified position
11352 in the list of filters.
11353
11354 Positions are numbered starting from <tt>0</tt>. If the specified
11355 position is equal to or greater than the number of elements in
11356 the list, the filter is added to the end of the collection.
11357
11358 <note>
11359 Duplicates are not allowed, so an attempt to insert a
11360 filter that is already in the collection, will return an
11361 error.
11362 </note>
11363
11364 <result name="VBOX_E_INVALID_VM_STATE">
11365 Virtual machine is not mutable.
11366 </result>
11367 <result name="E_INVALIDARG">
11368 USB device filter not created within this VirtualBox instance.
11369 </result>
11370 <result name="VBOX_E_INVALID_OBJECT_STATE">
11371 USB device filter already in list.
11372 </result>
11373
11374 <see>#deviceFilters</see>
11375 </desc>
11376 <param name="position" type="unsigned long" dir="in">
11377 <desc>Position to insert the filter to.</desc>
11378 </param>
11379 <param name="filter" type="IUSBDeviceFilter" dir="in">
11380 <desc>USB device filter to insert.</desc>
11381 </param>
11382 </method>
11383
11384 <method name="removeDeviceFilter">
11385 <desc>
11386 Removes a USB device filter from the specified position in the
11387 list of filters.
11388
11389 Positions are numbered starting from <tt>0</tt>. Specifying a
11390 position equal to or greater than the number of elements in
11391 the list will produce an error.
11392
11393 <see>#deviceFilters</see>
11394
11395 <result name="VBOX_E_INVALID_VM_STATE">
11396 Virtual machine is not mutable.
11397 </result>
11398 <result name="E_INVALIDARG">
11399 USB device filter list empty or invalid @a position.
11400 </result>
11401
11402 </desc>
11403 <param name="position" type="unsigned long" dir="in">
11404 <desc>Position to remove the filter from.</desc>
11405 </param>
11406 <param name="filter" type="IUSBDeviceFilter" dir="return">
11407 <desc>Removed USB device filter.</desc>
11408 </param>
11409 </method>
11410
11411 </interface>
11412
11413
11414 <!--
11415 // IUSBDevice
11416 /////////////////////////////////////////////////////////////////////////
11417 -->
11418
11419 <interface
11420 name="IUSBDevice" extends="$unknown"
11421 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11422 wsmap="managed"
11423 >
11424 <desc>
11425 The IUSBDevice interface represents a virtual USB device attached to the
11426 virtual machine.
11427
11428 A collection of objects implementing this interface is stored in the
11429 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11430 attached to a running virtual machine's USB controller.
11431 </desc>
11432
11433 <attribute name="id" type="uuid" mod="string" readonly="yes">
11434 <desc>
11435 Unique USB device ID. This ID is built from #vendorId,
11436 #productId, #revision and #serialNumber.
11437 </desc>
11438 </attribute>
11439
11440 <attribute name="vendorId" type="unsigned short" readonly="yes">
11441 <desc>Vendor ID.</desc>
11442 </attribute>
11443
11444 <attribute name="productId" type="unsigned short" readonly="yes">
11445 <desc>Product ID.</desc>
11446 </attribute>
11447
11448 <attribute name="revision" type="unsigned short" readonly="yes">
11449 <desc>
11450 Product revision number. This is a packed BCD represented as
11451 unsigned short. The high byte is the integer part and the low
11452 byte is the decimal.
11453 </desc>
11454 </attribute>
11455
11456 <attribute name="manufacturer" type="wstring" readonly="yes">
11457 <desc>Manufacturer string.</desc>
11458 </attribute>
11459
11460 <attribute name="product" type="wstring" readonly="yes">
11461 <desc>Product string.</desc>
11462 </attribute>
11463
11464 <attribute name="serialNumber" type="wstring" readonly="yes">
11465 <desc>Serial number string.</desc>
11466 </attribute>
11467
11468 <attribute name="address" type="wstring" readonly="yes">
11469 <desc>Host specific address of the device.</desc>
11470 </attribute>
11471
11472 <attribute name="port" type="unsigned short" readonly="yes">
11473 <desc>
11474 Host USB port number the device is physically
11475 connected to.
11476 </desc>
11477 </attribute>
11478
11479 <attribute name="version" type="unsigned short" readonly="yes">
11480 <desc>
11481 The major USB version of the device - 1 or 2.
11482 </desc>
11483 </attribute>
11484
11485 <attribute name="portVersion" type="unsigned short" readonly="yes">
11486 <desc>
11487 The major USB version of the host USB port the device is
11488 physically connected to - 1 or 2. For devices not connected to
11489 anything this will have the same value as the version attribute.
11490 </desc>
11491 </attribute>
11492
11493 <attribute name="remote" type="boolean" readonly="yes">
11494 <desc>
11495 Whether the device is physically connected to a remote VRDP
11496 client or to a local host machine.
11497 </desc>
11498 </attribute>
11499
11500 </interface>
11501
11502
11503 <!--
11504 // IUSBDeviceFilter
11505 /////////////////////////////////////////////////////////////////////////
11506 -->
11507
11508 <interface
11509 name="IUSBDeviceFilter" extends="$unknown"
11510 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11511 wsmap="managed"
11512 >
11513 <desc>
11514 The IUSBDeviceFilter interface represents an USB device filter used
11515 to perform actions on a group of USB devices.
11516
11517 This type of filters is used by running virtual machines to
11518 automatically capture selected USB devices once they are physically
11519 attached to the host computer.
11520
11521 A USB device is matched to the given device filter if and only if all
11522 attributes of the device match the corresponding attributes of the
11523 filter (that is, attributes are joined together using the logical AND
11524 operation). On the other hand, all together, filters in the list of
11525 filters carry the semantics of the logical OR operation. So if it is
11526 desirable to create a match like "this vendor id OR this product id",
11527 one needs to create two filters and specify "any match" (see below)
11528 for unused attributes.
11529
11530 All filter attributes used for matching are strings. Each string
11531 is an expression representing a set of values of the corresponding
11532 device attribute, that will match the given filter. Currently, the
11533 following filtering expressions are supported:
11534
11535 <ul>
11536 <li><i>Interval filters</i>. Used to specify valid intervals for
11537 integer device attributes (Vendor ID, Product ID and Revision).
11538 The format of the string is:
11539
11540 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11541
11542 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11543 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11544 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11545 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11546 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11547 possible integer is assumed.
11548 </li>
11549 <li><i>Boolean filters</i>. Used to specify acceptable values for
11550 boolean device attributes. The format of the string is:
11551
11552 <tt>true|false|yes|no|0|1</tt>
11553
11554 </li>
11555 <li><i>Exact match</i>. Used to specify a single value for the given
11556 device attribute. Any string that doesn't start with <tt>int:</tt>
11557 represents the exact match. String device attributes are compared to
11558 this string including case of symbols. Integer attributes are first
11559 converted to a string (see individual filter attributes) and then
11560 compared ignoring case.
11561
11562 </li>
11563 <li><i>Any match</i>. Any value of the corresponding device attribute
11564 will match the given filter. An empty or @c null string is
11565 used to construct this type of filtering expressions.
11566
11567 </li>
11568 </ul>
11569
11570 <note>
11571 On the Windows host platform, interval filters are not currently
11572 available. Also all string filter attributes
11573 (<link to="#manufacturer"/>, <link to="#product"/>,
11574 <link to="#serialNumber"/>) are ignored, so they behave as
11575 <i>any match</i> no matter what string expression is specified.
11576 </note>
11577
11578 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11579 </desc>
11580
11581 <attribute name="name" type="wstring">
11582 <desc>
11583 Visible name for this filter.
11584 This name is used to visually distinguish one filter from another,
11585 so it can neither be @c null nor an empty string.
11586 </desc>
11587 </attribute>
11588
11589 <attribute name="active" type="boolean">
11590 <desc>Whether this filter active or has been temporarily disabled.</desc>
11591 </attribute>
11592
11593 <attribute name="vendorId" type="wstring">
11594 <desc>
11595 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11596 The string representation for the <i>exact matching</i>
11597 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11598 (including leading zeroes).
11599 </desc>
11600 </attribute>
11601
11602 <attribute name="productId" type="wstring">
11603 <desc>
11604 <link to="IUSBDevice::productId">Product ID</link> filter.
11605 The string representation for the <i>exact matching</i>
11606 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11607 (including leading zeroes).
11608 </desc>
11609 </attribute>
11610
11611 <attribute name="revision" type="wstring">
11612 <desc>
11613 <link to="IUSBDevice::productId">Product revision number</link>
11614 filter. The string representation for the <i>exact matching</i>
11615 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11616 of the integer part of the revision, and <tt>F</tt> is the
11617 decimal digit of its fractional part (including leading and
11618 trailing zeros).
11619 Note that for interval filters, it's best to use the hexadecimal
11620 form, because the revision is stored as a 16 bit packed BCD value;
11621 so the expression <tt>int:0x0100-0x0199</tt> will match any
11622 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11623 </desc>
11624 </attribute>
11625
11626 <attribute name="manufacturer" type="wstring">
11627 <desc>
11628 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11629 </desc>
11630 </attribute>
11631
11632 <attribute name="product" type="wstring">
11633 <desc>
11634 <link to="IUSBDevice::product">Product</link> filter.
11635 </desc>
11636 </attribute>
11637
11638 <attribute name="serialNumber" type="wstring">
11639 <desc>
11640 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11641 </desc>
11642 </attribute>
11643
11644 <attribute name="port" type="wstring">
11645 <desc>
11646 <link to="IUSBDevice::port">Host USB port</link> filter.
11647 </desc>
11648 </attribute>
11649
11650 <attribute name="remote" type="wstring">
11651 <desc>
11652 <link to="IUSBDevice::remote">Remote state</link> filter.
11653 <note>
11654 This filter makes sense only for machine USB filters,
11655 i.e. it is ignored by IHostUSBDeviceFilter objects.
11656 </note>
11657 </desc>
11658 </attribute>
11659
11660 <attribute name="maskedInterfaces" type="unsigned long">
11661 <desc>
11662 This is an advanced option for hiding one or more USB interfaces
11663 from the guest. The value is a bit mask where the bits that are set
11664 means the corresponding USB interface should be hidden, masked off
11665 if you like.
11666 This feature only works on Linux hosts.
11667 </desc>
11668 </attribute>
11669
11670 </interface>
11671
11672
11673 <!--
11674 // IHostUSBDevice
11675 /////////////////////////////////////////////////////////////////////////
11676 -->
11677
11678 <enum
11679 name="USBDeviceState"
11680 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11681 >
11682 <desc>
11683 USB device state. This enumeration represents all possible states
11684 of the USB device physically attached to the host computer regarding
11685 its state on the host computer and availability to guest computers
11686 (all currently running virtual machines).
11687
11688 Once a supported USB device is attached to the host, global USB
11689 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11690 either ignore the device, or put it to USBDeviceState_Held state, or do
11691 nothing. Unless the device is ignored by global filters, filters of all
11692 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11693 activated that can put it to USBDeviceState_Captured state.
11694
11695 If the device was ignored by global filters, or didn't match
11696 any filters at all (including guest ones), it is handled by the host
11697 in a normal way. In this case, the device state is determined by
11698 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11699 or USBDeviceState_Available, depending on the current device usage.
11700
11701 Besides auto-capturing based on filters, the device can be manually
11702 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11703 state is USBDeviceState_Busy, USBDeviceState_Available or
11704 USBDeviceState_Held.
11705
11706 <note>
11707 Due to differences in USB stack implementations in Linux and Win32,
11708 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11709 only to the Linux version of the product. This also means that (<link
11710 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11711 device state is USBDeviceState_Held.
11712 </note>
11713
11714 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11715 </desc>
11716
11717 <const name="NotSupported" value="0">
11718 <desc>
11719 Not supported by the VirtualBox server, not available to guests.
11720 </desc>
11721 </const>
11722 <const name="Unavailable" value="1">
11723 <desc>
11724 Being used by the host computer exclusively,
11725 not available to guests.
11726 </desc>
11727 </const>
11728 <const name="Busy" value="2">
11729 <desc>
11730 Being used by the host computer, potentially available to guests.
11731 </desc>
11732 </const>
11733 <const name="Available" value="3">
11734 <desc>
11735 Not used by the host computer, available to guests (the host computer
11736 can also start using the device at any time).
11737 </desc>
11738 </const>
11739 <const name="Held" value="4">
11740 <desc>
11741 Held by the VirtualBox server (ignored by the host computer),
11742 available to guests.
11743 </desc>
11744 </const>
11745 <const name="Captured" value="5">
11746 <desc>
11747 Captured by one of the guest computers, not available
11748 to anybody else.
11749 </desc>
11750 </const>
11751 </enum>
11752
11753 <interface
11754 name="IHostUSBDevice" extends="IUSBDevice"
11755 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11756 wsmap="managed"
11757 >
11758 <desc>
11759 The IHostUSBDevice interface represents a physical USB device attached
11760 to the host computer.
11761
11762 Besides properties inherited from IUSBDevice, this interface adds the
11763 <link to="#state"/> property that holds the current state of the USB
11764 device.
11765
11766 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11767 </desc>
11768
11769 <attribute name="state" type="USBDeviceState" readonly="yes">
11770 <desc>
11771 Current state of the device.
11772 </desc>
11773 </attribute>
11774
11775 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11776
11777 </interface>
11778
11779
11780 <!--
11781 // IHostUSBDeviceFilter
11782 /////////////////////////////////////////////////////////////////////////
11783 -->
11784
11785 <enum
11786 name="USBDeviceFilterAction"
11787 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11788 >
11789 <desc>
11790 Actions for host USB device filters.
11791 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11792 </desc>
11793
11794 <const name="Null" value="0">
11795 <desc>Null value (never used by the API).</desc>
11796 </const>
11797 <const name="Ignore" value="1">
11798 <desc>Ignore the matched USB device.</desc>
11799 </const>
11800 <const name="Hold" value="2">
11801 <desc>Hold the matched USB device.</desc>
11802 </const>
11803 </enum>
11804
11805 <interface
11806 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11807 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11808 wsmap="managed"
11809 >
11810 <desc>
11811 The IHostUSBDeviceFilter interface represents a global filter for a
11812 physical USB device used by the host computer. Used indirectly in
11813 <link to="IHost::USBDeviceFilters"/>.
11814
11815 Using filters of this type, the host computer determines the initial
11816 state of the USB device after it is physically attached to the
11817 host's USB controller.
11818
11819 <note>
11820 The <link to="#remote"/> attribute is ignored by this type of
11821 filters, because it makes sense only for
11822 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11823 </note>
11824
11825 <see>IHost::USBDeviceFilters</see>
11826 </desc>
11827
11828 <attribute name="action" type="USBDeviceFilterAction">
11829 <desc>
11830 Action performed by the host when an attached USB device
11831 matches this filter.
11832 </desc>
11833 </attribute>
11834
11835 </interface>
11836
11837 <!--
11838 // IAudioAdapter
11839 /////////////////////////////////////////////////////////////////////////
11840 -->
11841
11842 <enum
11843 name="AudioDriverType"
11844 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11845 >
11846 <desc>
11847 Host audio driver type.
11848 </desc>
11849
11850 <const name="Null" value="0">
11851 <desc>Null value, also means "dummy audio driver".</desc>
11852 </const>
11853 <const name="WinMM" value="1">
11854 <desc>Windows multimedia (Windows hosts only).</desc>
11855 </const>
11856 <const name="OSS" value="2">
11857 <desc>Open Sound System (Linux hosts only).</desc>
11858 </const>
11859 <const name="ALSA" value="3">
11860 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11861 </const>
11862 <const name="DirectSound" value="4">
11863 <desc>DirectSound (Windows hosts only).</desc>
11864 </const>
11865 <const name="CoreAudio" value="5">
11866 <desc>CoreAudio (Mac hosts only).</desc>
11867 </const>
11868 <const name="MMPM" value="6">
11869 <desc>Reserved for historical reasons.</desc>
11870 </const>
11871 <const name="Pulse" value="7">
11872 <desc>PulseAudio (Linux hosts only).</desc>
11873 </const>
11874 <const name="SolAudio" value="8">
11875 <desc>Solaris audio (Solaris hosts only).</desc>
11876 </const>
11877 </enum>
11878
11879 <enum
11880 name="AudioControllerType"
11881 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11882 >
11883 <desc>
11884 Virtual audio controller type.
11885 </desc>
11886
11887 <const name="AC97" value="0"/>
11888 <const name="SB16" value="1"/>
11889 </enum>
11890
11891 <interface
11892 name="IAudioAdapter" extends="$unknown"
11893 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11894 wsmap="managed"
11895 >
11896 <desc>
11897 The IAudioAdapter interface represents the virtual audio adapter of
11898 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11899 </desc>
11900 <attribute name="enabled" type="boolean">
11901 <desc>
11902 Flag whether the audio adapter is present in the
11903 guest system. If disabled, the virtual guest hardware will
11904 not contain any audio adapter. Can only be changed when
11905 the VM is not running.
11906 </desc>
11907 </attribute>
11908 <attribute name="audioController" type="AudioControllerType">
11909 <desc>
11910 The audio hardware we emulate.
11911 </desc>
11912 </attribute>
11913 <attribute name="audioDriver" type="AudioDriverType">
11914 <desc>
11915 Audio driver the adapter is connected to. This setting
11916 can only be changed when the VM is not running.
11917 </desc>
11918 </attribute>
11919 </interface>
11920
11921 <!--
11922 // IVRDPServer
11923 /////////////////////////////////////////////////////////////////////////
11924 -->
11925
11926 <enum
11927 name="VRDPAuthType"
11928 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11929 >
11930 <desc>
11931 VRDP authentication type.
11932 </desc>
11933
11934 <const name="Null" value="0">
11935 <desc>Null value, also means "no authentication".</desc>
11936 </const>
11937 <const name="External" value="1"/>
11938 <const name="Guest" value="2"/>
11939 </enum>
11940
11941 <interface
11942 name="IVRDPServer" extends="$unknown"
11943 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11944 wsmap="managed"
11945 >
11946 <attribute name="enabled" type="boolean">
11947 <desc>VRDP server status.</desc>
11948 </attribute>
11949
11950 <attribute name="ports" type="wstring">
11951 <desc>
11952 VRDP server port numbers.
11953 <note>
11954 This is a string of comma separated TCP port numbers or port number ranges.
11955 The server will try to bind to one of ports from the list. Example
11956 <tt>3000,3010-3012,3015</tt>
11957 </note>
11958 </desc>
11959 </attribute>
11960
11961 <attribute name="netAddress" type="wstring">
11962 <desc>VRDP server address.</desc>
11963 </attribute>
11964
11965 <attribute name="authType" type="VRDPAuthType">
11966 <desc>VRDP authentication method.</desc>
11967 </attribute>
11968
11969 <attribute name="authTimeout" type="unsigned long">
11970 <desc>Timeout for guest authentication. Milliseconds.</desc>
11971 </attribute>
11972
11973 <attribute name="allowMultiConnection" type="boolean">
11974 <desc>
11975 Flag whether multiple simultaneous connections to the VM are permitted.
11976 Note that this will be replaced by a more powerful mechanism in the future.
11977 </desc>
11978 </attribute>
11979
11980 <attribute name="reuseSingleConnection" type="boolean">
11981 <desc>
11982 Flag whether the existing connection must be dropped and a new connection
11983 must be established by the VRDP server, when a new client connects in single
11984 connection mode.
11985 </desc>
11986 </attribute>
11987
11988 </interface>
11989
11990
11991 <!--
11992 // ISharedFolder
11993 /////////////////////////////////////////////////////////////////////////
11994 -->
11995
11996 <interface
11997 name="ISharedFolder" extends="$unknown"
11998 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11999 wsmap="struct"
12000 >
12001 <desc>
12002 The ISharedFolder interface represents a folder in the host computer's
12003 file system accessible from the guest OS running inside a virtual
12004 machine using an associated logical name.
12005
12006 There are three types of shared folders:
12007 <ul>
12008 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12009 folders available to all virtual machines.</li>
12010 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12011 VM-specific shared folders available to the given virtual machine at
12012 startup.</li>
12013 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12014 VM-specific shared folders created in the session context (for
12015 example, when the virtual machine is running) and automatically
12016 discarded when the session is closed (the VM is powered off).</li>
12017 </ul>
12018
12019 Logical names of shared folders must be unique within the given scope
12020 (global, permanent or transient). However, they do not need to be unique
12021 across scopes. In this case, the definition of the shared folder in a
12022 more specific scope takes precedence over definitions in all other
12023 scopes. The order of precedence is (more specific to more general):
12024 <ol>
12025 <li>Transient definitions</li>
12026 <li>Permanent definitions</li>
12027 <li>Global definitions</li>
12028 </ol>
12029
12030 For example, if MyMachine has a shared folder named
12031 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12032 transient shared folder named <tt>C_DRIVE</tt> (that points
12033 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12034 of <tt>C_DRIVE</tt> in the guest OS so
12035 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12036 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12037 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12038 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12039 to <tt>C:\\</tt> if it still exists.
12040
12041 Note that permanent and transient shared folders of different machines
12042 are in different name spaces, so they don't overlap and don't need to
12043 have unique logical names.
12044
12045 <note>
12046 Global shared folders are not implemented in the current version of the
12047 product.
12048 </note>
12049 </desc>
12050
12051 <attribute name="name" type="wstring" readonly="yes">
12052 <desc>Logical name of the shared folder.</desc>
12053 </attribute>
12054
12055 <attribute name="hostPath" type="wstring" readonly="yes">
12056 <desc>Full path to the shared folder in the host file system.</desc>
12057 </attribute>
12058
12059 <attribute name="accessible" type="boolean" readonly="yes">
12060 <desc>
12061 Whether the folder defined by the host path is currently
12062 accessible or not.
12063 For example, the folder can be unaccessible if it is placed
12064 on the network share that is not available by the time
12065 this property is read.
12066 </desc>
12067 </attribute>
12068
12069 <attribute name="writable" type="boolean" readonly="yes">
12070 <desc>
12071 Whether the folder defined by the host path is writable or
12072 not.
12073 </desc>
12074 </attribute>
12075
12076 <attribute name="lastAccessError" type="wstring" readonly="yes">
12077 <desc>
12078 Text message that represents the result of the last accessibility
12079 check.
12080
12081 Accessibility checks are performed each time the <link to="#accessible"/>
12082 attribute is read. An empty string is returned if the last
12083 accessibility check was successful. A non-empty string indicates a
12084 failure and should normally describe a reason of the failure (for
12085 example, a file read error).
12086 </desc>
12087 </attribute>
12088
12089 </interface>
12090
12091 <!--
12092 // ISession
12093 /////////////////////////////////////////////////////////////////////////
12094 -->
12095
12096 <interface
12097 name="IInternalSessionControl" extends="$unknown"
12098 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12099 internal="yes"
12100 wsmap="suppress"
12101 >
12102 <method name="getPID">
12103 <desc>PID of the process that has created this Session object.
12104 </desc>
12105 <param name="pid" type="unsigned long" dir="return"/>
12106 </method>
12107
12108 <method name="getRemoteConsole">
12109 <desc>
12110 Returns the console object suitable for remote control.
12111
12112 <result name="VBOX_E_INVALID_VM_STATE">
12113 Session state prevents operation.
12114 </result>
12115 <result name="VBOX_E_INVALID_OBJECT_STATE">
12116 Session type prevents operation.
12117 </result>
12118
12119 </desc>
12120 <param name="console" type="IConsole" dir="return"/>
12121 </method>
12122
12123 <method name="assignMachine">
12124 <desc>
12125 Assigns the machine object associated with this direct-type
12126 session or informs the session that it will be a remote one
12127 (if @a machine == @c null).
12128
12129 <result name="VBOX_E_INVALID_VM_STATE">
12130 Session state prevents operation.
12131 </result>
12132 <result name="VBOX_E_INVALID_OBJECT_STATE">
12133 Session type prevents operation.
12134 </result>
12135
12136 </desc>
12137 <param name="machine" type="IMachine" dir="in"/>
12138 </method>
12139
12140 <method name="assignRemoteMachine">
12141 <desc>
12142 Assigns the machine and the (remote) console object associated with
12143 this remote-type session.
12144
12145 <result name="VBOX_E_INVALID_VM_STATE">
12146 Session state prevents operation.
12147 </result>
12148
12149 </desc>
12150 <param name="machine" type="IMachine" dir="in"/>
12151 <param name="console" type="IConsole" dir="in"/>
12152 </method>
12153
12154 <method name="updateMachineState">
12155 <desc>
12156 Updates the machine state in the VM process.
12157 Must be called only in certain cases
12158 (see the method implementation).
12159
12160 <result name="VBOX_E_INVALID_VM_STATE">
12161 Session state prevents operation.
12162 </result>
12163 <result name="VBOX_E_INVALID_OBJECT_STATE">
12164 Session type prevents operation.
12165 </result>
12166
12167 </desc>
12168 <param name="aMachineState" type="MachineState" dir="in"/>
12169 </method>
12170
12171 <method name="uninitialize">
12172 <desc>
12173 Uninitializes (closes) this session. Used by VirtualBox to close
12174 the corresponding remote session when the direct session dies
12175 or gets closed.
12176
12177 <result name="VBOX_E_INVALID_VM_STATE">
12178 Session state prevents operation.
12179 </result>
12180
12181 </desc>
12182 </method>
12183
12184 <method name="onNetworkAdapterChange">
12185 <desc>
12186 Triggered when settings of a network adapter of the
12187 associated virtual machine have changed.
12188
12189 <result name="VBOX_E_INVALID_VM_STATE">
12190 Session state prevents operation.
12191 </result>
12192 <result name="VBOX_E_INVALID_OBJECT_STATE">
12193 Session type prevents operation.
12194 </result>
12195
12196 </desc>
12197 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12198 <param name="changeAdapter" type="boolean" dir="in"/>
12199 </method>
12200
12201 <method name="onSerialPortChange">
12202 <desc>
12203 Triggered when settings of a serial port of the
12204 associated virtual machine have changed.
12205
12206 <result name="VBOX_E_INVALID_VM_STATE">
12207 Session state prevents operation.
12208 </result>
12209 <result name="VBOX_E_INVALID_OBJECT_STATE">
12210 Session type prevents operation.
12211 </result>
12212
12213 </desc>
12214 <param name="serialPort" type="ISerialPort" dir="in"/>
12215 </method>
12216
12217 <method name="onParallelPortChange">
12218 <desc>
12219 Triggered when settings of a parallel port of the
12220 associated virtual machine have changed.
12221
12222 <result name="VBOX_E_INVALID_VM_STATE">
12223 Session state prevents operation.
12224 </result>
12225 <result name="VBOX_E_INVALID_OBJECT_STATE">
12226 Session type prevents operation.
12227 </result>
12228
12229 </desc>
12230 <param name="parallelPort" type="IParallelPort" dir="in"/>
12231 </method>
12232
12233 <method name="onStorageControllerChange">
12234 <desc>
12235 Triggered when settings of a storage controller of the
12236 associated virtual machine have changed.
12237
12238 <result name="VBOX_E_INVALID_VM_STATE">
12239 Session state prevents operation.
12240 </result>
12241 <result name="VBOX_E_INVALID_OBJECT_STATE">
12242 Session type prevents operation.
12243 </result>
12244
12245 </desc>
12246 </method>
12247
12248 <method name="onMediumChange">
12249 <desc>
12250 Triggered when attached media of the
12251 associated virtual machine have changed.
12252
12253 <result name="VBOX_E_INVALID_VM_STATE">
12254 Session state prevents operation.
12255 </result>
12256 <result name="VBOX_E_INVALID_OBJECT_STATE">
12257 Session type prevents operation.
12258 </result>
12259
12260 </desc>
12261
12262 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12263 </method>
12264
12265 <method name="onVRDPServerChange">
12266 <desc>
12267 Triggered when settings of the VRDP server object of the
12268 associated virtual machine have changed.
12269
12270 <result name="VBOX_E_INVALID_VM_STATE">
12271 Session state prevents operation.
12272 </result>
12273 <result name="VBOX_E_INVALID_OBJECT_STATE">
12274 Session type prevents operation.
12275 </result>
12276
12277 </desc>
12278 </method>
12279
12280 <method name="onUSBControllerChange">
12281 <desc>
12282 Triggered when settings of the USB controller object of the
12283 associated virtual machine have changed.
12284
12285 <result name="VBOX_E_INVALID_VM_STATE">
12286 Session state prevents operation.
12287 </result>
12288 <result name="VBOX_E_INVALID_OBJECT_STATE">
12289 Session type prevents operation.
12290 </result>
12291
12292 </desc>
12293 </method>
12294
12295 <method name="onSharedFolderChange">
12296 <desc>
12297 Triggered when a permanent (global or machine) shared folder has been
12298 created or removed.
12299 <note>
12300 We don't pass shared folder parameters in this notification because
12301 the order in which parallel notifications are delivered is not defined,
12302 therefore it could happen that these parameters were outdated by the
12303 time of processing this notification.
12304 </note>
12305
12306 <result name="VBOX_E_INVALID_VM_STATE">
12307 Session state prevents operation.
12308 </result>
12309 <result name="VBOX_E_INVALID_OBJECT_STATE">
12310 Session type prevents operation.
12311 </result>
12312
12313 </desc>
12314 <param name="global" type="boolean" dir="in"/>
12315 </method>
12316
12317 <method name="onUSBDeviceAttach">
12318 <desc>
12319 Triggered when a request to capture a USB device (as a result
12320 of matched USB filters or direct call to
12321 <link to="IConsole::attachUSBDevice"/>) has completed.
12322 A @c null @a error object means success, otherwise it
12323 describes a failure.
12324
12325 <result name="VBOX_E_INVALID_VM_STATE">
12326 Session state prevents operation.
12327 </result>
12328 <result name="VBOX_E_INVALID_OBJECT_STATE">
12329 Session type prevents operation.
12330 </result>
12331
12332 </desc>
12333 <param name="device" type="IUSBDevice" dir="in"/>
12334 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12335 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12336 </method>
12337
12338 <method name="onUSBDeviceDetach">
12339 <desc>
12340 Triggered when a request to release the USB device (as a result
12341 of machine termination or direct call to
12342 <link to="IConsole::detachUSBDevice"/>) has completed.
12343 A @c null @a error object means success, otherwise it
12344 describes a failure.
12345
12346 <result name="VBOX_E_INVALID_VM_STATE">
12347 Session state prevents operation.
12348 </result>
12349 <result name="VBOX_E_INVALID_OBJECT_STATE">
12350 Session type prevents operation.
12351 </result>
12352
12353 </desc>
12354 <param name="id" type="uuid" mod="string" dir="in"/>
12355 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12356 </method>
12357
12358 <method name="onShowWindow">
12359 <desc>
12360 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12361 <link to="IMachine::showConsoleWindow"/> in order to notify
12362 console callbacks
12363 <link to="IConsoleCallback::onCanShowWindow"/>
12364 and <link to="IConsoleCallback::onShowWindow"/>.
12365
12366 <result name="VBOX_E_INVALID_OBJECT_STATE">
12367 Session type prevents operation.
12368 </result>
12369
12370 </desc>
12371 <param name="check" type="boolean" dir="in"/>
12372 <param name="canShow" type="boolean" dir="out"/>
12373 <param name="winId" type="unsigned long long" dir="out"/>
12374 </method>
12375
12376 <method name="accessGuestProperty">
12377 <desc>
12378 Called by <link to="IMachine::getGuestProperty"/> and by
12379 <link to="IMachine::setGuestProperty"/> in order to read and
12380 modify guest properties.
12381
12382 <result name="VBOX_E_INVALID_VM_STATE">
12383 Machine session is not open.
12384 </result>
12385 <result name="VBOX_E_INVALID_OBJECT_STATE">
12386 Session type is not direct.
12387 </result>
12388
12389 </desc>
12390 <param name="name" type="wstring" dir="in"/>
12391 <param name="value" type="wstring" dir="in"/>
12392 <param name="flags" type="wstring" dir="in"/>
12393 <param name="isSetter" type="boolean" dir="in"/>
12394 <param name="retValue" type="wstring" dir="out"/>
12395 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12396 <param name="retFlags" type="wstring" dir="out"/>
12397 </method>
12398
12399 <method name="enumerateGuestProperties">
12400 <desc>
12401 Return a list of the guest properties matching a set of patterns along
12402 with their values, time stamps and flags.
12403
12404 <result name="VBOX_E_INVALID_VM_STATE">
12405 Machine session is not open.
12406 </result>
12407 <result name="VBOX_E_INVALID_OBJECT_STATE">
12408 Session type is not direct.
12409 </result>
12410
12411 </desc>
12412 <param name="patterns" type="wstring" dir="in">
12413 <desc>
12414 The patterns to match the properties against as a comma-separated
12415 string. If this is empty, all properties currently set will be
12416 returned.
12417 </desc>
12418 </param>
12419 <param name="key" type="wstring" dir="out" safearray="yes">
12420 <desc>
12421 The key names of the properties returned.
12422 </desc>
12423 </param>
12424 <param name="value" type="wstring" dir="out" safearray="yes">
12425 <desc>
12426 The values of the properties returned. The array entries match the
12427 corresponding entries in the @a key array.
12428 </desc>
12429 </param>
12430 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12431 <desc>
12432 The time stamps of the properties returned. The array entries match
12433 the corresponding entries in the @a key array.
12434 </desc>
12435 </param>
12436 <param name="flags" type="wstring" dir="out" safearray="yes">
12437 <desc>
12438 The flags of the properties returned. The array entries match the
12439 corresponding entries in the @a key array.
12440 </desc>
12441 </param>
12442 </method>
12443
12444 </interface>
12445
12446 <interface
12447 name="ISession" extends="$dispatched"
12448 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12449 wsmap="managed"
12450 >
12451 <desc>
12452 The ISession interface represents a serialization primitive for virtual
12453 machines.
12454
12455 With VirtualBox, every time one wishes to manipulate a virtual machine
12456 (e.g. change its settings or start execution), a session object is
12457 required. Such an object must be passed to one of the session methods
12458 that open the given session, which then initiates the machine manipulation.
12459
12460 A session serves several purposes: it identifies to the inter-process VirtualBox
12461 code which process is currently working with the virtual machine, and it ensures
12462 that there are no incompatible requests from several processes for the
12463 same virtual machine. Session objects can therefore be thought of as mutex
12464 semaphores that lock virtual machines to prevent conflicting accesses from
12465 several processes.
12466
12467 How sessions objects are used depends on whether you use the Main API
12468 via COM or via the webservice:
12469
12470 <ul>
12471 <li>When using the COM API directly, an object of the Session class from the
12472 VirtualBox type library needs to be created. In regular COM C++ client code,
12473 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12474 This object will then act as a local session object in further calls to open
12475 a session.
12476 </li>
12477
12478 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12479 one session object automatically when <link to="IWebsessionManager::logon" />
12480 is called. A managed object reference to that session object can be retrieved by
12481 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12482 reference can then be used to open sessions.
12483 </li>
12484 </ul>
12485
12486 Sessions are mainly used in two variations:
12487
12488 <ul>
12489 <li>
12490 To start a virtual machine in a separate process, one would call
12491 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12492 object as its first parameter. This session then identifies the caller
12493 and lets him control the started machine (for example, pause machine
12494 execution or power it down) as well as be notified about machine
12495 execution state changes.
12496 </li>
12497
12498 <li>To alter machine settings, or to start machine execution within the
12499 current process, one needs to open a direct session for the machine first by
12500 calling <link to="IVirtualBox::openSession"/>. While a direct session
12501 is open within one process, no any other process may open another direct
12502 session for the same machine. This prevents the machine from being changed
12503 by other processes while it is running or while the machine is being configured.
12504 </li>
12505 </ul>
12506
12507 One also can attach to an existing direct session already opened by
12508 another process (for example, in order to send a control request to the
12509 virtual machine such as the pause or the reset request). This is done by
12510 calling <link to="IVirtualBox::openExistingSession"/>.
12511
12512 <note>
12513 Unless you are trying to write a new VirtualBox front-end that
12514 performs direct machine execution (like the VirtualBox or VBoxSDL
12515 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12516 session opened by <link to="IVirtualBox::openSession"/> and use this
12517 session only to change virtual machine settings. If you simply want to
12518 start virtual machine execution using one of the existing front-ends
12519 (for example the VirtualBox GUI or headless server), simply use
12520 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12521 will power up the machine automatically for you.
12522 </note>
12523 </desc>
12524
12525 <attribute name="state" type="SessionState" readonly="yes">
12526 <desc>Current state of this session.</desc>
12527 </attribute>
12528
12529 <attribute name="type" type="SessionType" readonly="yes">
12530 <desc>
12531 Type of this session. The value of this attribute is valid only
12532 if the session is currently open (i.e. its #state is
12533 SessionType_SessionOpen), otherwise an error will be returned.
12534 </desc>
12535 </attribute>
12536
12537 <attribute name="machine" type="IMachine" readonly="yes">
12538 <desc>Machine object associated with this session.</desc>
12539 </attribute>
12540
12541 <attribute name="console" type="IConsole" readonly="yes">
12542 <desc>Console object associated with this session.</desc>
12543 </attribute>
12544
12545 <method name="close">
12546 <desc>
12547 Closes a session that was previously opened.
12548
12549 It is recommended that every time an "open session" method (such as
12550 <link to="IVirtualBox::openRemoteSession" /> or
12551 <link to="IVirtualBox::openSession" />) has been called to
12552 manipulate a virtual machine, the caller invoke
12553 ISession::close() when it's done doing so. Since sessions are
12554 serialization primitives much like ordinary mutexes, they are
12555 best used the same way: for each "open" call, there should be
12556 a matching "close" call, even when errors occur.
12557
12558 Otherwise, if a direct session for a machine opened with
12559 <link to="IVirtualBox::openSession"/> is not explicitly closed
12560 when the application terminates, the state of the machine will
12561 be set to <link to="MachineState_Aborted" /> on the server.
12562
12563 Generally, it is recommended to close all open sessions explicitly
12564 before terminating the application (regardless of the reason for
12565 the termination).
12566
12567 <note>
12568 Do not expect the session state (<link to="ISession::state" />
12569 to return to "Closed" immediately after you invoke
12570 ISession::close(), particularly if you have started a remote
12571 session to execute the VM in a new process. The session state will
12572 automatically return to "Closed" once the VM is no longer executing,
12573 which can of course take a very long time.
12574 </note>
12575
12576 <result name="E_UNEXPECTED">
12577 Session is not open.
12578 </result>
12579
12580 </desc>
12581 </method>
12582
12583 </interface>
12584
12585 <!--
12586 // IStorageController
12587 /////////////////////////////////////////////////////////////////////////
12588 -->
12589
12590 <enum
12591 name="StorageBus"
12592 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12593 >
12594 <desc>
12595 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12596 see <link to="IStorageController::bus" />.
12597 </desc>
12598 <const name="Null" value="0">
12599 <desc>@c null value. Never used by the API.</desc>
12600 </const>
12601 <const name="IDE" value="1"/>
12602 <const name="SATA" value="2"/>
12603 <const name="SCSI" value="3"/>
12604 <const name="Floppy" value="4"/>
12605 </enum>
12606
12607 <enum
12608 name="StorageControllerType"
12609 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12610 >
12611 <desc>
12612 The exact variant of storage controller hardware presented
12613 to the guest; see <link to="IStorageController::controllerType" />.
12614 </desc>
12615
12616 <const name="Null" value="0">
12617 <desc>@c null value. Never used by the API.</desc>
12618 </const>
12619 <const name="LsiLogic" value="1">
12620 <desc>A SCSI controller of the LsiLogic variant.</desc>
12621 </const>
12622 <const name="BusLogic" value="2">
12623 <desc>A SCSI controller of the BusLogic variant.</desc>
12624 </const>
12625 <const name="IntelAhci" value="3">
12626 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12627 </const>
12628 <const name="PIIX3" value="4">
12629 <desc>An IDE controller of the PIIX3 variant.</desc>
12630 </const>
12631 <const name="PIIX4" value="5">
12632 <desc>An IDE controller of the PIIX4 variant.</desc>
12633 </const>
12634 <const name="ICH6" value="6">
12635 <desc>An IDE controller of the ICH6 variant.</desc>
12636 </const>
12637 <const name="I82078" value="7">
12638 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12639 </const>
12640 </enum>
12641
12642 <interface
12643 name="IStorageController" extends="$unknown"
12644 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12645 wsmap="managed"
12646 >
12647 <desc>
12648 Represents a storage controller that is attached to a virtual machine
12649 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12650 attached to storage controllers in a real computer, virtual media
12651 (represented by <link to="IMedium" />) are attached to virtual
12652 storage controllers, represented by this interface.
12653
12654 As opposed to physical hardware, VirtualBox has a very generic concept
12655 of a storage controller, and for purposes of the Main API, all virtual
12656 storage is attached to virtual machines via instances of this interface.
12657 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12658 and Floppy (see <link to="#bus" />). Depending on which of these four is
12659 used, certain sub-types may be available and can be selected in
12660 <link to="#controllerType" />.
12661
12662 Depending on these settings, the guest operating system might see
12663 significantly different virtual hardware.
12664 </desc>
12665
12666 <attribute name="name" type="wstring" readonly="yes">
12667 <desc>
12668 Name of the storage controller, as originally specified with
12669 <link to="IMachine::addStorageController" />. This then uniquely
12670 identifies this controller with other method calls such as
12671 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12672 </desc>
12673 </attribute>
12674
12675 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12676 <desc>
12677 Maximum number of devices which can be attached to one port.
12678 </desc>
12679 </attribute>
12680
12681 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12682 <desc>
12683 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12684 </desc>
12685 </attribute>
12686
12687 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12688 <desc>
12689 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12690 </desc>
12691 </attribute>
12692
12693 <attribute name="instance" type="unsigned long">
12694 <desc>
12695 The instance number of the device in the running VM.
12696 </desc>
12697 </attribute>
12698
12699 <attribute name="portCount" type="unsigned long">
12700 <desc>
12701 The number of currently usable ports on the controller.
12702 The minimum and maximum number of ports for one controller are
12703 stored in <link to="IStorageController::minPortCount"/>
12704 and <link to="IStorageController::maxPortCount"/>.
12705 </desc>
12706 </attribute>
12707
12708 <attribute name="bus" type="StorageBus" readonly="yes">
12709 <desc>
12710 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12711 </desc>
12712 </attribute>
12713
12714 <attribute name="controllerType" type="StorageControllerType">
12715 <desc>
12716 The exact variant of storage controller hardware presented
12717 to the guest.
12718 Depending on this value, VirtualBox will provide a different
12719 virtual storage controller hardware to the guest.
12720 For SATA and floppy controllers, only one variant is available,
12721 but for IDE and SCSI, there are several.
12722
12723 For SCSI controllers, the default type is LsiLogic.
12724 </desc>
12725 </attribute>
12726
12727 <method name="GetIDEEmulationPort">
12728 <desc>
12729 Gets the corresponding port number which is emulated as an IDE device.
12730 Works only with SATA controllers.
12731
12732 <result name="E_INVALIDARG">
12733 The @a devicePosition is not in the range 0 to 3.
12734 </result>
12735 <result name="E_NOTIMPL">
12736 The storage controller type is not SATAIntelAhci.
12737 </result>
12738
12739 </desc>
12740 <param name="devicePosition" type="long" dir="in"/>
12741 <param name="portNumber" type="long" dir="return"/>
12742 </method>
12743
12744 <method name="SetIDEEmulationPort">
12745 <desc>
12746 Sets the port number which is emulated as an IDE device.
12747 Works only with SATA controllers.
12748
12749 <result name="E_INVALIDARG">
12750 The @a devicePosition is not in the range 0 to 3 or the
12751 @a portNumber is not in the range 0 to 29.
12752 </result>
12753 <result name="E_NOTIMPL">
12754 The storage controller type is not SATAIntelAhci.
12755 </result>
12756
12757 </desc>
12758 <param name="devicePosition" type="long" dir="in"/>
12759 <param name="portNumber" type="long" dir="in"/>
12760 </method>
12761
12762 </interface>
12763
12764<if target="wsdl">
12765
12766 <!--
12767 // IManagedObjectRef
12768 /////////////////////////////////////////////////////////////////////////
12769 -->
12770
12771 <interface
12772 name="IManagedObjectRef" extends="$unknown"
12773 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12774 internal="yes"
12775 wsmap="managed"
12776 wscpp="hardcoded"
12777 >
12778 <desc>
12779 Managed object reference.
12780
12781 Only within the webservice, a managed object reference (which is really
12782 an opaque number) allows a webservice client to address an object
12783 that lives in the address space of the webservice server.
12784
12785 Behind each managed object reference, there is a COM object that lives
12786 in the webservice server's address space. The COM object is not freed
12787 until the managed object reference is released, either by an explicit
12788 call to <link to="IManagedObjectRef::release" /> or by logging off from
12789 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12790 all objects created during the webservice session.
12791
12792 Whenever a method call of the VirtualBox API returns a COM object, the
12793 webservice representation of that method will instead return a
12794 managed object reference, which can then be used to invoke methods
12795 on that object.
12796 </desc>
12797
12798 <method name="getInterfaceName">
12799 <desc>
12800 Returns the name of the interface that this managed object represents,
12801 for example, "IMachine", as a string.
12802 </desc>
12803 <param name="return" type="wstring" dir="return"/>
12804 </method>
12805
12806 <method name="release">
12807 <desc>
12808 Releases this managed object reference and frees the resources that
12809 were allocated for it in the webservice server process. After calling
12810 this method, the identifier of the reference can no longer be used.
12811 </desc>
12812 </method>
12813
12814 </interface>
12815
12816 <!--
12817 // IWebsessionManager
12818 /////////////////////////////////////////////////////////////////////////
12819 -->
12820
12821 <interface
12822 name="IWebsessionManager" extends="$unknown"
12823 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12824 internal="yes"
12825 wsmap="global"
12826 wscpp="hardcoded"
12827 >
12828 <desc>
12829 Websession manager. This provides essential services
12830 to webservice clients.
12831 </desc>
12832 <method name="logon">
12833 <desc>
12834 Logs a new client onto the webservice and returns a managed object reference to
12835 the IVirtualBox instance, which the client can then use as a basis to further
12836 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12837 interface, in one way or the other.
12838 </desc>
12839 <param name="username" type="wstring" dir="in"/>
12840 <param name="password" type="wstring" dir="in"/>
12841 <param name="return" type="IVirtualBox" dir="return"/>
12842 </method>
12843
12844 <method name="getSessionObject">
12845 <desc>
12846 Returns a managed object reference to the internal ISession object that was created
12847 for this web service session when the client logged on.
12848
12849 <see>ISession</see>
12850 </desc>
12851 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12852 <param name="return" type="ISession" dir="return"/>
12853 </method>
12854
12855 <method name="logoff">
12856 <desc>
12857 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12858 and destroys all resources associated with the session (most importantly, all
12859 managed objects created in the server while the session was active).
12860 </desc>
12861 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12862 </method>
12863
12864 </interface>
12865
12866</if>
12867
12868 <!--
12869 // IPerformanceCollector & friends
12870 /////////////////////////////////////////////////////////////////////////
12871 -->
12872
12873 <interface
12874 name="IPerformanceMetric" extends="$unknown"
12875 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12876 >
12877 <desc>
12878 The IPerformanceMetric interface represents parameters of the given
12879 performance metric.
12880 </desc>
12881
12882 <attribute name="metricName" type="wstring" readonly="yes">
12883 <desc>
12884 Name of the metric.
12885 </desc>
12886 </attribute>
12887
12888 <attribute name="object" type="$unknown" readonly="yes">
12889 <desc>
12890 Object this metric belongs to.
12891 </desc>
12892 </attribute>
12893
12894 <attribute name="description" type="wstring" readonly="yes">
12895 <desc>
12896 Textual description of the metric.
12897 </desc>
12898 </attribute>
12899
12900 <attribute name="period" type="unsigned long" readonly="yes">
12901 <desc>
12902 Time interval between samples, measured in seconds.
12903 </desc>
12904 </attribute>
12905
12906 <attribute name="count" type="unsigned long" readonly="yes">
12907 <desc>
12908 Number of recent samples retained by the performance collector for this
12909 metric.
12910
12911 When the collected sample count exceeds this number, older samples
12912 are discarded.
12913 </desc>
12914 </attribute>
12915
12916 <attribute name="unit" type="wstring" readonly="yes">
12917 <desc>
12918 Unit of measurement.
12919 </desc>
12920 </attribute>
12921
12922 <attribute name="minimumValue" type="long" readonly="yes">
12923 <desc>
12924 Minimum possible value of this metric.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="maximumValue" type="long" readonly="yes">
12929 <desc>
12930 Maximum possible value of this metric.
12931 </desc>
12932 </attribute>
12933 </interface>
12934
12935 <interface
12936 name="IPerformanceCollector" extends="$unknown"
12937 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12938 wsmap="managed"
12939 >
12940 <desc>
12941 The IPerformanceCollector interface represents a service that collects and
12942 stores performance metrics data.
12943
12944 Performance metrics are associated with objects of interfaces like IHost and
12945 IMachine. Each object has a distinct set of performance metrics.
12946 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12947
12948 Metric data is collected at the specified intervals and is retained
12949 internally. The interval and the number of retained samples can be set
12950 with <link to="IPerformanceCollector::setupMetrics" />.
12951
12952 Metrics are organized hierarchically, with each level separated by a
12953 slash (/) character. Generally, the scheme for metric names is like this:
12954
12955 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12956
12957 "Category/Metric" together form the base metric name. A base metric is the
12958 smallest unit for which a sampling interval and the number of retained
12959 samples can be set. Only base metrics can be enabled and disabled. All
12960 sub-metrics are collected when their base metric is collected.
12961 Collected values for any set of sub-metrics can be queried with
12962 <link to="IPerformanceCollector::queryMetricsData" />.
12963
12964 For example "CPU/Load/User:avg"
12965 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12966 "average" aggregate. An aggregate function is computed over all retained
12967 data. Valid aggregate functions are:
12968
12969 <ul>
12970 <li>avg -- average</li>
12971 <li>min -- minimum</li>
12972 <li>max -- maximum</li>
12973 </ul>
12974
12975 When setting up
12976 metric parameters, querying metric data, enabling or disabling metrics
12977 wildcards can be used in metric names to specify a subset of metrics. For
12978 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12979 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12980 values without aggregates <tt>*:</tt> can be used.
12981
12982 The valid names for base metrics are:
12983
12984 <ul>
12985 <li>CPU/Load</li>
12986 <li>CPU/MHz</li>
12987 <li>RAM/Usage</li>
12988 </ul>
12989
12990 The general sequence for collecting and retrieving the metrics is:
12991 <ul>
12992 <li>
12993 Obtain an instance of IPerformanceCollector with
12994 <link to="IVirtualBox::performanceCollector" />
12995 </li>
12996 <li>
12997 Allocate and populate an array with references to objects the metrics
12998 will be collected for. Use references to IHost and IMachine objects.
12999 </li>
13000 <li>
13001 Allocate and populate an array with base metric names the data will be
13002 collected for.
13003 </li>
13004 <li>
13005 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13006 metric data will be collected and stored.
13007 </li>
13008 <li>
13009 Wait for the data to get collected.
13010 </li>
13011 <li>
13012 Allocate and populate an array with references to objects the metric
13013 values will be queried for. You can re-use the object array used for
13014 setting base metrics.
13015 </li>
13016 <li>
13017 Allocate and populate an array with metric names the data will be
13018 collected for. Note that metric names differ from base metric names.
13019 </li>
13020 <li>
13021 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13022 have been collected so far are returned. Note that the values are still
13023 retained internally and data collection continues.
13024 </li>
13025 </ul>
13026
13027 For an example of usage refer to the following files in VirtualBox SDK:
13028 <ul>
13029 <li>
13030 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13031 </li>
13032 <li>
13033 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13034 </li>
13035 </ul>
13036 </desc>
13037
13038 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13039 <desc>
13040 Array of unique names of metrics.
13041
13042 This array represents all metrics supported by the performance
13043 collector. Individual objects do not necessarily support all of them.
13044 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13045 list of supported metrics for a particular object.
13046 </desc>
13047 </attribute>
13048
13049 <method name="getMetrics">
13050 <desc>
13051 Returns parameters of specified metrics for a set of objects.
13052 <note>
13053 @c Null metrics array means all metrics. @c Null object array means
13054 all existing objects.
13055 </note>
13056 </desc>
13057 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13058 <desc>
13059 Metric name filter. Currently, only a comma-separated list of metrics
13060 is supported.
13061 </desc>
13062 </param>
13063 <param name="objects" type="$unknown" dir="in" safearray="yes">
13064 <desc>
13065 Set of objects to return metric parameters for.
13066 </desc>
13067 </param>
13068 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13069 <desc>
13070 Array of returned metric parameters.
13071 </desc>
13072 </param>
13073 </method>
13074
13075 <method name="setupMetrics">
13076 <desc>
13077 Sets parameters of specified base metrics for a set of objects. Returns
13078 an array of <link to="IPerformanceMetric" /> describing the metrics have
13079 been affected.
13080 <note>
13081 @c Null or empty metric name array means all metrics. @c Null or empty
13082 object array means all existing objects. If metric name array contains
13083 a single element and object array contains many, the single metric
13084 name array element is applied to each object array element to form
13085 metric/object pairs.
13086 </note>
13087 </desc>
13088 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13089 <desc>
13090 Metric name filter. Comma-separated list of metrics with wildcard
13091 support.
13092 </desc>
13093 </param>
13094 <param name="objects" type="$unknown" dir="in" safearray="yes">
13095 <desc>
13096 Set of objects to setup metric parameters for.
13097 </desc>
13098 </param>
13099 <param name="period" type="unsigned long" dir="in">
13100 <desc>
13101 Time interval in seconds between two consecutive samples of performance
13102 data.
13103 </desc>
13104 </param>
13105 <param name="count" type="unsigned long" dir="in">
13106 <desc>
13107 Number of samples to retain in performance data history. Older samples
13108 get discarded.
13109 </desc>
13110 </param>
13111 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13112 <desc>
13113 Array of metrics that have been modified by the call to this method.
13114 </desc>
13115 </param>
13116 </method>
13117
13118 <method name="enableMetrics">
13119 <desc>
13120 Turns on collecting specified base metrics. Returns an array of
13121 <link to="IPerformanceMetric" /> describing the metrics have been
13122 affected.
13123 <note>
13124 @c Null or empty metric name array means all metrics. @c Null or empty
13125 object array means all existing objects. If metric name array contains
13126 a single element and object array contains many, the single metric
13127 name array element is applied to each object array element to form
13128 metric/object pairs.
13129 </note>
13130 </desc>
13131 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13132 <desc>
13133 Metric name filter. Comma-separated list of metrics with wildcard
13134 support.
13135 </desc>
13136 </param>
13137 <param name="objects" type="$unknown" dir="in" safearray="yes">
13138 <desc>
13139 Set of objects to enable metrics for.
13140 </desc>
13141 </param>
13142 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13143 <desc>
13144 Array of metrics that have been modified by the call to this method.
13145 </desc>
13146 </param>
13147 </method>
13148
13149 <method name="disableMetrics">
13150 <desc>
13151 Turns off collecting specified base metrics. Returns an array of
13152 <link to="IPerformanceMetric" /> describing the metrics have been
13153 affected.
13154 <note>
13155 @c Null or empty metric name array means all metrics. @c Null or empty
13156 object array means all existing objects. If metric name array contains
13157 a single element and object array contains many, the single metric
13158 name array element is applied to each object array element to form
13159 metric/object pairs.
13160 </note>
13161 </desc>
13162 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13163 <desc>
13164 Metric name filter. Comma-separated list of metrics with wildcard
13165 support.
13166 </desc>
13167 </param>
13168 <param name="objects" type="$unknown" dir="in" safearray="yes">
13169 <desc>
13170 Set of objects to disable metrics for.
13171 </desc>
13172 </param>
13173 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13174 <desc>
13175 Array of metrics that have been modified by the call to this method.
13176 </desc>
13177 </param>
13178 </method>
13179
13180 <method name="queryMetricsData">
13181 <desc>
13182 Queries collected metrics data for a set of objects.
13183
13184 The data itself and related metric information are returned in seven
13185 parallel and one flattened array of arrays. Elements of
13186 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13187 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13188 the same index describe one set of values corresponding to a single
13189 metric.
13190
13191 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13192 start and length of a sub-array is indicated by
13193 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13194 value for metric <tt>metricNames[i]</tt> is at
13195 <tt>returnData[returnIndices[i]]</tt>.
13196
13197 <note>
13198 @c Null or empty metric name array means all metrics. @c Null or empty
13199 object array means all existing objects. If metric name array contains
13200 a single element and object array contains many, the single metric
13201 name array element is applied to each object array element to form
13202 metric/object pairs.
13203 </note>
13204 <note>
13205 Data collection continues behind the scenes after call to
13206 @c queryMetricsData. The return data can be seen as the snapshot of
13207 the current state at the time of @c queryMetricsData call. The
13208 internally kept metric values are not cleared by the call. This makes
13209 possible querying different subsets of metrics or aggregates with
13210 subsequent calls. If periodic querying is needed it is highly
13211 suggested to query the values with @c interval*count period to avoid
13212 confusion. This way a completely new set of data values will be
13213 provided by each query.
13214 </note>
13215 </desc>
13216 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13217 <desc>
13218 Metric name filter. Comma-separated list of metrics with wildcard
13219 support.
13220 </desc>
13221 </param>
13222 <param name="objects" type="$unknown" dir="in" safearray="yes">
13223 <desc>
13224 Set of objects to query metrics for.
13225 </desc>
13226 </param>
13227 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13228 <desc>
13229 Names of metrics returned in @c returnData.
13230 </desc>
13231 </param>
13232 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13233 <desc>
13234 Objects associated with metrics returned in @c returnData.
13235 </desc>
13236 </param>
13237 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13238 <desc>
13239 Units of measurement for each returned metric.
13240 </desc>
13241 </param>
13242 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13243 <desc>
13244 Divisor that should be applied to return values in order to get
13245 floating point values. For example:
13246 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13247 will retrieve the floating point value of i-th sample of the first
13248 metric.
13249 </desc>
13250 </param>
13251 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13252 <desc>
13253 Sequence numbers of the first elements of value sequences of particular metrics
13254 returned in @c returnData. For aggregate metrics it is the sequence number of
13255 the sample the aggregate started calculation from.
13256 </desc>
13257 </param>
13258 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13259 <desc>
13260 Indices of the first elements of value sequences of particular metrics
13261 returned in @c returnData.
13262 </desc>
13263 </param>
13264 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13265 <desc>
13266 Lengths of value sequences of particular metrics.
13267 </desc>
13268 </param>
13269 <param name="returnData" type="long" dir="return" safearray="yes">
13270 <desc>
13271 Flattened array of all metric data containing sequences of values for
13272 each metric.
13273 </desc>
13274 </param>
13275 </method>
13276
13277 </interface>
13278
13279 <module name="VBoxSVC" context="LocalServer">
13280 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13281 namespace="virtualbox.org">
13282 <interface name="IVirtualBox" default="yes"/>
13283 </class>
13284 </module>
13285
13286 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13287 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13288 namespace="virtualbox.org">
13289 <interface name="ISession" default="yes"/>
13290 </class>
13291 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13292 namespace="virtualbox.org">
13293 <interface name="ILocalOwner" default="yes"/>
13294 <interface name="IVirtualBoxCallback"/>
13295 <interface name="IConsoleCallback"/>
13296 </class>
13297 </module>
13298
13299</library>
13300
13301</idl>
13302
13303<!-- 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