VirtualBox

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

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

Main: more API doc fixes

  • Property svn:eol-style set to native
File size: 493.3 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="0f4cc50c-e1cc-4cde-ae7a-e6164bac5ba2"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
577 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
578 +-&gt; Saved -------+ |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Aborted" value="3">
619 <desc>
620 The process running the machine has terminated abnormally. This may
621 indicate a crash of the VM process in host execution context, or
622 the VM process has been terminated externally.
623 </desc>
624 </const>
625 <const name="Running" value="4">
626 <desc>
627 The machine is currently being executed.
628 <note internal="yes">
629 For whoever decides to touch this enum: In order to keep the
630 comparisons in the old source code valid, this state must immediately
631 precede the Paused state.
632 </note>
633 </desc>
634 </const>
635 <const name="Paused" value="5">
636 <desc>
637 Execution of the machine has been paused.
638 <note internal="yes">
639 For whoever decides to touch this enum: In order to keep the
640 comparisons in the old source code valid, this state must immediately
641 follow the Running state.
642 </note>
643 </desc>
644 </const>
645 <const name="Stuck" value="6">
646 <desc>
647 Execution of the machine has reached the "Guru Meditation"
648 condition. This indicates a severe error in the hypervisor itself.
649 </desc>
650 </const>
651 <const name="Starting" value="7">
652 <desc>
653 Machine is being started after powering it on from a
654 zero execution state.
655 </desc>
656 </const>
657 <const name="Stopping" value="8">
658 <desc>
659 Machine is being normally stopped powering it off, or after the guest OS
660 has initiated a shutdown sequence.
661 </desc>
662 </const>
663 <const name="Saving" value="9">
664 <desc>
665 Machine is saving its execution state to a file, or an online
666 snapshot of the machine is being taken.
667 </desc>
668 </const>
669 <const name="Restoring" value="10">
670 <desc>
671 Execution state of the machine is being restored from a file
672 after powering it on from the saved execution state.
673 </desc>
674 </const>
675 <const name="TeleportingFrom" value="11">
676 <desc>
677 Teleporting the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="RestoringSnapshot" value="12">
681 <desc>
682 A machine snapshot is being restored; this typically does not take long.
683 </desc>
684 </const>
685 <const name="DeletingSnapshot" value="13">
686 <desc>
687 A machine snapshot is being deleted; this can take a long time since this
688 may require merging differencing media.
689 </desc>
690 </const>
691 <const name="SettingUp" value="14">
692 <desc>
693 Lengthy setup operation is in progress.
694 </desc>
695 </const>
696
697 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
698 <desc>
699 Pseudo-state: first online state (for use in relational expressions).
700 </desc>
701 </const>
702 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
703 <desc>
704 Pseudo-state: last online state (for use in relational expressions).
705 </desc>
706 </const>
707
708 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
709 <desc>
710 Pseudo-state: first transient state (for use in relational expressions).
711 </desc>
712 </const>
713 <const name="LastTransient" value="14" wsmap="suppress"> <!-- SettingUp -->
714 <desc>
715 Pseudo-state: last transient state (for use in relational expressions).
716 </desc>
717 </const>
718
719 </enum>
720
721 <enum
722 name="SessionState"
723 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
724 >
725 <desc>
726 Session state. This enumeration represents possible values of
727 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
728 attributes. See individual enumerator descriptions for the meaning for
729 every value.
730 </desc>
731
732 <const name="Null" value="0">
733 <desc>Null value (never used by the API).</desc>
734 </const>
735 <const name="Closed" value="1">
736 <desc>
737 The machine has no open sessions (<link to="IMachine::sessionState"/>);
738 the session is closed (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Open" value="2">
742 <desc>
743 The machine has an open direct session (<link to="IMachine::sessionState"/>);
744 the session is open (<link to="ISession::state"/>)
745 </desc>
746 </const>
747 <const name="Spawning" value="3">
748 <desc>
749 A new (direct) session is being opened for the machine as a result of
750 <link to="IVirtualBox::openRemoteSession"/> call
751 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
752 This state also occurs as a short transient state when a new direct
753 session is opened by calling <link to="IVirtualBox::openSession"/>.
754 </desc>
755 </const>
756 <const name="Closing" value="4">
757 <desc>
758 The direct session is being closed (<link to="IMachine::sessionState"/>);
759 the session is being closed (<link to="ISession::state"/>)
760 </desc>
761 </const>
762 </enum>
763
764 <enum
765 name="CpuPropertyType"
766 uuid="af7bb668-eeb1-4404-b77f-a114b30c92d6"
767 >
768 <desc>
769 Virtual CPU property type. This enumeration represents possible values of the
770 IMachine get- and setCpuProperty methods.
771 </desc>
772 <const name="Null" value="0">
773 <desc>Null value (never used by the API).</desc>
774 </const>
775 <const name="PAE" value="1">
776 <desc>
777 This setting determines whether VirtualBox will expose the Physical Address
778 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
779 is not available, it will not be reported.
780 </desc>
781 </const>
782 <const name="Synthetic" value="2">
783 <desc>
784 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
785 teleporting between host systems that differ significantly.
786 </desc>
787 </const>
788 </enum>
789
790
791 <enum
792 name="HWVirtExPropertyType"
793 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
794 >
795 <desc>
796 HWVirtEx property type. This enumeration represents possible values of the
797 IMachine get- and setHWVirtExProperty methods.
798 </desc>
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Enabled" value="1">
803 <desc>
804 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
805 they will not be used.
806 </desc>
807 </const>
808 <const name="Exclusive" value="2">
809 <desc>
810 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
811 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
812 </desc>
813 </const>
814 <const name="VPID" value="3">
815 <desc>
816 VT-x VPID boolean property. Note that in case this extension is not available,
817 it will not be used.
818 </desc>
819 </const>
820 <const name="NestedPaging" value="4">
821 <desc>
822 Nested Paging boolean property. Note that in case this extension is not available,
823 it will not be used.
824 </desc>
825 </const>
826 </enum>
827
828 <enum
829 name="SessionType"
830 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
831 >
832 <desc>
833 Session type. This enumeration represents possible values of the
834 <link to="ISession::type"/> attribute.
835 </desc>
836
837 <const name="Null" value="0">
838 <desc>Null value (never used by the API).</desc>
839 </const>
840 <const name="Direct" value="1">
841 <desc>
842 Direct session
843 (opened by <link to="IVirtualBox::openSession"/>)
844 </desc>
845 </const>
846 <const name="Remote" value="2">
847 <desc>
848 Remote session
849 (opened by <link to="IVirtualBox::openRemoteSession"/>)
850 </desc>
851 </const>
852 <const name="Existing" value="3">
853 <desc>
854 Existing session
855 (opened by <link to="IVirtualBox::openExistingSession"/>)
856 </desc>
857 </const>
858 </enum>
859
860 <enum
861 name="DeviceType"
862 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
863 >
864 <desc>
865 Device type.
866 </desc>
867 <const name="Null" value="0">
868 <desc>
869 Null value, may also mean "no device" (not allowed for
870 <link to="IConsole::getDeviceActivity"/>).
871 </desc>
872 </const>
873 <const name="Floppy" value="1">
874 <desc>Floppy device.</desc>
875 </const>
876 <const name="DVD" value="2">
877 <desc>CD/DVD-ROM device.</desc>
878 </const>
879 <const name="HardDisk" value="3">
880 <desc>Hard disk device.</desc>
881 </const>
882 <const name="Network" value="4">
883 <desc>Network device.</desc>
884 </const>
885 <const name="USB" value="5">
886 <desc>USB device.</desc>
887 </const>
888 <const name="SharedFolder" value="6">
889 <desc>Shared folder device.</desc>
890 </const>
891 </enum>
892
893 <enum
894 name="DeviceActivity"
895 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
896 >
897 <desc>
898 Device activity for <link to="IConsole::getDeviceActivity"/>.
899 </desc>
900
901 <const name="Null" value="0"/>
902 <const name="Idle" value="1"/>
903 <const name="Reading" value="2"/>
904 <const name="Writing" value="3"/>
905 </enum>
906
907 <enum
908 name="ClipboardMode"
909 uuid="33364716-4008-4701-8f14-be0fa3d62950"
910 >
911 <desc>
912 Host-Guest clipboard interchange mode.
913 </desc>
914
915 <const name="Disabled" value="0"/>
916 <const name="HostToGuest" value="1"/>
917 <const name="GuestToHost" value="2"/>
918 <const name="Bidirectional" value="3"/>
919 </enum>
920
921 <enum
922 name="Scope"
923 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
924 >
925 <desc>
926 Scope of the operation.
927
928 A generic enumeration used in various methods to define the action or
929 argument scope.
930 </desc>
931
932 <const name="Global" value="0"/>
933 <const name="Machine" value="1"/>
934 <const name="Session" value="2"/>
935 </enum>
936
937 <enum
938 name="GuestStatisticType"
939 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
940 >
941 <desc>
942 Statistics type for <link to="IGuest::getStatistic"/>.
943 </desc>
944
945 <const name="CPULoad_Idle" value="0">
946 <desc>
947 Idle CPU load (0-100%) for last interval.
948 </desc>
949 </const>
950 <const name="CPULoad_Kernel" value="1">
951 <desc>
952 Kernel CPU load (0-100%) for last interval.
953 </desc>
954 </const>
955 <const name="CPULoad_User" value="2">
956 <desc>
957 User CPU load (0-100%) for last interval.
958 </desc>
959 </const>
960 <const name="Threads" value="3">
961 <desc>
962 Total number of threads in the system.
963 </desc>
964 </const>
965 <const name="Processes" value="4">
966 <desc>
967 Total number of processes in the system.
968 </desc>
969 </const>
970 <const name="Handles" value="5">
971 <desc>
972 Total number of handles in the system.
973 </desc>
974 </const>
975 <const name="MemoryLoad" value="6">
976 <desc>
977 Memory load (0-100%).
978 </desc>
979 </const>
980 <const name="PhysMemTotal" value="7">
981 <desc>
982 Total physical memory in megabytes.
983 </desc>
984 </const>
985 <const name="PhysMemAvailable" value="8">
986 <desc>
987 Free physical memory in megabytes.
988 </desc>
989 </const>
990 <const name="PhysMemBalloon" value="9">
991 <desc>
992 Ballooned physical memory in megabytes.
993 </desc>
994 </const>
995 <const name="MemCommitTotal" value="10">
996 <desc>
997 Total amount of memory in the committed state in megabytes.
998 </desc>
999 </const>
1000 <const name="MemKernelTotal" value="11">
1001 <desc>
1002 Total amount of memory used by the guest OS's kernel in megabytes.
1003 </desc>
1004 </const>
1005 <const name="MemKernelPaged" value="12">
1006 <desc>
1007 Total amount of paged memory used by the guest OS's kernel in megabytes.
1008 </desc>
1009 </const>
1010 <const name="MemKernelNonpaged" value="13">
1011 <desc>
1012 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1013 </desc>
1014 </const>
1015 <const name="MemSystemCache" value="14">
1016 <desc>
1017 Total amount of memory used by the guest OS's system cache in megabytes.
1018 </desc>
1019 </const>
1020 <const name="PageFileSize" value="15">
1021 <desc>
1022 Pagefile size in megabytes.
1023 </desc>
1024 </const>
1025 <const name="SampleNumber" value="16">
1026 <desc>
1027 Statistics sample number
1028 </desc>
1029 </const>
1030 <const name="MaxVal" value="17"/>
1031 </enum>
1032
1033 <enum
1034 name="BIOSBootMenuMode"
1035 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1036 >
1037 <desc>
1038 BIOS boot menu mode.
1039 </desc>
1040
1041 <const name="Disabled" value="0"/>
1042 <const name="MenuOnly" value="1"/>
1043 <const name="MessageAndMenu" value="2"/>
1044 </enum>
1045
1046 <enum
1047 name="ProcessorFeature"
1048 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1049 >
1050 <desc>
1051 CPU features.
1052 </desc>
1053
1054 <const name="HWVirtEx" value="0"/>
1055 <const name="PAE" value="1"/>
1056 <const name="LongMode" value="2"/>
1057 <const name="NestedPaging" value="3"/>
1058 </enum>
1059
1060 <enum
1061 name="FirmwareType"
1062 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1063 >
1064 <desc>
1065 Firmware type.
1066 </desc>
1067 <const name="BIOS" value="1">
1068 <desc>BIOS Firmware.</desc>
1069 </const>
1070 <const name="EFI" value="2">
1071 <desc>Efi firmware.</desc>
1072 </const>
1073 </enum>
1074
1075 <!--
1076 // IVirtualBoxErrorInfo
1077 /////////////////////////////////////////////////////////////////////////
1078 -->
1079
1080 <interface
1081 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1082 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1083 supportsErrorInfo="no"
1084 wsmap="managed"
1085 >
1086 <desc>
1087 The IVirtualBoxErrorInfo interface represents extended error information.
1088
1089 Extended error information can be set by VirtualBox components after
1090 unsuccessful or partially successful method invocation. This information
1091 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1092 and then shown to the client in addition to the plain 32-bit result code.
1093
1094 In MS COM, this interface extends the IErrorInfo interface,
1095 in XPCOM, it extends the nsIException interface. In both cases,
1096 it provides a set of common attributes to retrieve error
1097 information.
1098
1099 Sometimes invocation of some component's method may involve methods of
1100 other components that may also fail (independently of this method's
1101 failure), or a series of non-fatal errors may precede a fatal error that
1102 causes method failure. In cases like that, it may be desirable to preserve
1103 information about all errors happened during method invocation and deliver
1104 it to the caller. The <link to="#next"/> attribute is intended
1105 specifically for this purpose and allows to represent a chain of errors
1106 through a single IVirtualBoxErrorInfo object set after method invocation.
1107
1108 Note that errors are stored to a chain in the reverse order, i.e. the
1109 initial error object you query right after method invocation is the last
1110 error set by the callee, the object it points to in the @a next attribute
1111 is the previous error and so on, up to the first error (which is the last
1112 in the chain).
1113 </desc>
1114
1115 <attribute name="resultCode" type="long" readonly="yes">
1116 <desc>
1117 Result code of the error.
1118 Usually, it will be the same as the result code returned
1119 by the method that provided this error information, but not
1120 always. For example, on Win32, CoCreateInstance() will most
1121 likely return E_NOINTERFACE upon unsuccessful component
1122 instantiation attempt, but not the value the component factory
1123 returned. Value is typed 'long', not 'result',
1124 to make interface usable from scripting languages.
1125 <note>
1126 In MS COM, there is no equivalent.
1127 In XPCOM, it is the same as nsIException::result.
1128 </note>
1129 </desc>
1130 </attribute>
1131
1132 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1133 <desc>
1134 UUID of the interface that defined the error.
1135 <note>
1136 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1137 data type.
1138 In XPCOM, there is no equivalent.
1139 </note>
1140 </desc>
1141 </attribute>
1142
1143 <attribute name="component" type="wstring" readonly="yes">
1144 <desc>
1145 Name of the component that generated the error.
1146 <note>
1147 In MS COM, it is the same as IErrorInfo::GetSource.
1148 In XPCOM, there is no equivalent.
1149 </note>
1150 </desc>
1151 </attribute>
1152
1153 <attribute name="text" type="wstring" readonly="yes">
1154 <desc>
1155 Text description of the error.
1156 <note>
1157 In MS COM, it is the same as IErrorInfo::GetDescription.
1158 In XPCOM, it is the same as nsIException::message.
1159 </note>
1160 </desc>
1161 </attribute>
1162
1163 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1164 <desc>
1165 Next error object if there is any, or @c null otherwise.
1166 <note>
1167 In MS COM, there is no equivalent.
1168 In XPCOM, it is the same as nsIException::inner.
1169 </note>
1170 </desc>
1171 </attribute>
1172
1173 </interface>
1174
1175 <interface
1176 name="ILocalOwner" extends="$dispatched"
1177 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1178 >
1179 <desc>
1180 The ILocalOwner interface allows to register local objects
1181 (created without COM calls, but with new()).
1182 Once registered, calls to methods of such objects can be made
1183 from remote COM processes.
1184 The main usecase is the event callback implementation where
1185 API clients provide callback objects.
1186 </desc>
1187 <method name="setLocalObject">
1188 <desc>
1189 Set local object.
1190 </desc>
1191 <param name="object" type="$unknown" dir="in">
1192 <desc>Local object to forward requests to.
1193 If null, clears currently set local object.</desc>
1194 </param>
1195 </method>
1196 </interface>
1197
1198 <!--
1199 // IVirtualBox
1200 /////////////////////////////////////////////////////////////////////////
1201 -->
1202
1203 <interface
1204 name="IVirtualBoxCallback" extends="$unknown"
1205 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1206 wsmap="suppress"
1207 >
1208
1209 <method name="onMachineStateChange">
1210 <desc>
1211 The execution state of the given machine has changed.
1212 <see>IMachine::state</see>
1213 </desc>
1214 <param name="machineId" type="uuid" mod="string" dir="in">
1215 <desc>ID of the machine this event relates to.</desc>
1216 </param>
1217 <param name="state" type="MachineState" dir="in">
1218 <desc>New execution state.</desc>
1219 </param>
1220 </method>
1221
1222 <method name="onMachineDataChange">
1223 <desc>
1224 Any of the settings of the given machine has changed.
1225 </desc>
1226 <param name="machineId" type="uuid" mod="string" dir="in">
1227 <desc>ID of the machine this event relates to.</desc>
1228 </param>
1229 </method>
1230
1231 <method name="onExtraDataCanChange">
1232 <desc>
1233 Notification when someone tries to change extra data for
1234 either the given machine or (if @c null) global extra data.
1235 This gives the chance to veto against changes.
1236 </desc>
1237 <param name="machineId" type="uuid" mod="string" dir="in">
1238 <desc>
1239 ID of the machine this event relates to
1240 (@c null ID for global extra data change requests).
1241 </desc>
1242 </param>
1243 <param name="key" type="wstring" dir="in">
1244 <desc>
1245 Extra data key for the attempted write.
1246 </desc>
1247 </param>
1248 <param name="value" type="wstring" dir="in">
1249 <desc>
1250 Extra data value for the given key.
1251 </desc>
1252 </param>
1253 <param name="error" type="wstring" dir="out">
1254 <desc>
1255 Optional error message describing the reason of the
1256 veto (ignored if this notification returns @c true).
1257 </desc>
1258 </param>
1259 <param name="allowChange" type="boolean" dir="return">
1260 <desc>
1261 Flag to indicate whether the callee agrees (@c true)
1262 or vetoes against the change (@c false).
1263 </desc>
1264 </param>
1265 </method>
1266
1267 <method name="onExtraDataChange">
1268 <desc>
1269 Notification when machine specific or global extra data
1270 has changed.
1271 </desc>
1272 <param name="machineId" type="uuid" mod="string" dir="in">
1273 <desc>
1274 ID of the machine this event relates to.
1275 Null for global extra data changes.
1276 </desc>
1277 </param>
1278 <param name="key" type="wstring" dir="in">
1279 <desc>
1280 Extra data key that has changed.
1281 </desc>
1282 </param>
1283 <param name="value" type="wstring" dir="in">
1284 <desc>
1285 Extra data value for the given key.
1286 </desc>
1287 </param>
1288 </method>
1289
1290 <method name="onMediumRegistered">
1291 <desc>
1292 The given medium was registered or unregistered
1293 within this VirtualBox installation.
1294
1295 The @a mediumType parameter describes what type of
1296 medium the specified @a mediumId refers to. Possible
1297 values are:
1298
1299 <ul>
1300 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1301 that, if registered, can be obtained using the
1302 <link to="IVirtualBox::getHardDisk"/> call.</li>
1303 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1304 that, if registered, can be obtained using the
1305 <link to="IVirtualBox::getDVDImage"/> call.</li>
1306 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1307 that, if registered, can be obtained using the
1308 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1309 </ul>
1310
1311 Note that if this is a deregistration notification,
1312 there is no way to access the object representing the
1313 unregistered medium. It is supposed that the
1314 application will do required cleanup based on the
1315 @a mediumId value.
1316 </desc>
1317 <param name="mediumId" type="uuid" mod="string" dir="in">
1318 <desc>ID of the medium this event relates to.</desc>
1319 </param>
1320 <param name="mediumType" type="DeviceType" dir="in">
1321 <desc>Type of the medium this event relates to.</desc>
1322 </param>
1323 <param name="registered" type="boolean" dir="in">
1324 <desc>
1325 If @c true, the medium was registered, otherwise it was
1326 unregistered.
1327 </desc>
1328 </param>
1329 </method>
1330
1331 <method name="onMachineRegistered">
1332 <desc>
1333 The given machine was registered or unregistered
1334 within this VirtualBox installation.
1335 </desc>
1336 <param name="machineId" type="uuid" mod="string" dir="in">
1337 <desc>ID of the machine this event relates to.</desc>
1338 </param>
1339 <param name="registered" type="boolean" dir="in">
1340 <desc>
1341 If @c true, the machine was registered, otherwise it was
1342 unregistered.
1343 </desc>
1344 </param>
1345 </method>
1346
1347 <method name="onSessionStateChange">
1348 <desc>
1349 The state of the session for the given machine was changed.
1350 <see>IMachine::sessionState</see>
1351 </desc>
1352 <param name="machineId" type="uuid" mod="string" dir="in">
1353 <desc>ID of the machine this event relates to.</desc>
1354 </param>
1355 <param name="state" type="SessionState" dir="in">
1356 <desc>New session state.</desc>
1357 </param>
1358 </method>
1359
1360 <method name="onSnapshotTaken">
1361 <desc>
1362 A new snapshot of the machine has been taken.
1363 <see>ISnapshot</see>
1364 </desc>
1365 <param name="machineId" type="uuid" mod="string" dir="in">
1366 <desc>ID of the machine this event relates to.</desc>
1367 </param>
1368 <param name="snapshotId" type="uuid" mod="string" dir="in">
1369 <desc>ID of the new snapshot.</desc>
1370 </param>
1371 </method>
1372
1373 <method name="onSnapshotDiscarded">
1374 <desc>
1375 Snapshot of the given machine has been discarded.
1376
1377 <note>
1378 This notification is delivered <b>after</b> the snapshot
1379 object has been uninitialized on the server (so that any
1380 attempt to call its methods will return an error).
1381 </note>
1382
1383 <see>ISnapshot</see>
1384 </desc>
1385 <param name="machineId" type="uuid" mod="string" dir="in">
1386 <desc>ID of the machine this event relates to.</desc>
1387 </param>
1388 <param name="snapshotId" type="uuid" mod="string" dir="in">
1389 <desc>
1390 ID of the discarded snapshot. @c null means the current machine
1391 state has been discarded (restored from the current snapshot).
1392 </desc>
1393 </param>
1394 </method>
1395
1396 <method name="onSnapshotChange">
1397 <desc>
1398 Snapshot properties (name and/or description) have been changed.
1399 <see>ISnapshot</see>
1400 </desc>
1401 <param name="machineId" type="uuid" mod="string" dir="in">
1402 <desc>ID of the machine this event relates to.</desc>
1403 </param>
1404 <param name="snapshotId" type="uuid" mod="string" dir="in">
1405 <desc>ID of the changed snapshot.</desc>
1406 </param>
1407 </method>
1408
1409 <method name="onGuestPropertyChange">
1410 <desc>
1411 Notification when a guest property has changed.
1412 </desc>
1413 <param name="machineId" type="uuid" mod="string" dir="in">
1414 <desc>
1415 ID of the machine this event relates to.
1416 </desc>
1417 </param>
1418 <param name="name" type="wstring" dir="in">
1419 <desc>
1420 The name of the property that has changed.
1421 </desc>
1422 </param>
1423 <param name="value" type="wstring" dir="in">
1424 <desc>
1425 The new property value.
1426 </desc>
1427 </param>
1428 <param name="flags" type="wstring" dir="in">
1429 <desc>
1430 The new property flags.
1431 </desc>
1432 </param>
1433 </method>
1434
1435 </interface>
1436
1437 <interface
1438 name="IDHCPServer" extends="$unknown"
1439 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1440 wsmap="managed"
1441 >
1442 <desc>
1443 The IDHCPServer interface represents the vbox dhcp server configuration.
1444
1445 To enumerate all the dhcp servers on the host, use the
1446 <link to="IVirtualBox::DHCPServers"/> attribute.
1447 </desc>
1448
1449 <attribute name="enabled" type="boolean">
1450 <desc>
1451 specifies if the dhcp server is enabled
1452 </desc>
1453 </attribute>
1454
1455 <attribute name="IPAddress" type="wstring" readonly="yes">
1456 <desc>
1457 specifies server IP
1458 </desc>
1459 </attribute>
1460
1461 <attribute name="networkMask" type="wstring" readonly="yes">
1462 <desc>
1463 specifies server network mask
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="networkName" type="wstring" readonly="yes">
1468 <desc>
1469 specifies internal network name the server is used for
1470 </desc>
1471 </attribute>
1472
1473 <attribute name="lowerIP" type="wstring" readonly="yes">
1474 <desc>
1475 specifies from IP adrres in server address range
1476 </desc>
1477 </attribute>
1478
1479 <attribute name="upperIP" type="wstring" readonly="yes">
1480 <desc>
1481 specifies to IP adrres in server address range
1482 </desc>
1483 </attribute>
1484
1485 <method name="setConfiguration">
1486 <desc>
1487 configures the server
1488 <result name="E_INVALIDARG">
1489 invalid configuration supplied
1490 </result>
1491 </desc>
1492 <param name="IPAddress" type="wstring" dir="in">
1493 <desc>
1494 server IP address
1495 </desc>
1496 </param>
1497 <param name="networkMask" type="wstring" dir="in">
1498 <desc>
1499 server network mask
1500 </desc>
1501 </param>
1502 <param name="FromIPAddress" type="wstring" dir="in">
1503 <desc>
1504 server From IP address for address range
1505 </desc>
1506 </param>
1507 <param name="ToIPAddress" type="wstring" dir="in">
1508 <desc>
1509 server To IP address for address range
1510 </desc>
1511 </param>
1512 </method>
1513
1514 <method name="start">
1515 <desc>
1516 Starts DHCP server process.
1517 <result name="E_FAIL">
1518 Failed to start the process.
1519 </result>
1520 </desc>
1521 <param name="networkName" type="wstring" dir="in">
1522 <desc>
1523 Name of internal network DHCP server should attach to.
1524 </desc>
1525 </param>
1526 <param name="trunkName" type="wstring" dir="in">
1527 <desc>
1528 Name of internal network trunk.
1529 </desc>
1530 </param>
1531 <param name="trunkType" type="wstring" dir="in">
1532 <desc>
1533 Type of internal network trunk.
1534 </desc>
1535 </param>
1536 </method>
1537
1538 <method name="stop">
1539 <desc>
1540 Stops DHCP server process.
1541 <result name="E_FAIL">
1542 Failed to stop the process.
1543 </result>
1544 </desc>
1545 </method>
1546 </interface>
1547
1548 <interface
1549 name="IVirtualBox" extends="$dispatched"
1550 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1551 wsmap="managed"
1552 >
1553 <desc>
1554 The IVirtualBox interface represents the main interface exposed by the
1555 product that provides virtual machine management.
1556
1557 An instance of IVirtualBox is required for the product to do anything
1558 useful. Even though the interface does not expose this, internally,
1559 IVirtualBox is implemented as a singleton and actually lives in the
1560 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1561 IVirtualBox can track the state of all virtual machines on a particular
1562 host, regardless of which frontend started them.
1563
1564 To enumerate all the virtual machines on the host, use the
1565 <link to="IVirtualBox::machines"/> attribute.
1566 </desc>
1567
1568 <attribute name="version" type="wstring" readonly="yes">
1569 <desc>
1570 A string representing the version number of the product. The
1571 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1572 last number represents the build number and will frequently change.
1573 </desc>
1574 </attribute>
1575
1576 <attribute name="revision" type="unsigned long" readonly="yes">
1577 <desc>
1578 The internal build revision number of the product.
1579 </desc>
1580 </attribute>
1581
1582 <attribute name="packageType" type="wstring" readonly="yes">
1583 <desc>
1584 A string representing the package type of this product. The
1585 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1586 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1587 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1588 this.
1589 </desc>
1590 </attribute>
1591
1592 <attribute name="homeFolder" type="wstring" readonly="yes">
1593 <desc>
1594 Full path to the directory where the global settings file,
1595 <tt>VirtualBox.xml</tt>, is stored.
1596
1597 In this version of VirtualBox, the value of this property is
1598 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1599 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1600 as determined by the host OS), and cannot be changed.
1601
1602 This path is also used as the base to resolve relative paths in
1603 places where relative paths are allowed (unless otherwise
1604 expressly indicated).
1605 </desc>
1606 </attribute>
1607
1608 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1609 <desc>
1610 Full name of the global settings file.
1611 The value of this property corresponds to the value of
1612 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1613 </desc>
1614 </attribute>
1615
1616 <attribute name="host" type="IHost" readonly="yes">
1617 <desc>Associated host object.</desc>
1618 </attribute>
1619
1620 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1621 <desc>Associated system information object.</desc>
1622 </attribute>
1623
1624 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1625 <desc>
1626 Array of machine objects registered within this VirtualBox instance.
1627 </desc>
1628 </attribute>
1629
1630 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1631 <desc>
1632 Array of medium objects known to this VirtualBox installation.
1633
1634 This array contains only base media. All differencing
1635 media of the given base medium can be enumerated using
1636 <link to="IMedium::children"/>.
1637 </desc>
1638 </attribute>
1639
1640 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1641 <desc>
1642 Array of CD/DVD image objects registered with this VirtualBox instance.
1643 </desc>
1644 </attribute>
1645
1646 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1647 <desc>
1648 Array of floppy image objects registered with this VirtualBox instance.
1649 </desc>
1650 </attribute>
1651
1652 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1653
1654 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1655
1656 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1657 <desc>
1658 Collection of global shared folders. Global shared folders are
1659 available to all virtual machines.
1660
1661 New shared folders are added to the collection using
1662 <link to="#createSharedFolder"/>. Existing shared folders can be
1663 removed using <link to="#removeSharedFolder"/>.
1664
1665 <note>
1666 In the current version of the product, global shared folders are not
1667 implemented and therefore this collection is always empty.
1668 </note>
1669 </desc>
1670 </attribute>
1671
1672 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1673 <desc>
1674 Associated performance collector object.
1675 </desc>
1676 </attribute>
1677
1678 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1679 <desc>
1680 dhcp server settings.
1681 </desc>
1682 </attribute>
1683
1684 <method name="createMachine">
1685 <desc>
1686 Creates a new virtual machine.
1687
1688 The new machine is created unregistered, with the initial configuration
1689 set according to the specified guest OS type. A typical sequence of
1690 actions to create a new virtual machine is as follows:
1691
1692 <ol>
1693 <li>
1694 Call this method to have a new machine created. The returned machine
1695 object will be "mutable" allowing to change any machine property.
1696 </li>
1697
1698 <li>
1699 Configure the machine using the appropriate attributes and methods.
1700 </li>
1701
1702 <li>
1703 Call <link to="IMachine::saveSettings" /> to write the settings
1704 to the machine's XML settings file. The configuration of the newly
1705 created machine will not be saved to disk until this method is
1706 called.
1707 </li>
1708
1709 <li>
1710 Call <link to="#registerMachine" /> to add the machine to the list
1711 of machines known to VirtualBox.
1712 </li>
1713 </ol>
1714
1715 You should specify valid name for the newly created machine when calling
1716 this method. See the <link to="IMachine::name"/> attribute description
1717 for more details about the machine name.
1718
1719 The specified guest OS type identifier must match an ID of one of known
1720 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1721 array.
1722
1723 Every machine has a <i>settings file</i> that is used to store
1724 the machine configuration. This file is stored in a directory called the
1725 <i>machine settings subfolder</i>. Both the settings subfolder and file
1726 will have a name that corresponds to the name of the virtual machine.
1727 You can specify where to create the machine setting subfolder using the
1728 @a baseFolder argument. The base folder can be absolute (full path) or
1729 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1730 directory</link>.
1731
1732 If @a baseFolder is a @c null or empty string (which is recommended), the
1733 <link to="ISystemProperties::defaultMachineFolder">default machine
1734 settings folder</link> will be used as a base folder for the created
1735 machine. Otherwise the given base folder will be used. In either case,
1736 the full path to the resulting settings file has the following
1737 structure:
1738 <pre>
1739 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1740 </pre>
1741
1742 Note that if the resulting settings file already exists, this method
1743 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1744
1745 Optionally, you may specify an UUID of to assign to the created machine.
1746 However, this is not recommended and you should normally pass an empty
1747 (@c null) UUID to this method so that a new UUID will be automatically
1748 generated for every created machine. You can use UUID
1749 00000000-0000-0000-0000-000000000000 as @c null value.
1750
1751 <note>
1752 There is no way to change the name of the settings file or
1753 subfolder of the created machine directly.
1754 </note>
1755
1756 <result name="VBOX_E_OBJECT_NOT_FOUND">
1757 @a osTypeId is invalid.
1758 </result>
1759 <result name="VBOX_E_FILE_ERROR">
1760 Resulting settings file name is invalid or the settings file already
1761 exists or could not be created due to an I/O error.
1762 </result>
1763 <result name="E_INVALIDARG">
1764 @a name is empty or @c null.
1765 </result>
1766 </desc>
1767
1768 <param name="name" type="wstring" dir="in">
1769 <desc>Machine name.</desc>
1770 </param>
1771 <param name="osTypeId" type="wstring" dir="in">
1772 <desc>Guest OS Type ID.</desc>
1773 </param>
1774 <param name="baseFolder" type="wstring" dir="in">
1775 <desc>Base machine folder (optional).</desc>
1776 </param>
1777 <param name="id" type="uuid" mod="string" dir="in">
1778 <desc>Machine UUID (optional).</desc>
1779 </param>
1780 <param name="machine" type="IMachine" dir="return">
1781 <desc>Created machine object.</desc>
1782 </param>
1783 </method>
1784
1785 <method name="createLegacyMachine">
1786 <desc>
1787 Creates a new virtual machine in "legacy" mode, using the specified
1788 settings file to store machine settings.
1789
1790 As opposed to machines created by <link to="#createMachine"/>,
1791 the settings file of the machine created in "legacy" mode is not
1792 automatically renamed when the machine name is changed -- it will always
1793 remain the same as specified in this method call.
1794
1795 The specified settings file name can be absolute (full path) or relative
1796 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1797 directory</link>. If the file name doesn't contain an extension, the
1798 default extension (.xml) will be appended.
1799
1800 Note that the configuration of the newly created machine is not
1801 saved to disk (and therefore no settings file is created)
1802 until <link to="IMachine::saveSettings"/> is called. If the
1803 specified settings file already exists, this method
1804 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1805
1806 See <link to="#createMachine"/> for more information.
1807
1808 @deprecated This method may be removed later. Use <link
1809 to="IVirtualBox::createMachine"/> instead.
1810
1811 <note>
1812 There is no way to change the name of the settings file
1813 of the machine created in "legacy" mode.
1814 </note>
1815
1816 <result name="VBOX_E_OBJECT_NOT_FOUND">
1817 @a osTypeId is invalid.
1818 </result>
1819 <result name="VBOX_E_FILE_ERROR">
1820 @a settingsFile is invalid or the settings file already exists or
1821 could not be created due to an I/O error.
1822 </result>
1823 <result name="E_INVALIDARG">
1824 @a name or @a settingsFile is empty or @c null.
1825 </result>
1826 </desc>
1827
1828 <param name="name" type="wstring" dir="in">
1829 <desc>Machine name.</desc>
1830 </param>
1831 <param name="osTypeId" type="wstring" dir="in">
1832 <desc>Machine OS Type ID.</desc>
1833 </param>
1834 <param name="settingsFile" type="wstring" dir="in">
1835 <desc>Name of the machine settings file.</desc>
1836 </param>
1837 <param name="id" type="uuid" mod="string" dir="in">
1838 <desc>Machine UUID (optional).</desc>
1839 </param>
1840 <param name="machine" type="IMachine" dir="return">
1841 <desc>Created machine object.</desc>
1842 </param>
1843 </method>
1844
1845 <method name="openMachine">
1846 <desc>
1847 Opens a virtual machine from the existing settings file.
1848 The opened machine remains unregistered until you call
1849 <link to="#registerMachine"/>.
1850
1851 The specified settings file name can be absolute
1852 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1853 VirtualBox home directory</link>. This file must exist
1854 and must be a valid machine settings file whose contents
1855 will be used to construct the machine object.
1856
1857 @deprecated Will be removed soon.
1858 <result name="VBOX_E_FILE_ERROR">
1859 Settings file name invalid, not found or sharing violation.
1860 </result>
1861 </desc>
1862 <param name="settingsFile" type="wstring" dir="in">
1863 <desc>
1864 Name of the machine settings file.
1865 </desc>
1866 </param>
1867 <param name="machine" type="IMachine" dir="return">
1868 <desc>Opened machine object.</desc>
1869 </param>
1870 <note>
1871 <link to="IMachine::settingsModified"/> will return
1872 @c false for the created machine, until any of machine settings
1873 are changed.
1874 </note>
1875 </method>
1876
1877 <method name="registerMachine">
1878 <desc>
1879
1880 Registers the machine previously created using
1881 <link to="#createMachine"/> or opened using
1882 <link to="#openMachine"/> within this VirtualBox installation. After
1883 successful method invocation, the
1884 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1885 to all registered callbacks.
1886
1887 <note>
1888 This method implicitly calls <link to="IMachine::saveSettings"/>
1889 to save all current machine settings before registering it.
1890 </note>
1891
1892 <result name="VBOX_E_OBJECT_NOT_FOUND">
1893 No matching virtual machine found.
1894 </result>
1895 <result name="VBOX_E_INVALID_OBJECT_STATE">
1896 Virtual machine was not created within this VirtualBox instance.
1897 </result>
1898
1899 </desc>
1900 <param name="machine" type="IMachine" dir="in"/>
1901 </method>
1902
1903 <method name="getMachine">
1904 <desc>
1905 Attempts to find a virtual machine given its UUID.
1906 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1907 instead.
1908
1909 <result name="VBOX_E_OBJECT_NOT_FOUND">
1910 Could not find registered machine matching @a id.
1911 </result>
1912
1913 </desc>
1914 <param name="id" type="uuid" mod="string" dir="in"/>
1915 <param name="machine" type="IMachine" dir="return"/>
1916 </method>
1917
1918 <method name="findMachine">
1919 <desc>
1920 Attempts to find a virtual machine given its name.
1921 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1922 instead.
1923
1924 <result name="VBOX_E_OBJECT_NOT_FOUND">
1925 Could not find registered machine matching @a name.
1926 </result>
1927
1928 </desc>
1929 <param name="name" type="wstring" dir="in"/>
1930 <param name="machine" type="IMachine" dir="return"/>
1931 </method>
1932
1933 <method name="unregisterMachine">
1934 <desc>
1935
1936 Unregisters the machine previously registered using
1937 <link to="#registerMachine"/>. After successful method invocation, the
1938 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1939 to all registered callbacks.
1940
1941 <note>
1942 The specified machine must not be in the Saved state, have an open
1943 (or a spawning) direct session associated with it, have snapshots or
1944 have any medium attached.
1945 </note>
1946
1947 <note>
1948 This method implicitly calls <link to="IMachine::saveSettings"/> to
1949 save all current machine settings before unregistering it.
1950 </note>
1951
1952 <note>
1953 If the given machine is inaccessible (see
1954 <link to="IMachine::accessible"/>), it will be unregistered and
1955 fully uninitialized right afterwards. As a result, the returned
1956 machine object will be unusable and an attempt to call
1957 <b>any</b> method will return the "Object not ready" error.
1958 </note>
1959
1960 <result name="VBOX_E_OBJECT_NOT_FOUND">
1961 Could not find registered machine matching @a id.
1962 </result>
1963 <result name="VBOX_E_INVALID_VM_STATE">
1964 Machine is in Saved state.
1965 </result>
1966 <result name="VBOX_E_INVALID_OBJECT_STATE">
1967 Machine has snapshot or open session or medium attached.
1968 </result>
1969
1970 </desc>
1971 <param name="id" type="uuid" mod="string" dir="in">
1972 <desc>UUID of the machine to unregister.</desc>
1973 </param>
1974 <param name="machine" type="IMachine" dir="return">
1975 <desc>Unregistered machine object.</desc>
1976 </param>
1977 </method>
1978
1979 <method name="createAppliance">
1980 <desc>
1981 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1982 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1983 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1984 </desc>
1985 <param name="appliance" type="IAppliance" dir="return">
1986 <desc>New appliance.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="createHardDisk">
1991 <desc>
1992 Creates a new base medium object that will use the given storage
1993 format and location for medium data.
1994
1995 Note that the actual storage unit is not created by this method. In
1996 order to do it, and before you are able to attach the created medium
1997 to virtual machines, you must call one of the following methods to
1998 allocate a format-specific storage unit at the specified location:
1999 <ul>
2000 <li><link to="IMedium::createBaseStorage"/></li>
2001 <li><link to="IMedium::createDiffStorage"/></li>
2002 </ul>
2003
2004 Some medium attributes, such as <link to="IMedium::id"/>, may
2005 remain uninitialized until the medium storage unit is successfully
2006 created by one of the above methods.
2007
2008 After the storage unit is successfully created, the medium gets
2009 remembered by this VirtualBox installation and will be accessible
2010 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2011 methods. Remembered base medium are also returned as part of
2012 the <link to="#hardDisks"/> array. See IMedium for more details.
2013
2014 The list of all storage formats supported by this VirtualBox
2015 installation can be obtained using
2016 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2017 attribute is empty or @c null then the default storage format
2018 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2019 be used for creating a storage unit of the medium.
2020
2021 Note that the format of the location string is storage format specific.
2022 See <link to="IMedium::location"/>, IMedium and
2023 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2024
2025 <result name="VBOX_E_OBJECT_NOT_FOUND">
2026 @a format identifier is invalid. See
2027 <link to="ISystemProperties::mediumFormats"/>.
2028 </result>
2029 <result name="VBOX_E_FILE_ERROR">
2030 @a location is a not valid file name (for file-based formats only).
2031 </result>
2032 </desc>
2033 <param name="format" type="wstring" dir="in">
2034 <desc>
2035 Identifier of the storage format to use for the new medium.
2036 </desc>
2037 </param>
2038 <param name="location" type="wstring" dir="in">
2039 <desc>
2040 Location of the storage unit for the new medium.
2041 </desc>
2042 </param>
2043 <param name="medium" type="IMedium" dir="return">
2044 <desc>Created medium object.</desc>
2045 </param>
2046 </method>
2047
2048 <method name="openHardDisk">
2049 <desc>
2050 Opens a medium from an existing location, optionally replacing
2051 the image UUID and/or parent UUID.
2052
2053 After the medium is successfully opened by this method, it gets
2054 remembered by (known to) this VirtualBox installation and will be
2055 accessible through <link to="#getHardDisk"/> and
2056 <link to="#findHardDisk"/> methods. Remembered base media
2057 are also returned as part of the <link to="#hardDisks"/> array and can
2058 be attached to virtual machines. See IMedium for more details.
2059
2060 If a differencing medium is to be opened by this method, the
2061 operation will succeed only if its parent medium and all ancestors,
2062 if any, are already known to this VirtualBox installation (for example,
2063 were opened by this method before).
2064
2065 This method tries to guess the storage format of the specified medium
2066 by reading medium data at the specified location.
2067
2068 If @a write is ReadWrite (which it should be), the image is opened for
2069 read/write access and must have according permissions, as VirtualBox
2070 may actually write status information into the disk's metadata sections.
2071
2072 Note that write access is required for all typical image usage in VirtualBox,
2073 since VirtualBox may need to write metadata such as a UUID into the image.
2074 The only exception is opening a source image temporarily for copying and
2075 cloning when the image will quickly be closed again.
2076
2077 Note that the format of the location string is storage format specific.
2078 See <link to="IMedium::location"/>, IMedium and
2079 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2080
2081 <result name="VBOX_E_FILE_ERROR">
2082 Invalid medium storage file location or could not find the medium
2083 at the specified location.
2084 </result>
2085 <result name="VBOX_E_IPRT_ERROR">
2086 Could not get medium storage format.
2087 </result>
2088 <result name="E_INVALIDARG">
2089 Invalid medium storage format.
2090 </result>
2091
2092 </desc>
2093 <param name="location" type="wstring" dir="in">
2094 <desc>
2095 Location of the storage unit that contains medium data in one of
2096 the supported storage formats.
2097 </desc>
2098 </param>
2099 <param name="accessMode" type="AccessMode" dir="in">
2100 <desc>
2101 Determines whether to open the image in read/write or read-only mode.
2102 </desc>
2103 </param>
2104 <param name="setImageId" type="boolean" dir="in">
2105 <desc>
2106 Select whether a new image UUID is set or not.
2107 </desc>
2108 </param>
2109 <param name="imageId" type="uuid" mod="string" dir="in">
2110 <desc>
2111 New UUID for the image. If an empty string is passed, then a new
2112 UUID is automatically created. Specifying a zero UUIDs is not valid.
2113 </desc>
2114 </param>
2115 <param name="setParentId" type="boolean" dir="in">
2116 <desc>
2117 Select whether a new parent UUID is set or not.
2118 </desc>
2119 </param>
2120 <param name="parentId" type="uuid" mod="string" dir="in">
2121 <desc>
2122 New parent UUID for the image. If an empty string is passed, then a
2123 new UUID is automatically created, provided @a setParentId is
2124 @c true. A zero UUID is valid.
2125 </desc>
2126 </param>
2127 <param name="medium" type="IMedium" dir="return">
2128 <desc>Opened medium object.</desc>
2129 </param>
2130 </method>
2131
2132 <method name="getHardDisk" const="yes">
2133 <desc>
2134 Returns a medium with the given UUID.
2135
2136 The medium with the given UUID must be known to this VirtualBox
2137 installation, i.e. it must be previously created by
2138 <link to="#createHardDisk"/> or opened by <link
2139 to="#openHardDisk"/>, or attached to some known virtual machine.
2140
2141 <result name="VBOX_E_OBJECT_NOT_FOUND">
2142 No medium object matching @a id found.
2143 </result>
2144
2145 </desc>
2146 <param name="id" type="uuid" mod="string" dir="in">
2147 <desc>UUID of the medium to look for.</desc>
2148 </param>
2149 <param name="medium" type="IMedium" dir="return">
2150 <desc>Found medium object.</desc>
2151 </param>
2152 </method>
2153
2154 <method name="findHardDisk">
2155 <desc>
2156 Returns a medium that uses the given location to store medium data.
2157
2158 The given medium must be known to this VirtualBox installation, i.e.
2159 it must be previously created by
2160 <link to="#createHardDisk"/> or opened by <link
2161 to="#openHardDisk"/>, or attached to some known virtual machine.
2162
2163 The search is done by comparing the value of the @a location argument to
2164 the <link to="IMedium::location"/> attribute of each known medium.
2165
2166 For locations represented by file names in the host's file system, the
2167 requested location can be a path relative to the
2168 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2169 only a file name without any path is given, the
2170 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2171 folder</link> will be prepended to the file name before searching. Note
2172 that on case sensitive file systems, a case sensitive comparison is
2173 performed, otherwise the case of symbols in the file path is ignored.
2174
2175 <result name="VBOX_E_OBJECT_NOT_FOUND">
2176 No medium object matching @a location found.
2177 </result>
2178
2179 </desc>
2180 <param name="location" type="wstring" dir="in">
2181 <desc>Location string to search for.</desc>
2182 </param>
2183 <param name="medium" type="IMedium" dir="return">
2184 <desc>Found medium object.</desc>
2185 </param>
2186 </method>
2187
2188 <method name="openDVDImage">
2189 <desc>
2190 Opens a CD/DVD image contained in the specified file of the supported
2191 format and assigns it the given UUID.
2192
2193 After the image is successfully opened by this method, it gets
2194 remembered by (known to) this VirtualBox installation and will be
2195 accessible through <link to="#getDVDImage"/> and
2196 <link to="#findDVDImage"/> methods. Remembered images are also
2197 returned as part of the <link to="#DVDImages"/> array and can be mounted
2198 to virtual machines. See IMedium for more details.
2199
2200 See <link to="IMedium::location"/> to get more details about the format
2201 of the location string.
2202
2203 <note>
2204 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2205 </note>
2206
2207 <result name="VBOX_E_FILE_ERROR">
2208 Invalid CD/DVD image file location or could not find the CD/DVD
2209 image at the specified location.
2210 </result>
2211 <result name="VBOX_E_INVALID_OBJECT_STATE">
2212 CD/DVD image already exists in the media registry.
2213 </result>
2214
2215 </desc>
2216 <param name="location" type="wstring" dir="in">
2217 <desc>
2218 Full path to the file that contains a valid CD/DVD image.
2219 </desc>
2220 </param>
2221 <param name="id" type="uuid" mod="string" dir="in">
2222 <desc>
2223 UUID to assign to the given image within this VirtualBox installation.
2224 If an empty (@c null) UUID is specified, the system will randomly
2225 generate a new UUID.
2226 </desc>
2227 </param>
2228 <param name="image" type="IMedium" dir="return">
2229 <desc>Opened CD/DVD image object.</desc>
2230 </param>
2231 </method>
2232
2233 <method name="getDVDImage">
2234 <desc>
2235 Returns a CD/DVD image with the given UUID.
2236
2237 The image with the given UUID must be known to this VirtualBox
2238 installation, i.e. it must be previously opened by <link
2239 to="#openDVDImage"/>, or mounted to some known virtual machine.
2240
2241 <result name="VBOX_E_OBJECT_NOT_FOUND">
2242 No matching DVD image found in the media registry.
2243 </result>
2244
2245 </desc>
2246 <param name="id" type="uuid" mod="string" dir="in">
2247 <desc>UUID of the image to look for.</desc>
2248 </param>
2249 <param name="image" type="IMedium" dir="return">
2250 <desc>Found CD/DVD image object.</desc>
2251 </param>
2252 </method>
2253
2254 <method name="findDVDImage">
2255 <desc>
2256 Returns a CD/DVD image with the given image location.
2257
2258 The image with the given UUID must be known to this VirtualBox
2259 installation, i.e. it must be previously opened by <link
2260 to="#openDVDImage"/>, or mounted to some known virtual machine.
2261
2262 The search is done by comparing the value of the @a location argument to
2263 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2264
2265 The requested location can be a path relative to the
2266 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2267 only a file name without any path is given, the
2268 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2269 folder</link> will be prepended to the file name before searching. Note
2270 that on case sensitive file systems, a case sensitive comparison is
2271 performed, otherwise the case in the file path is ignored.
2272
2273 <result name="VBOX_E_FILE_ERROR">
2274 Invalid image file location.
2275 </result>
2276 <result name="VBOX_E_OBJECT_NOT_FOUND">
2277 No matching DVD image found in the media registry.
2278 </result>
2279
2280 </desc>
2281 <param name="location" type="wstring" dir="in">
2282 <desc>CD/DVD image file path to look for.</desc>
2283 </param>
2284 <param name="image" type="IMedium" dir="return">
2285 <desc>Found CD/DVD image object.</desc>
2286 </param>
2287 </method>
2288
2289 <method name="openFloppyImage">
2290 <desc>
2291 Opens a floppy image contained in the specified file of the supported
2292 format and assigns it the given UUID.
2293
2294 After the image is successfully opened by this method, it gets
2295 remembered by (known to) this VirtualBox installation and will be
2296 accessible through <link to="#getFloppyImage"/> and
2297 <link to="#findFloppyImage"/> methods. Remembered images are also
2298 returned as part of the <link to="#floppyImages"/> array and can be
2299 mounted to virtual machines. See IMedium for more details.
2300
2301 See <link to="IMedium::location"/> to get more details about the format
2302 of the location string.
2303
2304 <result name="VBOX_E_FILE_ERROR">
2305 Invalid floppy image file location or could not find the floppy
2306 image at the specified location.
2307 </result>
2308 <result name="VBOX_E_INVALID_OBJECT_STATE">
2309 Floppy image already exists in the media registry.
2310 </result>
2311
2312 <note>
2313 Currently, only raw floppy images are supported by VirtualBox.
2314 </note>
2315 </desc>
2316 <param name="location" type="wstring" dir="in">
2317 <desc>
2318 Full path to the file that contains a valid floppy image.
2319 </desc>
2320 </param>
2321 <param name="id" type="uuid" mod="string" dir="in">
2322 <desc>
2323 UUID to assign to the given image file within this VirtualBox
2324 installation. If an empty (@c null) UUID is specified, the system will
2325 randomly generate a new UUID.
2326 </desc>
2327 </param>
2328 <param name="image" type="IMedium" dir="return">
2329 <desc>Opened floppy image object.</desc>
2330 </param>
2331 </method>
2332
2333 <method name="getFloppyImage">
2334 <desc>
2335 Returns a floppy image with the given UUID.
2336
2337 The image with the given UUID must be known to this VirtualBox
2338 installation, i.e. it must be previously opened by <link
2339 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2340
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching floppy image found in the media registry.
2343 </result>
2344
2345 </desc>
2346 <param name="id" type="uuid" mod="string" dir="in">
2347 <desc>UUID of the image to look for.</desc>
2348 </param>
2349 <param name="image" type="IMedium" dir="return">
2350 <desc>Found floppy image object.</desc>
2351 </param>
2352 </method>
2353
2354 <method name="findFloppyImage">
2355 <desc>
2356 Returns a floppy image with the given image location.
2357
2358 The image with the given UUID must be known to this VirtualBox
2359 installation, i.e. it must be previously opened by <link
2360 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2361
2362 The search is done by comparing the value of the @a location argument to
2363 the <link to="IMedium::location"/> attribute of each known floppy image.
2364
2365 The requested location can be a path relative to the
2366 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2367 only a file name without any path is given, the
2368 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2369 folder</link> will be prepended to the file name before searching. Note
2370 that on case sensitive file systems, a case sensitive comparison is
2371 performed, otherwise the case of symbols in the file path is ignored.
2372
2373 <result name="VBOX_E_FILE_ERROR">
2374 Invalid image file location.
2375 </result>
2376 <result name="VBOX_E_OBJECT_NOT_FOUND">
2377 No matching floppy image found in the media registry.
2378 </result>
2379
2380 </desc>
2381 <param name="location" type="wstring" dir="in">
2382 <desc>Floppy image file path to look for.</desc>
2383 </param>
2384 <param name="image" type="IMedium" dir="return">
2385 <desc>Found floppy image object.</desc>
2386 </param>
2387 </method>
2388
2389 <method name="getGuestOSType">
2390 <desc>
2391 Returns an object describing the specified guest OS type.
2392
2393 The requested guest OS type is specified using a string which is a
2394 mnemonic identifier of the guest operating system, such as
2395 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2396 particular virtual machine can be read or set using the
2397 <link to="IMachine::OSTypeId"/> attribute.
2398
2399 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2400 available guest OS type objects. Each object has an
2401 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2402 the guest OS this object describes.
2403
2404 <result name="E_INVALIDARG">
2405 @a id is not a valid Guest OS type.
2406 </result>
2407
2408 </desc>
2409 <param name="id" type="uuid" mod="string" dir="in">
2410 <desc>Guest OS type ID string.</desc>
2411 </param>
2412 <param name="type" type="IGuestOSType" dir="return">
2413 <desc>Guest OS type object.</desc>
2414 </param>
2415 </method>
2416
2417 <method name="createSharedFolder">
2418 <desc>
2419 Creates a new global shared folder by associating the given logical
2420 name with the given host path, adds it to the collection of shared
2421 folders and starts sharing it. Refer to the description of
2422 <link to="ISharedFolder"/> to read more about logical names.
2423 <note>
2424 In the current implementation, this operation is not
2425 implemented.
2426 </note>
2427 </desc>
2428 <param name="name" type="wstring" dir="in">
2429 <desc>Unique logical name of the shared folder.</desc>
2430 </param>
2431 <param name="hostPath" type="wstring" dir="in">
2432 <desc>Full path to the shared folder in the host file system.</desc>
2433 </param>
2434 <param name="writable" type="boolean" dir="in">
2435 <desc>Whether the share is writable or readonly</desc>
2436 </param>
2437 </method>
2438
2439 <method name="removeSharedFolder">
2440 <desc>
2441 Removes the global shared folder with the given name previously
2442 created by <link to="#createSharedFolder"/> from the collection of
2443 shared folders and stops sharing it.
2444 <note>
2445 In the current implementation, this operation is not
2446 implemented.
2447 </note>
2448 </desc>
2449 <param name="name" type="wstring" dir="in">
2450 <desc>Logical name of the shared folder to remove.</desc>
2451 </param>
2452 </method>
2453
2454 <method name="getExtraDataKeys">
2455 <desc>
2456 Returns an array representing the global extra data keys which currently
2457 have values defined.
2458 </desc>
2459 <param name="value" type="wstring" dir="return" safearray="yes">
2460 <desc>Array of extra data keys.</desc>
2461 </param>
2462 </method>
2463
2464 <method name="getExtraData">
2465 <desc>
2466 Returns associated global extra data.
2467
2468 If the requested data @a key does not exist, this function will
2469 succeed and return an empty string in the @a value argument.
2470
2471 <result name="VBOX_E_FILE_ERROR">
2472 Settings file not accessible.
2473 </result>
2474 <result name="VBOX_E_XML_ERROR">
2475 Could not parse the settings file.
2476 </result>
2477
2478 </desc>
2479 <param name="key" type="wstring" dir="in">
2480 <desc>Name of the data key to get.</desc>
2481 </param>
2482 <param name="value" type="wstring" dir="return">
2483 <desc>Value of the requested data key.</desc>
2484 </param>
2485 </method>
2486
2487 <method name="setExtraData">
2488 <desc>
2489 Sets associated global extra data.
2490
2491 If you pass @c null or empty string as a key @a value, the given @a key
2492 will be deleted.
2493
2494 <note>
2495 Before performing the actual data change, this method will ask all
2496 registered callbacks using the
2497 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2498 notification for a permission. If one of the callbacks refuses the
2499 new value, the change will not be performed.
2500 </note>
2501 <note>
2502 On success, the
2503 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2504 is called to inform all registered callbacks about a successful data
2505 change.
2506 </note>
2507
2508 <result name="VBOX_E_FILE_ERROR">
2509 Settings file not accessible.
2510 </result>
2511 <result name="VBOX_E_XML_ERROR">
2512 Could not parse the settings file.
2513 </result>
2514 <result name="E_ACCESSDENIED">
2515 Modification request refused.
2516 </result>
2517
2518 </desc>
2519 <param name="key" type="wstring" dir="in">
2520 <desc>Name of the data key to set.</desc>
2521 </param>
2522 <param name="value" type="wstring" dir="in">
2523 <desc>Value to assign to the key.</desc>
2524 </param>
2525 </method>
2526
2527 <method name="openSession">
2528 <desc>
2529 Opens a new direct session with the given virtual machine.
2530
2531 A direct session acts as a local lock on the given VM.
2532 There can be only one direct session open at a time for every
2533 virtual machine, protecting the VM from being manipulated by
2534 conflicting actions from different processes. Only after a
2535 direct session has been opened, one can change all VM settings
2536 and execute the VM in the process space of the session object.
2537
2538 Sessions therefore can be compared to mutex semaphores that
2539 lock a given VM for modification and execution.
2540 See <link to="ISession">ISession</link> for details.
2541
2542 <note>Unless you are writing a new VM frontend, you will not
2543 want to execute a VM in the current process. To spawn a new
2544 process that executes a VM, use
2545 <link to="IVirtualBox::openRemoteSession" />
2546 instead.</note>
2547
2548 Upon successful return, the session object can be used to
2549 get access to the machine and to the VM console.
2550
2551 In VirtualBox terminology, the machine becomes "mutable" after
2552 a session has been opened. Note that the "mutable" machine
2553 object, on which you may invoke IMachine methods to change its
2554 settings, will be a different object from the immutable IMachine
2555 objects returned by various IVirtualBox methods. To obtain a
2556 mutable IMachine object (upon which you can invoke settings methods),
2557 use the <link to="ISession::machine" /> attribute.
2558
2559 One must always call <link to="ISession::close" /> to release the
2560 lock on the machine, or the machine's state will eventually be
2561 set to "Aborted".
2562
2563 In other words, to change settings on a machine, the following
2564 sequence is typically performed:
2565
2566 <ol>
2567 <li>Call this method (openSession) to have a machine locked for
2568 the current session.</li>
2569
2570 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2571
2572 <li>Change the settings of the machine.</li>
2573
2574 <li>Call <link to="IMachine::saveSettings" />.</li>
2575
2576 <li>Close the session by calling <link to="ISession::close"/>.</li>
2577 </ol>
2578
2579 <result name="E_UNEXPECTED">
2580 Virtual machine not registered.
2581 </result>
2582 <result name="E_ACCESSDENIED">
2583 Process not started by OpenRemoteSession.
2584 </result>
2585 <result name="VBOX_E_OBJECT_NOT_FOUND">
2586 No matching virtual machine found.
2587 </result>
2588 <result name="VBOX_E_INVALID_OBJECT_STATE">
2589 Session already open or being opened.
2590 </result>
2591 <result name="VBOX_E_VM_ERROR">
2592 Failed to assign machine to session.
2593 </result>
2594
2595 </desc>
2596 <param name="session" type="ISession" dir="in">
2597 <desc>
2598 Session object that will represent the opened session after
2599 successful method invocation. This object must not represent
2600 the already open session.
2601 <note>
2602 This session will be automatically closed if the
2603 VirtualBox server is terminated for some reason.
2604 </note>
2605 </desc>
2606 </param>
2607 <param name="machineId" type="uuid" mod="string" dir="in">
2608 <desc>ID of the virtual machine to open a session with.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="openRemoteSession">
2613 <desc>
2614 Spawns a new process that executes a virtual machine (called a
2615 "remote session").
2616
2617 Opening a remote session causes the VirtualBox server to start a new
2618 process that opens a direct session with the given VM. As a result, the
2619 VM is locked by that direct session in the new process, preventing
2620 conflicting changes from other processes. Since sessions act as locks
2621 that prevent conflicting changes, one cannot open a remote session
2622 for a VM that already has another open session (direct or remote), or
2623 is currently in the process of opening one (see <link
2624 to="IMachine::sessionState"/>).
2625
2626 While the remote session still provides some level of control over the
2627 VM execution to the caller (using the <link to="IConsole" /> interface),
2628 not all VM settings are available for modification within the remote
2629 session context.
2630
2631 This operation can take some time (a new VM is started in a new process,
2632 for which memory and other resources need to be set up). Because of this,
2633 an <link to="IProgress" /> is returned to allow the caller to wait for this
2634 asynchronous operation to be completed. Until then, the remote session
2635 object remains in the closed state, and accessing the machine or its
2636 console through it is invalid. It is recommended to use
2637 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2638 completion.
2639
2640 As with all <link to="ISession" /> objects, it is recommended to call
2641 <link to="ISession::close" /> on the local session object once openRemoteSession()
2642 has been called. However, the session's state (see <link to="ISession::state" />)
2643 will not return to "Closed" until the remote session has also closed (i.e.
2644 until the VM is no longer running). In that case, however, the state of
2645 the session will automatically change back to "Closed".
2646
2647 Currently supported session types (values of the @a type
2648 argument) are:
2649 <ul>
2650 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2651 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2652 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2653 </ul>
2654
2655 The @a environment argument is a string containing definitions of
2656 environment variables in the following format:
2657 @code
2658 NAME[=VALUE]\n
2659 NAME[=VALUE]\n
2660 ...
2661 @endcode
2662 where <tt>\\n</tt> is the new line character. These environment
2663 variables will be appended to the environment of the VirtualBox server
2664 process. If an environment variable exists both in the server process
2665 and in this list, the value from this list takes precedence over the
2666 server's variable. If the value of the environment variable is
2667 omitted, this variable will be removed from the resulting environment.
2668 If the environment string is @c null or empty, the server environment
2669 is inherited by the started process as is.
2670
2671 <see>openExistingSession</see>
2672
2673 <result name="E_UNEXPECTED">
2674 Virtual machine not registered.
2675 </result>
2676 <result name="E_INVALIDARG">
2677 Invalid session type @a type.
2678 </result>
2679 <result name="VBOX_E_OBJECT_NOT_FOUND">
2680 No machine matching @a machineId found.
2681 </result>
2682 <result name="VBOX_E_INVALID_OBJECT_STATE">
2683 Session already open or being opened.
2684 </result>
2685 <result name="VBOX_E_IPRT_ERROR">
2686 Launching process for machine failed.
2687 </result>
2688 <result name="VBOX_E_VM_ERROR">
2689 Failed to assign machine to session.
2690 </result>
2691
2692 </desc>
2693 <param name="session" type="ISession" dir="in">
2694 <desc>
2695 Session object that will represent the opened remote session
2696 after successful method invocation (this object must not
2697 represent an already open session).
2698 </desc>
2699 </param>
2700 <param name="machineId" type="uuid" mod="string" dir="in">
2701 <desc>ID of the virtual machine to open a session with.</desc>
2702 </param>
2703 <param name="type" type="wstring" dir="in">
2704 <desc>
2705 Type of the remote session (case sensitive).
2706 </desc>
2707 </param>
2708 <param name="environment" type="wstring" dir="in">
2709 <desc>
2710 Environment to pass to the opened session.
2711 </desc>
2712 </param>
2713 <param name="progress" type="IProgress" dir="return">
2714 <desc>Progress object to track the operation completion.</desc>
2715 </param>
2716 </method>
2717
2718 <method name="openExistingSession">
2719 <desc>
2720 Opens a new remote session with the virtual machine for
2721 which a direct session is already open.
2722
2723 The remote session provides some level of control over the VM
2724 execution (using the IConsole interface) to the caller; however,
2725 within the remote session context, not all VM settings are available
2726 for modification.
2727
2728 As opposed to <link to="#openRemoteSession"/>, the number of
2729 remote sessions opened this way is not limited by the API
2730
2731 <note>
2732 It is an error to open a remote session with the machine that
2733 doesn't have an open direct session.
2734 </note>
2735
2736 <result name="E_UNEXPECTED">
2737 Virtual machine not registered.
2738 </result>
2739 <result name="VBOX_E_OBJECT_NOT_FOUND">
2740 No machine matching @a machineId found.
2741 </result>
2742 <result name="VBOX_E_INVALID_OBJECT_STATE">
2743 Session already open or being opened.
2744 </result>
2745 <result name="VBOX_E_INVALID_SESSION_STATE">
2746 Direct session state not Open.
2747 </result>
2748 <result name="VBOX_E_VM_ERROR">
2749 Failed to get console object from direct session or assign
2750 machine to session.
2751 </result>
2752
2753 <see>openRemoteSession</see>
2754 </desc>
2755 <param name="session" type="ISession" dir="in">
2756 <desc>
2757 Session object that will represent the open remote session
2758 after successful method invocation. This object must not
2759 represent an already open session.
2760 <note>
2761 This session will be automatically closed when the peer
2762 (direct) session dies or gets closed.
2763 </note>
2764 </desc>
2765 </param>
2766 <param name="machineId" type="uuid" mod="string" dir="in">
2767 <desc>ID of the virtual machine to open a session with.</desc>
2768 </param>
2769 </method>
2770
2771 <method name="registerCallback">
2772 <desc>
2773 Registers a new global VirtualBox callback. The methods of the given
2774 callback object will be called by VirtualBox when an appropriate
2775 event occurs.
2776
2777 <result name="E_INVALIDARG">
2778 A @c null callback cannot be registered.
2779 </result>
2780
2781 </desc>
2782 <param name="callback" type="IVirtualBoxCallback" dir="in">
2783 <desc>Callback object to register.</desc>
2784 </param>
2785 </method>
2786
2787 <method name="unregisterCallback">
2788 <desc>
2789 Unregisters the previously registered global VirtualBox callback.
2790
2791 <result name="E_INVALIDARG">
2792 Specified @a callback not registered.
2793 </result>
2794
2795 </desc>
2796 <param name="callback" type="IVirtualBoxCallback" dir="in">
2797 <desc>Callback object to unregister.</desc>
2798 </param>
2799 </method>
2800
2801 <method name="waitForPropertyChange">
2802 <desc>
2803 Blocks the caller until any of the properties represented by the
2804 @a what argument changes the value or until the given timeout interval
2805 expires.
2806
2807 The @a what argument is a comma separated list of property masks that
2808 describe properties the caller is interested in. The property mask is
2809 a string in the following format:
2810
2811 <pre>
2812 [[group.]subgroup.]name
2813 </pre>
2814
2815 where @c name is the property name and @c group, @c subgroup are zero
2816 or more property group specifiers. Each element (group or name) in
2817 the property mask may be either a Latin string or an asterisk symbol
2818 (@c "*") which is used to match any string for the given element. A
2819 property mask that doesn't contain asterisk symbols represents a
2820 single fully qualified property name.
2821
2822 Groups in the fully qualified property name go from more generic (the
2823 left-most part) to more specific (the right-most part). The first
2824 element is usually a name of the object the property belongs to. The
2825 second element may be either a property name, or a child object name,
2826 or an index if the preceding element names an object which is one of
2827 many objects of the same type. This way, property names form a
2828 hierarchy of properties. Here are some examples of property names:
2829
2830 <table>
2831 <tr>
2832 <td><tt>VirtualBox.version</tt></td>
2833 <td><link to="IVirtualBox::version"/> property</td>
2834 </tr>
2835 <tr>
2836 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2837 <td><link to="IMachine::name"/> property of the machine with the
2838 given UUID</td>
2839 </tr>
2840 </table>
2841
2842 Most property names directly correspond to the properties of objects
2843 (components) provided by the VirtualBox library and may be used to
2844 track changes to these properties. However, there may be
2845 pseudo-property names that don't correspond to any existing object's
2846 property directly, as well as there may be object properties that
2847 don't have a corresponding property name that is understood by this
2848 method, and therefore changes to such properties cannot be
2849 tracked. See individual object's property descriptions to get a
2850 fully qualified property name that can be used with this method (if
2851 any).
2852
2853 There is a special property mask @c "*" (i.e. a string consisting of a
2854 single asterisk symbol) that can be used to match all properties.
2855 Below are more examples of property masks:
2856
2857 <table>
2858 <tr>
2859 <td><tt>VirtualBox.*</tt></td>
2860 <td>Track all properties of the VirtualBox object</td>
2861 </tr>
2862 <tr>
2863 <td><tt>Machine.*.name</tt></td>
2864 <td>Track changes to the <link to="IMachine::name"/> property of
2865 all registered virtual machines</td>
2866 </tr>
2867 </table>
2868
2869 <note>
2870 This function is not implemented in the current version of the
2871 product.
2872 </note>
2873 </desc>
2874 <param name="what" type="wstring" dir="in">
2875 <desc>Comma separated list of property masks.</desc>
2876 </param>
2877 <param name="timeout" type="unsigned long" dir="in">
2878 <desc>
2879 Wait timeout in milliseconds.
2880 Specify -1 for an indefinite wait.
2881 </desc>
2882 </param>
2883 <param name="changed" type="wstring" dir="out">
2884 <desc>
2885 Comma separated list of properties that have been changed and caused
2886 this method to return to the caller.
2887 </desc>
2888 </param>
2889 <param name="values" type="wstring" dir="out">
2890 <desc>Reserved, not currently used.</desc>
2891 </param>
2892 </method>
2893
2894 <!--method name="createDHCPServerForInterface">
2895 <desc>
2896 Creates a dhcp server settings to be used for the given interface
2897 <result name="E_INVALIDARG">
2898 Host network interface @a name already exists.
2899 </result>
2900 </desc>
2901 <param name="interface" type="IHostNetworkInterface" dir="in">
2902 <desc>Network Interface</desc>
2903 </param>
2904 <param name="server" type="IDHCPServer" dir="out">
2905 <desc>Dhcp server settings</desc>
2906 </param>
2907 </method-->
2908
2909 <method name="createDHCPServer">
2910 <desc>
2911 Creates a dhcp server settings to be used for the given internal network name
2912 <result name="E_INVALIDARG">
2913 Host network interface @a name already exists.
2914 </result>
2915 </desc>
2916 <param name="name" type="wstring" dir="in">
2917 <desc>server name</desc>
2918 </param>
2919 <param name="server" type="IDHCPServer" dir="return">
2920 <desc>Dhcp server settings</desc>
2921 </param>
2922 </method>
2923
2924 <method name="findDHCPServerByNetworkName">
2925 <desc>
2926 Searches a dhcp server settings to be used for the given internal network name
2927 <result name="E_INVALIDARG">
2928 Host network interface @a name already exists.
2929 </result>
2930
2931 </desc>
2932 <param name="name" type="wstring" dir="in">
2933 <desc>server name</desc>
2934 </param>
2935 <param name="server" type="IDHCPServer" dir="return">
2936 <desc>Dhcp server settings</desc>
2937 </param>
2938 </method>
2939
2940 <!--method name="findDHCPServerForInterface">
2941 <desc>
2942 Searches a dhcp server settings to be used for the given interface
2943 <result name="E_INVALIDARG">
2944 Host network interface @a name already exists.
2945 </result>
2946 </desc>
2947 <param name="interface" type="IHostNetworkInterface" dir="in">
2948 <desc>Network Interface</desc>
2949 </param>
2950 <param name="server" type="IDHCPServer" dir="out">
2951 <desc>Dhcp server settings</desc>
2952 </param>
2953 </method-->
2954
2955 <method name="removeDHCPServer">
2956 <desc>
2957 Removes the dhcp server settings
2958 <result name="E_INVALIDARG">
2959 Host network interface @a name already exists.
2960 </result>
2961 </desc>
2962 <param name="server" type="IDHCPServer" dir="in">
2963 <desc>Dhcp server settings to be removed</desc>
2964 </param>
2965 </method>
2966
2967 </interface>
2968
2969 <!--
2970 // IVFSExplorer
2971 /////////////////////////////////////////////////////////////////////////
2972 -->
2973
2974 <enum
2975 name="VFSType"
2976 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2977 >
2978 <desc>
2979 Virtual file systems supported by VFSExplorer.
2980 </desc>
2981
2982 <const name="File" value="1" />
2983 <const name="Cloud" value="2" />
2984 <const name="S3" value="3" />
2985 <const name="WebDav" value="4" />
2986 </enum>
2987
2988 <enum
2989 name="VFSFileType"
2990 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2991 >
2992 <desc>
2993 File types known by VFSExplorer.
2994 </desc>
2995
2996 <const name="Unknown" value="1" />
2997 <const name="Fifo" value="2" />
2998 <const name="DevChar" value="3" />
2999 <const name="Directory" value="4" />
3000 <const name="DevBlock" value="5" />
3001 <const name="File" value="6" />
3002 <const name="SymLink" value="7" />
3003 <const name="Socket" value="8" />
3004 <const name="WhiteOut" value="9" />
3005 </enum>
3006
3007 <interface
3008 name="IVFSExplorer" extends="$unknown"
3009 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3010 wsmap="managed"
3011 >
3012 <desc>
3013 The VFSExplorer interface unifies access to different file system
3014 types. This includes local file systems as well remote file systems like
3015 S3. For a list of supported types see <link to="VFSType" />.
3016 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3017 </desc>
3018
3019 <attribute name="path" type="wstring" readonly="yes">
3020 <desc>Returns the current path in the virtual file system.</desc>
3021 </attribute>
3022
3023 <attribute name="type" type="VFSType" readonly="yes">
3024 <desc>Returns the file system type which is currently in use.</desc>
3025 </attribute>
3026
3027 <method name="update">
3028 <desc>Updates the internal list of files/directories from the
3029 current directory level. Use <link to="#entryList" /> to get the full list
3030 after a call to this method.</desc>
3031
3032 <param name="aProgress" type="IProgress" dir="return">
3033 <desc>Progress object to track the operation completion.</desc>
3034 </param>
3035 </method>
3036
3037 <method name="cd">
3038 <desc>Change the current directory level.</desc>
3039
3040 <param name="aDir" type="wstring" dir="in">
3041 <desc>The name of the directory to go in.</desc>
3042 </param>
3043
3044 <param name="aProgress" type="IProgress" dir="return">
3045 <desc>Progress object to track the operation completion.</desc>
3046 </param>
3047 </method>
3048
3049 <method name="cdUp">
3050 <desc>Go one directory upwards from the current directory level.</desc>
3051
3052 <param name="aProgress" type="IProgress" dir="return">
3053 <desc>Progress object to track the operation completion.</desc>
3054 </param>
3055 </method>
3056
3057 <method name="entryList">
3058 <desc>Returns a list of files/directories after a call to <link
3059 to="#update" />. The user is responsible for keeping this internal
3060 list up do date.</desc>
3061
3062 <param name="aNames" type="wstring" safearray="yes" dir="out">
3063 <desc>The list of names for the entries.</desc>
3064 </param>
3065
3066 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3067 <desc>The list of types for the entries.</desc>
3068 </param>
3069 </method>
3070
3071 <method name="exists">
3072 <desc>Checks if the given file list exists in the current directory
3073 level.</desc>
3074
3075 <param name="aNames" type="wstring" safearray="yes" dir="in">
3076 <desc>The names to check.</desc>
3077 </param>
3078
3079 <param name="aExists" type="wstring" safearray="yes" dir="return">
3080 <desc>The names which exist.</desc>
3081 </param>
3082 </method>
3083
3084 <method name="remove">
3085 <desc>Deletes the given files in the current directory level.</desc>
3086
3087 <param name="aNames" type="wstring" safearray="yes" dir="in">
3088 <desc>The names to remove.</desc>
3089 </param>
3090
3091 <param name="aProgress" type="IProgress" dir="return">
3092 <desc>Progress object to track the operation completion.</desc>
3093 </param>
3094 </method>
3095
3096 </interface>
3097
3098 <!--
3099 // IAppliance
3100 /////////////////////////////////////////////////////////////////////////
3101 -->
3102
3103 <interface
3104 name="IAppliance" extends="$unknown"
3105 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3106 wsmap="managed"
3107 >
3108 <desc>
3109 Represents a platform-independent appliance in OVF format. An instance of this is returned
3110 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3111 appliances with VirtualBox.
3112
3113 The OVF standard suggests two different physical file formats:
3114
3115 <ol>
3116 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3117 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3118 this descriptor file references other files, as OVF appliances distributed as a set of
3119 files most likely do, those files must be in the same directory as the descriptor file.</li>
3120
3121 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3122 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3123 files and optionally other files.
3124
3125 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3126 be added with a later version.</li>
3127 </ol>
3128
3129 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3130 <link to="IMachine" /> involves the following sequence of API calls:
3131
3132 <ol>
3133 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3134 </li>
3135
3136 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3137 would like to import. So long as this file is syntactically valid, this will succeed
3138 and return an instance of IAppliance that contains the parsed data from the OVF file.
3139 </li>
3140
3141 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3142 contents of the IAppliance attributes accordingly. These can be inspected by a
3143 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3144 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3145 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3146 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3147 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3148 The GUI can then give the user the option to confirm and/or change these suggestions.
3149 </li>
3150
3151 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3152 virtual system to override the suggestions made by the interpret() routine.
3153 </li>
3154
3155 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3156 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3157 virtual system descriptions.
3158 </li>
3159 </ol>
3160
3161 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3162
3163 <ol>
3164 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3165 an empty IAppliance object.
3166 </li>
3167
3168 <li>For each machine you would like to export, call <link to="IMachine::export" />
3169 with the IAppliance object you just created. This creates an instance of
3170 <link to="IVirtualSystemDescription" /> inside the appliance.
3171 </li>
3172
3173 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3174 virtual system to override the suggestions made by the export() routine.
3175 </li>
3176
3177 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3178 file written.</li>
3179 </ol>
3180
3181 </desc>
3182
3183 <attribute name="path" type="wstring" readonly="yes">
3184 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3185 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3186 <link to="#write" /> (for export).
3187 This attribute is empty until one of these methods has been called.
3188 </desc>
3189 </attribute>
3190
3191 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3192 <desc>
3193 Array of virtual disk definitions. One such description exists for each
3194 disk definition in the OVF; each string array item represents one such piece of
3195 disk information, with the information fields separated by tab (\\t) characters.
3196
3197 The caller should be prepared for additional fields being appended to
3198 this string in future versions of VirtualBox and therefore check for
3199 the number of tabs in the strings returned.
3200
3201 In the current version, the following eight fields are returned per string
3202 in the array:
3203
3204 <ol>
3205 <li>Disk ID (unique string identifier given to disk)</li>
3206
3207 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3208
3209 <li>Populated size (optional unsigned integer indicating the current size of the
3210 disk; can be approximate; -1 if unspecified)</li>
3211
3212 <li>Format (string identifying the disk format, typically
3213 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3214
3215 <li>Reference (where to find the disk image, typically a file name; if empty,
3216 then the disk should be created on import)</li>
3217
3218 <li>Image size (optional unsigned integer indicating the size of the image,
3219 which need not necessarily be the same as the values specified above, since
3220 the image may be compressed or sparse; -1 if not specified)</li>
3221
3222 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3223 presently unsupported and always -1)</li>
3224
3225 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3226 </ol>
3227 </desc>
3228 </attribute>
3229
3230 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3231 <desc> Array of virtual system descriptions. One such description is created
3232 for each virtual system found in the OVF.
3233 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3234 (for export) has been called.
3235 </desc>
3236 </attribute>
3237
3238 <method name="read">
3239 <desc>
3240 Reads an OVF file into the appliance object.
3241
3242 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3243 mere fact that this method returns successfully does not mean that VirtualBox supports all
3244 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3245 </desc>
3246 <param name="file" type="wstring" dir="in">
3247 <desc>
3248 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3249 on whether the appliance is distributed as a set of files or as a single file, respectively).
3250 </desc>
3251 </param>
3252 <param name="aProgress" type="IProgress" dir="return">
3253 <desc></desc>
3254 </param>
3255 </method>
3256
3257 <method name="interpret">
3258 <desc>
3259 Interprets the OVF data that was read when the appliance was constructed. After
3260 calling this method, one can inspect the
3261 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3262 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3263 the appliance.
3264
3265 Calling this method is the second step of importing an appliance into VirtualBox;
3266 see <link to="IAppliance" /> for an overview.
3267
3268 After calling this method, one should call <link to="#getWarnings" /> to find out
3269 if problems were encountered during the processing which might later lead to
3270 errors.
3271 </desc>
3272 </method>
3273
3274 <method name="importMachines">
3275 <desc>
3276 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3277 and other interfaces that match the information contained in the appliance as
3278 closely as possible, as represented by the import instructions in the
3279 <link to="#virtualSystemDescriptions" /> array.
3280
3281 Calling this method is the final step of importing an appliance into VirtualBox;
3282 see <link to="IAppliance" /> for an overview.
3283
3284 Since importing the appliance will most probably involve copying and converting
3285 disk images, which can take a long time, this method operates asynchronously and
3286 returns an IProgress object to allow the caller to monitor the progress.
3287 </desc>
3288
3289 <param name="aProgress" type="IProgress" dir="return">
3290 <desc></desc>
3291 </param>
3292 </method>
3293
3294 <method name="createVFSExplorer">
3295 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3296
3297 <param name="aUri" type="wstring" dir="in">
3298 <desc>The URI describing the file system to use.</desc>
3299 </param>
3300
3301 <param name="aExplorer" type="IVFSExplorer" dir="return">
3302 <desc></desc>
3303 </param>
3304 </method>
3305
3306 <method name="write">
3307 <desc>
3308 Writes the contents of the appliance exports into a new OVF file.
3309
3310 Calling this method is the final step of exporting an appliance from VirtualBox;
3311 see <link to="IAppliance" /> for an overview.
3312
3313 Since exporting the appliance will most probably involve copying and converting
3314 disk images, which can take a long time, this method operates asynchronously and
3315 returns an IProgress object to allow the caller to monitor the progress.
3316 </desc>
3317 <param name="format" type="wstring" dir="in">
3318 <desc>
3319 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3320 future versions of VirtualBox may support additional formats.
3321 </desc>
3322 </param>
3323 <param name="path" type="wstring" dir="in">
3324 <desc>
3325 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3326 on whether the appliance is distributed as a set of files or as a single file, respectively).
3327 </desc>
3328 </param>
3329 <param name="aProgress" type="IProgress" dir="return">
3330 <desc>Progress object to track the operation completion.</desc>
3331 </param>
3332 </method>
3333
3334 <method name="getWarnings">
3335 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3336
3337 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3338 <desc></desc>
3339 </param>
3340 </method>
3341
3342 </interface>
3343
3344 <enum
3345 name="VirtualSystemDescriptionType"
3346 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3347 >
3348 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3349 a configuration value.</desc>
3350
3351 <const name="Ignore" value="1" />
3352 <const name="OS" value="2" />
3353 <const name="Name" value="3" />
3354 <const name="Product" value="4" />
3355 <const name="Vendor" value="5" />
3356 <const name="Version" value="6" />
3357 <const name="ProductUrl" value="7" />
3358 <const name="VendorUrl" value="8" />
3359 <const name="Description" value="9" />
3360 <const name="License" value="10" />
3361 <const name="Miscellaneous" value="11" />
3362 <const name="CPU" value="12" />
3363 <const name="Memory" value="13" />
3364 <const name="HardDiskControllerIDE" value="14" />
3365 <const name="HardDiskControllerSATA" value="15" />
3366 <const name="HardDiskControllerSCSI" value="16" />
3367 <const name="HardDiskImage" value="17" />
3368 <const name="Floppy" value="18" />
3369 <const name="CDROM" value="19" />
3370 <const name="NetworkAdapter" value="20" />
3371 <const name="USBController" value="21" />
3372 <const name="SoundCard" value="22" />
3373
3374 </enum>
3375
3376 <enum
3377 name="VirtualSystemDescriptionValueType"
3378 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3379 >
3380 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3381 type to fetch.</desc>
3382
3383 <const name="Reference" value="1" />
3384 <const name="Original" value="2" />
3385 <const name="Auto" value="3" />
3386 <const name="ExtraConfig" value="4" />
3387
3388 </enum>
3389
3390 <interface
3391 name="IVirtualSystemDescription" extends="$unknown"
3392 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3393 wsmap="managed"
3394 >
3395
3396 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3397 After <link to="IAppliance::interpret" /> has been called, that array contains
3398 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3399 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3400 into VirtualBox.
3401 </desc>
3402
3403 <attribute name="count" type="unsigned long" readonly="yes">
3404 <desc>Return the number of virtual system description entries.</desc>
3405 </attribute>
3406
3407 <method name="getDescription">
3408 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3409 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3410
3411 The list below identifies the value sets that are possible depending on the
3412 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3413 the array item with the same index in aOvfValues[] will contain the original value as contained
3414 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3415 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3416 the aExtraConfigValues[] array item may also be used.
3417
3418 <ul>
3419 <li>
3420 "OS": the guest operating system type. There must be exactly one such array item on import. The
3421 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3422 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3423 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3424 </li>
3425 <li>
3426 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3427 if none is present on import, then an automatic name will be created from the operating system
3428 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3429 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3430 <link to="IMachine" /> name that does not exist yet.
3431 </li>
3432 <li>
3433 "Description": an arbitrary description.
3434 </li>
3435 <li>
3436 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3437 code to display such a license for agreement; the Main API does not enforce any such policy.
3438 </li>
3439 <li>
3440 Miscellaneous: reserved for future use.
3441 </li>
3442 <li>
3443 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3444 </li>
3445 <li>
3446 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3447 is present on import, then VirtualBox will set a meaningful default based on the operating system
3448 type.
3449 </li>
3450 <li>
3451 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3452 has no value in aOvfValues[] or aVBoxValues[].
3453 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3454 type can use to specify which hard disk controller a virtual disk should be connected to.
3455 </li>
3456 <li>
3457 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3458 has no value in aOvfValues[] or aVBoxValues[].
3459 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3460 </li>
3461 <li>
3462 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3463 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3464 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3465 </li>
3466 <li>
3467 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3468 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3469
3470 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3471 a path since the image file should be in the same location as the OVF file itself), whereas the
3472 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3473 hard disk image. This means that on import the image will be copied and converted from the
3474 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3475 On import, the target image will also be registered with VirtualBox.
3476
3477 The matching item in the aExtraConfigValues[] array must contain a string of the following
3478 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3479 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3480 the image to. That number must be the index of an array item with one of the hard disk controller
3481 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3482 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3483 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3484 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3485 </li>
3486 <li>
3487 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3488 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3489 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3490 </li>
3491 <li>
3492 "USBController": a USB controller. There can be at most one such item. If and only if such an
3493 item ispresent, USB support will be enabled for the new virtual machine.
3494 </li>
3495 <li>
3496 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3497 present, sound support will be enabled for the new virtual machine. Note that the virtual
3498 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3499 may be different from the virtual soundcard expected by the appliance.
3500 </li>
3501 </ul>
3502
3503 </desc>
3504
3505 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3506 <desc></desc>
3507 </param>
3508
3509 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3510 <desc></desc>
3511 </param>
3512
3513 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3514 <desc></desc>
3515 </param>
3516
3517 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3518 <desc></desc>
3519 </param>
3520
3521 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3522 <desc></desc>
3523 </param>
3524
3525 </method>
3526
3527 <method name="getDescriptionByType">
3528 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3529 should be returned.</desc>
3530
3531 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3532 <desc></desc>
3533 </param>
3534
3535 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3536 <desc></desc>
3537 </param>
3538
3539 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3540 <desc></desc>
3541 </param>
3542
3543 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3544 <desc></desc>
3545 </param>
3546
3547 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3548 <desc></desc>
3549 </param>
3550
3551 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3552 <desc></desc>
3553 </param>
3554
3555 </method>
3556
3557 <method name="getValuesByType">
3558 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3559 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3560 values.</desc>
3561
3562 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3563 <desc></desc>
3564 </param>
3565
3566 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3567 <desc></desc>
3568 </param>
3569
3570 <param name="aValues" type="wstring" dir="return" safearray="yes">
3571 <desc></desc>
3572 </param>
3573
3574 </method>
3575
3576 <method name="setFinalValues">
3577 <desc>
3578 This method allows the appliance's user to change the configuration for the virtual
3579 system descriptions. For each array item returned from <link to="#getDescription" />,
3580 you must pass in one boolean value and one configuration value.
3581
3582 Each item in the boolean array determines whether the particular configuration item
3583 should be enabled.
3584 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3585 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3586 and SoundCard.
3587
3588 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3589 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3590 the configuration remains unchanged. Please see the documentation for getDescription()
3591 for valid configuration values for the individual array item types. If the
3592 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3593 </desc>
3594
3595 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3596 <desc></desc>
3597 </param>
3598
3599 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3600 <desc></desc>
3601 </param>
3602
3603 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3604 <desc></desc>
3605 </param>
3606 </method>
3607
3608 <method name="addDescription">
3609 <desc>
3610 This method adds an additional description entry to the stack of already
3611 available descriptions for this virtual system. This is handy for writing
3612 values which aren't directly supported by VirtualBox. One example would
3613 be the License type of <link to="VirtualSystemDescriptionType" />.
3614 </desc>
3615
3616 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3617 <desc></desc>
3618 </param>
3619
3620 <param name="aVBoxValue" type="wstring" dir="in">
3621 <desc></desc>
3622 </param>
3623
3624 <param name="aExtraConfigValue" type="wstring" dir="in">
3625 <desc></desc>
3626 </param>
3627 </method>
3628 </interface>
3629
3630
3631 <!--
3632 // IMachine
3633 /////////////////////////////////////////////////////////////////////////
3634 -->
3635
3636 <interface
3637 name="IInternalMachineControl" extends="$unknown"
3638 uuid="4e2b8f0f-6575-49d2-bb19-5cd15a6ca2f0"
3639 internal="yes"
3640 wsmap="suppress"
3641 >
3642 <method name="setRemoveSavedState">
3643 <desc>
3644 Updates the flag whether saved state is removed on a machine state
3645 change from Saved to PoweredOff.
3646 </desc>
3647 <param name="aRemove" type="boolean" dir="in"/>
3648 </method>
3649
3650 <method name="updateState">
3651 <desc>
3652 Updates the VM state.
3653 <note>
3654 This operation will also update the settings file with
3655 the correct information about the saved state file
3656 and delete this file from disk when appropriate.
3657 </note>
3658 </desc>
3659 <param name="state" type="MachineState" dir="in"/>
3660 </method>
3661
3662 <method name="getIPCId">
3663 <param name="id" type="wstring" dir="return"/>
3664 </method>
3665
3666 <method name="runUSBDeviceFilters">
3667 <desc>
3668 Asks the server to run USB devices filters of the associated
3669 machine against the given USB device and tell if there is
3670 a match.
3671 <note>
3672 Intended to be used only for remote USB devices. Local
3673 ones don't require to call this method (this is done
3674 implicitly by the Host and USBProxyService).
3675 </note>
3676 </desc>
3677 <param name="device" type="IUSBDevice" dir="in"/>
3678 <param name="matched" type="boolean" dir="out"/>
3679 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3680 </method>
3681
3682 <method name="captureUSBDevice">
3683 <desc>
3684 Requests a capture of the given host USB device.
3685 When the request is completed, the VM process will
3686 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3687 notification.
3688 </desc>
3689 <param name="id" type="uuid" mod="string" dir="in"/>
3690 </method>
3691
3692 <method name="detachUSBDevice">
3693 <desc>
3694 Notification that a VM is going to detach (@a done = @c false) or has
3695 already detached (@a done = @c true) the given USB device.
3696 When the @a done = @c true request is completed, the VM process will
3697 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3698 notification.
3699 <note>
3700 In the @a done = @c true case, the server must run its own filters
3701 and filters of all VMs but this one on the detached device
3702 as if it were just attached to the host computer.
3703 </note>
3704 </desc>
3705 <param name="id" type="uuid" mod="string" dir="in"/>
3706 <param name="done" type="boolean" dir="in"/>
3707 </method>
3708
3709 <method name="autoCaptureUSBDevices">
3710 <desc>
3711 Requests a capture all matching USB devices attached to the host.
3712 When the request is completed, the VM process will
3713 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3714 notification per every captured device.
3715 </desc>
3716 </method>
3717
3718 <method name="detachAllUSBDevices">
3719 <desc>
3720 Notification that a VM that is being powered down. The done
3721 parameter indicates whether which stage of the power down
3722 we're at. When @a done = @c false the VM is announcing its
3723 intentions, while when @a done = @c true the VM is reporting
3724 what it has done.
3725 <note>
3726 In the @a done = @c true case, the server must run its own filters
3727 and filters of all VMs but this one on all detach devices as
3728 if they were just attached to the host computer.
3729 </note>
3730 </desc>
3731 <param name="done" type="boolean" dir="in"/>
3732 </method>
3733
3734 <method name="onSessionEnd">
3735 <desc>
3736 Triggered by the given session object when the session is about
3737 to close normally.
3738 </desc>
3739 <param name="session" type="ISession" dir="in">
3740 <desc>Session that is being closed</desc>
3741 </param>
3742 <param name="progress" type="IProgress" dir="return">
3743 <desc>
3744 Used to wait until the corresponding machine is actually
3745 dissociated from the given session on the server.
3746 Returned only when this session is a direct one.
3747 </desc>
3748 </param>
3749 </method>
3750
3751 <method name="beginSavingState">
3752 <desc>
3753 Called by the VM process to inform the server it wants to
3754 save the current state and stop the VM execution.
3755 </desc>
3756 <param name="progress" type="IProgress" dir="in">
3757 <desc>
3758 Progress object created by the VM process to wait until
3759 the state is saved.
3760 </desc>
3761 </param>
3762 <param name="stateFilePath" type="wstring" dir="out">
3763 <desc>
3764 File path the VM process must save the execution state to.
3765 </desc>
3766 </param>
3767 </method>
3768
3769 <method name="endSavingState">
3770 <desc>
3771 Called by the VM process to inform the server that saving
3772 the state previously requested by #beginSavingState is either
3773 successfully finished or there was a failure.
3774
3775 <result name="VBOX_E_FILE_ERROR">
3776 Settings file not accessible.
3777 </result>
3778 <result name="VBOX_E_XML_ERROR">
3779 Could not parse the settings file.
3780 </result>
3781
3782 </desc>
3783
3784 <param name="success" type="boolean" dir="in">
3785 <desc>@c true to indicate success and @c false otherwise.
3786 </desc>
3787 </param>
3788 </method>
3789
3790 <method name="adoptSavedState">
3791 <desc>
3792 Gets called by IConsole::adoptSavedState.
3793 <result name="VBOX_E_FILE_ERROR">
3794 Invalid saved state file path.
3795 </result>
3796 </desc>
3797 <param name="savedStateFile" type="wstring" dir="in">
3798 <desc>Path to the saved state file to adopt.</desc>
3799 </param>
3800 </method>
3801
3802 <method name="beginTakingSnapshot">
3803 <desc>
3804 Called from the VM process to request from the server to perform the
3805 server-side actions of creating a snapshot (creating differencing images
3806 and the snapshot object).
3807
3808 <result name="VBOX_E_FILE_ERROR">
3809 Settings file not accessible.
3810 </result>
3811 <result name="VBOX_E_XML_ERROR">
3812 Could not parse the settings file.
3813 </result>
3814 </desc>
3815 <param name="initiator" type="IConsole" dir="in">
3816 <desc>The console object that initiated this call.</desc>
3817 </param>
3818 <param name="name" type="wstring" dir="in">
3819 <desc>Snapshot name.</desc>
3820 </param>
3821 <param name="description" type="wstring" dir="in">
3822 <desc>Snapshot description.</desc>
3823 </param>
3824 <param name="consoleProgress" type="IProgress" dir="in">
3825 <desc>
3826 Progress object created by the VM process tracking the
3827 snapshot's progress. This has the following sub-operations:
3828 <ul>
3829 <li>setting up (weight 1);</li>
3830 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3831 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3832 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3833 <li>finishing up (weight 1)</li>
3834 </ul>
3835 </desc>
3836 </param>
3837 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3838 <desc>
3839 Whether this is an online snapshot (i.e. the machine is running).
3840 </desc>
3841 </param>
3842 <param name="stateFilePath" type="wstring" dir="out">
3843 <desc>
3844 File path the VM process must save the execution state to.
3845 </desc>
3846 </param>
3847 </method>
3848
3849 <method name="endTakingSnapshot">
3850 <desc>
3851 Called by the VM process to inform the server that the snapshot
3852 previously requested by #beginTakingSnapshot is either
3853 successfully taken or there was a failure.
3854 </desc>
3855
3856 <param name="success" type="boolean" dir="in">
3857 <desc>@c true to indicate success and @c false otherwise</desc>
3858 </param>
3859 </method>
3860
3861 <method name="deleteSnapshot">
3862 <desc>
3863 Gets called by IConsole::deleteSnapshot.
3864 <result name="VBOX_E_INVALID_OBJECT_STATE">
3865 Snapshot has more than one child snapshot.
3866 </result>
3867 </desc>
3868 <param name="initiator" type="IConsole" dir="in">
3869 <desc>The console object that initiated this call.</desc>
3870 </param>
3871 <param name="id" type="uuid" mod="string" dir="in">
3872 <desc>UUID of the snapshot to discard.</desc>
3873 </param>
3874 <param name="machineState" type="MachineState" dir="out">
3875 <desc>New machine state after this operation is started.</desc>
3876 </param>
3877 <param name="progress" type="IProgress" dir="return">
3878 <desc>Progress object to track the operation completion.</desc>
3879 </param>
3880 </method>
3881
3882 <method name="restoreSnapshot">
3883 <desc>
3884 Gets called by IConsole::RestoreSnapshot.
3885 </desc>
3886 <param name="initiator" type="IConsole" dir="in">
3887 <desc>The console object that initiated this call.</desc>
3888 </param>
3889 <param name="snapshot" type="ISnapshot" dir="in">
3890 <desc>The snapshot to restore the VM state from.</desc>
3891 </param>
3892 <param name="machineState" type="MachineState" dir="out">
3893 <desc>New machine state after this operation is started.</desc>
3894 </param>
3895 <param name="progress" type="IProgress" dir="return">
3896 <desc>Progress object to track the operation completion.</desc>
3897 </param>
3898 </method>
3899
3900 <method name="pullGuestProperties">
3901 <desc>
3902 Get the list of the guest properties matching a set of patterns along
3903 with their values, time stamps and flags and give responsibility for
3904 managing properties to the console.
3905 </desc>
3906 <param name="name" type="wstring" dir="out" safearray="yes">
3907 <desc>
3908 The names of the properties returned.
3909 </desc>
3910 </param>
3911 <param name="value" type="wstring" dir="out" safearray="yes">
3912 <desc>
3913 The values of the properties returned. The array entries match the
3914 corresponding entries in the @a name array.
3915 </desc>
3916 </param>
3917 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3918 <desc>
3919 The time stamps of the properties returned. The array entries match
3920 the corresponding entries in the @a name array.
3921 </desc>
3922 </param>
3923 <param name="flags" type="wstring" dir="out" safearray="yes">
3924 <desc>
3925 The flags of the properties returned. The array entries match the
3926 corresponding entries in the @a name array.
3927 </desc>
3928 </param>
3929 </method>
3930
3931 <method name="pushGuestProperties">
3932 <desc>
3933 Set the list of the guest properties matching a set of patterns along
3934 with their values, time stamps and flags and return responsibility for
3935 managing properties to IMachine.
3936 </desc>
3937 <param name="name" type="wstring" dir="in" safearray="yes">
3938 <desc>
3939 The names of the properties.
3940 </desc>
3941 </param>
3942 <param name="value" type="wstring" dir="in" safearray="yes">
3943 <desc>
3944 The values of the properties. The array entries match the
3945 corresponding entries in the @a name array.
3946 </desc>
3947 </param>
3948 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3949 <desc>
3950 The time stamps of the properties. The array entries match
3951 the corresponding entries in the @a name array.
3952 </desc>
3953 </param>
3954 <param name="flags" type="wstring" dir="in" safearray="yes">
3955 <desc>
3956 The flags of the properties. The array entries match the
3957 corresponding entries in the @a name array.
3958 </desc>
3959 </param>
3960 </method>
3961 <method name="pushGuestProperty">
3962 <desc>
3963 Update a single guest property in IMachine.
3964 </desc>
3965 <param name="name" type="wstring" dir="in">
3966 <desc>
3967 The name of the property to be updated.
3968 </desc>
3969 </param>
3970 <param name="value" type="wstring" dir="in">
3971 <desc>
3972 The value of the property.
3973 </desc>
3974 </param>
3975 <param name="timestamp" type="unsigned long long" dir="in">
3976 <desc>
3977 The timestamp of the property.
3978 </desc>
3979 </param>
3980 <param name="flags" type="wstring" dir="in">
3981 <desc>
3982 The flags of the property.
3983 </desc>
3984 </param>
3985 </method>
3986
3987 <method name="lockMedia">
3988 <desc>
3989 Locks all media attached to the machine for writing and parents of
3990 attached differencing media (if any) for reading. This operation is
3991 atomic so that if it fails no media is actually locked.
3992
3993 This method is intended to be called when the machine is in Starting or
3994 Restoring state. The locked media will be automatically unlocked when
3995 the machine is powered off or crashed.
3996 </desc>
3997 </method>
3998 </interface>
3999
4000 <interface
4001 name="IBIOSSettings" extends="$unknown"
4002 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4003 wsmap="managed"
4004 >
4005 <desc>
4006 The IBIOSSettings interface represents BIOS settings of the virtual
4007 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4008 </desc>
4009 <attribute name="logoFadeIn" type="boolean">
4010 <desc>Fade in flag for BIOS logo animation.</desc>
4011 </attribute>
4012
4013 <attribute name="logoFadeOut" type="boolean">
4014 <desc>Fade out flag for BIOS logo animation.</desc>
4015 </attribute>
4016
4017 <attribute name="logoDisplayTime" type="unsigned long">
4018 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4019 </attribute>
4020
4021 <attribute name="logoImagePath" type="wstring">
4022 <desc>Local file system path for external BIOS image.</desc>
4023 </attribute>
4024
4025 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4026 <desc>Mode of the BIOS boot device menu.</desc>
4027 </attribute>
4028
4029 <attribute name="ACPIEnabled" type="boolean">
4030 <desc>ACPI support flag.</desc>
4031 </attribute>
4032
4033 <attribute name="IOAPICEnabled" type="boolean">
4034 <desc>
4035 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4036 and support IRQs above 15.
4037 </desc>
4038 </attribute>
4039
4040 <attribute name="timeOffset" type="long long">
4041 <desc>
4042 Offset in milliseconds from the host system time. This allows for
4043 guests running with a different system date/time than the host.
4044 It is equivalent to setting the system date/time in the BIOS except
4045 it is not an absolute value but a relative one. Guest Additions
4046 time synchronization honors this offset.
4047 </desc>
4048 </attribute>
4049
4050 <attribute name="PXEDebugEnabled" type="boolean">
4051 <desc>
4052 PXE debug logging flag. If set, VirtualBox will write extensive
4053 PXE trace information to the release log.
4054 </desc>
4055 </attribute>
4056
4057 </interface>
4058
4059 <interface
4060 name="IMachine" extends="$unknown"
4061 uuid="59080235-41e1-41ca-aa28-33f6992d1646"
4062 wsmap="managed"
4063 >
4064 <desc>
4065 The IMachine interface represents a virtual machine, or guest, created
4066 in VirtualBox.
4067
4068 This interface is used in two contexts. First of all, a collection of
4069 objects implementing this interface is stored in the
4070 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4071 machines that are currently registered with this VirtualBox
4072 installation. Also, once a session has been opened for the given virtual
4073 machine (e.g. the virtual machine is running), the machine object
4074 associated with the open session can be queried from the session object;
4075 see <link to="ISession"/> for details.
4076
4077 The main role of this interface is to expose the settings of the virtual
4078 machine and provide methods to change various aspects of the virtual
4079 machine's configuration. For machine objects stored in the
4080 <link to="IVirtualBox::machines"/> collection, all attributes are
4081 read-only unless explicitly stated otherwise in individual attribute
4082 and method descriptions. In order to change a machine setting, a session
4083 for this machine must be opened using one of
4084 <link to="IVirtualBox::openSession"/>,
4085 <link to="IVirtualBox::openRemoteSession"/> or
4086 <link to="IVirtualBox::openExistingSession"/> methods. After the
4087 session has been successfully opened, a mutable machine object needs to
4088 be queried from the session object and then the desired settings changes
4089 can be applied to the returned object using IMachine attributes and
4090 methods. See the <link to="ISession"/> interface description for more
4091 information about sessions.
4092
4093 Note that IMachine does not provide methods to control virtual machine
4094 execution (such as start the machine, or power it down) -- these methods
4095 are grouped in a separate interface called <link to="IConsole" />.
4096
4097 <see>ISession, IConsole</see>
4098 </desc>
4099
4100 <attribute name="parent" type="IVirtualBox" readonly="yes">
4101 <desc>Associated parent object.</desc>
4102 </attribute>
4103
4104 <attribute name="accessible" type="boolean" readonly="yes">
4105 <desc>
4106 Whether this virtual machine is currently accessible or not.
4107
4108 A machine is always deemed accessible unless it is registered <i>and</i>
4109 its settings file cannot be read or parsed (either because the file itself
4110 is unavailable or has invalid XML contents).
4111
4112 Every time this property is read, the accessibility state of
4113 this machine is re-evaluated. If the returned value is @c false,
4114 the <link to="#accessError"/> property may be used to get the
4115 detailed error information describing the reason of
4116 inaccessibility, including XML error messages.
4117
4118 When the machine is inaccessible, only the following properties
4119 can be used on it:
4120 <ul>
4121 <li><link to="#parent"/></li>
4122 <li><link to="#id"/></li>
4123 <li><link to="#settingsFilePath"/></li>
4124 <li><link to="#accessible"/></li>
4125 <li><link to="#accessError"/></li>
4126 </ul>
4127
4128 An attempt to access any other property or method will return
4129 an error.
4130
4131 The only possible action you can perform on an inaccessible
4132 machine is to unregister it using the
4133 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4134 for the accessibility state once more by querying this
4135 property).
4136
4137 <note>
4138 In the current implementation, once this property returns
4139 @c true, the machine will never become inaccessible
4140 later, even if its settings file cannot be successfully
4141 read/written any more (at least, until the VirtualBox
4142 server is restarted). This limitation may be removed in
4143 future releases.
4144 </note>
4145 </desc>
4146 </attribute>
4147
4148 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4149 <desc>
4150 Error information describing the reason of machine
4151 inaccessibility.
4152
4153 Reading this property is only valid after the last call to
4154 <link to="#accessible"/> returned @c false (i.e. the
4155 machine is currently unaccessible). Otherwise, a @c null
4156 IVirtualBoxErrorInfo object will be returned.
4157 </desc>
4158 </attribute>
4159
4160 <attribute name="name" type="wstring">
4161 <desc>
4162 Name of the virtual machine.
4163
4164 Besides being used for human-readable identification purposes
4165 everywhere in VirtualBox, the virtual machine name is also used
4166 as a name of the machine's settings file and as a name of the
4167 subdirectory this settings file resides in. Thus, every time you
4168 change the value of this property, the settings file will be
4169 renamed once you call <link to="#saveSettings"/> to confirm the
4170 change. The containing subdirectory will be also renamed, but
4171 only if it has exactly the same name as the settings file
4172 itself prior to changing this property (for backward compatibility
4173 with previous API releases). The above implies the following
4174 limitations:
4175 <ul>
4176 <li>The machine name cannot be empty.</li>
4177 <li>The machine name can contain only characters that are valid
4178 file name characters according to the rules of the file
4179 system used to store VirtualBox configuration.</li>
4180 <li>You cannot have two or more machines with the same name
4181 if they use the same subdirectory for storing the machine
4182 settings files.</li>
4183 <li>You cannot change the name of the machine if it is running,
4184 or if any file in the directory containing the settings file
4185 is being used by another running machine or by any other
4186 process in the host operating system at a time when
4187 <link to="#saveSettings"/> is called.
4188 </li>
4189 </ul>
4190 If any of the above limitations are hit, <link to="#saveSettings"/>
4191 will return an appropriate error message explaining the exact
4192 reason and the changes you made to this machine will not be
4193 saved.
4194 <note>
4195 For "legacy" machines created using the
4196 <link to="IVirtualBox::createLegacyMachine"/> call,
4197 the above naming limitations do not apply because the
4198 machine name does not affect the settings file name.
4199 The settings file name remains the same as it was specified
4200 during machine creation and never changes.
4201 </note>
4202 </desc>
4203 </attribute>
4204
4205 <attribute name="description" type="wstring">
4206 <desc>
4207 Description of the virtual machine.
4208
4209 The description attribute can contain any text and is
4210 typically used to describe the hardware and software
4211 configuration of the virtual machine in detail (i.e. network
4212 settings, versions of the installed software and so on).
4213 </desc>
4214 </attribute>
4215
4216 <attribute name="id" type="uuid" mod="string" readonly="yes">
4217 <desc>UUID of the virtual machine.</desc>
4218 </attribute>
4219
4220 <attribute name="OSTypeId" type="wstring">
4221 <desc>
4222 User-defined identifier of the Guest OS type.
4223 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4224 an IGuestOSType object representing details about the given
4225 Guest OS type.
4226 <note>
4227 This value may differ from the value returned by
4228 <link to="IGuest::OSTypeId"/> if Guest Additions are
4229 installed to the guest OS.
4230 </note>
4231 </desc>
4232 </attribute>
4233
4234 <attribute name="HardwareVersion" type="wstring">
4235 <desc>Hardware version identifier. Internal use only for now.</desc>
4236 </attribute>
4237
4238 <attribute name="hardwareUUID" type="uuid" mod="string">
4239 <desc>
4240 The UUID presented to the guest via memory tables, hardware and guest
4241 properties. For most VMs this is the same as the @a id, but for VMs
4242 which have been cloned or teleported it may be the same as the source
4243 VM. This latter is because the guest shouldn't notice that it was
4244 cloned or teleported.
4245 </desc>
4246 </attribute>
4247
4248 <attribute name="CPUCount" type="unsigned long">
4249 <desc>Number of virtual CPUs in the VM.</desc>
4250 </attribute>
4251
4252 <attribute name="memorySize" type="unsigned long">
4253 <desc>System memory size in megabytes.</desc>
4254 </attribute>
4255
4256 <attribute name="memoryBalloonSize" type="unsigned long">
4257 <desc>Initial memory balloon size in megabytes.</desc>
4258 </attribute>
4259
4260 <attribute name="statisticsUpdateInterval" type="unsigned long">
4261 <desc>Initial interval to update guest statistics in seconds.</desc>
4262 </attribute>
4263
4264 <attribute name="VRAMSize" type="unsigned long">
4265 <desc>Video memory size in megabytes.</desc>
4266 </attribute>
4267
4268 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4269 <desc>
4270 This setting determines whether VirtualBox allows this machine to make
4271 use of the 3D graphics support available on the host.</desc>
4272 </attribute>
4273
4274 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4275 <desc>
4276 This setting determines whether VirtualBox allows this machine to make
4277 use of the 2D video acceleration support available on the host.</desc>
4278 </attribute>
4279
4280 <attribute name="monitorCount" type="unsigned long">
4281 <desc>
4282 Number of virtual monitors.
4283 <note>
4284 Only effective on Windows XP and later guests with
4285 Guest Additions installed.
4286 </note>
4287 </desc>
4288 </attribute>
4289
4290 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4291 <desc>Object containing all BIOS settings.</desc>
4292 </attribute>
4293
4294 <attribute name="firmwareType" type="FirmwareType">
4295 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4296 bootstrap in this VM.</desc>
4297 </attribute>
4298
4299 <attribute name="snapshotFolder" type="wstring">
4300 <desc>
4301 Full path to the directory used to store snapshot data
4302 (differencing media and saved state files) of this machine.
4303
4304 The initial value of this property is
4305 <tt>&lt;</tt><link to="#settingsFilePath">
4306 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4307 <link to="#id">machine_uuid</link>
4308 <tt>&gt;</tt>.
4309
4310 Currently, it is an error to try to change this property on
4311 a machine that has snapshots (because this would require to
4312 move possibly large files to a different location).
4313 A separate method will be available for this purpose later.
4314
4315 <note>
4316 Setting this property to @c null or to an empty string will restore
4317 the initial value.
4318 </note>
4319 <note>
4320 When setting this property, the specified path can be
4321 absolute (full path) or relative to the directory where the
4322 <link to="#settingsFilePath">machine settings file</link>
4323 is located. When reading this property, a full path is
4324 always returned.
4325 </note>
4326 <note>
4327 The specified path may not exist, it will be created
4328 when necessary.
4329 </note>
4330 </desc>
4331 </attribute>
4332
4333 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4334 <desc>VRDP server object.</desc>
4335 </attribute>
4336
4337 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4338 <desc>Array of media attached to this machine.</desc>
4339 </attribute>
4340
4341 <attribute name="USBController" type="IUSBController" readonly="yes">
4342 <desc>
4343 Associated USB controller object.
4344
4345 <note>
4346 If USB functionality is not available in the given edition of
4347 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4348 </note>
4349 </desc>
4350 </attribute>
4351
4352 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4353 <desc>Associated audio adapter, always present.</desc>
4354 </attribute>
4355
4356 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4357 <desc>Array of storage controllers attached to this machine.</desc>
4358 </attribute>
4359
4360 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4361 <desc>
4362 Full name of the file containing machine settings data.
4363 </desc>
4364 </attribute>
4365
4366 <attribute name="settingsModified" type="boolean" readonly="yes">
4367 <desc>
4368 Whether the settings of this machine have been modified
4369 (but neither yet saved nor discarded).
4370 <note>
4371 Reading this property is only valid on instances returned
4372 by <link to="ISession::machine"/> and on new machines
4373 created by <link to="IVirtualBox::createMachine"/> or opened
4374 by <link to="IVirtualBox::openMachine"/> but not
4375 yet registered, or on unregistered machines after calling
4376 <link to="IVirtualBox::unregisterMachine"/>. For all other
4377 cases, the settings can never be modified.
4378 </note>
4379 <note>
4380 For newly created unregistered machines, the value of this
4381 property is always @c true until <link to="#saveSettings"/>
4382 is called (no matter if any machine settings have been
4383 changed after the creation or not). For opened machines
4384 the value is set to @c false (and then follows to normal rules).
4385 </note>
4386 </desc>
4387 </attribute>
4388
4389 <attribute name="sessionState" type="SessionState" readonly="yes">
4390 <desc>Current session state for this machine.</desc>
4391 </attribute>
4392
4393 <attribute name="sessionType" type="wstring" readonly="yes">
4394 <desc>
4395 Type of the session. If <link to="#sessionState"/> is
4396 SessionSpawning or SessionOpen, this attribute contains the
4397 same value as passed to the
4398 <link to="IVirtualBox::openRemoteSession"/> method in the
4399 @a type parameter. If the session was opened directly using
4400 <link to="IVirtualBox::openSession"/>, or if
4401 <link to="#sessionState"/> is SessionClosed, the value of this
4402 attribute is an empty string.
4403 </desc>
4404 </attribute>
4405
4406 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4407 <desc>
4408 Identifier of the session process. This attribute contains the
4409 platform-dependent identifier of the process that has opened a
4410 direct session for this machine using the
4411 <link to="IVirtualBox::openSession"/> call. The returned value
4412 is only valid if <link to="#sessionState"/> is SessionOpen or
4413 SessionClosing (i.e. a session is currently open or being
4414 closed) by the time this property is read.
4415 </desc>
4416 </attribute>
4417
4418 <attribute name="state" type="MachineState" readonly="yes">
4419 <desc>Current execution state of this machine.</desc>
4420 </attribute>
4421
4422 <attribute name="lastStateChange" type="long long" readonly="yes">
4423 <desc>
4424 Time stamp of the last execution state change,
4425 in milliseconds since 1970-01-01 UTC.
4426 </desc>
4427 </attribute>
4428
4429 <attribute name="stateFilePath" type="wstring" readonly="yes">
4430 <desc>
4431 Full path to the file that stores the execution state of
4432 the machine when it is in the <link to="MachineState_Saved"/> state.
4433 <note>
4434 When the machine is not in the Saved state, this attribute is
4435 an empty string.
4436 </note>
4437 </desc>
4438 </attribute>
4439
4440 <attribute name="logFolder" type="wstring" readonly="yes">
4441 <desc>
4442 Full path to the folder that stores a set of rotated log files
4443 recorded during machine execution. The most recent log file is
4444 named <tt>VBox.log</tt>, the previous log file is
4445 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4446 in the current version).
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4451 <desc>
4452 Current snapshot of this machine. This is @c null if the machine
4453 currently has no snapshots. If it is not @c null, then it was
4454 set by one of <link to="Console::takeSnapshot" />,
4455 <link to="Console::deleteSnapshot" />
4456 or <link to="Console::restoreSnapshot" />, depending on which
4457 was called last. 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 only
4474 directly after one of the following calls are made:
4475
4476 <ul>
4477 <li><link to="IConsole::restoreSnapshot"/>
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 identifier cannot
4659 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4660 and floppies.
4661
4662 After calling this returns successfully, a new instance of
4663 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4664 attachments (<link to="IMachine::mediumAttachments"/>).
4665
4666 The specified device slot must not have a device attached to it,
4667 or this method will fail.
4668
4669 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4670 information about attaching media.
4671
4672 <note>
4673 You cannot attach a device to a running machine. Also, you cannot
4674 attach a device to a newly created machine until this machine's
4675 settings are saved to disk using <link to="#saveSettings"/>.
4676 </note>
4677 <note>
4678 If the medium is being attached indirectly, a new differencing medium
4679 will implicitly be created for it and attached instead. If the
4680 changes made to the machine settings (including this indirect
4681 attachment) are later cancelled using <link to="#discardSettings"/>,
4682 this implicitly created differencing medium will implicitly
4683 be deleted.
4684 </note>
4685
4686 <result name="E_INVALIDARG">
4687 SATA device, SATA port, IDE port or IDE slot out of range.
4688 </result>
4689 <result name="VBOX_E_INVALID_OBJECT_STATE">
4690 Attempt to attach medium to an unregistered virtual machine.
4691 </result>
4692 <result name="VBOX_E_INVALID_VM_STATE">
4693 Invalid machine state.
4694 </result>
4695 <result name="VBOX_E_OBJECT_IN_USE">
4696 Hard disk already attached to this or another virtual machine.
4697 </result>
4698
4699 </desc>
4700 <param name="name" type="wstring" dir="in">
4701 <desc>Name of the storage controller to attach the device to.</desc>
4702 </param>
4703 <param name="controllerPort" type="long" dir="in">
4704 <desc>Port to attach the device to.</desc>
4705 </param>
4706 <param name="device" type="long" dir="in">
4707 <desc>Device slot in the given port to attach the device to.</desc>
4708 </param>
4709 <param name="type" type="DeviceType" dir="in">
4710 <desc>Device type of the attached device.</desc>
4711 </param>
4712 <param name="id" type="uuid" mod="string" dir="in">
4713 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4714 medium.</desc>
4715 </param>
4716 </method>
4717
4718 <method name="detachDevice">
4719 <desc>
4720 Detaches the device attached to a device slot of the specified bus.
4721
4722 Detaching the device from the virtual machine is deferred. This means
4723 that the medium remains associated with the machine when this method
4724 returns and gets actually de-associated only after a successful
4725 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4726 for more detailed information about attaching media.
4727
4728 <note>
4729 You cannot detach a device from a running machine.
4730 </note>
4731 <note>
4732 Detaching differencing media implicitly created by <link
4733 to="#attachDevice"/> for the indirect attachment using this
4734 method will <b>not</b> implicitly delete them. The
4735 <link to="IMedium::deleteStorage"/> operation should be
4736 explicitly performed by the caller after the medium is successfully
4737 detached and the settings are saved with
4738 <link to="#saveSettings"/>, if it is the desired action.
4739 </note>
4740
4741 <result name="VBOX_E_INVALID_VM_STATE">
4742 Attempt to detach medium from a running virtual machine.
4743 </result>
4744 <result name="VBOX_E_OBJECT_NOT_FOUND">
4745 No medium attached to given slot/bus.
4746 </result>
4747 <result name="VBOX_E_NOT_SUPPORTED">
4748 Medium format does not support storage deletion.
4749 </result>
4750
4751 </desc>
4752 <param name="name" type="wstring" dir="in">
4753 <desc>Name of the storage controller to detach the medium from.</desc>
4754 </param>
4755 <param name="controllerPort" type="long" dir="in">
4756 <desc>Port number to detach the medium from.</desc>
4757 </param>
4758 <param name="device" type="long" dir="in">
4759 <desc>Device slot number to detach the medium from.</desc>
4760 </param>
4761 </method>
4762
4763 <method name="passthroughDevice">
4764 <desc>
4765 Sets the passthrough mode of an existing DVD device. Changing the
4766 setting while the VM is running is forbidden. The setting is only used
4767 if at VM start the device is configured as a host DVD drive, in all
4768 other cases it is ignored. The device must already exist; see
4769 <link to="IMachine::attachDevice"/> for how to attach a new device.
4770
4771 The @a controllerPort and @a device parameters specify the device slot and
4772 have have the same meaning as with <link to="IMachine::attachDevice" />.
4773
4774 <result name="E_INVALIDARG">
4775 SATA device, SATA port, IDE port or IDE slot out of range.
4776 </result>
4777 <result name="VBOX_E_INVALID_OBJECT_STATE">
4778 Attempt to modify an unregistered virtual machine.
4779 </result>
4780 <result name="VBOX_E_INVALID_VM_STATE">
4781 Invalid machine state.
4782 </result>
4783
4784 </desc>
4785 <param name="name" type="wstring" dir="in">
4786 <desc>Name of the storage controller.</desc>
4787 </param>
4788 <param name="controllerPort" type="long" dir="in">
4789 <desc>Storage controller port.</desc>
4790 </param>
4791 <param name="device" type="long" dir="in">
4792 <desc>Device slot in the given port.</desc>
4793 </param>
4794 <param name="passthrough" type="boolean" dir="in">
4795 <desc>New value for the passthrough setting.</desc>
4796 </param>
4797 </method>
4798
4799 <method name="mountMedium">
4800 <desc>
4801 Mounts a medium (<link to="IMedium" />, identified
4802 by the given UUID @a id) to the given storage controller
4803 (<link to="IStorageController" />, identified by @a name),
4804 at the indicated port and device. The device must already exist;
4805 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4806
4807 This method is intended only for managing removable media, where the
4808 device is fixed but media is changeable at runtime (such as DVDs
4809 and floppies). It cannot be used for fixed media such as hard disks.
4810
4811 The @a controllerPort and @a device parameters specify the device slot and
4812 have have the same meaning as with <link to="IMachine::attachDevice" />.
4813
4814 The specified device slot can have a medium mounted, which will be
4815 unmounted first. Specifying a zero UUID (or an empty string) for
4816 @a medium does just an unmount.
4817
4818 See <link to="IMedium"/> for more detailed information about
4819 attaching media.
4820
4821 <result name="E_INVALIDARG">
4822 SATA device, SATA port, IDE port or IDE slot out of range.
4823 </result>
4824 <result name="VBOX_E_INVALID_OBJECT_STATE">
4825 Attempt to attach medium to an unregistered virtual machine.
4826 </result>
4827 <result name="VBOX_E_INVALID_VM_STATE">
4828 Invalid machine state.
4829 </result>
4830 <result name="VBOX_E_OBJECT_IN_USE">
4831 Medium already attached to this or another virtual machine.
4832 </result>
4833
4834 </desc>
4835 <param name="name" type="wstring" dir="in">
4836 <desc>Name of the storage controller to attach the medium to.</desc>
4837 </param>
4838 <param name="controllerPort" type="long" dir="in">
4839 <desc>Port to attach the medium to.</desc>
4840 </param>
4841 <param name="device" type="long" dir="in">
4842 <desc>Device slot in the given port to attach the medium to.</desc>
4843 </param>
4844 <param name="medium" type="uuid" mod="string" dir="in">
4845 <desc>UUID of the medium to attach. A zero UUID means unmount the
4846 currently mounted medium.</desc>
4847 </param>
4848 </method>
4849
4850 <method name="getMedium" const="yes">
4851 <desc>
4852 Returns the virtual medium attached to a device slot of the specified
4853 bus.
4854
4855 Note that if the medium was indirectly attached by
4856 <link to="#mountMedium"/> to the given device slot then this
4857 method will return not the same object as passed to the
4858 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4859 more detailed information about mounting a medium.
4860
4861 <result name="VBOX_E_OBJECT_NOT_FOUND">
4862 No medium attached to given slot/bus.
4863 </result>
4864
4865 </desc>
4866 <param name="name" type="wstring" dir="in">
4867 <desc>Name of the storage controller the medium is attached to.</desc>
4868 </param>
4869 <param name="controllerPort" type="long" dir="in">
4870 <desc>Port to query.</desc>
4871 </param>
4872 <param name="device" type="long" dir="in">
4873 <desc>Device slot in the given port to query.</desc>
4874 </param>
4875 <param name="medium" type="IMedium" dir="return">
4876 <desc>Attached medium object.</desc>
4877 </param>
4878 </method>
4879
4880 <method name="getMediumAttachmentsOfController" const="yes">
4881 <desc>
4882 Returns an array of medium attachments which are attached to the
4883 the controller with the given name.
4884
4885 <result name="VBOX_E_OBJECT_NOT_FOUND">
4886 A storage controller with given name doesn't exist.
4887 </result>
4888 </desc>
4889 <param name="name" type="wstring" dir="in"/>
4890 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4891 </method>
4892
4893 <method name="getMediumAttachment" const="yes">
4894 <desc>
4895 Returns a medium attachment which corresponds to the controller with
4896 the given name, on the given port and device slot.
4897
4898 <result name="VBOX_E_OBJECT_NOT_FOUND">
4899 No attachment exists for the given controller/port/device combination.
4900 </result>
4901 </desc>
4902 <param name="name" type="wstring" dir="in"/>
4903 <param name="controllerPort" type="long" dir="in"/>
4904 <param name="device" type="long" dir="in"/>
4905 <param name="attachment" type="IMediumAttachment" dir="return"/>
4906 </method>
4907
4908 <method name="getNetworkAdapter" const="yes">
4909 <desc>
4910 Returns the network adapter associated with the given slot.
4911 Slots are numbered sequentially, starting with zero. The total
4912 number of adapters per machine is defined by the
4913 <link to="ISystemProperties::networkAdapterCount"/> property,
4914 so the maximum slot number is one less than that property's value.
4915
4916 <result name="E_INVALIDARG">
4917 Invalid @a slot number.
4918 </result>
4919
4920 </desc>
4921 <param name="slot" type="unsigned long" dir="in"/>
4922 <param name="adapter" type="INetworkAdapter" dir="return"/>
4923 </method>
4924
4925 <method name="addStorageController">
4926 <desc>
4927 Adds a new storage controller (SCSI or SATA controller) to the
4928 machine and returns it as an instance of
4929 <link to="IStorageController" />.
4930
4931 @a name identifies the controller for subsequent calls such as
4932 <link to="#getStorageControllerByName" />,
4933 <link to="#getStorageControllerByInstance" />,
4934 <link to="#removeStorageController" />,
4935 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4936
4937 After the controller has been added, you can set its exact
4938 type by setting the <link to="IStorageController::controllerType" />.
4939
4940 <result name="VBOX_E_OBJECT_IN_USE">
4941 A storage controller with given name exists already.
4942 </result>
4943 <result name="E_INVALIDARG">
4944 Invalid @a controllerType.
4945 </result>
4946 </desc>
4947 <param name="name" type="wstring" dir="in"/>
4948 <param name="connectionType" type="StorageBus" dir="in"/>
4949 <param name="controller" type="IStorageController" dir="return"/>
4950 </method>
4951
4952 <method name="getStorageControllerByName" const="yes">
4953 <desc>
4954 Returns a storage controller with the given name.
4955
4956 <result name="VBOX_E_OBJECT_NOT_FOUND">
4957 A storage controller with given name doesn't exist.
4958 </result>
4959 </desc>
4960 <param name="name" type="wstring" dir="in"/>
4961 <param name="storageController" type="IStorageController" dir="return"/>
4962 </method>
4963
4964 <method name="getStorageControllerByInstance" const="yes">
4965 <desc>
4966 Returns a storage controller with the given instance number.
4967
4968 <result name="VBOX_E_OBJECT_NOT_FOUND">
4969 A storage controller with given instance number doesn't exist.
4970 </result>
4971 </desc>
4972 <param name="instance" type="unsigned long" dir="in"/>
4973 <param name="storageController" type="IStorageController" dir="return"/>
4974 </method>
4975
4976 <method name="removeStorageController">
4977 <desc>
4978 Removes a storage controller from the machine.
4979
4980 <result name="VBOX_E_OBJECT_NOT_FOUND">
4981 A storage controller with given name doesn't exist.
4982 </result>
4983 </desc>
4984 <param name="name" type="wstring" dir="in"/>
4985 </method>
4986
4987 <method name="getSerialPort" const="yes">
4988 <desc>
4989 Returns the serial port associated with the given slot.
4990 Slots are numbered sequentially, starting with zero. The total
4991 number of serial ports per machine is defined by the
4992 <link to="ISystemProperties::serialPortCount"/> property,
4993 so the maximum slot number is one less than that property's value.
4994
4995 <result name="E_INVALIDARG">
4996 Invalid @a slot number.
4997 </result>
4998
4999 </desc>
5000 <param name="slot" type="unsigned long" dir="in"/>
5001 <param name="port" type="ISerialPort" dir="return"/>
5002 </method>
5003
5004 <method name="getParallelPort" const="yes">
5005 <desc>
5006 Returns the parallel port associated with the given slot.
5007 Slots are numbered sequentially, starting with zero. The total
5008 number of parallel ports per machine is defined by the
5009 <link to="ISystemProperties::parallelPortCount"/> property,
5010 so the maximum slot number is one less than that property's value.
5011
5012 <result name="E_INVALIDARG">
5013 Invalid @a slot number.
5014 </result>
5015
5016 </desc>
5017 <param name="slot" type="unsigned long" dir="in"/>
5018 <param name="port" type="IParallelPort" dir="return"/>
5019 </method>
5020
5021 <method name="getExtraDataKeys">
5022 <desc>
5023 Returns an array representing the machine-specific extra data keys
5024 which currently have values defined.
5025 </desc>
5026 <param name="value" type="wstring" dir="return" safearray="yes">
5027 <desc>Array of extra data keys.</desc>
5028 </param>
5029 </method>
5030
5031 <method name="getExtraData">
5032 <desc>
5033 Returns associated machine-specific extra data.
5034
5035 If the requested data @a key does not exist, this function will
5036 succeed and return an empty string in the @a value argument.
5037
5038 <result name="VBOX_E_FILE_ERROR">
5039 Settings file not accessible.
5040 </result>
5041 <result name="VBOX_E_XML_ERROR">
5042 Could not parse the settings file.
5043 </result>
5044
5045 </desc>
5046 <param name="key" type="wstring" dir="in">
5047 <desc>Name of the data key to get.</desc>
5048 </param>
5049 <param name="value" type="wstring" dir="return">
5050 <desc>Value of the requested data key.</desc>
5051 </param>
5052 </method>
5053
5054 <method name="setExtraData">
5055 <desc>
5056 Sets associated machine-specific extra data.
5057
5058 If you pass @c null or an empty string as a key @a value, the given
5059 @a key will be deleted.
5060
5061 <note>
5062 Before performing the actual data change, this method will ask all
5063 registered callbacks using the
5064 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5065 notification for a permission. If one of the callbacks refuses the
5066 new value, the change will not be performed.
5067 </note>
5068 <note>
5069 On success, the
5070 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5071 is called to inform all registered callbacks about a successful data
5072 change.
5073 </note>
5074 <note>
5075 This method can be called outside the machine session and therefore
5076 it's a caller's responsibility to handle possible race conditions
5077 when several clients change the same key at the same time.
5078 </note>
5079
5080 <result name="VBOX_E_FILE_ERROR">
5081 Settings file not accessible.
5082 </result>
5083 <result name="VBOX_E_XML_ERROR">
5084 Could not parse the settings file.
5085 </result>
5086
5087 </desc>
5088 <param name="key" type="wstring" dir="in">
5089 <desc>Name of the data key to set.</desc>
5090 </param>
5091 <param name="value" type="wstring" dir="in">
5092 <desc>Value to assign to the key.</desc>
5093 </param>
5094 </method>
5095
5096 <method name="getCpuProperty" const="yes">
5097 <desc>
5098 Returns the virtual CPU boolean value of the specified property.
5099
5100 <result name="E_INVALIDARG">
5101 Invalid property.
5102 </result>
5103
5104 </desc>
5105 <param name="property" type="CpuPropertyType" dir="in">
5106 <desc>
5107 Property type to query.
5108 </desc>
5109 </param>
5110 <param name="value" type="boolean" dir="return">
5111 <desc>
5112 Property value.
5113 </desc>
5114 </param>
5115 </method>
5116
5117 <method name="setCpuProperty">
5118 <desc>
5119 Sets the virtual CPU boolean value of the specified property.
5120
5121 <result name="E_INVALIDARG">
5122 Invalid property.
5123 </result>
5124
5125 </desc>
5126 <param name="property" type="CpuPropertyType" dir="in">
5127 <desc>
5128 Property type to query.
5129 </desc>
5130 </param>
5131 <param name="value" type="boolean" dir="in">
5132 <desc>
5133 Property value.
5134 </desc>
5135 </param>
5136 </method>
5137
5138 <method name="getHWVirtExProperty" const="yes">
5139 <desc>
5140 Returns the HWVirtEx boolean value of the specified property.
5141
5142 <result name="E_INVALIDARG">
5143 Invalid property.
5144 </result>
5145
5146 </desc>
5147 <param name="property" type="HWVirtExPropertyType" dir="in">
5148 <desc>
5149 Property type to query.
5150 </desc>
5151 </param>
5152 <param name="value" type="boolean" dir="return">
5153 <desc>
5154 Property value.
5155 </desc>
5156 </param>
5157 </method>
5158
5159 <method name="setHWVirtExProperty">
5160 <desc>
5161 Sets the HWVirtEx boolean value of the specified property.
5162
5163 <result name="E_INVALIDARG">
5164 Invalid property.
5165 </result>
5166
5167 </desc>
5168 <param name="property" type="HWVirtExPropertyType" dir="in">
5169 <desc>
5170 Property type to query.
5171 </desc>
5172 </param>
5173 <param name="value" type="boolean" dir="in">
5174 <desc>
5175 Property value.
5176 </desc>
5177 </param>
5178 </method>
5179
5180 <method name="saveSettings">
5181 <desc>
5182 Saves any changes to machine settings made since the session
5183 has been opened or a new machine has been created, or since the
5184 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5185 For registered machines, new settings become visible to all
5186 other VirtualBox clients after successful invocation of this
5187 method.
5188 <note>
5189 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5190 notification event after the configuration has been successfully
5191 saved (only for registered machines).
5192 </note>
5193 <note>
5194 Calling this method is only valid on instances returned
5195 by <link to="ISession::machine"/> and on new machines
5196 created by <link to="IVirtualBox::createMachine"/> but not
5197 yet registered, or on unregistered machines after calling
5198 <link to="IVirtualBox::unregisterMachine"/>.
5199 </note>
5200
5201 <result name="VBOX_E_FILE_ERROR">
5202 Settings file not accessible.
5203 </result>
5204 <result name="VBOX_E_XML_ERROR">
5205 Could not parse the settings file.
5206 </result>
5207 <result name="E_ACCESSDENIED">
5208 Modification request refused.
5209 </result>
5210
5211 </desc>
5212 </method>
5213
5214 <method name="discardSettings">
5215 <desc>
5216 Discards any changes to the machine settings made since the session
5217 has been opened or since the last call to <link to="#saveSettings"/>
5218 or <link to="#discardSettings"/>.
5219 <note>
5220 Calling this method is only valid on instances returned
5221 by <link to="ISession::machine"/> and on new machines
5222 created by <link to="IVirtualBox::createMachine"/> or
5223 opened by <link to="IVirtualBox::openMachine"/> but not
5224 yet registered, or on unregistered machines after calling
5225 <link to="IVirtualBox::unregisterMachine"/>.
5226 </note>
5227
5228 <result name="VBOX_E_INVALID_VM_STATE">
5229 Virtual machine is not mutable.
5230 </result>
5231
5232 </desc>
5233 </method>
5234
5235 <method name="deleteSettings">
5236 <desc>
5237 Deletes the settings file of this machine from disk.
5238 The machine must not be registered in order for this operation
5239 to succeed.
5240 <note>
5241 <link to="#settingsModified"/> will return @c true after this
5242 method successfully returns.
5243 </note>
5244 <note>
5245 Calling this method is only valid on instances returned
5246 by <link to="ISession::machine"/> and on new machines
5247 created by <link to="IVirtualBox::createMachine"/> or
5248 opened by <link to="IVirtualBox::openMachine"/> but not
5249 yet registered, or on unregistered machines after calling
5250 <link to="IVirtualBox::unregisterMachine"/>.
5251 </note>
5252 <note>
5253 The deleted machine settings file can be restored (saved again)
5254 by calling <link to="#saveSettings"/>.
5255 </note>
5256
5257 <result name="VBOX_E_INVALID_VM_STATE">
5258 Cannot delete settings of a registered machine or
5259 machine not mutable.
5260 </result>
5261 <result name="VBOX_E_IPRT_ERROR">
5262 Could not delete the settings file.
5263 </result>
5264
5265 </desc>
5266 </method>
5267
5268 <method name="export">
5269 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5270 steps required to export VirtualBox machines to OVF.
5271 </desc>
5272
5273 <param name="aAppliance" type="IAppliance" dir="in">
5274 <desc>Appliance to export this machine to.</desc>
5275 </param>
5276 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5277 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5278 </param>
5279 </method >
5280
5281 <method name="getSnapshot">
5282 <desc>
5283 Returns a snapshot of this machine with the given UUID.
5284 A @c null UUID can be used to obtain the first snapshot
5285 taken on this machine. This is useful if you want to traverse
5286 the whole tree of snapshots starting from the root.
5287
5288 <result name="VBOX_E_OBJECT_NOT_FOUND">
5289 Virtual machine has no snapshots or snapshot not found.
5290 </result>
5291
5292 </desc>
5293 <param name="id" type="uuid" mod="string" dir="in">
5294 <desc>UUID of the snapshot to get</desc>
5295 </param>
5296 <param name="snapshot" type="ISnapshot" dir="return">
5297 <desc>Snapshot object with the given UUID.</desc>
5298 </param>
5299 </method>
5300
5301 <method name="findSnapshot">
5302 <desc>
5303 Returns a snapshot of this machine with the given name.
5304
5305 <result name="VBOX_E_OBJECT_NOT_FOUND">
5306 Virtual machine has no snapshots or snapshot not found.
5307 </result>
5308
5309 </desc>
5310 <param name="name" type="wstring" dir="in">
5311 <desc>Name of the snapshot to find</desc>
5312 </param>
5313 <param name="snapshot" type="ISnapshot" dir="return">
5314 <desc>Snapshot object with the given name.</desc>
5315 </param>
5316 </method>
5317
5318 <method name="setCurrentSnapshot">
5319 <desc>
5320 Sets the current snapshot of this machine.
5321 <note>
5322 In the current implementation, this operation is not
5323 implemented.
5324 </note>
5325 </desc>
5326 <param name="id" type="uuid" mod="string" dir="in">
5327 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5328 </param>
5329 </method>
5330
5331 <method name="createSharedFolder">
5332 <desc>
5333 Creates a new permanent shared folder by associating the given logical
5334 name with the given host path, adds it to the collection of shared
5335 folders and starts sharing it. Refer to the description of
5336 <link to="ISharedFolder"/> to read more about logical names.
5337
5338 <result name="VBOX_E_OBJECT_IN_USE">
5339 Shared folder already exists.
5340 </result>
5341 <result name="VBOX_E_FILE_ERROR">
5342 Shared folder @a hostPath not accessible.
5343 </result>
5344
5345 </desc>
5346 <param name="name" type="wstring" dir="in">
5347 <desc>Unique logical name of the shared folder.</desc>
5348 </param>
5349 <param name="hostPath" type="wstring" dir="in">
5350 <desc>Full path to the shared folder in the host file system.</desc>
5351 </param>
5352 <param name="writable" type="boolean" dir="in">
5353 <desc>Whether the share is writable or readonly</desc>
5354 </param>
5355 </method>
5356
5357 <method name="removeSharedFolder">
5358 <desc>
5359 Removes the permanent shared folder with the given name previously
5360 created by <link to="#createSharedFolder"/> from the collection of
5361 shared folders and stops sharing it.
5362
5363 <result name="VBOX_E_INVALID_VM_STATE">
5364 Virtual machine is not mutable.
5365 </result>
5366 <result name="VBOX_E_OBJECT_NOT_FOUND">
5367 Shared folder @a name does not exist.
5368 </result>
5369
5370 </desc>
5371 <param name="name" type="wstring" dir="in">
5372 <desc>Logical name of the shared folder to remove.</desc>
5373 </param>
5374 </method>
5375
5376 <method name="canShowConsoleWindow">
5377 <desc>
5378 Returns @c true if the VM console process can activate the
5379 console window and bring it to foreground on the desktop of
5380 the host PC.
5381 <note>
5382 This method will fail if a session for this machine is not
5383 currently open.
5384 </note>
5385
5386 <result name="VBOX_E_INVALID_VM_STATE">
5387 Machine session is not open.
5388 </result>
5389
5390 </desc>
5391 <param name="canShow" type="boolean" dir="return">
5392 <desc>
5393 @c true if the console window can be shown and @c false otherwise.
5394 </desc>
5395 </param>
5396 </method>
5397
5398 <method name="showConsoleWindow">
5399 <desc>
5400 Activates the console window and brings it to foreground on
5401 the desktop of the host PC. Many modern window managers on
5402 many platforms implement some sort of focus stealing
5403 prevention logic, so that it may be impossible to activate
5404 a window without the help of the currently active
5405 application. In this case, this method will return a non-zero
5406 identifier that represents the top-level window of the VM
5407 console process. The caller, if it represents a currently
5408 active process, is responsible to use this identifier (in a
5409 platform-dependent manner) to perform actual window
5410 activation.
5411 <note>
5412 This method will fail if a session for this machine is not
5413 currently open.
5414 </note>
5415
5416 <result name="VBOX_E_INVALID_VM_STATE">
5417 Machine session is not open.
5418 </result>
5419
5420 </desc>
5421 <param name="winId" type="unsigned long long" dir="return">
5422 <desc>
5423 Platform-dependent identifier of the top-level VM console
5424 window, or zero if this method has performed all actions
5425 necessary to implement the <i>show window</i> semantics for
5426 the given platform and/or VirtualBox front-end.
5427 </desc>
5428 </param>
5429 </method>
5430
5431 <method name="getGuestProperty">
5432 <desc>
5433 Reads an entry from the machine's guest property store.
5434
5435 <result name="VBOX_E_INVALID_VM_STATE">
5436 Machine session is not open.
5437 </result>
5438
5439 </desc>
5440 <param name="name" type="wstring" dir="in">
5441 <desc>
5442 The name of the property to read.
5443 </desc>
5444 </param>
5445 <param name="value" type="wstring" dir="out">
5446 <desc>
5447 The value of the property. If the property does not exist then this
5448 will be empty.
5449 </desc>
5450 </param>
5451 <param name="timestamp" type="unsigned long long" dir="out">
5452 <desc>
5453 The time at which the property was last modified, as seen by the
5454 server process.
5455 </desc>
5456 </param>
5457 <param name="flags" type="wstring" dir="out">
5458 <desc>
5459 Additional property parameters, passed as a comma-separated list of
5460 "name=value" type entries.
5461 </desc>
5462 </param>
5463 </method>
5464
5465 <method name="getGuestPropertyValue">
5466 <desc>
5467 Reads a value from the machine's guest property store.
5468
5469 <result name="VBOX_E_INVALID_VM_STATE">
5470 Machine session is not open.
5471 </result>
5472
5473 </desc>
5474 <param name="property" type="wstring" dir="in">
5475 <desc>
5476 The name of the property to read.
5477 </desc>
5478 </param>
5479 <param name="value" type="wstring" dir="return">
5480 <desc>
5481 The value of the property. If the property does not exist then this
5482 will be empty.
5483 </desc>
5484 </param>
5485 </method>
5486
5487 <method name="getGuestPropertyTimestamp">
5488 <desc>
5489 Reads a property timestamp from the machine's guest property store.
5490
5491 <result name="VBOX_E_INVALID_VM_STATE">
5492 Machine session is not open.
5493 </result>
5494
5495 </desc>
5496 <param name="property" type="wstring" dir="in">
5497 <desc>
5498 The name of the property to read.
5499 </desc>
5500 </param>
5501 <param name="value" type="unsigned long long" dir="return">
5502 <desc>
5503 The timestamp. If the property does not exist then this will be
5504 empty.
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="setGuestProperty">
5510 <desc>
5511 Sets, changes or deletes an entry in the machine's guest property
5512 store.
5513
5514 <result name="E_ACCESSDENIED">
5515 Property cannot be changed.
5516 </result>
5517 <result name="E_INVALIDARG">
5518 Invalid @a flags.
5519 </result>
5520 <result name="VBOX_E_INVALID_VM_STATE">
5521 Virtual machine is not mutable or session not open.
5522 </result>
5523 <result name="VBOX_E_INVALID_OBJECT_STATE">
5524 Cannot set transient property when machine not running.
5525 </result>
5526
5527 </desc>
5528 <param name="property" type="wstring" dir="in">
5529 <desc>
5530 The name of the property to set, change or delete.
5531 </desc>
5532 </param>
5533 <param name="value" type="wstring" dir="in">
5534 <desc>
5535 The new value of the property to set, change or delete. If the
5536 property does not yet exist and value is non-empty, it will be
5537 created. If the value is @c null or empty, the property will be
5538 deleted if it exists.
5539 </desc>
5540 </param>
5541 <param name="flags" type="wstring" dir="in">
5542 <desc>
5543 Additional property parameters, passed as a comma-separated list of
5544 "name=value" type entries.
5545 </desc>
5546 </param>
5547 </method>
5548
5549 <method name="setGuestPropertyValue">
5550 <desc>
5551 Sets, changes or deletes a value in the machine's guest property
5552 store. The flags field will be left unchanged or created empty for a
5553 new property.
5554
5555 <result name="E_ACCESSDENIED">
5556 Property cannot be changed.
5557 </result>
5558 <result name="VBOX_E_INVALID_VM_STATE">
5559 Virtual machine is not mutable or session not open.
5560 </result>
5561 <result name="VBOX_E_INVALID_OBJECT_STATE">
5562 Cannot set transient property when machine not running.
5563 </result>
5564 </desc>
5565
5566 <param name="property" type="wstring" dir="in">
5567 <desc>
5568 The name of the property to set, change or delete.
5569 </desc>
5570 </param>
5571 <param name="value" type="wstring" dir="in">
5572 <desc>
5573 The new value of the property to set, change or delete. If the
5574 property does not yet exist and value is non-empty, it will be
5575 created. If the value is @c null or empty, the property will be
5576 deleted if it exists.
5577 </desc>
5578 </param>
5579 </method>
5580
5581 <method name="enumerateGuestProperties">
5582 <desc>
5583 Return a list of the guest properties matching a set of patterns along
5584 with their values, time stamps and flags.
5585 </desc>
5586 <param name="patterns" type="wstring" dir="in">
5587 <desc>
5588 The patterns to match the properties against, separated by '|'
5589 characters. If this is empty or @c null, all properties will match.
5590 </desc>
5591 </param>
5592 <param name="name" type="wstring" dir="out" safearray="yes">
5593 <desc>
5594 The names of the properties returned.
5595 </desc>
5596 </param>
5597 <param name="value" type="wstring" dir="out" safearray="yes">
5598 <desc>
5599 The values of the properties returned. The array entries match the
5600 corresponding entries in the @a name array.
5601 </desc>
5602 </param>
5603 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5604 <desc>
5605 The time stamps of the properties returned. The array entries match
5606 the corresponding entries in the @a name array.
5607 </desc>
5608 </param>
5609 <param name="flags" type="wstring" dir="out" safearray="yes">
5610 <desc>
5611 The flags of the properties returned. The array entries match the
5612 corresponding entries in the @a name array.
5613 </desc>
5614 </param>
5615 </method>
5616</interface>
5617
5618 <!--
5619 // IConsole
5620 /////////////////////////////////////////////////////////////////////////
5621 -->
5622
5623 <interface
5624 name="IConsoleCallback" extends="$unknown"
5625 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5626 wsmap="suppress"
5627 >
5628
5629 <desc>
5630 This interface is used by a client of the Main API that need to
5631 be notified of events. For example, a graphical user interface
5632 can use this to learn about machine state changes so they can
5633 update the list of virtual machines without having to rely
5634 on polling.
5635
5636 Whenever relevant events occur in VirtualBox, the callbacks in
5637 objects of this interface are called. In order for this to be
5638 useful, a client needs to create its own subclass that implements
5639 this interface in which the methods for the relevant callbacks
5640 are overridden. An instance of this subclass interface can then
5641 be passed to <link to="IConsole::registerCallback" />.
5642 </desc>
5643
5644 <method name="onMousePointerShapeChange">
5645 <desc>
5646 Notification when the guest mouse pointer shape has
5647 changed. The new shape data is given.
5648 </desc>
5649 <param name="visible" type="boolean" dir="in">
5650 <desc>
5651 Flag whether the pointer is visible.
5652 </desc>
5653 </param>
5654 <param name="alpha" type="boolean" dir="in">
5655 <desc>
5656 Flag whether the pointer has an alpha channel.
5657 </desc>
5658 </param>
5659 <param name="xHot" type="unsigned long" dir="in">
5660 <desc>
5661 The pointer hot spot x coordinate.
5662 </desc>
5663 </param>
5664 <param name="yHot" type="unsigned long" dir="in">
5665 <desc>
5666 The pointer hot spot y coordinate.
5667 </desc>
5668 </param>
5669 <param name="width" type="unsigned long" dir="in">
5670 <desc>
5671 Width of the pointer shape in pixels.
5672 </desc>
5673 </param>
5674 <param name="height" type="unsigned long" dir="in">
5675 <desc>
5676 Height of the pointer shape in pixels.
5677 </desc>
5678 </param>
5679 <param name="shape" type="octet" mod="ptr" dir="in">
5680 <desc>
5681 Address of the shape buffer.
5682
5683 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5684 followed by a 32-bpp XOR (color) mask.
5685
5686 For pointers without alpha channel the XOR mask pixels are 32
5687 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5688 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5689
5690 An AND mask is used for pointers with alpha channel, so if the
5691 callback does not support alpha, the pointer could be
5692 displayed as a normal color pointer.
5693
5694 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5695 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5696 height</tt>. The padding bits at the end of each scanline are
5697 undefined.
5698
5699 The XOR mask follows the AND mask on the next 4-byte aligned
5700 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5701 Bytes in the gap between the AND and the XOR mask are undefined.
5702 The XOR mask scanlines have no gap between them and the size of
5703 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5704
5705 <note>
5706 If @a shape is 0, only the pointer visibility is changed.
5707 </note>
5708 </desc>
5709 </param>
5710 </method>
5711
5712 <method name="onMouseCapabilityChange">
5713 <desc>
5714 Notification when the mouse capabilities reported by the
5715 guest have changed. The new capabilities are passed.
5716 </desc>
5717 <param name="supportsAbsolute" type="boolean" dir="in"/>
5718 <param name="needsHostCursor" type="boolean" dir="in"/>
5719 </method>
5720
5721 <method name="onKeyboardLedsChange">
5722 <desc>
5723 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5724 to alter the state of the keyboard LEDs.
5725 </desc>
5726 <param name="numLock" type="boolean" dir="in"/>
5727 <param name="capsLock" type="boolean" dir="in"/>
5728 <param name="scrollLock" type="boolean" dir="in"/>
5729 </method>
5730
5731 <method name="onStateChange">
5732 <desc>
5733 Notification when the execution state of the machine has changed.
5734 The new state will be given.
5735 </desc>
5736 <param name="state" type="MachineState" dir="in"/>
5737 </method>
5738
5739 <method name="onAdditionsStateChange">
5740 <desc>
5741 Notification when a Guest Additions property changes.
5742 Interested callees should query IGuest attributes to
5743 find out what has changed.
5744 </desc>
5745 </method>
5746
5747 <method name="onNetworkAdapterChange">
5748 <desc>
5749 Notification when a property of one of the
5750 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5751 changes. Interested callees should use INetworkAdapter methods and
5752 attributes to find out what has changed.
5753 </desc>
5754 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5755 <desc>Network adapter that is subject to change.</desc>
5756 </param>
5757 </method>
5758
5759 <method name="onSerialPortChange">
5760 <desc>
5761 Notification when a property of one of the
5762 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5763 Interested callees should use ISerialPort methods and attributes
5764 to find out what has changed.
5765 </desc>
5766 <param name="serialPort" type="ISerialPort" dir="in">
5767 <desc>Serial port that is subject to change.</desc>
5768 </param>
5769 </method>
5770
5771 <method name="onParallelPortChange">
5772 <desc>
5773 Notification when a property of one of the
5774 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5775 changes. Interested callees should use ISerialPort methods and
5776 attributes to find out what has changed.
5777 </desc>
5778 <param name="parallelPort" type="IParallelPort" dir="in">
5779 <desc>Parallel port that is subject to change.</desc>
5780 </param>
5781 </method>
5782
5783 <method name="onStorageControllerChange">
5784 <desc>
5785 Notification when a property of one of the
5786 virtual <link to="IMachine::storageControllers">storage controllers</link>
5787 changes. Interested callees should query the corresponding collections
5788 to find out what has changed.
5789 </desc>
5790 </method>
5791
5792 <method name="onMediumChange">
5793 <desc>
5794 Notification when a
5795 <link to="IMachine::mediumAttachments">medium attachment</link>
5796 changes.
5797 </desc>
5798 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5799 <desc>Medium attachment that is subject to change.</desc>
5800 </param>
5801 </method>
5802
5803 <method name="onVRDPServerChange">
5804 <desc>
5805 Notification when a property of the
5806 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5807 Interested callees should use IVRDPServer methods and attributes to
5808 find out what has changed.
5809 </desc>
5810 </method>
5811
5812 <method name="onRemoteDisplayInfoChange">
5813 <desc>
5814 Notification when the status of the VRDP server changes. Interested callees
5815 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5816 attributes to find out what is the current status.
5817 </desc>
5818 </method>
5819
5820 <method name="onUSBControllerChange">
5821 <desc>
5822 Notification when a property of the virtual
5823 <link to="IMachine::USBController">USB controller</link> changes.
5824 Interested callees should use IUSBController methods and attributes to
5825 find out what has changed.
5826 </desc>
5827 </method>
5828
5829 <method name="onUSBDeviceStateChange">
5830 <desc>
5831 Notification when a USB device is attached to or detached from
5832 the virtual USB controller.
5833
5834 This notification is sent as a result of the indirect
5835 request to attach the device because it matches one of the
5836 machine USB filters, or as a result of the direct request
5837 issued by <link to="IConsole::attachUSBDevice"/> or
5838 <link to="IConsole::detachUSBDevice"/>.
5839
5840 This notification is sent in case of both a succeeded and a
5841 failed request completion. When the request succeeds, the
5842 @a error parameter is @c null, and the given device has been
5843 already added to (when @a attached is @c true) or removed from
5844 (when @a attached is @c false) the collection represented by
5845 <link to="IConsole::USBDevices"/>. On failure, the collection
5846 doesn't change and the @a error parameter represents the error
5847 message describing the failure.
5848
5849 </desc>
5850 <param name="device" type="IUSBDevice" dir="in">
5851 <desc>Device that is subject to state change.</desc>
5852 </param>
5853 <param name="attached" type="boolean" dir="in">
5854 <desc>
5855 @c true if the device was attached and @c false otherwise.
5856 </desc>
5857 </param>
5858 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5859 <desc>
5860 @c null on success or an error message object on failure.
5861 </desc>
5862 </param>
5863 </method>
5864
5865 <method name="onSharedFolderChange">
5866 <desc>
5867 Notification when a shared folder is added or removed.
5868 The @a scope argument defines one of three scopes:
5869 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5870 (<link to="Scope_Global">Global</link>),
5871 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5872 the machine (<link to="Scope_Machine">Machine</link>) or <link
5873 to="IConsole::sharedFolders">transient shared folders</link> of the
5874 machine (<link to="Scope_Session">Session</link>). Interested callees
5875 should use query the corresponding collections to find out what has
5876 changed.
5877 </desc>
5878 <param name="scope" type="Scope" dir="in">
5879 <desc>Scope of the notification.</desc>
5880 </param>
5881 </method>
5882
5883 <method name="onRuntimeError">
5884 <desc>
5885 Notification when an error happens during the virtual
5886 machine execution.
5887
5888 There are three kinds of runtime errors:
5889 <ul>
5890 <li><i>fatal</i></li>
5891 <li><i>non-fatal with retry</i></li>
5892 <li><i>non-fatal warnings</i></li>
5893 </ul>
5894
5895 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5896 to @c true. In case of fatal errors, the virtual machine
5897 execution is always paused before calling this notification, and
5898 the notification handler is supposed either to immediately save
5899 the virtual machine state using <link to="IConsole::saveState"/>
5900 or power it off using <link to="IConsole::powerDown"/>.
5901 Resuming the execution can lead to unpredictable results.
5902
5903 <b>Non-fatal</b> errors and warnings are indicated by the
5904 @a fatal parameter set to @c false. If the virtual machine
5905 is in the Paused state by the time the error notification is
5906 received, it means that the user can <i>try to resume</i> the machine
5907 execution after attempting to solve the problem that caused the
5908 error. In this case, the notification handler is supposed
5909 to show an appropriate message to the user (depending on the
5910 value of the @a id parameter) that offers several actions such
5911 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5912 wants to retry, the notification handler should continue
5913 the machine execution using the <link to="IConsole::resume"/>
5914 call. If the machine execution is not Paused during this
5915 notification, then it means this notification is a <i>warning</i>
5916 (for example, about a fatal condition that can happen very soon);
5917 no immediate action is required from the user, the machine
5918 continues its normal execution.
5919
5920 Note that in either case the notification handler
5921 <b>must not</b> perform any action directly on a thread
5922 where this notification is called. Everything it is allowed to
5923 do is to post a message to another thread that will then talk
5924 to the user and take the corresponding action.
5925
5926 Currently, the following error identifiers are known:
5927 <ul>
5928 <li><tt>"HostMemoryLow"</tt></li>
5929 <li><tt>"HostAudioNotResponding"</tt></li>
5930 <li><tt>"VDIStorageFull"</tt></li>
5931 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5932 </ul>
5933
5934 <note>
5935 This notification is not designed to be implemented by
5936 more than one callback at a time. If you have multiple
5937 IConsoleCallback instances registered on the given
5938 IConsole object, make sure you simply do nothing but
5939 return @c S_OK from all but one of them that does actual
5940 user notification and performs necessary actions.
5941 </note>
5942
5943 </desc>
5944 <param name="fatal" type="boolean" dir="in">
5945 <desc>Whether the error is fatal or not</desc>
5946 </param>
5947 <param name="id" type="wstring" dir="in">
5948 <desc>Error identifier</desc>
5949 </param>
5950 <param name="message" type="wstring" dir="in">
5951 <desc>Optional error message</desc>
5952 </param>
5953 </method>
5954
5955 <method name="onCanShowWindow">
5956 <desc>
5957 Notification when a call to
5958 <link to="IMachine::canShowConsoleWindow"/> is made by a
5959 front-end to check if a subsequent call to
5960 <link to="IMachine::showConsoleWindow"/> can succeed.
5961
5962 The callee should give an answer appropriate to the current
5963 machine state in the @a canShow argument. This answer must
5964 remain valid at least until the next
5965 <link to="IConsole::state">machine state</link> change.
5966
5967 <note>
5968 This notification is not designed to be implemented by
5969 more than one callback at a time. If you have multiple
5970 IConsoleCallback instances registered on the given
5971 IConsole object, make sure you simply do nothing but
5972 return @c true and @c S_OK from all but one of them that
5973 actually manages console window activation.
5974 </note>
5975 </desc>
5976 <param name="canShow" type="boolean" dir="return">
5977 <desc>
5978 @c true if the console window can be shown and @c false otherwise.
5979 </desc>
5980 </param>
5981 </method>
5982
5983 <method name="onShowWindow">
5984 <desc>
5985 Notification when a call to
5986 <link to="IMachine::showConsoleWindow"/>
5987 requests the console window to be activated and brought to
5988 foreground on the desktop of the host PC.
5989
5990 This notification should cause the VM console process to
5991 perform the requested action as described above. If it is
5992 impossible to do it at a time of this notification, this
5993 method should return a failure.
5994
5995 Note that many modern window managers on many platforms
5996 implement some sort of focus stealing prevention logic, so
5997 that it may be impossible to activate a window without the
5998 help of the currently active application (which is supposedly
5999 an initiator of this notification). In this case, this method
6000 must return a non-zero identifier that represents the
6001 top-level window of the VM console process. The caller, if it
6002 represents a currently active process, is responsible to use
6003 this identifier (in a platform-dependent manner) to perform
6004 actual window activation.
6005
6006 This method must set @a winId to zero if it has performed all
6007 actions necessary to complete the request and the console
6008 window is now active and in foreground, to indicate that no
6009 further action is required on the caller's side.
6010
6011 <note>
6012 This notification is not designed to be implemented by
6013 more than one callback at a time. If you have multiple
6014 IConsoleCallback instances registered on the given
6015 IConsole object, make sure you simply do nothing but
6016 return @c S_OK from all but one of them that actually
6017 manages console window activation.
6018 </note>
6019 </desc>
6020 <param name="winId" type="unsigned long long" dir="return">
6021 <desc>
6022 Platform-dependent identifier of the top-level VM console
6023 window, or zero if this method has performed all actions
6024 necessary to implement the <i>show window</i> semantics for
6025 the given platform and/or this VirtualBox front-end.
6026 </desc>
6027 </param>
6028 </method>
6029
6030 </interface>
6031
6032 <interface
6033 name="IRemoteDisplayInfo" extends="$unknown"
6034 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6035 wsmap="struct"
6036 >
6037 <desc>
6038 Contains information about the remote display (VRDP) capabilities and status.
6039 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6040 </desc>
6041
6042 <attribute name="active" type="boolean" readonly="yes">
6043 <desc>
6044 Whether the remote display connection is active.
6045 </desc>
6046 </attribute>
6047
6048 <attribute name="port" type="long" readonly="yes">
6049 <desc>
6050 VRDP server port number. If this property is equal to <tt>0</tt>, then
6051 the VRDP server failed to start, usually because there are no free TCP
6052 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6053 server has not yet been started.
6054 </desc>
6055 </attribute>
6056
6057 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6058 <desc>
6059 How many times a client connected.
6060 </desc>
6061 </attribute>
6062
6063 <attribute name="beginTime" type="long long" readonly="yes">
6064 <desc>
6065 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6066 </desc>
6067 </attribute>
6068
6069 <attribute name="endTime" type="long long" readonly="yes">
6070 <desc>
6071 When the last connection was terminated or the current time, if
6072 connection is still active, in milliseconds since 1970-01-01 UTC.
6073 </desc>
6074 </attribute>
6075
6076 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6077 <desc>
6078 How many bytes were sent in last or current, if still active, connection.
6079 </desc>
6080 </attribute>
6081
6082 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6083 <desc>
6084 How many bytes were sent in all connections.
6085 </desc>
6086 </attribute>
6087
6088 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6089 <desc>
6090 How many bytes were received in last or current, if still active, connection.
6091 </desc>
6092 </attribute>
6093
6094 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6095 <desc>
6096 How many bytes were received in all connections.
6097 </desc>
6098 </attribute>
6099
6100 <attribute name="user" type="wstring" readonly="yes">
6101 <desc>
6102 Login user name supplied by the client.
6103 </desc>
6104 </attribute>
6105
6106 <attribute name="domain" type="wstring" readonly="yes">
6107 <desc>
6108 Login domain name supplied by the client.
6109 </desc>
6110 </attribute>
6111
6112 <attribute name="clientName" type="wstring" readonly="yes">
6113 <desc>
6114 The client name supplied by the client.
6115 </desc>
6116 </attribute>
6117
6118 <attribute name="clientIP" type="wstring" readonly="yes">
6119 <desc>
6120 The IP address of the client.
6121 </desc>
6122 </attribute>
6123
6124 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6125 <desc>
6126 The client software version number.
6127 </desc>
6128 </attribute>
6129
6130 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6131 <desc>
6132 Public key exchange method used when connection was established.
6133 Values: 0 - RDP4 public key exchange scheme.
6134 1 - X509 certificates were sent to client.
6135 </desc>
6136 </attribute>
6137
6138 </interface>
6139
6140 <interface
6141 name="IConsole" extends="$unknown"
6142 uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
6143 wsmap="managed"
6144 >
6145 <desc>
6146 The IConsole interface represents an interface to control virtual
6147 machine execution.
6148
6149 The console object that implements the IConsole interface is obtained
6150 from a session object after the session for the given machine has been
6151 opened using one of <link to="IVirtualBox::openSession"/>,
6152 <link to="IVirtualBox::openRemoteSession"/> or
6153 <link to="IVirtualBox::openExistingSession"/> methods.
6154
6155 Methods of the IConsole interface allow the caller to query the current
6156 virtual machine execution state, pause the machine or power it down, save
6157 the machine state or take a snapshot, attach and detach removable media
6158 and so on.
6159
6160 <see>ISession</see>
6161 </desc>
6162
6163 <attribute name="machine" type="IMachine" readonly="yes">
6164 <desc>
6165 Machine object this console is sessioned with.
6166 <note>
6167 This is a convenience property, it has the same value as
6168 <link to="ISession::machine"/> of the corresponding session
6169 object.
6170 </note>
6171 </desc>
6172 </attribute>
6173
6174 <attribute name="state" type="MachineState" readonly="yes">
6175 <desc>
6176 Current execution state of the machine.
6177 <note>
6178 This property always returns the same value as the corresponding
6179 property of the IMachine object this console is sessioned with.
6180 For the process that owns (executes) the VM, this is the
6181 preferable way of querying the VM state, because no IPC
6182 calls are made.
6183 </note>
6184 </desc>
6185 </attribute>
6186
6187 <attribute name="guest" type="IGuest" readonly="yes">
6188 <desc>Guest object.</desc>
6189 </attribute>
6190
6191 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6192 <desc>
6193 Virtual keyboard object.
6194 <note>
6195 If the machine is not running, any attempt to use
6196 the returned object will result in an error.
6197 </note>
6198 </desc>
6199 </attribute>
6200
6201 <attribute name="mouse" type="IMouse" readonly="yes">
6202 <desc>
6203 Virtual mouse object.
6204 <note>
6205 If the machine is not running, any attempt to use
6206 the returned object will result in an error.
6207 </note>
6208 </desc>
6209 </attribute>
6210
6211 <attribute name="display" type="IDisplay" readonly="yes">
6212 <desc>Virtual display object.
6213 <note>
6214 If the machine is not running, any attempt to use
6215 the returned object will result in an error.
6216 </note>
6217 </desc>
6218 </attribute>
6219
6220 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6221 <desc>Debugging interface.</desc>
6222 </attribute>
6223
6224 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6225 <desc>
6226 Collection of USB devices currently attached to the virtual
6227 USB controller.
6228 <note>
6229 The collection is empty if the machine is not running.
6230 </note>
6231 </desc>
6232 </attribute>
6233
6234 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6235 <desc>
6236 List of USB devices currently attached to the remote VRDP client.
6237 Once a new device is physically attached to the remote host computer,
6238 it appears in this list and remains there until detached.
6239 </desc>
6240 </attribute>
6241
6242 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6243 <desc>
6244 Collection of shared folders for the current session. These folders
6245 are called transient shared folders because they are available to the
6246 guest OS running inside the associated virtual machine only for the
6247 duration of the session (as opposed to
6248 <link to="IMachine::sharedFolders"/> which represent permanent shared
6249 folders). When the session is closed (e.g. the machine is powered down),
6250 these folders are automatically discarded.
6251
6252 New shared folders are added to the collection using
6253 <link to="#createSharedFolder"/>. Existing shared folders can be
6254 removed using <link to="#removeSharedFolder"/>.
6255 </desc>
6256 </attribute>
6257
6258 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6259 <desc>
6260 Interface that provides information on Remote Display (VRDP) connection.
6261 </desc>
6262 </attribute>
6263
6264 <method name="powerUp">
6265 <desc>
6266 Starts the virtual machine execution using the current machine
6267 state (that is, its current execution state, current settings and
6268 current storage devices).
6269
6270 If the machine is powered off or aborted, the execution will
6271 start from the beginning (as if the real hardware were just
6272 powered on).
6273
6274 If the machine is in the <link to="MachineState_Saved"/> state,
6275 it will continue its execution the point where the state has
6276 been saved.
6277
6278 <note>
6279 Unless you are trying to write a new VirtualBox front-end that
6280 performs direct machine execution (like the VirtualBox or VBoxSDL
6281 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6282 session opened by <link to="IVirtualBox::openSession"/> and use this
6283 session only to change virtual machine settings. If you simply want to
6284 start virtual machine execution using one of the existing front-ends
6285 (for example the VirtualBox GUI or headless server), simply use
6286 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6287 power up the machine automatically for you.
6288 </note>
6289
6290 <see>#saveState</see>
6291 <result name="VBOX_E_INVALID_VM_STATE">
6292 Virtual machine already running.
6293 </result>
6294 <result name="VBOX_E_HOST_ERROR">
6295 Host interface does not exist or name not set.
6296 </result>
6297 <result name="VBOX_E_FILE_ERROR">
6298 Invalid saved state file.
6299 </result>
6300 </desc>
6301 <param name="progress" type="IProgress" dir="return">
6302 <desc>Progress object to track the operation completion.</desc>
6303 </param>
6304 </method>
6305
6306 <method name="powerUpPaused">
6307 <desc>
6308 Identical to powerUp except that the VM will enter the
6309 <link to="MachineState_Paused"/> state, instead of
6310 <link to="MachineState_Running"/>.
6311
6312 <see>#powerUp</see>
6313 <result name="VBOX_E_INVALID_VM_STATE">
6314 Virtual machine already running.
6315 </result>
6316 <result name="VBOX_E_HOST_ERROR">
6317 Host interface does not exist or name not set.
6318 </result>
6319 <result name="VBOX_E_FILE_ERROR">
6320 Invalid saved state file.
6321 </result>
6322 </desc>
6323 <param name="progress" type="IProgress" dir="return">
6324 <desc>Progress object to track the operation completion.</desc>
6325 </param>
6326 </method>
6327
6328 <method name="powerDown">
6329 <desc>
6330 Initiates the power down procedure to stop the virtual machine
6331 execution.
6332
6333 The completion of the power down procedure is tracked using the returned
6334 IProgress object. After the operation is complete, the machine will go
6335 to the PoweredOff state.
6336 <result name="VBOX_E_INVALID_VM_STATE">
6337 Virtual machine must be Running, Paused or Stuck to be powered down.
6338 </result>
6339 </desc>
6340 <param name="progress" type="IProgress" dir="return">
6341 <desc>Progress object to track the operation completion.</desc>
6342 </param>
6343 </method>
6344
6345 <method name="reset">
6346 <desc>Resets the virtual machine.
6347 <result name="VBOX_E_INVALID_VM_STATE">
6348 Virtual machine not in Running state.
6349 </result>
6350 <result name="VBOX_E_VM_ERROR">
6351 Virtual machine error in reset operation.
6352 </result>
6353 </desc>
6354 </method>
6355
6356 <method name="pause">
6357 <desc>Pauses the virtual machine execution.
6358 <result name="VBOX_E_INVALID_VM_STATE">
6359 Virtual machine not in Running state.
6360 </result>
6361 <result name="VBOX_E_VM_ERROR">
6362 Virtual machine error in suspend operation.
6363 </result>
6364 </desc>
6365 </method>
6366
6367 <method name="resume">
6368 <desc>Resumes the virtual machine execution.
6369 <result name="VBOX_E_INVALID_VM_STATE">
6370 Virtual machine not in Paused state.
6371 </result>
6372 <result name="VBOX_E_VM_ERROR">
6373 Virtual machine error in resume operation.
6374 </result>
6375 </desc>
6376 </method>
6377
6378 <method name="powerButton">
6379 <desc>Sends the ACPI power button event to the guest.
6380 <result name="VBOX_E_INVALID_VM_STATE">
6381 Virtual machine not in Running state.
6382 </result>
6383 <result name="VBOX_E_PDM_ERROR">
6384 Controlled power off failed.
6385 </result>
6386 </desc>
6387 </method>
6388
6389 <method name="sleepButton">
6390 <desc>Sends the ACPI sleep button event to the guest.
6391 <result name="VBOX_E_INVALID_VM_STATE">
6392 Virtual machine not in Running state.
6393 </result>
6394 <result name="VBOX_E_PDM_ERROR">
6395 Sending sleep button event failed.
6396 </result>
6397 </desc>
6398 </method>
6399
6400 <method name="getPowerButtonHandled">
6401 <desc>Checks if the last power button event was handled by guest.
6402 <result name="VBOX_E_PDM_ERROR">
6403 Checking if the event was handled by the guest OS failed.
6404 </result>
6405 </desc>
6406 <param name="handled" type="boolean" dir="return"/>
6407 </method>
6408
6409 <method name="getGuestEnteredACPIMode">
6410 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6411 G1 (sleeping). If this method returns @c false, the guest will
6412 most likely not respond to external ACPI events.
6413 <result name="VBOX_E_INVALID_VM_STATE">
6414 Virtual machine not in Running state.
6415 </result>
6416 </desc>
6417 <param name="entered" type="boolean" dir="return"/>
6418 </method>
6419
6420 <method name="saveState">
6421 <desc>
6422 Saves the current execution state of a running virtual machine
6423 and stops its execution.
6424
6425 After this operation completes, the machine will go to the
6426 Saved state. Next time it is powered up, this state will
6427 be restored and the machine will continue its execution from
6428 the place where it was saved.
6429
6430 This operation differs from taking a snapshot to the effect
6431 that it doesn't create new differencing media. Also, once
6432 the machine is powered up from the state saved using this method,
6433 the saved state is deleted, so it will be impossible to return
6434 to this state later.
6435
6436 <note>
6437 On success, this method implicitly calls
6438 <link to="IMachine::saveSettings"/> to save all current machine
6439 settings (including runtime changes to the DVD medium, etc.).
6440 Together with the impossibility to change any VM settings when it is
6441 in the Saved state, this guarantees adequate hardware
6442 configuration of the machine when it is restored from the saved
6443 state file.
6444 </note>
6445
6446 <note>
6447 The machine must be in the Running or Paused state, otherwise
6448 the operation will fail.
6449 </note>
6450 <result name="VBOX_E_INVALID_VM_STATE">
6451 Virtual machine state neither Running nor Paused.
6452 </result>
6453 <result name="VBOX_E_FILE_ERROR">
6454 Failed to create directory for saved state file.
6455 </result>
6456
6457 <see><link to="#takeSnapshot"/></see>
6458 </desc>
6459 <param name="progress" type="IProgress" dir="return">
6460 <desc>Progress object to track the operation completion.</desc>
6461 </param>
6462 </method>
6463
6464 <method name="adoptSavedState">
6465 <desc>
6466 Associates the given saved state file to the virtual machine.
6467
6468 On success, the machine will go to the Saved state. Next time it is
6469 powered up, it will be restored from the adopted saved state and
6470 continue execution from the place where the saved state file was
6471 created.
6472
6473 The specified saved state file path may be absolute or relative to the
6474 folder the VM normally saves the state to (usually,
6475 <link to="IMachine::snapshotFolder"/>).
6476
6477 <note>
6478 It's a caller's responsibility to make sure the given saved state
6479 file is compatible with the settings of this virtual machine that
6480 represent its virtual hardware (memory size, storage disk configuration
6481 etc.). If there is a mismatch, the behavior of the virtual machine
6482 is undefined.
6483 </note>
6484 <result name="VBOX_E_INVALID_VM_STATE">
6485 Virtual machine state neither PoweredOff nor Aborted.
6486 </result>
6487 </desc>
6488 <param name="savedStateFile" type="wstring" dir="in">
6489 <desc>Path to the saved state file to adopt.</desc>
6490 </param>
6491 </method>
6492
6493 <method name="forgetSavedState">
6494 <desc>
6495 Forgets the saved state of the virtual machine previously created
6496 by <link to="#saveState"/>. Next time the machine is powered up, a
6497 clean boot will occur. If @a remove is @c true the saved state file
6498 is deleted.
6499 <note>
6500 This operation is equivalent to resetting or powering off
6501 the machine without doing a proper shutdown in the guest OS.
6502 </note>
6503 <result name="VBOX_E_INVALID_VM_STATE">
6504 Virtual machine not in state Saved.
6505 </result>
6506 </desc>
6507 <param name="remove" type="boolean" dir="in">
6508 <desc>If @c true remove the saved state file.</desc>
6509 </param>
6510 </method>
6511
6512 <method name="getDeviceActivity">
6513 <desc>
6514 Gets the current activity type of a given device or device group.
6515 <result name="E_INVALIDARG">
6516 Invalid device type.
6517 </result>
6518 </desc>
6519 <param name="type" type="DeviceType" dir="in"/>
6520 <param name="activity" type="DeviceActivity" dir="return"/>
6521 </method>
6522
6523 <method name="attachUSBDevice">
6524 <desc>
6525 Attaches a host USB device with the given UUID to the
6526 USB controller of the virtual machine.
6527
6528 The device needs to be in one of the following states:
6529 <link to="USBDeviceState_Busy"/>,
6530 <link to="USBDeviceState_Available"/> or
6531 <link to="USBDeviceState_Held"/>,
6532 otherwise an error is immediately returned.
6533
6534 When the device state is
6535 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6536 be returned if the host computer refuses to release it for some reason.
6537
6538 <see>IUSBController::deviceFilters, USBDeviceState</see>
6539 <result name="VBOX_E_INVALID_VM_STATE">
6540 Virtual machine state neither Running nor Paused.
6541 </result>
6542 <result name="VBOX_E_PDM_ERROR">
6543 Virtual machine does not have a USB controller.
6544 </result>
6545 </desc>
6546 <param name="id" type="uuid" mod="string" dir="in">
6547 <desc>UUID of the host USB device to attach.</desc>
6548 </param>
6549 </method>
6550
6551 <method name="detachUSBDevice">
6552 <desc>
6553 Detaches an USB device with the given UUID from the USB controller
6554 of the virtual machine.
6555
6556 After this method succeeds, the VirtualBox server re-initiates
6557 all USB filters as if the device were just physically attached
6558 to the host, but filters of this machine are ignored to avoid
6559 a possible automatic re-attachment.
6560
6561 <see>IUSBController::deviceFilters, USBDeviceState</see>
6562
6563 <result name="VBOX_E_PDM_ERROR">
6564 Virtual machine does not have a USB controller.
6565 </result>
6566 <result name="E_INVALIDARG">
6567 USB device not attached to this virtual machine.
6568 </result>
6569 </desc>
6570 <param name="id" type="uuid" mod="string" dir="in">
6571 <desc>UUID of the USB device to detach.</desc>
6572 </param>
6573 <param name="device" type="IUSBDevice" dir="return">
6574 <desc>Detached USB device.</desc>
6575 </param>
6576 </method>
6577
6578 <method name="findUSBDeviceByAddress">
6579 <desc>
6580 Searches for a USB device with the given host address.
6581
6582 <result name="VBOX_E_OBJECT_NOT_FOUND">
6583 Given @c name does not correspond to any USB device.
6584 </result>
6585
6586 <see>IUSBDevice::address</see>
6587 </desc>
6588 <param name="name" type="wstring" dir="in">
6589 <desc>
6590 Address of the USB device (as assigned by the host) to
6591 search for.
6592 </desc>
6593 </param>
6594 <param name="device" type="IUSBDevice" dir="return">
6595 <desc>Found USB device object.</desc>
6596 </param>
6597 </method>
6598
6599 <method name="findUSBDeviceById">
6600 <desc>
6601 Searches for a USB device with the given UUID.
6602
6603 <result name="VBOX_E_OBJECT_NOT_FOUND">
6604 Given @c id does not correspond to any USB device.
6605 </result>
6606
6607 <see>IUSBDevice::id</see>
6608 </desc>
6609 <param name="id" type="uuid" mod="string" dir="in">
6610 <desc>UUID of the USB device to search for.</desc>
6611 </param>
6612 <param name="device" type="IUSBDevice" dir="return">
6613 <desc>Found USB device object.</desc>
6614 </param>
6615 </method>
6616
6617 <method name="createSharedFolder">
6618 <desc>
6619 Creates a transient new shared folder by associating the given logical
6620 name with the given host path, adds it to the collection of shared
6621 folders and starts sharing it. Refer to the description of
6622 <link to="ISharedFolder"/> to read more about logical names.
6623
6624 <result name="VBOX_E_INVALID_VM_STATE">
6625 Virtual machine in Saved state or currently changing state.
6626 </result>
6627 <result name="VBOX_E_FILE_ERROR">
6628 Shared folder already exists or not accessible.
6629 </result>
6630 </desc>
6631 <param name="name" type="wstring" dir="in">
6632 <desc>Unique logical name of the shared folder.</desc>
6633 </param>
6634 <param name="hostPath" type="wstring" dir="in">
6635 <desc>Full path to the shared folder in the host file system.</desc>
6636 </param>
6637 <param name="writable" type="boolean" dir="in">
6638 <desc>Whether the share is writable or readonly</desc>
6639 </param>
6640 </method>
6641
6642 <method name="removeSharedFolder">
6643 <desc>
6644 Removes a transient shared folder with the given name previously
6645 created by <link to="#createSharedFolder"/> from the collection of
6646 shared folders and stops sharing it.
6647 <result name="VBOX_E_INVALID_VM_STATE">
6648 Virtual machine in Saved state or currently changing state.
6649 </result>
6650 <result name="VBOX_E_FILE_ERROR">
6651 Shared folder does not exists.
6652 </result>
6653 </desc>
6654 <param name="name" type="wstring" dir="in">
6655 <desc>Logical name of the shared folder to remove.</desc>
6656 </param>
6657 </method>
6658
6659 <method name="takeSnapshot">
6660 <desc>
6661 Saves the current execution state
6662 and all settings of the machine and creates differencing images
6663 for all normal (non-independent) media.
6664 See <link to="ISnapshot" /> for an introduction to snapshots.
6665
6666 This method can be called for a PoweredOff, Saved (see
6667 <link to="#saveState"/>), Running or
6668 Paused virtual machine. When the machine is PoweredOff, an
6669 offline snapshot is created. When the machine is Running a live
6670 snapshot is created, and an online snapshot is is created when Paused.
6671
6672 The taken snapshot is always based on the
6673 <link to="IMachine::currentSnapshot">current snapshot</link>
6674 of the associated virtual machine and becomes a new current snapshot.
6675
6676 <note>
6677 This method implicitly calls <link to="IMachine::saveSettings"/> to
6678 save all current machine settings before taking an offline snapshot.
6679 </note>
6680
6681 <result name="VBOX_E_INVALID_VM_STATE">
6682 Virtual machine currently changing state.
6683 </result>
6684 </desc>
6685 <param name="name" type="wstring" dir="in">
6686 <desc>Short name for the snapshot.</desc>
6687 </param>
6688 <param name="description" type="wstring" dir="in">
6689 <desc>Optional description of the snapshot.</desc>
6690 </param>
6691 <param name="progress" type="IProgress" dir="return">
6692 <desc>Progress object to track the operation completion.</desc>
6693 </param>
6694 </method>
6695
6696 <method name="deleteSnapshot">
6697 <desc>
6698 Starts discarding the specified snapshot asynchronously.
6699 See <link to="ISnapshot" /> for an introduction to snapshots.
6700
6701 The execution state and settings of the associated machine stored in
6702 the snapshot will be deleted. The contents of all differencing media of
6703 this snapshot will be merged with the contents of their dependent child
6704 media to keep the medium chain valid (in other words, all changes
6705 represented by media being discarded will be propagated to their child
6706 medium). After that, this snapshot's differencing medium will be
6707 deleted. The parent of this snapshot will become a new parent for all
6708 its child snapshots.
6709
6710 If the discarded snapshot is the current one, its parent
6711 snapshot will become a new current snapshot. The current machine
6712 state is not directly affected in this case, except that
6713 currently attached differencing media based on media
6714 of the discarded snapshot will be also merged as described
6715 above.
6716
6717 If the discarded snapshot is the first one (the root snapshot)
6718 and it has exactly one child snapshot, this child snapshot will
6719 become the first snapshot after discarding. If there are no
6720 children at all (i.e. the first snapshot is the only snapshot of
6721 the machine), both the current and the first snapshot of the
6722 machine will be set to @c null. In all other cases, the first
6723 snapshot cannot be discarded.
6724
6725 You cannot discard the snapshot if it
6726 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6727 media that have differencing media based on them. Snapshots of
6728 such kind can be discarded only when every normal medium has either
6729 no children at all or exactly one child. In the former case, the normal
6730 medium simply becomes unused (i.e. not attached to any VM). In the
6731 latter case, it receives all the changes stored in the child medium,
6732 and then it replaces the child medium in the configuration of the
6733 corresponding snapshot or machine.
6734
6735 Also, you cannot discard the snapshot if it stores media
6736 (of any type) having differencing child media that belong
6737 to other machines. Such snapshots can be only discarded after
6738 you discard all snapshots of other machines containing "foreign"
6739 child media, or detach these "foreign" child media from machines
6740 they are attached to.
6741
6742 One particular example of the snapshot storing normal media
6743 is the first snapshot of a virtual machine that had normal media
6744 attached when taking the snapshot. Be careful when
6745 discarding such snapshots because this implicitly commits
6746 changes (made since the snapshot being discarded has been taken)
6747 to normal media (as described above), which may be not what
6748 you want.
6749
6750 The virtual machine is put to
6751 the <link to="MachineState_Discarding">Discarding</link> state until
6752 the discard operation is completed.
6753
6754 <note>
6755 The machine must not be running, otherwise the operation
6756 will fail.
6757 </note>
6758
6759 <note>
6760 Child media of all normal media of the discarded snapshot
6761 must be accessible (see <link to="IMedium::state"/>) for this
6762 operation to succeed. In particular, this means that all virtual
6763 machines, whose media are directly or indirectly based on the
6764 media of discarded snapshot, must be powered off.
6765 </note>
6766 <note>
6767 Merging medium contents can be very time and disk space
6768 consuming, if these media are big in size and have many
6769 children. However, if the snapshot being discarded is the last
6770 (head) snapshot on the branch, the operation will be rather
6771 quick.
6772 </note>
6773 <note>
6774 Note that discarding the current snapshot
6775 will implicitly call <link to="IMachine::saveSettings"/> to
6776 make all current machine settings permanent.
6777 </note>
6778 <result name="VBOX_E_INVALID_VM_STATE">
6779 Virtual machine is running.
6780 </result>
6781 </desc>
6782 <param name="id" type="uuid" mod="string" dir="in">
6783 <desc>UUID of the snapshot to discard.</desc>
6784 </param>
6785 <param name="progress" type="IProgress" dir="return">
6786 <desc>Progress object to track the operation completion.</desc>
6787 </param>
6788 </method>
6789
6790 <method name="restoreSnapshot">
6791 <desc>
6792 Starts resetting the machine's current state to the state contained
6793 in the given snapshot, asynchronously. All current settings of the
6794 machine will be reset and changes stored in differencing media
6795 will be lost.
6796 See <link to="ISnapshot" /> for an introduction to snapshots.
6797
6798 After this operation is successfully completed, new empty differencing
6799 media are created for all normal media of the machine.
6800
6801 If the given snapshot is an online snapshot, the machine will go to
6802 the <link to="MachineState_Saved"> saved state</link>, so that the
6803 next time it is powered on, the execution state will be restored
6804 from the state of the snapshot.
6805
6806 <note>
6807 The machine must not be running, otherwise the operation will fail.
6808 </note>
6809
6810 <note>
6811 If the machine state is <link to="MachineState_Saved">Saved</link>
6812 prior to this operation, the saved state file will be implicitly
6813 discarded (as if <link to="IConsole::forgetSavedState"/> were
6814 called).
6815 </note>
6816
6817 <result name="VBOX_E_INVALID_VM_STATE">
6818 Virtual machine is running.
6819 </result>
6820 </desc>
6821 <param name="snapshot" type="ISnapshot" dir="in">
6822 <desc>The snapshot to restore the VM state from.</desc>
6823 </param>
6824 <param name="progress" type="IProgress" dir="return">
6825 <desc>Progress object to track the operation completion.</desc>
6826 </param>
6827 </method>
6828
6829 <method name="teleport">
6830 <desc>
6831 Teleport the VM to a different host machine or process.
6832
6833 TODO explain the details.
6834
6835 <result name="VBOX_E_INVALID_VM_STATE">
6836 Virtual machine not running or paused.
6837 </result>
6838 </desc>
6839 <param name="hostname" type="wstring" dir="in">
6840 <desc>The name or IP of the host to teleport to.</desc>
6841 </param>
6842 <param name="tcpport" type="unsigned long" dir="in">
6843 <desc>The TCP port to connect to (1..65535).</desc>
6844 </param>
6845 <param name="password" type="wstring" dir="in">
6846 <desc>The password.</desc>
6847 </param>
6848 <param name="progress" type="IProgress" dir="return">
6849 <desc>Progress object to track the operation completion.</desc>
6850 </param>
6851 </method>
6852
6853 <method name="registerCallback">
6854 <desc>
6855 Registers a new console callback on this instance. The methods of the
6856 callback interface will be called by this instance when the appropriate
6857 event occurs.
6858 </desc>
6859 <param name="callback" type="IConsoleCallback" dir="in"/>
6860 </method>
6861
6862 <method name="unregisterCallback">
6863 <desc>
6864 Unregisters the console callback previously registered using
6865 <link to="#registerCallback"/>.
6866 <result name="E_INVALIDARG">
6867 Given @a callback handler is not registered.
6868 </result>
6869 </desc>
6870 <param name="callback" type="IConsoleCallback" dir="in"/>
6871 </method>
6872 </interface>
6873
6874 <!--
6875 // IHost
6876 /////////////////////////////////////////////////////////////////////////
6877 -->
6878
6879 <enum
6880 name="HostNetworkInterfaceMediumType"
6881 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6882 >
6883 <desc>
6884 Type of encapsulation. Ethernet encapsulation includes both wired and
6885 wireless Ethernet connections.
6886 <see>IHostNetworkInterface</see>
6887 </desc>
6888
6889 <const name="Unknown" value="0">
6890 <desc>
6891 The type of interface cannot be determined.
6892 </desc>
6893 </const>
6894 <const name="Ethernet" value="1">
6895 <desc>
6896 Ethernet frame encapsulation.
6897 </desc>
6898 </const>
6899 <const name="PPP" value="2">
6900 <desc>
6901 Point-to-point protocol encapsulation.
6902 </desc>
6903 </const>
6904 <const name="SLIP" value="3">
6905 <desc>
6906 Serial line IP encapsulation.
6907 </desc>
6908 </const>
6909 </enum>
6910
6911 <enum
6912 name="HostNetworkInterfaceStatus"
6913 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6914 >
6915 <desc>
6916 Current status of the interface.
6917 <see>IHostNetworkInterface</see>
6918 </desc>
6919
6920 <const name="Unknown" value="0">
6921 <desc>
6922 The state of interface cannot be determined.
6923 </desc>
6924 </const>
6925 <const name="Up" value="1">
6926 <desc>
6927 The interface is fully operational.
6928 </desc>
6929 </const>
6930 <const name="Down" value="2">
6931 <desc>
6932 The interface is not functioning.
6933 </desc>
6934 </const>
6935 </enum>
6936
6937 <enum
6938 name="HostNetworkInterfaceType"
6939 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6940 >
6941 <desc>
6942 Network interface type.
6943 </desc>
6944 <const name="Bridged" value="1"/>
6945 <const name="HostOnly" value="2"/>
6946 </enum>
6947
6948 <interface
6949 name="IHostNetworkInterface" extends="$unknown"
6950 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6951 wsmap="managed"
6952 >
6953 <desc>
6954 Represents one of host's network interfaces. IP V6 address and network
6955 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6956 separated by colons.
6957 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6958 </desc>
6959 <attribute name="name" type="wstring" readonly="yes">
6960 <desc>Returns the host network interface name.</desc>
6961 </attribute>
6962
6963 <attribute name="id" type="uuid" mod="string" readonly="yes">
6964 <desc>Returns the interface UUID.</desc>
6965 </attribute>
6966
6967 <attribute name="networkName" type="wstring" readonly="yes">
6968 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6969 </attribute>
6970
6971 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6972 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6973 </attribute>
6974
6975 <attribute name="IPAddress" type="wstring" readonly="yes">
6976 <desc>Returns the IP V4 address of the interface.</desc>
6977 </attribute>
6978
6979 <attribute name="networkMask" type="wstring" readonly="yes">
6980 <desc>Returns the network mask of the interface.</desc>
6981 </attribute>
6982
6983 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6984 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6985 </attribute>
6986
6987 <attribute name="IPV6Address" type="wstring" readonly="yes">
6988 <desc>Returns the IP V6 address of the interface.</desc>
6989 </attribute>
6990
6991 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6992 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6993 </attribute>
6994
6995 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6996 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6997 </attribute>
6998
6999 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7000 <desc>Type of protocol encapsulation used.</desc>
7001 </attribute>
7002
7003 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7004 <desc>Status of the interface.</desc>
7005 </attribute>
7006
7007 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7008 <desc>specifies the host interface type.</desc>
7009 </attribute>
7010
7011 <method name="enableStaticIpConfig">
7012 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7013 <param name="IPAddress" type="wstring" dir="in">
7014 <desc>
7015 IP address.
7016 </desc>
7017 </param>
7018 <param name="networkMask" type="wstring" dir="in">
7019 <desc>
7020 network mask.
7021 </desc>
7022 </param>
7023 </method>
7024
7025 <method name="enableStaticIpConfigV6">
7026 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7027 <param name="IPV6Address" type="wstring" dir="in">
7028 <desc>
7029 IP address.
7030 </desc>
7031 </param>
7032 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7033 <desc>
7034 network mask.
7035 </desc>
7036 </param>
7037 </method>
7038
7039 <method name="enableDynamicIpConfig">
7040 <desc>enables the dynamic IP configuration.</desc>
7041 </method>
7042
7043 <method name="dhcpRediscover">
7044 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7045 </method>
7046
7047 </interface>
7048
7049 <interface
7050 name="IHost" extends="$unknown"
7051 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7052 wsmap="managed"
7053 >
7054 <desc>
7055 The IHost interface represents the physical machine that this VirtualBox
7056 installation runs on.
7057
7058 An object implementing this interface is returned by the
7059 <link to="IVirtualBox::host" /> attribute. This interface contains
7060 read-only information about the host's physical hardware (such as what
7061 processors and disks are available, what the host operating system is,
7062 and so on) and also allows for manipulating some of the host's hardware,
7063 such as global USB device filters and host interface networking.
7064
7065 </desc>
7066 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7067 <desc>List of DVD drives available on the host.</desc>
7068 </attribute>
7069
7070 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7071 <desc>List of floppy drives available on the host.</desc>
7072 </attribute>
7073
7074 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7075 <desc>
7076 List of USB devices currently attached to the host.
7077 Once a new device is physically attached to the host computer,
7078 it appears in this list and remains there until detached.
7079
7080 <note>
7081 If USB functionality is not available in the given edition of
7082 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7083 </note>
7084 </desc>
7085 </attribute>
7086
7087 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7088 <desc>
7089 List of USB device filters in action.
7090 When a new device is physically attached to the host computer,
7091 filters from this list are applied to it (in order they are stored
7092 in the list). The first matched filter will determine the
7093 <link to="IHostUSBDeviceFilter::action">action</link>
7094 performed on the device.
7095
7096 Unless the device is ignored by these filters, filters of all
7097 currently running virtual machines
7098 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7099
7100 <note>
7101 If USB functionality is not available in the given edition of
7102 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7103 </note>
7104
7105 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7106 </desc>
7107 </attribute>
7108
7109 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7110 <desc>List of host network interfaces currently defined on the host.</desc>
7111 </attribute>
7112
7113 <attribute name="processorCount" type="unsigned long" readonly="yes">
7114 <desc>Number of (logical) CPUs installed in the host system.</desc>
7115 </attribute>
7116
7117 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7118 <desc>Number of (logical) CPUs online in the host system.</desc>
7119 </attribute>
7120
7121 <method name="getProcessorSpeed">
7122 <desc>Query the (approximate) maximum speed of a specified host CPU in
7123 Megahertz.
7124 </desc>
7125 <param name="cpuId" type="unsigned long" dir="in">
7126 <desc>
7127 Identifier of the CPU.
7128 </desc>
7129 </param>
7130 <param name="speed" type="unsigned long" dir="return">
7131 <desc>
7132 Speed value. 0 is returned if value is not known or @a cpuId is
7133 invalid.
7134 </desc>
7135 </param>
7136 </method>
7137
7138 <method name="getProcessorFeature">
7139 <desc>Query whether a CPU feature is supported or not.</desc>
7140 <param name="feature" type="ProcessorFeature" dir="in">
7141 <desc>
7142 CPU Feature identifier.
7143 </desc>
7144 </param>
7145 <param name="supported" type="boolean" dir="return">
7146 <desc>
7147 Feature is supported or not.
7148 </desc>
7149 </param>
7150 </method>
7151
7152 <method name="getProcessorDescription">
7153 <desc>Query the model string of a specified host CPU.
7154 </desc>
7155 <param name="cpuId" type="unsigned long" dir="in">
7156 <desc>
7157 Identifier of the CPU.
7158 </desc>
7159 </param>
7160 <param name="description" type="wstring" dir="return">
7161 <desc>
7162 Model string. An empty string is returned if value is not known or
7163 @a cpuId is invalid.
7164 </desc>
7165 </param>
7166 </method>
7167
7168 <attribute name="memorySize" type="unsigned long" readonly="yes">
7169 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7170 </attribute>
7171
7172 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7173 <desc>Available system memory in the host system.</desc>
7174 </attribute>
7175
7176 <attribute name="operatingSystem" type="wstring" readonly="yes">
7177 <desc>Name of the host system's operating system.</desc>
7178 </attribute>
7179
7180 <attribute name="OSVersion" type="wstring" readonly="yes">
7181 <desc>Host operating system's version string.</desc>
7182 </attribute>
7183
7184 <attribute name="UTCTime" type="long long" readonly="yes">
7185 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7186 </attribute>
7187
7188 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7189 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7190 </attribute>
7191
7192 <method name="createHostOnlyNetworkInterface">
7193 <desc>
7194 Creates a new adapter for Host Only Networking.
7195 <result name="E_INVALIDARG">
7196 Host network interface @a name already exists.
7197 </result>
7198 </desc>
7199 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7200 <desc>
7201 Created host interface object.
7202 </desc>
7203 </param>
7204 <param name="progress" type="IProgress" dir="return">
7205 <desc>
7206 Progress object to track the operation completion.
7207 </desc>
7208 </param>
7209 </method>
7210
7211 <method name="removeHostOnlyNetworkInterface">
7212 <desc>
7213 Removes the given Host Only Networking interface.
7214 <result name="VBOX_E_OBJECT_NOT_FOUND">
7215 No host network interface matching @a id found.
7216 </result>
7217 </desc>
7218 <param name="id" type="uuid" mod="string" dir="in">
7219 <desc>
7220 Adapter GUID.
7221 </desc>
7222 </param>
7223 <param name="progress" type="IProgress" dir="return">
7224 <desc>
7225 Progress object to track the operation completion.
7226 </desc>
7227 </param>
7228 </method>
7229
7230 <method name="createUSBDeviceFilter">
7231 <desc>
7232 Creates a new USB device filter. All attributes except
7233 the filter name are set to empty (any match),
7234 <i>active</i> is @c false (the filter is not active).
7235
7236 The created filter can be added to the list of filters using
7237 <link to="#insertUSBDeviceFilter"/>.
7238
7239 <see>#USBDeviceFilters</see>
7240 </desc>
7241 <param name="name" type="wstring" dir="in">
7242 <desc>
7243 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7244 for more info.
7245 </desc>
7246 </param>
7247 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7248 <desc>Created filter object.</desc>
7249 </param>
7250 </method>
7251
7252 <method name="insertUSBDeviceFilter">
7253 <desc>
7254 Inserts the given USB device to the specified position
7255 in the list of filters.
7256
7257 Positions are numbered starting from @c 0. If the specified
7258 position is equal to or greater than the number of elements in
7259 the list, the filter is added at the end of the collection.
7260
7261 <note>
7262 Duplicates are not allowed, so an attempt to insert a
7263 filter already in the list is an error.
7264 </note>
7265 <note>
7266 If USB functionality is not available in the given edition of
7267 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7268 </note>
7269
7270 <see>#USBDeviceFilters</see>
7271
7272 <result name="VBOX_E_INVALID_OBJECT_STATE">
7273 USB device filter is not created within this VirtualBox instance.
7274 </result>
7275 <result name="E_INVALIDARG">
7276 USB device filter already in list.
7277 </result>
7278
7279 </desc>
7280 <param name="position" type="unsigned long" dir="in">
7281 <desc>Position to insert the filter to.</desc>
7282 </param>
7283 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7284 <desc>USB device filter to insert.</desc>
7285 </param>
7286 </method>
7287
7288 <method name="removeUSBDeviceFilter">
7289 <desc>
7290 Removes a USB device filter from the specified position in the
7291 list of filters.
7292
7293 Positions are numbered starting from @c 0. Specifying a
7294 position equal to or greater than the number of elements in
7295 the list will produce an error.
7296
7297 <note>
7298 If USB functionality is not available in the given edition of
7299 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7300 </note>
7301
7302 <see>#USBDeviceFilters</see>
7303
7304 <result name="E_INVALIDARG">
7305 USB device filter list empty or invalid @a position.
7306 </result>
7307
7308 </desc>
7309 <param name="position" type="unsigned long" dir="in">
7310 <desc>Position to remove the filter from.</desc>
7311 </param>
7312 </method>
7313
7314 <method name="findHostDVDDrive">
7315 <desc>
7316 Searches for a host DVD drive with the given @c name.
7317
7318 <result name="VBOX_E_OBJECT_NOT_FOUND">
7319 Given @c name does not correspond to any host drive.
7320 </result>
7321
7322 </desc>
7323 <param name="name" type="wstring" dir="in">
7324 <desc>Name of the host drive to search for</desc>
7325 </param>
7326 <param name="drive" type="IMedium" dir="return">
7327 <desc>Found host drive object</desc>
7328 </param>
7329 </method>
7330
7331 <method name="findHostFloppyDrive">
7332 <desc>
7333 Searches for a host floppy drive with the given @c name.
7334
7335 <result name="VBOX_E_OBJECT_NOT_FOUND">
7336 Given @c name does not correspond to any host floppy drive.
7337 </result>
7338
7339 </desc>
7340 <param name="name" type="wstring" dir="in">
7341 <desc>Name of the host floppy drive to search for</desc>
7342 </param>
7343 <param name="drive" type="IMedium" dir="return">
7344 <desc>Found host floppy drive object</desc>
7345 </param>
7346 </method>
7347
7348 <method name="findHostNetworkInterfaceByName">
7349 <desc>
7350 Searches through all host network interfaces for an interface with
7351 the given @c name.
7352 <note>
7353 The method returns an error if the given @c name does not
7354 correspond to any host network interface.
7355 </note>
7356 </desc>
7357 <param name="name" type="wstring" dir="in">
7358 <desc>Name of the host network interface to search for.</desc>
7359 </param>
7360 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7361 <desc>Found host network interface object.</desc>
7362 </param>
7363 </method>
7364 <method name="findHostNetworkInterfaceById">
7365 <desc>
7366 Searches through all host network interfaces for an interface with
7367 the given GUID.
7368 <note>
7369 The method returns an error if the given GUID does not
7370 correspond to any host network interface.
7371 </note>
7372 </desc>
7373 <param name="id" type="uuid" mod="string" dir="in">
7374 <desc>GUID of the host network interface to search for.</desc>
7375 </param>
7376 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7377 <desc>Found host network interface object.</desc>
7378 </param>
7379 </method>
7380 <method name="findHostNetworkInterfacesOfType">
7381 <desc>
7382 Searches through all host network interfaces and returns a list of interfaces of the specified type
7383 </desc>
7384 <param name="type" type="HostNetworkInterfaceType" dir="in">
7385 <desc>type of the host network interfaces to search for.</desc>
7386 </param>
7387 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7388 <desc>Found host network interface objects.</desc>
7389 </param>
7390 </method>
7391
7392 <method name="findUSBDeviceById">
7393 <desc>
7394 Searches for a USB device with the given UUID.
7395
7396 <result name="VBOX_E_OBJECT_NOT_FOUND">
7397 Given @c id does not correspond to any USB device.
7398 </result>
7399
7400 <see>IHostUSBDevice::id</see>
7401 </desc>
7402 <param name="id" type="uuid" mod="string" dir="in">
7403 <desc>UUID of the USB device to search for.</desc>
7404 </param>
7405 <param name="device" type="IHostUSBDevice" dir="return">
7406 <desc>Found USB device object.</desc>
7407 </param>
7408 </method>
7409
7410 <method name="findUSBDeviceByAddress">
7411 <desc>
7412 Searches for a USB device with the given host address.
7413
7414 <result name="VBOX_E_OBJECT_NOT_FOUND">
7415 Given @c name does not correspond to any USB device.
7416 </result>
7417
7418 <see>IHostUSBDevice::address</see>
7419 </desc>
7420 <param name="name" type="wstring" dir="in">
7421 <desc>
7422 Address of the USB device (as assigned by the host) to
7423 search for.
7424 </desc>
7425 </param>
7426 <param name="device" type="IHostUSBDevice" dir="return">
7427 <desc>Found USB device object.</desc>
7428 </param>
7429 </method>
7430
7431 </interface>
7432
7433 <!--
7434 // ISystemProperties
7435 /////////////////////////////////////////////////////////////////////////
7436 -->
7437
7438 <interface
7439 name="ISystemProperties"
7440 extends="$unknown"
7441 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7442 wsmap="managed"
7443 >
7444 <desc>
7445 The ISystemProperties interface represents global properties of the given
7446 VirtualBox installation.
7447
7448 These properties define limits and default values for various attributes
7449 and parameters. Most of the properties are read-only, but some can be
7450 changed by a user.
7451 </desc>
7452
7453 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7454 <desc>Minimum guest system memory in Megabytes.</desc>
7455 </attribute>
7456
7457 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7458 <desc>Maximum guest system memory in Megabytes.</desc>
7459 </attribute>
7460
7461 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7462 <desc>Minimum guest video memory in Megabytes.</desc>
7463 </attribute>
7464
7465 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7466 <desc>Maximum guest video memory in Megabytes.</desc>
7467 </attribute>
7468
7469 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7470 <desc>Minimum CPU count.</desc>
7471 </attribute>
7472
7473 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7474 <desc>Maximum CPU count.</desc>
7475 </attribute>
7476
7477 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7478 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7479 </attribute>
7480
7481 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7482 <desc>
7483 Number of network adapters associated with every
7484 <link to="IMachine"/> instance.
7485 </desc>
7486 </attribute>
7487
7488 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7489 <desc>
7490 Number of serial ports associated with every
7491 <link to="IMachine"/> instance.
7492 </desc>
7493 </attribute>
7494
7495 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7496 <desc>
7497 Number of parallel ports associated with every
7498 <link to="IMachine"/> instance.
7499 </desc>
7500 </attribute>
7501
7502 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7503 <desc>
7504 Maximum device position in the boot order. This value corresponds
7505 to the total number of devices a machine can boot from, to make it
7506 possible to include all possible devices to the boot list.
7507 <see><link to="IMachine::setBootOrder"/></see>
7508 </desc>
7509 </attribute>
7510
7511 <attribute name="defaultMachineFolder" type="wstring">
7512 <desc>
7513 Full path to the default directory used to create new or open
7514 existing machines when a settings file name contains no
7515 path.
7516
7517 The initial value of this property is
7518 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7519 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7520
7521 <note>
7522 Setting this property to @c null or an empty string will restore the
7523 initial value.
7524 </note>
7525 <note>
7526 When settings this property, the specified path can be
7527 absolute (full path) or relative
7528 to the <link to="IVirtualBox::homeFolder">
7529 VirtualBox home directory</link>.
7530 When reading this property, a full path is
7531 always returned.
7532 </note>
7533 <note>
7534 The specified path may not exist, it will be created
7535 when necessary.
7536 </note>
7537
7538 <see>
7539 <link to="IVirtualBox::createMachine"/>,
7540 <link to="IVirtualBox::openMachine"/>
7541 </see>
7542 </desc>
7543 </attribute>
7544
7545 <attribute name="defaultHardDiskFolder" type="wstring">
7546 <desc>
7547 Full path to the default directory used to create new or open existing
7548 virtual disks.
7549
7550 This path is used when the storage unit of a hard disk is a regular file
7551 in the host's file system and only a file name that contains no path is
7552 given.
7553
7554 The initial value of this property is
7555 <tt>&lt;</tt>
7556 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7557 <tt>&gt;/HardDisks</tt>.
7558
7559 <note>
7560 Setting this property to @c null or empty string will restore the
7561 initial value.
7562 </note>
7563 <note>
7564 When settings this property, the specified path can be relative
7565 to the
7566 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7567 absolute. When reading this property, a full path is
7568 always returned.
7569 </note>
7570 <note>
7571 The specified path may not exist, it will be created
7572 when necessary.
7573 </note>
7574
7575 <see>
7576 IMedium,
7577 <link to="IVirtualBox::createHardDisk"/>,
7578 <link to="IVirtualBox::openHardDisk"/>,
7579 <link to="IMedium::location"/>
7580 </see>
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7585 <desc>
7586 List of all medium storage formats supported by this VirtualBox
7587 installation.
7588
7589 Keep in mind that the medium format identifier
7590 (<link to="IMediumFormat::id"/>) used in other API calls like
7591 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7592 medium format is a case-insensitive string. This means that, for
7593 example, all of the following strings:
7594 <pre>
7595 "VDI"
7596 "vdi"
7597 "VdI"</pre>
7598 refer to the same medium format.
7599
7600 Note that the virtual medium framework is backend-based, therefore
7601 the list of supported formats depends on what backends are currently
7602 installed.
7603
7604 <see>
7605 <link to="IMediumFormat"/>,
7606 </see>
7607 </desc>
7608 </attribute>
7609
7610 <attribute name="defaultHardDiskFormat" type="wstring">
7611 <desc>
7612 Identifier of the default medium format used by VirtualBox.
7613
7614 The medium format set by this attribute is used by VirtualBox
7615 when the medium format was not specified explicitly. One example is
7616 <link to="IVirtualBox::createHardDisk"/> with the empty
7617 format argument. A more complex example is implicit creation of
7618 differencing media when taking a snapshot of a virtual machine:
7619 this operation will try to use a format of the parent medium first
7620 and if this format does not support differencing media the default
7621 format specified by this argument will be used.
7622
7623 The list of supported medium formats may be obtained by the
7624 <link to="#mediaFormats"/> call. Note that the default medium
7625 format must have a capability to create differencing media;
7626 otherwise operations that create media implicitly may fail
7627 unexpectedly.
7628
7629 The initial value of this property is <tt>"VDI"</tt> in the current
7630 version of the VirtualBox product, but may change in the future.
7631
7632 <note>
7633 Setting this property to @c null or empty string will restore the
7634 initial value.
7635 </note>
7636
7637 <see>
7638 <link to="#mediaFormats"/>,
7639 <link to="IMediumFormat::id"/>,
7640 <link to="IVirtualBox::createHardDisk"/>
7641 </see>
7642 </desc>
7643 </attribute>
7644
7645 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7646 <desc>
7647 Library that provides authentication for VRDP clients. The library
7648 is used if a virtual machine's authentication type is set to "external"
7649 in the VM RemoteDisplay configuration.
7650
7651 The system library extension (".DLL" or ".so") must be omitted.
7652 A full path can be specified; if not, then the library must reside on the
7653 system's default library path.
7654
7655 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7656 of that name in one of the default VirtualBox library directories.
7657
7658 For details about VirtualBox authentication libraries and how to implement
7659 them, please refer to the VirtualBox manual.
7660
7661 <note>
7662 Setting this property to @c null or empty string will restore the
7663 initial value.
7664 </note>
7665 </desc>
7666 </attribute>
7667
7668 <attribute name="webServiceAuthLibrary" type="wstring">
7669 <desc>
7670 Library that provides authentication for webservice clients. The library
7671 is used if a virtual machine's authentication type is set to "external"
7672 in the VM RemoteDisplay configuration and will be called from
7673 within the <link to="IWebsessionManager::logon" /> implementation.
7674
7675 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7676 there is no per-VM setting for this, as the webservice is a global
7677 resource (if it is running). Only for this setting (for the webservice),
7678 setting this value to a literal <tt>"null"</tt> string disables authentication,
7679 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7680 no matter what user name and password are supplied.
7681
7682 The initial value of this property is <tt>"VRDPAuth"</tt>,
7683 meaning that the webservice will use the same authentication
7684 library that is used by default for VBoxVRDP (again, see
7685 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7686 The format and calling convention of authentication libraries
7687 is the same for the webservice as it is for VBoxVRDP.
7688
7689 <note>
7690 Setting this property to @c null or empty string will restore the
7691 initial value.
7692 </note>
7693 </desc>
7694 </attribute>
7695
7696 <attribute name="LogHistoryCount" type="unsigned long">
7697 <desc>
7698 This value specifies how many old release log files are kept.
7699 </desc>
7700 </attribute>
7701
7702 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7703 <desc>This value hold the default audio driver for the current
7704 system.</desc>
7705 </attribute>
7706
7707 <method name="getMaxDevicesPerPortForStorageBus">
7708 <desc>Returns the maximum number of devices which can be attached to a port
7709 for the given storage bus.</desc>
7710
7711 <param name="bus" type="StorageBus" dir="in">
7712 <desc>The storage bus type to get the value for.</desc>
7713 </param>
7714
7715 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7716 <desc>The maximum number of devices which can eb attached to the port for the given
7717 storage bus.</desc>
7718 </param>
7719 </method>
7720
7721 <method name="getMinPortCountForStorageBus">
7722 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7723
7724 <param name="bus" type="StorageBus" dir="in">
7725 <desc>The storage bus type to get the value for.</desc>
7726 </param>
7727
7728 <param name="minPortCount" type="unsigned long" dir="return">
7729 <desc>The minimum number of ports for the given storage bus.</desc>
7730 </param>
7731 </method>
7732
7733 <method name="getMaxPortCountForStorageBus">
7734 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7735
7736 <param name="bus" type="StorageBus" dir="in">
7737 <desc>The storage bus type to get the value for.</desc>
7738 </param>
7739
7740 <param name="maxPortCount" type="unsigned long" dir="return">
7741 <desc>The maximum number of ports for the given storage bus.</desc>
7742 </param>
7743 </method>
7744
7745 <method name="getMaxInstancesOfStorageBus">
7746 <desc>Returns the maximum number of storage bus instances which
7747 can be configured for each VM. This corresponds to the number of
7748 storage controllers one can have.</desc>
7749
7750 <param name="bus" type="StorageBus" dir="in">
7751 <desc>The storage bus type to get the value for.</desc>
7752 </param>
7753
7754 <param name="maxInstances" type="unsigned long" dir="return">
7755 <desc>The maximum number of instances for the given storage bus.</desc>
7756 </param>
7757 </method>
7758 </interface>
7759
7760 <!--
7761 // IGuest
7762 /////////////////////////////////////////////////////////////////////////
7763 -->
7764
7765 <interface
7766 name="IGuestOSType" extends="$unknown"
7767 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7768 wsmap="struct"
7769 >
7770 <desc>
7771 </desc>
7772
7773 <attribute name="familyId" type="wstring" readonly="yes">
7774 <desc>Guest OS family identifier string.</desc>
7775 </attribute>
7776
7777 <attribute name="familyDescription" type="wstring" readonly="yes">
7778 <desc>Human readable description of the guest OS family.</desc>
7779 </attribute>
7780
7781 <attribute name="id" type="wstring" readonly="yes">
7782 <desc>Guest OS identifier string.</desc>
7783 </attribute>
7784
7785 <attribute name="description" type="wstring" readonly="yes">
7786 <desc>Human readable description of the guest OS.</desc>
7787 </attribute>
7788
7789 <attribute name="is64Bit" type="boolean" readonly="yes">
7790 <desc>Returns @c true if the given OS is 64-bit</desc>
7791 </attribute>
7792
7793 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7794 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7795 </attribute>
7796
7797 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7798 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7799 </attribute>
7800
7801 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7802 <desc>Recommended RAM size in Megabytes.</desc>
7803 </attribute>
7804
7805 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7806 <desc>Recommended video RAM size in Megabytes.</desc>
7807 </attribute>
7808
7809 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7810 <desc>Recommended hard disk size in Megabytes.</desc>
7811 </attribute>
7812
7813 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7814 <desc>Returns recommended network adapter for this OS type.</desc>
7815 </attribute>
7816 </interface>
7817
7818 <interface
7819 name="IGuest" extends="$unknown"
7820 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7821 wsmap="managed"
7822 >
7823 <desc>
7824 The IGuest interface represents information about the operating system
7825 running inside the virtual machine. Used in
7826 <link to="IConsole::guest"/>.
7827
7828 IGuest provides information about the guest operating system, whether
7829 Guest Additions are installed and other OS-specific virtual machine
7830 properties.
7831 </desc>
7832
7833 <attribute name="OSTypeId" type="wstring" readonly="yes">
7834 <desc>
7835 Identifier of the Guest OS type as reported by the Guest
7836 Additions.
7837 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7838 an IGuestOSType object representing details about the given
7839 Guest OS type.
7840 <note>
7841 If Guest Additions are not installed, this value will be
7842 the same as <link to="IMachine::OSTypeId"/>.
7843 </note>
7844 </desc>
7845 </attribute>
7846
7847 <attribute name="additionsActive" type="boolean" readonly="yes">
7848 <desc>
7849 Flag whether the Guest Additions are installed and active
7850 in which case their version will be returned by the
7851 <link to="#additionsVersion"/> property.
7852 </desc>
7853 </attribute>
7854
7855 <attribute name="additionsVersion" type="wstring" readonly="yes">
7856 <desc>
7857 Version of the Guest Additions (3 decimal numbers separated
7858 by dots) or empty when the Additions are not installed. The
7859 Additions may also report a version but yet not be active as
7860 the version might be refused by VirtualBox (incompatible) or
7861 other failures occurred.
7862 </desc>
7863 </attribute>
7864
7865 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7866 <desc>
7867 Flag whether seamless guest display rendering (seamless desktop
7868 integration) is supported.
7869 </desc>
7870 </attribute>
7871
7872 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7873 <desc>
7874 Flag whether the guest is in graphics mode. If it is not, then
7875 seamless rendering will not work, resize hints are not immediately
7876 acted on and guest display resizes are probably not initiated by
7877 the guest additions.
7878 </desc>
7879 </attribute>
7880
7881 <attribute name="memoryBalloonSize" type="unsigned long">
7882 <desc>Guest system memory balloon size in megabytes.</desc>
7883 </attribute>
7884
7885 <attribute name="statisticsUpdateInterval" type="unsigned long">
7886 <desc>Interval to update guest statistics in seconds.</desc>
7887 </attribute>
7888
7889 <method name="setCredentials">
7890 <desc>
7891 Store login credentials that can be queried by guest operating
7892 systems with Additions installed. The credentials are transient
7893 to the session and the guest may also choose to erase them. Note
7894 that the caller cannot determine whether the guest operating system
7895 has queried or made use of the credentials.
7896
7897 <result name="VBOX_E_VM_ERROR">
7898 VMM device is not available.
7899 </result>
7900
7901 </desc>
7902 <param name="userName" type="wstring" dir="in">
7903 <desc>User name string, can be empty</desc>
7904 </param>
7905 <param name="password" type="wstring" dir="in">
7906 <desc>Password string, can be empty</desc>
7907 </param>
7908 <param name="domain" type="wstring" dir="in">
7909 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7910 </param>
7911 <param name="allowInteractiveLogon" type="boolean" dir="in">
7912 <desc>
7913 Flag whether the guest should alternatively allow the user to
7914 interactively specify different credentials. This flag might
7915 not be supported by all versions of the Additions.
7916 </desc>
7917 </param>
7918 </method>
7919
7920 <method name="getStatistic">
7921 <desc>
7922 Query specified guest statistics as reported by the VirtualBox Additions.
7923 </desc>
7924 <param name="cpuId" type="unsigned long" dir="in">
7925 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7926 </param>
7927 <param name="statistic" type="GuestStatisticType" dir="in">
7928 <desc>Statistic type.</desc>
7929 </param>
7930 <param name="statVal" type="unsigned long" dir="return">
7931 <desc>Statistics value</desc>
7932 </param>
7933 </method>
7934
7935 </interface>
7936
7937
7938 <!--
7939 // IProgress
7940 /////////////////////////////////////////////////////////////////////////
7941 -->
7942
7943 <interface
7944 name="IProgress" extends="$unknown"
7945 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7946 wsmap="managed"
7947 >
7948 <desc>
7949 The IProgress interface is used to track and control
7950 asynchronous tasks within VirtualBox.
7951
7952 An instance of this is returned every time VirtualBox starts
7953 an asynchronous task (in other words, a separate thread) which
7954 continues to run after a method call returns. For example,
7955 <link to="IConsole::saveState" />, which saves the state of
7956 a running virtual machine, can take a long time to complete.
7957 To be able to display a progress bar, a user interface such as
7958 the VirtualBox graphical user interface can use the IProgress
7959 object returned by that method.
7960
7961 Note that IProgress is a "read-only" interface in the sense
7962 that only the VirtualBox internals behind the Main API can
7963 create and manipulate progress objects, whereas client code
7964 can only use the IProgress object to monitor a task's
7965 progress and, if <link to="#cancelable" /> is @c true,
7966 cancel the task by calling <link to="#cancel" />.
7967
7968 A task represented by IProgress consists of either one or
7969 several sub-operations that run sequentially, one by one (see
7970 <link to="#operation" /> and <link to="#operationCount" />).
7971 Every operation is identified by a number (starting from 0)
7972 and has a separate description.
7973
7974 You can find the individual percentage of completion of the current
7975 operation in <link to="#operationPercent" /> and the
7976 percentage of completion of the task as a whole
7977 in <link to="#percent" />.
7978
7979 Similarly, you can wait for the completion of a particular
7980 operation via <link to="#waitForOperationCompletion" /> or
7981 for the completion of the whole task via
7982 <link to="#waitForCompletion" />.
7983 </desc>
7984
7985 <attribute name="id" type="uuid" mod="string" readonly="yes">
7986 <desc>ID of the task.</desc>
7987 </attribute>
7988
7989 <attribute name="description" type="wstring" readonly="yes">
7990 <desc>Description of the task.</desc>
7991 </attribute>
7992
7993 <attribute name="initiator" type="$unknown" readonly="yes">
7994 <desc>Initiator of the task.</desc>
7995 </attribute>
7996
7997 <attribute name="cancelable" type="boolean" readonly="yes">
7998 <desc>Whether the task can be interrupted.</desc>
7999 </attribute>
8000
8001 <attribute name="percent" type="unsigned long" readonly="yes">
8002 <desc>
8003 Current progress value of the task as a whole, in percent.
8004 This value depends on how many operations are already complete.
8005 Returns 100 if <link to="#completed" /> is @c true.
8006 </desc>
8007 </attribute>
8008
8009 <attribute name="timeRemaining" type="long" readonly="yes">
8010 <desc>
8011 Estimated remaining time until the task completes, in
8012 seconds. Returns 0 once the task has completed; returns -1
8013 if the remaining time cannot be computed, in particular if
8014 the current progress is 0.
8015
8016 Even if a value is returned, the estimate will be unreliable
8017 for low progress values. It will become more reliable as the
8018 task progresses; it is not recommended to display an ETA
8019 before at least 20% of a task have completed.
8020 </desc>
8021 </attribute>
8022
8023 <attribute name="completed" type="boolean" readonly="yes">
8024 <desc>Whether the task has been completed.</desc>
8025 </attribute>
8026
8027 <attribute name="canceled" type="boolean" readonly="yes">
8028 <desc>Whether the task has been canceled.</desc>
8029 </attribute>
8030
8031 <attribute name="resultCode" type="long" readonly="yes">
8032 <desc>
8033 Result code of the progress task.
8034 Valid only if <link to="#completed"/> is @c true.
8035 </desc>
8036 </attribute>
8037
8038 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8039 <desc>
8040 Extended information about the unsuccessful result of the
8041 progress operation. May be @c null if no extended information
8042 is available.
8043 Valid only if <link to="#completed"/> is @c true and
8044 <link to="#resultCode"/> indicates a failure.
8045 </desc>
8046 </attribute>
8047
8048 <attribute name="operationCount" type="unsigned long" readonly="yes">
8049 <desc>
8050 Number of sub-operations this task is divided into.
8051 Every task consists of at least one suboperation.
8052 </desc>
8053 </attribute>
8054
8055 <attribute name="operation" type="unsigned long" readonly="yes">
8056 <desc>Number of the sub-operation being currently executed.</desc>
8057 </attribute>
8058
8059 <attribute name="operationDescription" type="wstring" readonly="yes">
8060 <desc>
8061 Description of the sub-operation being currently executed.
8062 </desc>
8063 </attribute>
8064
8065 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8066 <desc>Progress value of the current sub-operation only, in percent.</desc>
8067 </attribute>
8068
8069 <method name="setCurrentOperationProgress">
8070 <desc>Internal method, not to be called externally.</desc>
8071 <param name="percent" type="unsigned long" dir="in" />
8072 </method>
8073 <method name="setNextOperation">
8074 <desc>Internal method, not to be called externally.</desc>
8075 <param name="nextOperationDescription" type="wstring" dir="in" />
8076 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8077 </method>
8078
8079 <method name="waitForCompletion">
8080 <desc>
8081 Waits until the task is done (including all sub-operations)
8082 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8083
8084 <result name="VBOX_E_IPRT_ERROR">
8085 Failed to wait for task completion.
8086 </result>
8087 </desc>
8088
8089 <param name="timeout" type="long" dir="in">
8090 <desc>
8091 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8092 </desc>
8093 </param>
8094 </method>
8095
8096 <method name="waitForOperationCompletion">
8097 <desc>
8098 Waits until the given operation is done with a given timeout in
8099 milliseconds; specify -1 for an indefinite wait.
8100
8101 <result name="VBOX_E_IPRT_ERROR">
8102 Failed to wait for operation completion.
8103 </result>
8104
8105 </desc>
8106 <param name="operation" type="unsigned long" dir="in">
8107 <desc>
8108 Number of the operation to wait for.
8109 Must be less than <link to="#operationCount"/>.
8110 </desc>
8111 </param>
8112 <param name="timeout" type="long" dir="in">
8113 <desc>
8114 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8115 </desc>
8116 </param>
8117 </method>
8118
8119 <method name="cancel">
8120 <desc>
8121 Cancels the task.
8122 <note>
8123 If <link to="#cancelable"/> is @c false, then this method will fail.
8124 </note>
8125
8126 <result name="VBOX_E_INVALID_OBJECT_STATE">
8127 Operation cannot be canceled.
8128 </result>
8129
8130 </desc>
8131 </method>
8132
8133 </interface>
8134
8135
8136 <!--
8137 // ISnapshot
8138 /////////////////////////////////////////////////////////////////////////
8139 -->
8140
8141 <interface
8142 name="ISnapshot" extends="$unknown"
8143 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8144 wsmap="managed"
8145 >
8146 <desc>
8147 The ISnapshot interface represents a snapshot of the virtual
8148 machine.
8149
8150 Together with the differencing media that are created
8151 when a snapshot is taken, a machine can be brought back to
8152 the exact state it was in when the snapshot was taken.
8153
8154 The ISnapshot interface has no methods, only attributes; snapshots
8155 are controlled through methods of the <link to="IConsole" /> interface
8156 which also manage the media associated with the snapshot.
8157 The following operations exist:
8158
8159 <ul>
8160 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8161 by creating new, empty differencing images for the machine's
8162 media and saving the VM settings and (if the VM is running)
8163 the current VM state in the snapshot.
8164
8165 The differencing images will then receive all data written to
8166 the machine's media, while their parent (base) images
8167 remain unmodified after the snapshot has been taken (see
8168 <link to="IMedium" /> for details about differencing images).
8169 This simplifies restoring a machine to the state of a snapshot:
8170 only the differencing images need to be deleted.
8171
8172 The current machine state is not changed by taking a snapshot.
8173 If the machine is running, it will resume execution after the
8174 snapshot has been taken.
8175 </li>
8176
8177 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8178 a previous snapshot. This resets the machine's state to that of
8179 the previous snapshot by deleting the differencing image of each
8180 of the machine's media and setting the machine's settings
8181 and state to the state that was saved in the snapshot (if any).
8182
8183 This destroys the machine's current state.
8184 </li>
8185
8186 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8187 without affecting the current machine state.
8188
8189 This does not change the machine, but instead frees the resources
8190 allocated when the snapshot was taken: the settings and machine state
8191 is deleted (if any), and the snapshot's differencing image for each
8192 of the machine's media gets merged with its parent image.
8193
8194 Neither the current machine state nor other snapshots are affected
8195 by this operation, except that parent media will be modified
8196 to contain the disk data associated with the snapshot being deleted.
8197 </li>
8198 </ul>
8199
8200 Each snapshot contains the settings of the virtual machine (hardware
8201 configuration etc.). In addition, if the machine was running when the
8202 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8203 the current VM state is saved in the snapshot (similarly to what happens
8204 when a VM's state is saved). The snapshot is then said to
8205 be <i>online</i> because when restoring it, the VM will be running.
8206
8207 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8208 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8209
8210 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8211 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8212 it then contains a so-called "zero execution state", representing a
8213 machine that is powered off.
8214
8215 <h3>Snapshot branches and the "current" snapshot</h3>
8216
8217 Snapshots can be chained, whereby every next snapshot is based on the
8218 previous one. This chaining is related to medium branching
8219 (see the <link to="IMedium"/> description) in that every time
8220 a new snapshot is created, a new differencing medium is implicitly
8221 created for all normal media attached to the machine.
8222
8223 Each virtual machine has a "current snapshot", identified by
8224 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8225 to the last snapshot in the chain. In a future version of VirtualBox,
8226 it will be possible to reset a machine's current state to that of an
8227 earlier snapshot without discarding the current state so that it will be
8228 possible to create alternative snapshot paths in a snapshot tree.
8229
8230 In the current implementation, multiple snapshot branches within one
8231 virtual machine are not allowed. Every machine has a single branch,
8232 and <link to="IConsole::takeSnapshot"/> operation adds a new
8233 snapshot to the top of that branch.
8234 </desc>
8235
8236 <attribute name="id" type="uuid" mod="string" readonly="yes">
8237 <desc>UUID of the snapshot.</desc>
8238 </attribute>
8239
8240 <attribute name="name" type="wstring">
8241 <desc>Short name of the snapshot.</desc>
8242 </attribute>
8243
8244 <attribute name="description" type="wstring">
8245 <desc>Optional description of the snapshot.</desc>
8246 </attribute>
8247
8248 <attribute name="timeStamp" type="long long" readonly="yes">
8249 <desc>
8250 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8251 </desc>
8252 </attribute>
8253
8254 <attribute name="online" type="boolean" readonly="yes">
8255 <desc>
8256 @c true if this snapshot is an online snapshot and @c false otherwise.
8257
8258 When this attribute is @c true, the
8259 <link to="IMachine::stateFilePath"/> attribute of the
8260 <link to="#machine"/> object associated with this snapshot
8261 will point to the saved state file. Otherwise, it will be
8262 an empty string.
8263 </desc>
8264 </attribute>
8265
8266 <attribute name="machine" type="IMachine" readonly="yes">
8267 <desc>
8268 Virtual machine this snapshot is taken on. This object
8269 stores all settings the machine had when taking this snapshot.
8270 <note>
8271 The returned machine object is immutable, i.e. no
8272 any settings can be changed.
8273 </note>
8274 </desc>
8275 </attribute>
8276
8277 <attribute name="parent" type="ISnapshot" readonly="yes">
8278 <desc>
8279 Parent snapshot (a snapshot this one is based on), or
8280 @c null if the snapshot has no parent.
8281 </desc>
8282 </attribute>
8283
8284 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8285 <desc>
8286 Child snapshots (all snapshots having this one as a parent).
8287 <note>
8288 In the current implementation, there can be only one
8289 child snapshot, or no children at all, meaning this is the
8290 last (head) snapshot.
8291 </note>
8292 </desc>
8293 </attribute>
8294
8295 </interface>
8296
8297
8298 <!--
8299 // IMedium
8300 /////////////////////////////////////////////////////////////////////////
8301 -->
8302
8303 <enum
8304 name="MediumState"
8305 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8306 >
8307 <desc>
8308 Virtual medium state.
8309 <see>IMedium</see>
8310 </desc>
8311
8312 <const name="NotCreated" value="0">
8313 <desc>
8314 Associated medium storage does not exist (either was not created yet or
8315 was deleted).
8316 </desc>
8317 </const>
8318 <const name="Created" value="1">
8319 <desc>
8320 Associated storage exists and accessible; this gets set if the
8321 accessibility check performed by <link to="IMedium::refreshState" />
8322 was successful.
8323 </desc>
8324 </const>
8325 <const name="LockedRead" value="2">
8326 <desc>
8327 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8328 no data modification is possible.
8329 </desc>
8330 </const>
8331 <const name="LockedWrite" value="3">
8332 <desc>
8333 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8334 no concurrent data reading or modification is possible.
8335 </desc>
8336 </const>
8337 <const name="Inaccessible" value="4">
8338 <desc>
8339 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8340 not yet been performed, or else, associated medium storage is not
8341 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8342 is empty, in the second case, it describes the error that occured.
8343 </desc>
8344 </const>
8345 <const name="Creating" value="5">
8346 <desc>
8347 Associated medium storage is being created.
8348 </desc>
8349 </const>
8350 <const name="Deleting" value="6">
8351 <desc>
8352 Associated medium storage is being deleted.
8353 </desc>
8354 </const>
8355 </enum>
8356
8357 <enum
8358 name="MediumType"
8359 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8360 >
8361 <desc>
8362 Virtual medium type.
8363 <see>IMedium</see>
8364 </desc>
8365
8366 <const name="Normal" value="0">
8367 <desc>
8368 Normal medium (attached directly or indirectly, preserved
8369 when taking snapshots).
8370 </desc>
8371 </const>
8372 <const name="Immutable" value="1">
8373 <desc>
8374 Immutable medium (attached indirectly, changes are wiped out
8375 the next time the virtual machine is started).
8376 </desc>
8377 </const>
8378 <const name="Writethrough" value="2">
8379 <desc>
8380 Write through medium (attached directly, ignored when
8381 taking snapshots).
8382 </desc>
8383 </const>
8384 </enum>
8385
8386 <enum
8387 name="MediumVariant"
8388 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8389 >
8390 <desc>
8391 Virtual medium image variant. More than one flag may be set.
8392 <see>IMedium</see>
8393 </desc>
8394
8395 <const name="Standard" value="0">
8396 <desc>
8397 No particular variant requested, results in using the backend default.
8398 </desc>
8399 </const>
8400 <const name="VmdkSplit2G" value="0x01">
8401 <desc>
8402 VMDK image split in chunks of less than 2GByte.
8403 </desc>
8404 </const>
8405 <const name="VmdkStreamOptimized" value="0x04">
8406 <desc>
8407 VMDK streamOptimized image. Special import/export format which is
8408 read-only/append-only.
8409 </desc>
8410 </const>
8411 <const name="VmdkESX" value="0x08">
8412 <desc>
8413 VMDK format variant used on ESX products.
8414 </desc>
8415 </const>
8416 <const name="Fixed" value="0x10000">
8417 <desc>
8418 Fixed image. Only allowed for base images.
8419 </desc>
8420 </const>
8421 <const name="Diff" value="0x20000">
8422 <desc>
8423 Fixed image. Only allowed for base images.
8424 </desc>
8425 </const>
8426 </enum>
8427
8428 <interface
8429 name="IMediumAttachment" extends="$unknown"
8430 uuid="7bb6ac41-8c03-4863-9eea-d9c76561b8d1"
8431 wsmap="struct"
8432 >
8433 <desc>
8434 The IMediumAttachment interface represents the attachment
8435 of a storage medium to a virtual machine. Each machine contains
8436 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8437
8438 Each medium attachment specifies a storage controller as well as a port
8439 and device number. Fixed media (hard disks) will always also specify
8440 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8441 medium. For removeable media, the IMedia instance is optional; it can be
8442 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
8443 </desc>
8444
8445 <attribute name="medium" type="IMedium" readonly="yes">
8446 <desc>Medium object associated with this attachment; it
8447 can be @c null for removable devices.</desc>
8448 </attribute>
8449
8450 <attribute name="controller" type="IStorageController" readonly="yes">
8451 <desc>Storage controller object to which this attachment belongs.</desc>
8452 </attribute>
8453
8454 <attribute name="port" type="long" readonly="yes">
8455 <desc>Port number of this attachment.</desc>
8456 </attribute>
8457
8458 <attribute name="device" type="long" readonly="yes">
8459 <desc>Device slot number of this attachment.</desc>
8460 </attribute>
8461
8462 <attribute name="type" type="DeviceType" readonly="yes">
8463 <desc>Device type of this attachment.</desc>
8464 </attribute>
8465
8466 <attribute name="passthrough" type="boolean" readonly="yes">
8467 <desc>Pass I/O requests through to a device on the host.</desc>
8468 </attribute>
8469
8470 </interface>
8471
8472 <interface
8473 name="IMedium" extends="$unknown"
8474 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
8475 wsmap="managed"
8476 >
8477 <desc>
8478 The IMedium interface represents virtual storage for a machine's
8479 hard disks, CD/DVD or floppy drives. It will typically represent
8480 a disk image on the host, for example a VDI or VMDK file representing
8481 a virtual hard disk, or an ISO or RAW file representing virtual
8482 removable media, but can also point to a network location (e.g.
8483 for iSCSI targets).
8484
8485 Instances of IMedium are connected to virtual machines by way of
8486 medium attachments (see <link to="IMediumAttachment" />), which link
8487 the storage medium to a particular device slot of a storage controller
8488 of the virtual machine.
8489 In the VirtualBox API, virtual storage is therefore always represented
8490 by the following chain of object links:
8491
8492 <ul>
8493 <li><link to="IMachine::storageControllers"/> contains an array of
8494 storage controllers (IDE, SATA, SCSI or a floppy controller;
8495 these are instances of <link to="IStorageController"/>).</li>
8496 <li><link to="IMachine::mediumAttachments"/> contains an array of
8497 medium attachments (instances of <link to="IMediumAttachment"/>),
8498 each containing the name of a storage controller from the above
8499 array, a port/device specification, and an instance of
8500 IMedium representing the medium storage (image file). For removable
8501 media, the storage medium is optional; a medium attachment with no
8502 medium represents a CD/DVD or floppy drive with no medium inserted.
8503 By contrast, hard disk attachments will always have an IMedium
8504 object attached.</li>
8505 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8506 computer or a network resource) that holds actual data. The location of
8507 the storage unit is represented by the <link to="#location"/> attribute.
8508 The value of this attribute is medium type dependent.</li>
8509 </ul>
8510
8511 Existing media are opened using the following methods, depending on the
8512 media type:
8513 <ul>
8514 <li><link to="IVirtualBox::openHardDisk"/></li>
8515 <li><link to="IVirtualBox::openDVDImage"/></li>
8516 <li><link to="IVirtualBox::openFloppyImage"/></li>
8517 </ul>
8518
8519 New hard disk media can be created with the VirtualBox API using the
8520 <link to="IVirtualBox::createHardDisk"/> method.
8521
8522 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8523 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8524 type in a regular file.
8525
8526 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8527 drive; in that case the <link to="#id" /> attribute contains the UUID of
8528 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8529
8530 <h3>Known media</h3>
8531
8532 When an existing medium is opened for the first time, it is automatically
8533 remembered by the given VirtualBox installation or, in other words, becomes
8534 a <i>known medium</i>. Known media are stored in the media
8535 registry transparently maintained by VirtualBox and stored in settings
8536 files so that this registry is preserved when VirtualBox is not running.
8537
8538 Newly created virtual media are remembered only when the associated
8539 storage unit is actually created.
8540
8541 All known media can be enumerated using
8542 <link to="IVirtualBox::hardDisks"/>,
8543 <link to="IVirtualBox::DVDImages"/> and
8544 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8545 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8546 and similar methods or by location using
8547 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8548
8549 Only known media can be attached to virtual machines.
8550
8551 Removing known media from the media registry is performed when the given
8552 medium is closed using the <link to="#close"/> method or when its
8553 associated storage unit is deleted.
8554
8555 <h3>Accessibility checks</h3>
8556
8557 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8558 method is called explicitly on a medium. This is done to make the VirtualBox object
8559 ready for serving requests as fast as possible and let the end-user
8560 application decide if it needs to check media accessibility right away or not.
8561
8562 As a result, when VirtualBox starts up (e.g. the VirtualBox
8563 object gets created for the first time), all known media are in the
8564 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8565 attribute is an empty string because no actual accessibility check has
8566 been made yet.
8567
8568 After calling <link to="#refreshState" />, a medium is considered
8569 <i>accessible</i> if its storage unit can be read. In that case, the
8570 <link to="#state"/> attribute has a value of "Created". If the storage
8571 unit cannot be read (for example, because it is located on a disconnected
8572 network resource, or was accidentally deleted outside VirtualBox),
8573 the medium is considered <i>inaccessible</i>, which is indicated by the
8574 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8575 obtained by reading the <link to="#lastAccessError"/> attribute.
8576
8577 <h3>Medium types</h3>
8578
8579 There are three types of medium behavior (see <link to="MediumType" />):
8580 "normal", "immutable" and "writethrough", represented by the
8581 <link to="#type"/> attribute. The type of the medium defines how the
8582 medium is attached to a virtual machine and what happens when a
8583 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8584 attached medium is taken. At the moment DVD and floppy media are always
8585 of type "writethrough".
8586
8587 All media can be also divided in two groups: <i>base</i> media and
8588 <i>differencing</i> media. A base medium contains all sectors of the
8589 medium data in its own storage and therefore can be used independently.
8590 In contrast, a differencing mediun is a "delta" to some other medium and
8591 contains only those sectors which differ from that other medium, which is
8592 then called a <i>parent</i>. The differencing medium is said to be
8593 <i>linked to</i> that parent. The parent may be itself a differencing
8594 medium, thus forming a chain of linked media. The last element in that
8595 chain must always be a base medium. Note that several differencing
8596 media may be linked to the same parent medium.
8597
8598 Differencing media can be distinguished from base media by querying the
8599 <link to="#parent"/> attribute: base media do not have parents they would
8600 depend on, so the value of this attribute is always @c null for them.
8601 Using this attribute, it is possible to walk up the medium tree (from the
8602 child medium to its parent). It is also possible to walk down the tree
8603 using the <link to="#children"/> attribute.
8604
8605 Note that the type of all differencing media is
8606 <link to="MediumType_Normal" />; all other values are meaningless for
8607 them. Base media may be of any type.
8608
8609 <h3>Creating hard disks</h3>
8610
8611 New base hard disks are created using
8612 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8613 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8614 disks are usually implicitly created by VirtualBox when needed but may
8615 also be created explicitly using <link to="#createDiffStorage"/>.
8616
8617 After the hard disk is successfully created (including the storage unit)
8618 or opened, it becomes a known hard disk (remembered in the internal media
8619 registry). Known hard disks can be attached to a virtual machine, accessed
8620 through <link to="IVirtualBox::getHardDisk"/> and
8621 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8622 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8623
8624 The following methods, besides <link to="IMedium::close"/>,
8625 automatically remove the hard disk from the media registry:
8626 <ul>
8627 <li><link to="#deleteStorage"/></li>
8628 <li><link to="#mergeTo"/></li>
8629 </ul>
8630
8631 If the storage unit of the hard disk is a regular file in the host's
8632 file system then the rules stated in the description of the
8633 <link to="IMedium::location"/> attribute apply when setting its value. In
8634 addition, a plain file name without any path may be given, in which case
8635 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8636 folder</link> will be prepended to it.
8637
8638 <h4>Automatic composition of the file name part</h4>
8639
8640 Another extension to the <link to="IMedium::location"/> attribute is that
8641 there is a possibility to cause VirtualBox to compose a unique value for
8642 the file name part of the location using the UUID of the hard disk. This
8643 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8644 e.g. before the storage unit is created, and works as follows. You set the
8645 value of the <link to="IMedium::location"/> attribute to a location
8646 specification which only contains the path specification but not the file
8647 name part and ends with either a forward slash or a backslash character.
8648 In response, VirtualBox will generate a new UUID for the hard disk and
8649 compose the file name using the following pattern:
8650 <pre>
8651 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8652 </pre>
8653 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8654 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8655 is the default extension for the storage format of this hard disk. After
8656 that, you may call any of the methods that create a new hard disk storage
8657 unit and they will use the generated UUID and file name.
8658
8659 <h3>Attaching Hard Disks</h3>
8660
8661 Hard disks are attached to virtual machines using the
8662 <link to="IMachine::attachDevice"/> method and detached using the
8663 <link to="IMachine::detachDevice"/> method. Depending on their
8664 <link to="#type"/>, hard disks are attached either
8665 <i>directly</i> or <i>indirectly</i>.
8666
8667 When a hard disk is being attached directly, it is associated with the
8668 virtual machine and used for hard disk operations when the machine is
8669 running. When a hard disk is being attached indirectly, a new differencing
8670 hard disk linked to it is implicitly created and this differencing hard
8671 disk is associated with the machine and used for hard disk operations.
8672 This also means that if <link to="IMachine::attachDevice"/> performs
8673 a direct attachment then the same hard disk will be returned in response
8674 to the subsequent <link to="IMachine::getMedium"/> call; however if
8675 an indirect attachment is performed then
8676 <link to="IMachine::getMedium"/> will return the implicitly created
8677 differencing hard disk, not the original one passed to <link
8678 to="IMachine::attachDevice"/>. In detail:
8679
8680 <ul>
8681 <li><b>Normal base</b> hard disks that do not have children (i.e.
8682 differencing hard disks linked to them) and that are not already
8683 attached to virtual machines in snapshots are attached <b>directly</b>.
8684 Otherwise, they are attached <b>indirectly</b> because having
8685 dependent children or being part of the snapshot makes it impossible
8686 to modify hard disk contents without breaking the integrity of the
8687 dependent party. The <link to="#readOnly"/> attribute allows to
8688 quickly determine the kind of the attachment for the given hard
8689 disk. Note that if a normal base hard disk is to be indirectly
8690 attached to a virtual machine with snapshots then a special
8691 procedure called <i>smart attachment</i> is performed (see below).</li>
8692 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8693 they are attached <b>directly</b> if they do not have children and are
8694 not attached to virtual machines in snapshots, and <b>indirectly</b>
8695 otherwise. Note that the smart attachment procedure is never performed
8696 for differencing hard disks.</li>
8697 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8698 they are designed to be non-writable. If an immutable hard disk is
8699 attached to a virtual machine with snapshots then a special
8700 procedure called smart attachment is performed (see below).</li>
8701 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8702 also as designed. This also means that writethrough hard disks cannot
8703 have other hard disks linked to them at all.</li>
8704 </ul>
8705
8706 Note that the same hard disk, regardless of its type, may be attached to
8707 more than one virtual machine at a time. In this case, the machine that is
8708 started first gains exclusive access to the hard disk and attempts to
8709 start other machines having this hard disk attached will fail until the
8710 first machine is powered down.
8711
8712 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8713 that the given hard disk remains associated with the given machine after a
8714 successful <link to="IMachine::detachDevice"/> call until
8715 <link to="IMachine::saveSettings"/> is called to save all changes to
8716 machine settings to disk. This deferring is necessary to guarantee that
8717 the hard disk configuration may be restored at any time by a call to
8718 <link to="IMachine::discardSettings"/> before the settings
8719 are saved (committed).
8720
8721 Note that if <link to="IMachine::discardSettings"/> is called after
8722 indirectly attaching some hard disks to the machine but before a call to
8723 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8724 all differencing hard disks implicitly created by
8725 <link to="IMachine::attachDevice"/> for these indirect attachments.
8726 Such implicitly created hard disks will also be immediately deleted when
8727 detached explicitly using the <link to="IMachine::detachDevice"/>
8728 call if it is made before <link to="IMachine::saveSettings"/>. This
8729 implicit deletion is safe because newly created differencing hard
8730 disks do not contain any user data.
8731
8732 However, keep in mind that detaching differencing hard disks that were
8733 implicitly created by <link to="IMachine::attachDevice"/>
8734 before the last <link to="IMachine::saveSettings"/> call will
8735 <b>not</b> implicitly delete them as they may already contain some data
8736 (for example, as a result of virtual machine execution). If these hard
8737 disks are no more necessary, the caller can always delete them explicitly
8738 using <link to="#deleteStorage"/> after they are actually de-associated
8739 from this machine by the <link to="IMachine::saveSettings"/> call.
8740
8741 <h3>Smart Attachment</h3>
8742
8743 When normal base or immutable hard disks are indirectly attached to a
8744 virtual machine then some additional steps are performed to make sure the
8745 virtual machine will have the most recent "view" of the hard disk being
8746 attached. These steps include walking through the machine's snapshots
8747 starting from the current one and going through ancestors up to the first
8748 snapshot. Hard disks attached to the virtual machine in all
8749 of the encountered snapshots are checked whether they are descendants of
8750 the given normal base or immutable hard disk. The first found child (which
8751 is the differencing hard disk) will be used instead of the normal base or
8752 immutable hard disk as a parent for creating a new differencing hard disk
8753 that will be actually attached to the machine. And only if no descendants
8754 are found or if the virtual machine does not have any snapshots then the
8755 normal base or immutable hard disk will be used itself as a parent for
8756 this differencing hard disk.
8757
8758 It is easier to explain what smart attachment does using the
8759 following example:
8760 <pre>
8761BEFORE attaching B.vdi: AFTER attaching B.vdi:
8762
8763Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8764 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8765 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8766 Snapshot 4 (none) Snapshot 4 (none)
8767 CurState (none) CurState (D3->D2.vdi)
8768
8769 NOT
8770 ...
8771 CurState (D3->B.vdi)
8772 </pre>
8773 The first column is the virtual machine configuration before the base hard
8774 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8775 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8776 mean that the hard disk that is actually attached to the machine is a
8777 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8778 another hard disk, <tt>B.vdi</tt>.
8779
8780 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8781 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8782 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8783 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8784 it cannot be attached directly and needs an indirect attachment (i.e.
8785 implicit creation of a new differencing hard disk). Due to the smart
8786 attachment procedure, the new differencing hard disk
8787 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8788 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8789 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8790 machine.
8791
8792 Note that if there is more than one descendant hard disk of the given base
8793 hard disk found in a snapshot, and there is an exact device, channel and
8794 bus match, then this exact match will be used. Otherwise, the youngest
8795 descendant will be picked up.
8796
8797 There is one more important aspect of the smart attachment procedure which
8798 is not related to snapshots at all. Before walking through the snapshots
8799 as described above, the backup copy of the current list of hard disk
8800 attachment is searched for descendants. This backup copy is created when
8801 the hard disk configuration is changed for the first time after the last
8802 <link to="IMachine::saveSettings"/> call and used by
8803 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8804 changes. When such a descendant is found in this backup copy, it will be
8805 simply re-attached back, without creating a new differencing hard disk for
8806 it. This optimization is necessary to make it possible to re-attach the
8807 base or immutable hard disk to a different bus, channel or device slot
8808 without losing the contents of the differencing hard disk actually
8809 attached to the machine in place of it.
8810 </desc>
8811
8812 <attribute name="id" type="uuid" mod="string" readonly="yes">
8813 <desc>
8814 UUID of the medium. For a newly created medium, this value is a randomly
8815 generated UUID.
8816
8817 <note>
8818 For media in one of MediumState_NotCreated, MediumState_Creating or
8819 MediumState_Deleting states, the value of this property is undefined
8820 and will most likely be an empty UUID.
8821 </note>
8822 </desc>
8823 </attribute>
8824
8825 <attribute name="description" type="wstring">
8826 <desc>
8827 Optional description of the medium. For a newly created medium the value
8828 of this attribute is an empty string.
8829
8830 Medium types that don't support this attribute will return E_NOTIMPL in
8831 attempt to get or set this attribute's value.
8832
8833 <note>
8834 For some storage types, reading this attribute may return an outdated
8835 (last known) value when <link to="#state"/> is <link
8836 to="MediumState_Inaccessible"/> or <link
8837 to="MediumState_LockedWrite"/> because the value of this attribute is
8838 stored within the storage unit itself. Also note that changing the
8839 attribute value is not possible in such case, as well as when the
8840 medium is the <link to="MediumState_LockedRead"/> state.
8841 </note>
8842 </desc>
8843 </attribute>
8844
8845 <attribute name="state" type="MediumState" readonly="yes">
8846 <desc>
8847 Returns the current medium state, which is the last state set by
8848 the accessibility check performed by <link to="#refreshState"/>.
8849 If that method has not yet been called on the medium, the state
8850 is "Inaccessible"; as opposed to truly inaccessible media, the
8851 value of <link to="#lastAccessError"/> will be an empty string in
8852 that case.
8853
8854 <note>As of version 3.1, this no longer performs an accessibility check
8855 automatically; call <link to="#refreshState"/> for that.
8856 </note>
8857 </desc>
8858 </attribute>
8859
8860 <attribute name="location" type="wstring">
8861 <desc>
8862 Location of the storage unit holding medium data.
8863
8864 The format of the location string is medium type specific. For medium
8865 types using regular files in a host's file system, the location
8866 string is the full file name.
8867
8868 Some medium types may support changing the storage unit location by
8869 simply changing the value of this property. If this operation is not
8870 supported, the implementation will return E_NOTIMPL in attempt to set
8871 this attribute's value.
8872
8873 When setting a value of the location attribute which is a regular file
8874 in the host's file system, the given file name may be either relative to
8875 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8876 absolute. Note that if the given location specification does not contain
8877 the file extension part then a proper default extension will be
8878 automatically appended by the implementation depending on the medium type.
8879 </desc>
8880 </attribute>
8881
8882 <attribute name="name" type="wstring" readonly="yes">
8883 <desc>
8884 Name of the storage unit holding medium data.
8885
8886 The returned string is a short version of the <link to="#location"/>
8887 attribute that is suitable for representing the medium in situations
8888 where the full location specification is too long (such as lists
8889 and comboboxes in GUI frontends). This string is also used by frontends
8890 to sort the media list alphabetically when needed.
8891
8892 For example, for locations that are regular files in the host's file
8893 system, the value of this attribute is just the file name (+ extension),
8894 without the path specification.
8895
8896 Note that as opposed to the <link to="#location"/> attribute, the name
8897 attribute will not necessary be unique for a list of media of the
8898 given type and format.
8899 </desc>
8900 </attribute>
8901
8902 <attribute name="deviceType" type="DeviceType" readonly="yes">
8903 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8904 medium.</desc>
8905 </attribute>
8906
8907 <attribute name="hostDrive" type="boolean" readonly="yes">
8908 <desc>True if this corresponds to a drive on the host.</desc>
8909 </attribute>
8910
8911 <attribute name="size" type="unsigned long long" readonly="yes">
8912 <desc>
8913 Physical size of the storage unit used to hold medium data (in bytes).
8914
8915 <note>
8916 For media whose <link to="#state"/> is <link
8917 to="MediumState_Inaccessible"/>, the value of this property is the
8918 last known size. For <link to="MediumState_NotCreated"/> media,
8919 the returned value is zero.
8920 </note>
8921 </desc>
8922 </attribute>
8923
8924 <attribute name="format" type="wstring" readonly="yes">
8925 <desc>
8926 Storage format of this medium.
8927
8928 The value of this attribute is a string that specifies a backend used
8929 to store medium data. The storage format is defined when you create a
8930 new medium or automatically detected when you open an existing medium,
8931 and cannot be changed later.
8932
8933 The list of all storage formats supported by this VirtualBox
8934 installation can be obtained using
8935 <link to="ISystemProperties::mediumFormats"/>.
8936 </desc>
8937 </attribute>
8938
8939 <attribute name="type" type="MediumType">
8940 <desc>
8941 Type (role) of this medium.
8942
8943 The following constraints apply when changing the value of this
8944 attribute:
8945 <ul>
8946 <li>If a medium is attached to a virtual machine (either in the
8947 current state or in one of the snapshots), its type cannot be
8948 changed.
8949 </li>
8950 <li>As long as the medium has children, its type cannot be set
8951 to <link to="MediumType_Writethrough"/>.
8952 </li>
8953 <li>The type of all differencing media is
8954 <link to="MediumType_Normal"/> and cannot be changed.
8955 </li>
8956 </ul>
8957
8958 The type of a newly created or opened medium is set to
8959 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8960 which have a type of <link to="MediumType_Writethrough"/>.
8961 </desc>
8962 </attribute>
8963
8964 <attribute name="parent" type="IMedium" readonly="yes">
8965 <desc>
8966 Parent of this medium (the medium this medium is directly based
8967 on).
8968
8969 Only differencing media have parents. For base (non-differencing)
8970 media, @c null is returned.
8971 </desc>
8972 </attribute>
8973
8974 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8975 <desc>
8976 Children of this medium (all differencing media directly based
8977 on this medium). A @c null array is returned if this medium
8978 does not have any children.
8979 </desc>
8980 </attribute>
8981
8982 <attribute name="base" type="IMedium" readonly="yes">
8983 <desc>
8984 Base medium of this medium.
8985
8986 If this is a differencing medium, its base medium is the medium
8987 the given medium branch starts from. For all other types of media, this
8988 property returns the medium object itself (i.e. the same object this
8989 property is read on).
8990 </desc>
8991 </attribute>
8992
8993 <attribute name="readOnly" type="boolean" readonly="yes">
8994 <desc>
8995 Returns @c true if this medium is read-only and @c false otherwise.
8996
8997 A medium is considered to be read-only when its contents cannot be
8998 modified without breaking the integrity of other parties that depend on
8999 this medium such as its child media or snapshots of virtual machines
9000 where this medium is attached to these machines. If there are no
9001 children and no such snapshots then there is no dependency and the
9002 medium is not read-only.
9003
9004 The value of this attribute can be used to determine the kind of the
9005 attachment that will take place when attaching this medium to a
9006 virtual machine. If the value is @c false then the medium will
9007 be attached directly. If the value is @c true then the medium
9008 will be attached indirectly by creating a new differencing child
9009 medium for that. See the interface description for more information.
9010
9011 Note that all <link to="MediumType_Immutable">Immutable</link> media
9012 are always read-only while all
9013 <link to="MediumType_Writethrough">Writethrough</link> media are
9014 always not.
9015
9016 <note>
9017 The read-only condition represented by this attribute is related to
9018 the medium type and usage, not to the current
9019 <link to="IMedium::state">medium state</link> and not to the read-only
9020 state of the storage unit.
9021 </note>
9022 </desc>
9023 </attribute>
9024
9025 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9026 <desc>
9027 Logical size of this medium (in megabytes), as reported to the
9028 guest OS running inside the virtual machine this medium is
9029 attached to. The logical size is defined when the medium is created
9030 and cannot be changed later.
9031
9032 <note>
9033 Reading this property on a differencing medium will return the size
9034 of its <link to="#base"/> medium.
9035 </note>
9036 <note>
9037 For media whose state is <link to="#state"/> is <link
9038 to="MediumState_Inaccessible"/>, the value of this property is the
9039 last known logical size. For <link to="MediumaState_NotCreated"/>
9040 media, the returned value is zero.
9041 </note>
9042 </desc>
9043 </attribute>
9044
9045 <attribute name="autoReset" type="boolean">
9046 <desc>
9047 Whether this differencing medium will be automatically reset each
9048 time a virtual machine it is attached to is powered up.
9049
9050 See <link to="#reset()"/> for more information about resetting
9051 differencing media.
9052
9053 <note>
9054 Reading this property on a base (non-differencing) medium will
9055 always @c false. Changing the value of this property in this
9056 case is not supported.
9057 </note>
9058
9059 <result name="VBOX_E_NOT_SUPPORTED">
9060 This is not a differencing medium (when changing the attribute
9061 value).
9062 </result>
9063 </desc>
9064 </attribute>
9065
9066 <attribute name="lastAccessError" type="wstring" readonly="yes">
9067 <desc>
9068 Text message that represents the result of the last accessibility
9069 check performed by <link to="#refreshState"/>.
9070
9071 An empty string is returned if the last accessibility check
9072 was successful or has not yet been called. As a result, if
9073 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9074 then <link to="#refreshState"/> has yet to be called; this is the
9075 default value of media after VirtualBox initialization.
9076 A non-empty string indicates a failure and should normally describe
9077 a reason of the failure (for example, a file read error).
9078 </desc>
9079 </attribute>
9080
9081 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9082 <desc>
9083 Array of UUIDs of all machines this medium is attached to.
9084
9085 A @c null array is returned if this medium is not attached to any
9086 machine or to any machine's snapshot.
9087
9088 <note>
9089 The returned array will include a machine even if this medium is not
9090 attached to that machine in the current state but attached to it in
9091 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9092 details.
9093 </note>
9094 </desc>
9095 </attribute>
9096
9097 <method name="refreshState">
9098 <desc>
9099 If the current medium state (see <link to="MediumState"/>) is one of
9100 "Created", "Inaccessible" or "LockedRead", then this performs an
9101 accessibility check on the medium and sets the value of the <link to="#state"/>
9102 attribute accordingly; that value is also returned for convenience.
9103
9104 For all other state values, this does not perform a refresh but returns
9105 the state only.
9106
9107 The refresh, if performed, may take a long time (several seconds or even
9108 minutes, depending on the storage unit location and format) because it performs an
9109 accessibility check of the storage unit. This check may cause a significant
9110 delay if the storage unit of the given medium is, for example, a file located
9111 on a network share which is not currently accessible due to connectivity
9112 problems. In that case, the call will not return until a timeout
9113 interval defined by the host OS for this operation expires. For this reason,
9114 it is recommended to never read this attribute on the main UI thread to avoid
9115 making the UI unresponsive.
9116
9117 If the last known state of the medium is "Created" and the accessibility
9118 check fails, then the state would be set to "Inaccessible", and
9119 <link to="#lastAccessError"/> may be used to get more details about the
9120 failure. If the state of the medium is "LockedRead", then it remains the
9121 same, and a non-empty value of <link to="#lastAccessError"/> will
9122 indicate a failed accessibility check in this case.
9123
9124 Note that not all medium states are applicable to all medium types.
9125 </desc>
9126 <param name="state" type="MediumState" dir="return">
9127 <desc>
9128 New medium state.
9129 </desc>
9130 </param>
9131 </method>
9132
9133 <method name="getSnapshotIds">
9134 <desc>
9135 Returns an array of UUIDs of all snapshots of the given machine where
9136 this medium is attached to.
9137
9138 If the medium is attached to the machine in the current state, then the
9139 first element in the array will always be the ID of the queried machine
9140 (i.e. the value equal to the @c machineId argument), followed by
9141 snapshot IDs (if any).
9142
9143 If the medium is not attached to the machine in the current state, then
9144 the array will contain only snapshot IDs.
9145
9146 The returned array may be @c null if this medium is not attached
9147 to the given machine at all, neither in the current state nor in one of
9148 the snapshots.
9149 </desc>
9150 <param name="machineId" type="uuid" mod="string" dir="in">
9151 <desc>
9152 UUID of the machine to query.
9153 </desc>
9154 </param>
9155 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9156 <desc>
9157 Array of snapshot UUIDs of the given machine using this medium.
9158 </desc>
9159 </param>
9160 </method>
9161
9162 <method name="lockRead">
9163 <desc>
9164 Locks this medium for reading.
9165
9166 A read lock is shared: many clients can simultaneously lock the
9167 same medium for reading unless it is already locked for writing (see
9168 <link to="#lockWrite"/>) in which case an error is returned.
9169
9170 When the medium is locked for reading, it cannot be modified
9171 from within VirtualBox. This means that any method that changes
9172 the properties of this medium or contents of the storage unit
9173 will return an error (unless explicitly stated otherwise). That
9174 includes an attempt to start a virtual machine that wants to
9175 write to the the medium.
9176
9177 When the virtual machine is started up, it locks for reading all
9178 media it uses in read-only mode. If some medium cannot be locked
9179 for reading, the startup procedure will fail.
9180 A medium is typically locked for reading while it is used by a running
9181 virtual machine but has a depending differencing image that receives
9182 the actual write operations. This way one base medium can have
9183 multiple child differencing images which can be written to
9184 simultaneously. Read-only media such as DVD and floppy images are
9185 also locked for reading only (so they can be in use by multiple
9186 machines simultaneously).
9187
9188 A medium is also locked for reading when it is the source of a
9189 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9190
9191 The medium locked for reading must be unlocked using the <link
9192 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9193 can be nested and must be followed by the same number of paired
9194 <link to="#unlockRead"/> calls.
9195
9196 This method sets the medium state (see <link to="#state"/>) to
9197 "LockedRead" on success. The medium's previous state must be
9198 one of "Created", "Inaccessible" or "LockedRead".
9199
9200 Locking an inaccessible medium is not an error; this method performs
9201 a logical lock that prevents modifications of this medium through
9202 the VirtualBox API, not a physical file-system lock of the underlying
9203 storage unit.
9204
9205 This method returns the current state of the medium
9206 <i>before</i> the operation.
9207
9208 <result name="VBOX_E_INVALID_OBJECT_STATE">
9209 Invalid medium state (e.g. not created, locked, inaccessible,
9210 creating, deleting).
9211 </result>
9212
9213 </desc>
9214 <param name="state" type="MediumState" dir="return">
9215 <desc>
9216 State of the medium after the operation.
9217 </desc>
9218 </param>
9219 </method>
9220
9221 <method name="unlockRead">
9222 <desc>
9223 Cancels the read lock previously set by <link to="#lockRead"/>.
9224
9225 For both success and failure, this method returns the current state
9226 of the medium <i>after</i> the operation.
9227
9228 See <link to="#lockRead"/> for more details.
9229
9230 <result name="VBOX_E_INVALID_OBJECT_STATE">
9231 Medium not locked for reading.
9232 </result>
9233
9234 </desc>
9235 <param name="state" type="MediumState" dir="return">
9236 <desc>
9237 State of the medium after the operation.
9238 </desc>
9239 </param>
9240 </method>
9241
9242 <method name="lockWrite">
9243 <desc>
9244 Locks this medium for writing.
9245
9246 A write lock, as opposed to <link to="#lockRead"/>, is
9247 exclusive: there may be only one client holding a write lock,
9248 and there may be no read locks while the write lock is held.
9249 As a result, read-locking fails if a write lock is held, and
9250 write-locking fails if either a read or another write lock is held.
9251
9252 When a medium is locked for writing, it cannot be modified
9253 from within VirtualBox, and it is not guaranteed that the values
9254 of its properties are up-to-date. Any method that changes the
9255 properties of this medium or contents of the storage unit will
9256 return an error (unless explicitly stated otherwise).
9257
9258 When a virtual machine is started up, it locks for writing all
9259 media it uses to write data to. If any medium could not be locked
9260 for writing, the startup procedure will fail. If a medium has
9261 differencing images, then while the machine is running, only
9262 the last ("leaf") differencing image is locked for writing,
9263 whereas its parents are locked for reading only.
9264
9265 A medium is also locked for writing when it is the target of a
9266 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9267
9268 The medium locked for writing must be unlocked using the <link
9269 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9270
9271 This method sets the medium state (see <link to="#state"/>) to
9272 "LockedWrite" on success. The medium's previous state must be
9273 either "Created" or "Inaccessible".
9274
9275 Locking an inaccessible medium is not an error; this method performs
9276 a logical lock that prevents modifications of this medium through
9277 the VirtualBox API, not a physical file-system lock of the underlying
9278 storage unit.
9279
9280 For both, success and failure, this method returns the current
9281 state of the medium <i>before</i> the operation.
9282
9283 <result name="VBOX_E_INVALID_OBJECT_STATE">
9284 Invalid medium state (e.g. not created, locked, inaccessible,
9285 creating, deleting).
9286 </result>
9287
9288 </desc>
9289 <param name="state" type="MediumState" dir="return">
9290 <desc>
9291 State of the medium after the operation.
9292 </desc>
9293 </param>
9294 </method>
9295
9296 <method name="unlockWrite">
9297 <desc>
9298 Cancels the write lock previously set by <link to="#lockWrite"/>.
9299
9300 For both success and failure, this method returns the current
9301 state of the medium <i>after</i> the operation.
9302
9303 See <link to="#lockWrite"/> for more details.
9304
9305 <result name="VBOX_E_INVALID_OBJECT_STATE">
9306 Medium not locked for writing.
9307 </result>
9308
9309 </desc>
9310 <param name="state" type="MediumState" dir="return">
9311 <desc>
9312 State of the medium after the operation.
9313 </desc>
9314 </param>
9315 </method>
9316
9317 <method name="close">
9318 <desc>
9319 Closes this medium.
9320
9321 The medium must not be attached to any known virtual machine
9322 and must not have any known child media, otherwise the
9323 operation will fail.
9324
9325 When the medium is successfully closed, it gets removed from
9326 the list of remembered media, but its storage unit is not
9327 deleted. In particular, this means that this medium can be
9328 later opened again using the <link
9329 to="IVirtualBox::openHardDisk"/> call.
9330
9331 Note that after this method successfully returns, the given medium
9332 object becomes uninitialized. This means that any attempt
9333 to call any of its methods or attributes will fail with the
9334 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9335
9336 <result name="VBOX_E_INVALID_OBJECT_STATE">
9337 Invalid medium state (other than not created, created or
9338 inaccessible).
9339 </result>
9340 <result name="VBOX_E_OBJECT_IN_USE">
9341 Medium attached to virtual machine.
9342 </result>
9343 <result name="VBOX_E_FILE_ERROR">
9344 Settings file not accessible.
9345 </result>
9346 <result name="VBOX_E_XML_ERROR">
9347 Could not parse the settings file.
9348 </result>
9349
9350 </desc>
9351 </method>
9352
9353 <!-- storage methods -->
9354
9355 <method name="getProperty">
9356 <desc>
9357 Returns the value of the custom medium property with the given name.
9358
9359 The list of all properties supported by the given medium format can
9360 be obtained with <link to="IMediumFormat::describeProperties"/>.
9361
9362 Note that if this method returns an empty string in @a value, the
9363 requested property is supported but currently not assigned any value.
9364
9365 <result name="VBOX_E_OBJECT_NOT_FOUND">
9366 Requested property does not exist (not supported by the format).
9367 </result>
9368 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9369 </desc>
9370 <param name="name" type="wstring" dir="in">
9371 <desc>Name of the property to get.</desc>
9372 </param>
9373 <param name="value" type="wstring" dir="return">
9374 <desc>Current property value.</desc>
9375 </param>
9376 </method>
9377
9378 <method name="setProperty">
9379 <desc>
9380 Sets the value of the custom medium property with the given name.
9381
9382 The list of all properties supported by the given medium format can
9383 be obtained with <link to="IMediumFormat::describeProperties"/>.
9384
9385 Note that setting the property value to @c null or an empty string is
9386 equivalent to deleting the existing value. A default value (if it is
9387 defined for this property) will be used by the format backend in this
9388 case.
9389
9390 <result name="VBOX_E_OBJECT_NOT_FOUND">
9391 Requested property does not exist (not supported by the format).
9392 </result>
9393 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9394 </desc>
9395 <param name="name" type="wstring" dir="in">
9396 <desc>Name of the property to set.</desc>
9397 </param>
9398 <param name="value" type="wstring" dir="in">
9399 <desc>Property value to set.</desc>
9400 </param>
9401 </method>
9402
9403 <method name="getProperties">
9404 <desc>
9405 Returns values for a group of properties in one call.
9406
9407 The names of the properties to get are specified using the @a names
9408 argument which is a list of comma-separated property names or
9409 an empty string if all properties are to be returned. Note that currently
9410 the value of this argument is ignored and the method always returns all
9411 existing properties.
9412
9413 The list of all properties supported by the given medium format can
9414 be obtained with <link to="IMediumFormat::describeProperties"/>.
9415
9416 The method returns two arrays, the array of property names corresponding
9417 to the @a names argument and the current values of these properties.
9418 Both arrays have the same number of elements with each elemend at the
9419 given index in the first array corresponds to an element at the same
9420 index in the second array.
9421
9422 Note that for properties that do not have assigned values,
9423 an empty string is returned at the appropriate index in the
9424 @a returnValues array.
9425
9426 </desc>
9427 <param name="names" type="wstring" dir="in">
9428 <desc>
9429 Names of properties to get.
9430 </desc>
9431 </param>
9432 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9433 <desc>Names of returned properties.</desc>
9434 </param>
9435 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9436 <desc>Values of returned properties.</desc>
9437 </param>
9438 </method>
9439
9440 <method name="setProperties">
9441 <desc>
9442 Sets values for a group of properties in one call.
9443
9444 The names of the properties to set are passed in the @a names
9445 array along with the new values for them in the @a values array. Both
9446 arrays have the same number of elements with each elemend at the given
9447 index in the first array corresponding to an element at the same index
9448 in the second array.
9449
9450 If there is at least one property name in @a names that is not valid,
9451 the method will fail before changing the values of any other properties
9452 from the @a names array.
9453
9454 Using this method over <link to="#setProperty"/> is preferred if you
9455 need to set several properties at once since it will result into less
9456 IPC calls.
9457
9458 The list of all properties supported by the given medium format can
9459 be obtained with <link to="IMediumFormat::describeProperties"/>.
9460
9461 Note that setting the property value to @c null or an empty string is
9462 equivalent to deleting the existing value. A default value (if it is
9463 defined for this property) will be used by the format backend in this
9464 case.
9465 </desc>
9466 <param name="names" type="wstring" safearray="yes" dir="in">
9467 <desc>Names of properties to set.</desc>
9468 </param>
9469 <param name="values" type="wstring" safearray="yes" dir="in">
9470 <desc>Values of properties to set.</desc>
9471 </param>
9472 </method>
9473
9474 <!-- storage methods -->
9475
9476 <method name="createBaseStorage">
9477 <desc>
9478 Starts creating a hard disk storage unit (fixed/dynamic, according
9479 to the variant flags) in in the background. The previous storage unit
9480 created for this object, if any, must first be deleted using
9481 <link to="#deleteStorage"/>, otherwise the operation will fail.
9482
9483 Before the operation starts, the medium is placed in
9484 <link to="MediumState_Creating"/> state. If the create operation
9485 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9486 state.
9487
9488 After the returned progress object reports that the operation has
9489 successfully completed, the medium state will be set to <link
9490 to="MediumState_Created"/>, the medium will be remembered by this
9491 VirtualBox installation and may be attached to virtual machines.
9492
9493 <result name="VBOX_E_NOT_SUPPORTED">
9494 The variant of storage creation operation is not supported. See <link
9495 to="IMediumFormat::capabilities"/>.
9496 </result>
9497 </desc>
9498 <param name="logicalSize" type="unsigned long long" dir="in">
9499 <desc>Maximum logical size of the medium in megabytes.</desc>
9500 </param>
9501 <param name="variant" type="MediumVariant" dir="in">
9502 <desc>Exact image variant which should be created.</desc>
9503 </param>
9504 <param name="progress" type="IProgress" dir="return">
9505 <desc>Progress object to track the operation completion.</desc>
9506 </param>
9507 </method>
9508
9509 <method name="deleteStorage">
9510 <desc>
9511 Starts deleting the storage unit of this medium.
9512
9513 The medium must not be attached to any known virtual machine and must
9514 not have any known child media, otherwise the operation will fail.
9515 It will also fail if there is no storage unit to delete or if deletion
9516 is already in progress, or if the medium is being in use (locked for
9517 read or for write) or inaccessible. Therefore, the only valid state for
9518 this operation to succeed is <link to="MediumState_Created"/>.
9519
9520 Before the operation starts, the medium is placed in
9521 <link to="MediumState_Deleting"/> state and gets removed from the list
9522 of remembered hard disks (media registry). If the delete operation
9523 fails, the medium will be remembered again and placed back to
9524 <link to="MediumState_Created"/> state.
9525
9526 After the returned progress object reports that the operation is
9527 complete, the medium state will be set to
9528 <link to="MediumState_NotCreated"/> and you will be able to use one of
9529 the storage creation methods to create it again.
9530
9531 <see>#close()</see>
9532
9533 <result name="VBOX_E_OBJECT_IN_USE">
9534 Medium is attached to a virtual machine.
9535 </result>
9536 <result name="VBOX_E_NOT_SUPPORTED">
9537 Storage deletion is not allowed because neither of storage creation
9538 operations are supported. See
9539 <link to="IMediumFormat::capabilities"/>.
9540 </result>
9541
9542 <note>
9543 If the deletion operation fails, it is not guaranteed that the storage
9544 unit still exists. You may check the <link to="IMedium::state"/> value
9545 to answer this question.
9546 </note>
9547 </desc>
9548 <param name="progress" type="IProgress" dir="return">
9549 <desc>Progress object to track the operation completion.</desc>
9550 </param>
9551 </method>
9552
9553 <!-- diff methods -->
9554
9555 <method name="createDiffStorage">
9556 <desc>
9557 Starts creating an empty differencing storage unit based on this
9558 medium in the format and at the location defined by the @a target
9559 argument.
9560
9561 The target medium must be in <link to="MediumState_NotCreated"/>
9562 state (i.e. must not have an existing storage unit). Upon successful
9563 completion, this operation will set the type of the target medium to
9564 <link to="MediumType_Normal"/> and create a storage unit necessary to
9565 represent the differencing medium data in the given format (according
9566 to the storage format of the target object).
9567
9568 After the returned progress object reports that the operation is
9569 successfully complete, the target medium gets remembered by this
9570 VirtualBox installation and may be attached to virtual machines.
9571
9572 <note>
9573 The medium will be set to <link to="MediumState_LockedRead"/>
9574 state for the duration of this operation.
9575 </note>
9576 <result name="VBOX_E_OBJECT_IN_USE">
9577 Medium not in @c NotCreated state.
9578 </result>
9579 </desc>
9580 <param name="target" type="IMedium" dir="in">
9581 <desc>Target medium.</desc>
9582 </param>
9583 <param name="variant" type="MediumVariant" dir="in">
9584 <desc>Exact image variant which should be created.</desc>
9585 </param>
9586 <param name="progress" type="IProgress" dir="return">
9587 <desc>Progress object to track the operation completion.</desc>
9588 </param>
9589 </method>
9590
9591 <method name="mergeTo">
9592 <desc>
9593 Starts merging the contents of this medium and all intermediate
9594 differencing media in the chain to the given target medium.
9595
9596 The target medium must be either a descendant of this medium or
9597 its ancestor (otherwise this method will immediately return a failure).
9598 It follows that there are two logical directions of the merge operation:
9599 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9600 ancestor (<i>backward merge</i>). Let us consider the following medium
9601 chain:
9602
9603 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9604
9605 Here, calling this method on the <tt>Base</tt> medium object with
9606 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9607 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9608 merge. Note that in both cases the contents of the resulting medium
9609 will be the same, the only difference is the medium object that takes
9610 the result of the merge operation. In case of the forward merge in the
9611 above example, the result will be written to <tt>Diff_2</tt>; in case of
9612 the backward merge, the result will be written to <tt>Base</tt>. In
9613 other words, the result of the operation is always stored in the target
9614 medium.
9615
9616 Upon successful operation completion, the storage units of all media in
9617 the chain between this (source) medium and the target medium, including
9618 the source medium itself, will be automatically deleted and the
9619 relevant medium objects (including this medium) will become
9620 uninitialized. This means that any attempt to call any of
9621 their methods or attributes will fail with the
9622 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9623 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9624 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9625 Note that <tt>Diff_2</tt> in this case will become a base medium
9626 itself since it will no longer be based on any other medium.
9627
9628 Considering the above, all of the following conditions must be met in
9629 order for the merge operation to succeed:
9630 <ul>
9631 <li>
9632 Neither this (source) medium nor any intermediate
9633 differencing medium in the chain between it and the target
9634 medium is attached to any virtual machine.
9635 </li>
9636 <li>
9637 Neither the source medium nor the target medium is an
9638 <link to="MediumType_Immutable"/> medium.
9639 </li>
9640 <li>
9641 The part of the medium tree from the source medium to the
9642 target medium is a linear chain, i.e. all medium in this
9643 chain have exactly one child which is the next medium in this
9644 chain. The only exception from this rule is the target medium in
9645 the forward merge operation; it is allowed to have any number of
9646 child media because the merge operation will not change its
9647 logical contents (as it is seen by the guest OS or by children).
9648 </li>
9649 <li>
9650 None of the involved media are in
9651 <link to="MediumState_LockedRead"/> or
9652 <link to="MediumState_LockedWrite"/> state.
9653 </li>
9654 </ul>
9655
9656 <note>
9657 This (source) medium and all intermediates will be placed to <link
9658 to="MediumState_Deleting"/> state and the target medium will be
9659 placed to <link to="MediumState_LockedWrite"/> state and for the
9660 duration of this operation.
9661 </note>
9662 </desc>
9663 <param name="targetId" type="uuid" mod="string" dir="in">
9664 <desc>UUID of the target ancestor or descendant medium.</desc>
9665 </param>
9666 <param name="progress" type="IProgress" dir="return">
9667 <desc>Progress object to track the operation completion.</desc>
9668 </param>
9669 </method>
9670
9671 <!-- clone method -->
9672
9673 <method name="cloneTo">
9674 <desc>
9675 Starts creating a clone of this medium in the format and at the
9676 location defined by the @a target argument.
9677
9678 The target medium must be either in <link to="MediumState_NotCreated"/>
9679 state (i.e. must not have an existing storage unit) or in
9680 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9681 big enough to hold the data or else the copy will be partial). Upon
9682 successful completion, the cloned medium will contain exactly the
9683 same sector data as the medium being cloned, except that in the
9684 first case a new UUID for the clone will be randomly generated, and in
9685 the second case the UUID will remain unchanged.
9686
9687 The @a parent argument defines which medium will be the parent
9688 of the clone. Passing a @c null reference indicates that the clone will
9689 be a base image, i.e. completely independent. It is possible to specify
9690 an arbitrary medium for this parameter, including the parent of the
9691 medium which is being cloned. Even cloning to a child of the source
9692 medium is possible. Note that when cloning to an existing image, the
9693 @a parent irgument is ignored.
9694
9695 After the returned progress object reports that the operation is
9696 successfully complete, the target medium gets remembered by this
9697 VirtualBox installation and may be attached to virtual machines.
9698
9699 <note>
9700 This medium will be placed to <link to="MediumState_LockedRead"/>
9701 state for the duration of this operation.
9702 </note>
9703 <result name="E_NOTIMPL">
9704 The specified cloning variant is not supported at the moment.
9705 </result>
9706 </desc>
9707 <param name="target" type="IMedium" dir="in">
9708 <desc>Target medium.</desc>
9709 </param>
9710 <param name="variant" type="MediumVariant" dir="in">
9711 <desc>Exact image variant which should be created.</desc>
9712 </param>
9713 <param name="parent" type="IMedium" dir="in">
9714 <desc>Parent of the cloned medium.</desc>
9715 </param>
9716 <param name="progress" type="IProgress" dir="return">
9717 <desc>Progress object to track the operation completion.</desc>
9718 </param>
9719 </method>
9720
9721 <!-- other methods -->
9722
9723 <method name="compact">
9724 <desc>
9725 Starts compacting of this medium. This means that the medium is
9726 transformed into a possibly more compact storage representation.
9727 This potentially creates temporary images, which can require a
9728 substantial amount of additional disk space.
9729
9730 This medium will be placed to <link to="MediumState_LockedWrite"/>
9731 state and all its parent media (if any) will be placed to
9732 <link to="MediumState_LockedRead"/> state for the duration of this
9733 operation.
9734
9735 Please note that the results can be either returned straight away,
9736 or later as the result of the background operation via the object
9737 returned via the @a progress parameter.
9738
9739 <result name="VBOX_E_NOT_SUPPORTED">
9740 Medium format does not support compacting (but potentially
9741 needs it).
9742 </result>
9743 </desc>
9744 <param name="progress" type="IProgress" dir="return">
9745 <desc>Progress object to track the operation completion.</desc>
9746 </param>
9747 </method>
9748
9749 <method name="resize">
9750 <desc>
9751 Starts resizing this medium. This means that the nominal size of the
9752 medium is set to the new value. Both increasing and decreasing the
9753 size is possible, and there are no safety checks, since VirtualBox
9754 does not make any assumptions about the medium contents.
9755
9756 Resizing usually needs additional disk space, and possibly also
9757 some temporary disk space. Note that resize does not create a full
9758 temporary copy of the medium, so the additional disk space requirement
9759 is usually much lower than using the clone operation.
9760
9761 This medium will be placed to <link to="MediumState_LockedWrite"/>
9762 state for the duration of this operation.
9763
9764 Please note that the results can be either returned straight away,
9765 or later as the result of the background operation via the object
9766 returned via the @a progress parameter.
9767
9768 <result name="VBOX_E_NOT_SUPPORTED">
9769 Medium format does not support resizing.
9770 </result>
9771 </desc>
9772 <param name="logicalSize" type="unsigned long long" dir="in">
9773 <desc>New nominal capacity of the medium in megabytes.</desc>
9774 </param>
9775 <param name="progress" type="IProgress" dir="return">
9776 <desc>Progress object to track the operation completion.</desc>
9777 </param>
9778 </method>
9779
9780 <method name="reset">
9781 <desc>
9782 Starts erasing the contents of this differencing medium.
9783
9784 This operation will reset the differencing medium to its initial
9785 state when it does not contain any sector data and any read operation is
9786 redirected to its parent medium.
9787
9788 This medium will be placed to <link to="MediumState_LockedWrite"/>
9789 for the duration of this operation.
9790
9791 <result name="VBOX_E_NOT_SUPPORTED">
9792 This is not a differencing medium.
9793 </result>
9794 <result name="VBOX_E_INVALID_OBJECT_STATE">
9795 Medium is not in <link to="MediumState_Created"/> or
9796 <link to="MediumState_Inaccessible"/> state.
9797 </result>
9798 </desc>
9799 <param name="progress" type="IProgress" dir="return">
9800 <desc>Progress object to track the operation completion.</desc>
9801 </param>
9802 </method>
9803
9804 </interface>
9805
9806
9807 <!--
9808 // IMediumFormat
9809 /////////////////////////////////////////////////////////////////////////
9810 -->
9811
9812 <enum
9813 name="DataType"
9814 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9815 >
9816 <const name="Int32" value="0"/>
9817 <const name="Int8" value="1"/>
9818 <const name="String" value="2"/>
9819 </enum>
9820
9821 <enum
9822 name="DataFlags"
9823 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9824 >
9825 <const name="None" value="0x00"/>
9826 <const name="Mandatory" value="0x01"/>
9827 <const name="Expert" value="0x02"/>
9828 <const name="Array" value="0x04"/>
9829 <const name="FlagMask" value="0x07"/>
9830 </enum>
9831
9832 <enum
9833 name="MediumFormatCapabilities"
9834 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9835 >
9836 <desc>
9837 Medium format capability flags.
9838 </desc>
9839
9840 <const name="Uuid" value="0x01">
9841 <desc>
9842 Supports UUIDs as expected by VirtualBox code.
9843 </desc>
9844 </const>
9845
9846 <const name="CreateFixed" value="0x02">
9847 <desc>
9848 Supports creating fixed size images, allocating all space instantly.
9849 </desc>
9850 </const>
9851
9852 <const name="CreateDynamic" value="0x04">
9853 <desc>
9854 Supports creating dynamically growing images, allocating space on
9855 demand.
9856 </desc>
9857 </const>
9858
9859 <const name="CreateSplit2G" value="0x08">
9860 <desc>
9861 Supports creating images split in chunks of a bit less than 2 GBytes.
9862 </desc>
9863 </const>
9864
9865 <const name="Differencing" value="0x10">
9866 <desc>
9867 Supports being used as a format for differencing media (see <link
9868 to="IMedium::createDiffStorage"/>).
9869 </desc>
9870 </const>
9871
9872 <const name="Asynchronous" value="0x20">
9873 <desc>
9874 Supports asynchronous I/O operations for at least some configurations.
9875 </desc>
9876 </const>
9877
9878 <const name="File" value="0x40">
9879 <desc>
9880 The format backend operates on files (the <link to="IMedium::location"/>
9881 attribute of the medium specifies a file used to store medium
9882 data; for a list of supported file extensions see
9883 <link to="IMediumFormat::fileExtensions"/>).
9884 </desc>
9885 </const>
9886
9887 <const name="Properties" value="0x80">
9888 <desc>
9889 The format backend uses the property interface to configure the storage
9890 location and properties (the <link to="IMediumFormat::describeProperties"/>
9891 method is used to get access to properties supported by the given medium format).
9892 </desc>
9893 </const>
9894
9895 <const name="CapabilityMask" value="0xFF"/>
9896 </enum>
9897
9898 <interface
9899 name="IMediumFormat" extends="$unknown"
9900 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9901 wsmap="managed"
9902 >
9903 <desc>
9904 The IMediumFormat interface represents a medium format.
9905
9906 Each medium format has an associated backend which is used to handle
9907 media stored in this format. This interface provides information
9908 about the properties of the associated backend.
9909
9910 Each medium format is identified by a string represented by the
9911 <link to="#id"/> attribute. This string is used in calls like
9912 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9913 format.
9914
9915 The list of all supported medium formats can be obtained using
9916 <link to="ISystemProperties::mediaFormats"/>.
9917
9918 <see>IMedium</see>
9919 </desc>
9920
9921 <attribute name="id" type="wstring" readonly="yes">
9922 <desc>
9923 Identifier of this format.
9924
9925 The format identifier is a non-@c null non-empty ASCII string. Note that
9926 this string is case-insensitive. This means that, for example, all of
9927 the following strings:
9928 <pre>
9929 "VDI"
9930 "vdi"
9931 "VdI"</pre>
9932 refer to the same medium format.
9933
9934 This string is used in methods of other interfaces where it is necessary
9935 to specify a medium format, such as
9936 <link to="IVirtualBox::createHardDisk"/>.
9937 </desc>
9938 </attribute>
9939
9940 <attribute name="name" type="wstring" readonly="yes">
9941 <desc>
9942 Human readable description of this format.
9943
9944 Mainly for use in file open dialogs.
9945 </desc>
9946 </attribute>
9947
9948 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9949 <desc>
9950 Array of strings containing the supported file extensions.
9951
9952 The first extension in the array is the extension preferred by the
9953 backend. It is recommended to use this extension when specifying a
9954 location of the storage unit for a new medium.
9955
9956 Note that some backends do not work on files, so this array may be
9957 empty.
9958
9959 <see>IMediumFormat::capabilities</see>
9960 </desc>
9961 </attribute>
9962
9963 <attribute name="capabilities" type="unsigned long" readonly="yes">
9964 <desc>
9965 Capabilities of the format as a set of bit flags.
9966
9967 For the meaning of individual capability flags see
9968 <link to="MediumFormatCapabilities"/>.
9969 </desc>
9970 </attribute>
9971
9972 <method name="describeProperties">
9973 <desc>
9974 Returns several arrays describing the properties supported by this
9975 format.
9976
9977 An element with the given index in each array describes one
9978 property. Thus, the number of elements in each returned array is the
9979 same and corresponds to the number of supported properties.
9980
9981 The returned arrays are filled in only if the
9982 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9983 All arguments must be non-@c null.
9984
9985 <see>DataType</see>
9986 <see>DataFlags</see>
9987 </desc>
9988
9989 <param name="names" type="wstring" safearray="yes" dir="out">
9990 <desc>Array of property names.</desc>
9991 </param>
9992 <param name="description" type="wstring" safearray="yes" dir="out">
9993 <desc>Array of property descriptions.</desc>
9994 </param>
9995 <param name="types" type="DataType" safearray="yes" dir="out">
9996 <desc>Array of property types.</desc>
9997 </param>
9998 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9999 <desc>Array of property flags.</desc>
10000 </param>
10001 <param name="defaults" type="wstring" safearray="yes" dir="out">
10002 <desc>Array of default property values.</desc>
10003 </param>
10004 </method>
10005
10006 </interface>
10007
10008
10009 <!--
10010 // IKeyboard
10011 /////////////////////////////////////////////////////////////////////////
10012 -->
10013
10014 <interface
10015 name="IKeyboard" extends="$unknown"
10016 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10017 wsmap="managed"
10018 >
10019 <desc>
10020 The IKeyboard interface represents the virtual machine's keyboard. Used
10021 in <link to="IConsole::keyboard"/>.
10022
10023 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10024 to the virtual machine.
10025
10026 </desc>
10027 <method name="putScancode">
10028 <desc>Sends a scancode to the keyboard.
10029
10030 <result name="VBOX_E_IPRT_ERROR">
10031 Could not send scan code to virtual keyboard.
10032 </result>
10033
10034 </desc>
10035 <param name="scancode" type="long" dir="in"/>
10036 </method>
10037
10038 <method name="putScancodes">
10039 <desc>Sends an array of scancodes to the keyboard.
10040
10041 <result name="VBOX_E_IPRT_ERROR">
10042 Could not send all scan codes to virtual keyboard.
10043 </result>
10044
10045 </desc>
10046 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10047 <param name="codesStored" type="unsigned long" dir="return"/>
10048 </method>
10049
10050 <method name="putCAD">
10051 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10052 function is nothing special, it is just a convenience function
10053 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10054
10055 <result name="VBOX_E_IPRT_ERROR">
10056 Could not send all scan codes to virtual keyboard.
10057 </result>
10058
10059 </desc>
10060 </method>
10061
10062 </interface>
10063
10064
10065 <!--
10066 // IMouse
10067 /////////////////////////////////////////////////////////////////////////
10068 -->
10069
10070 <enum
10071 name="MouseButtonState"
10072 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10073 >
10074 <desc>
10075 Mouse button state.
10076 </desc>
10077
10078 <const name="LeftButton" value="0x01"/>
10079 <const name="RightButton" value="0x02"/>
10080 <const name="MiddleButton" value="0x04"/>
10081 <const name="WheelUp" value="0x08"/>
10082 <const name="WheelDown" value="0x10"/>
10083 <const name="XButton1" value="0x20"/>
10084 <const name="XButton2" value="0x40"/>
10085 <const name="MouseStateMask" value="0x7F"/>
10086 </enum>
10087
10088 <interface
10089 name="IMouse" extends="$unknown"
10090 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10091 wsmap="managed"
10092 >
10093 <desc>
10094 The IMouse interface represents the virtual machine's mouse. Used in
10095 <link to="IConsole::mouse"/>.
10096
10097 Through this interface, the virtual machine's virtual mouse can be
10098 controlled.
10099 </desc>
10100
10101 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10102 <desc>
10103 Whether the guest OS supports absolute mouse pointer positioning
10104 or not.
10105 <note>
10106 VirtualBox Guest Tools need to be installed to the guest OS
10107 in order to enable absolute mouse positioning support.
10108 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10109 callback to be instantly informed about changes of this attribute
10110 during virtual machine execution.
10111 </note>
10112 <see><link to="#putMouseEventAbsolute"/></see>
10113 </desc>
10114 </attribute>
10115
10116 <method name="putMouseEvent">
10117 <desc>
10118 Initiates a mouse event using relative pointer movements
10119 along x and y axis.
10120
10121 <result name="E_ACCESSDENIED">
10122 Console not powered up.
10123 </result>
10124 <result name="VBOX_E_IPRT_ERROR">
10125 Could not send mouse event to virtual mouse.
10126 </result>
10127
10128 </desc>
10129
10130 <param name="dx" type="long" dir="in">
10131 <desc>
10132 Amount of pixels the mouse should move to the right.
10133 Negative values move the mouse to the left.
10134 </desc>
10135 </param>
10136 <param name="dy" type="long" dir="in">
10137 <desc>
10138 Amount of pixels the mouse should move downwards.
10139 Negative values move the mouse upwards.
10140 </desc>
10141 </param>
10142 <param name="dz" type="long" dir="in">
10143 <desc>
10144 Amount of mouse wheel moves.
10145 Positive values describe clockwise wheel rotations,
10146 negative values describe counterclockwise rotations.
10147 </desc>
10148 </param>
10149 <param name="dw" type="long" dir="in">
10150 <desc>
10151 Amount of horizontal mouse wheel moves.
10152 Positive values describe a movement to the left,
10153 negative values describe a movement to the right.
10154 </desc>
10155 </param>
10156 <param name="buttonState" type="long" dir="in">
10157 <desc>
10158 The current state of mouse buttons. Every bit represents
10159 a mouse button as follows:
10160 <table>
10161 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10162 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10163 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10164 </table>
10165 A value of <tt>1</tt> means the corresponding button is pressed.
10166 otherwise it is released.
10167 </desc>
10168 </param>
10169 </method>
10170
10171 <method name="putMouseEventAbsolute">
10172 <desc>
10173 Positions the mouse pointer using absolute x and y coordinates.
10174 These coordinates are expressed in pixels and
10175 start from <tt>[1,1]</tt> which corresponds to the top left
10176 corner of the virtual display.
10177
10178 <result name="E_ACCESSDENIED">
10179 Console not powered up.
10180 </result>
10181 <result name="VBOX_E_IPRT_ERROR">
10182 Could not send mouse event to virtual mouse.
10183 </result>
10184
10185 <note>
10186 This method will have effect only if absolute mouse
10187 positioning is supported by the guest OS.
10188 </note>
10189
10190 <see><link to="#absoluteSupported"/></see>
10191 </desc>
10192
10193 <param name="x" type="long" dir="in">
10194 <desc>
10195 X coordinate of the pointer in pixels, starting from @c 1.
10196 </desc>
10197 </param>
10198 <param name="y" type="long" dir="in">
10199 <desc>
10200 Y coordinate of the pointer in pixels, starting from @c 1.
10201 </desc>
10202 </param>
10203 <param name="dz" type="long" dir="in">
10204 <desc>
10205 Amount of mouse wheel moves.
10206 Positive values describe clockwise wheel rotations,
10207 negative values describe counterclockwise rotations.
10208 </desc>
10209 </param>
10210 <param name="dw" type="long" dir="in">
10211 <desc>
10212 Amount of horizontal mouse wheel moves.
10213 Positive values describe a movement to the left,
10214 negative values describe a movement to the right.
10215 </desc>
10216 </param>
10217 <param name="buttonState" type="long" dir="in">
10218 <desc>
10219 The current state of mouse buttons. Every bit represents
10220 a mouse button as follows:
10221 <table>
10222 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10223 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10224 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10225 </table>
10226 A value of @c 1 means the corresponding button is pressed.
10227 otherwise it is released.
10228 </desc>
10229 </param>
10230 </method>
10231
10232 </interface>
10233
10234 <!--
10235 // IDisplay
10236 /////////////////////////////////////////////////////////////////////////
10237 -->
10238
10239 <enum
10240 name="FramebufferPixelFormat"
10241 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10242 >
10243 <desc>
10244 Format of the video memory buffer. Constants represented by this enum can
10245 be used to test for particular values of <link
10246 to="IFramebuffer::pixelFormat"/>. See also <link
10247 to="IFramebuffer::requestResize"/>.
10248
10249 See also www.fourcc.org for more information about FOURCC pixel formats.
10250 </desc>
10251
10252 <const name="Opaque" value="0">
10253 <desc>
10254 Unknown buffer format (the user may not assume any particular format of
10255 the buffer).
10256 </desc>
10257 </const>
10258 <const name="FOURCC_RGB" value="0x32424752">
10259 <desc>
10260 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10261 bit layout).
10262 </desc>
10263 </const>
10264 </enum>
10265
10266 <interface
10267 name="IFramebuffer" extends="$unknown"
10268 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10269 wsmap="suppress"
10270 >
10271 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10272 <desc>Address of the start byte of the frame buffer.</desc>
10273 </attribute>
10274
10275 <attribute name="width" type="unsigned long" readonly="yes">
10276 <desc>Frame buffer width, in pixels.</desc>
10277 </attribute>
10278
10279 <attribute name="height" type="unsigned long" readonly="yes">
10280 <desc>Frame buffer height, in pixels.</desc>
10281 </attribute>
10282
10283 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10284 <desc>
10285 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10286 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10287 are: 8, 15, 16, 24 and 32.
10288 </desc>
10289 </attribute>
10290
10291 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10292 <desc>
10293 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10294 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10295 size of the scan line must be aligned to 32 bits.
10296 </desc>
10297 </attribute>
10298
10299 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10300 <desc>
10301 Frame buffer pixel format. It's either one of the values defined by <link
10302 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10303 <note>
10304 This attribute must never return <link
10305 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10306 <link to="#address"/> points to must be always known.
10307 </note>
10308 </desc>
10309 </attribute>
10310
10311 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10312 <desc>
10313 Defines whether this frame buffer uses the virtual video card's memory
10314 buffer (guest VRAM) directly or not. See <link
10315 to="IFramebuffer::requestResize"/> for more information.
10316 </desc>
10317 </attribute>
10318
10319 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10320 <desc>
10321 Hint from the frame buffer about how much of the standard
10322 screen height it wants to use for itself. This information is
10323 exposed to the guest through the VESA BIOS and VMMDev interface
10324 so that it can use it for determining its video mode table. It
10325 is not guaranteed that the guest respects the value.
10326 </desc>
10327 </attribute>
10328
10329 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10330 <desc>
10331 An alpha-blended overlay which is superposed over the frame buffer.
10332 The initial purpose is to allow the display of icons providing
10333 information about the VM state, including disk activity, in front
10334 ends which do not have other means of doing that. The overlay is
10335 designed to controlled exclusively by IDisplay. It has no locking
10336 of its own, and any changes made to it are not guaranteed to be
10337 visible until the affected portion of IFramebuffer is updated. The
10338 overlay can be created lazily the first time it is requested. This
10339 attribute can also return @c null to signal that the overlay is not
10340 implemented.
10341 </desc>
10342 </attribute>
10343
10344 <attribute name="winId" type="unsigned long long" readonly="yes">
10345 <desc>
10346 Platform-dependent identifier of the window where context of this
10347 frame buffer is drawn, or zero if there's no such window.
10348 </desc>
10349 </attribute>
10350
10351 <method name="lock">
10352 <desc>
10353 Locks the frame buffer.
10354 Gets called by the IDisplay object where this frame buffer is
10355 bound to.
10356 </desc>
10357 </method>
10358
10359 <method name="unlock">
10360 <desc>
10361 Unlocks the frame buffer.
10362 Gets called by the IDisplay object where this frame buffer is
10363 bound to.
10364 </desc>
10365 </method>
10366
10367 <method name="notifyUpdate">
10368 <desc>
10369 Informs about an update.
10370 Gets called by the display object where this buffer is
10371 registered.
10372 </desc>
10373 <param name="x" type="unsigned long" dir="in"/>
10374 <param name="y" type="unsigned long" dir="in"/>
10375 <param name="width" type="unsigned long" dir="in"/>
10376 <param name="height" type="unsigned long" dir="in"/>
10377 </method>
10378
10379 <method name="requestResize">
10380 <desc>
10381 Requests a size and pixel format change.
10382
10383 There are two modes of working with the video buffer of the virtual
10384 machine. The <i>indirect</i> mode implies that the IFramebuffer
10385 implementation allocates a memory buffer for the requested display mode
10386 and provides it to the virtual machine. In <i>direct</i> mode, the
10387 IFramebuffer implementation uses the memory buffer allocated and owned
10388 by the virtual machine. This buffer represents the video memory of the
10389 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10390 usually faster because the implementation gets a raw pointer to the
10391 guest VRAM buffer which it can directly use for visualizing the contents
10392 of the virtual display, as opposed to the indirect mode where the
10393 contents of guest VRAM are copied to the memory buffer provided by
10394 the implementation every time a display update occurs.
10395
10396 It is important to note that the direct mode is really fast only when
10397 the implementation uses the given guest VRAM buffer directly, for
10398 example, by blitting it to the window representing the virtual machine's
10399 display, which saves at least one copy operation comparing to the
10400 indirect mode. However, using the guest VRAM buffer directly is not
10401 always possible: the format and the color depth of this buffer may be
10402 not supported by the target window, or it may be unknown (opaque) as in
10403 case of text or non-linear multi-plane VGA video modes. In this case,
10404 the indirect mode (that is always available) should be used as a
10405 fallback: when the guest VRAM contents are copied to the
10406 implementation-provided memory buffer, color and format conversion is
10407 done automatically by the underlying code.
10408
10409 The @a pixelFormat parameter defines whether the direct mode is
10410 available or not. If @a pixelFormat is <link
10411 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10412 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10413 @a bytesPerLine parameters must be ignored and the implementation must use
10414 the indirect mode (where it provides its own buffer in one of the
10415 supported formats). In all other cases, @a pixelFormat together with
10416 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10417 buffer pointed to by the @a VRAM parameter and the implementation is
10418 free to choose which mode to use. To indicate that this frame buffer uses
10419 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10420 attribute must return @c true and <link to="#address"/> must
10421 return exactly the same address that is passed in the @a VRAM parameter
10422 of this method; otherwise it is assumed that the indirect strategy is
10423 chosen.
10424
10425 The @a width and @a height parameters represent the size of the
10426 requested display mode in both modes. In case of indirect mode, the
10427 provided memory buffer should be big enough to store data of the given
10428 display mode. In case of direct mode, it is guaranteed that the given
10429 @a VRAM buffer contains enough space to represent the display mode of the
10430 given size. Note that this frame buffer's <link to="#width"/> and <link
10431 to="#height"/> attributes must return exactly the same values as
10432 passed to this method after the resize is completed (see below).
10433
10434 The @a finished output parameter determines if the implementation has
10435 finished resizing the frame buffer or not. If, for some reason, the
10436 resize cannot be finished immediately during this call, @a finished
10437 must be set to @c false, and the implementation must call
10438 <link to="IDisplay::resizeCompleted"/> after it has returned from
10439 this method as soon as possible. If @a finished is @c false, the
10440 machine will not call any frame buffer methods until
10441 <link to="IDisplay::resizeCompleted"/> is called.
10442
10443 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10444 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10445 this frame buffer must return exactly the same values as specified in the
10446 parameters of this method, after the resize is completed. If the
10447 indirect mode is chosen, these attributes must return values describing
10448 the format of the implementation's own memory buffer <link
10449 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10450 value must always correlate with <link to="#pixelFormat"/>. Note that
10451 the <link to="#pixelFormat"/> attribute must never return <link
10452 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10453
10454 <note>
10455 This method is called by the IDisplay object under the
10456 <link to="#lock"/> provided by this IFramebuffer
10457 implementation. If this method returns @c false in @a finished, then
10458 this lock is not released until
10459 <link to="IDisplay::resizeCompleted"/> is called.
10460 </note>
10461 </desc>
10462 <param name="screenId" type="unsigned long" dir="in">
10463 <desc>
10464 Logical screen number. Must be used in the corresponding call to
10465 <link to="IDisplay::resizeCompleted"/> if this call is made.
10466 </desc>
10467 </param>
10468 <param name="pixelFormat" type="unsigned long" dir="in">
10469 <desc>
10470 Pixel format of the memory buffer pointed to by @a VRAM.
10471 See also <link to="FramebufferPixelFormat"/>.
10472 </desc>
10473 </param>
10474 <param name="VRAM" type="octet" mod="ptr" dir="in">
10475 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10476 </param>
10477 <param name="bitsPerPixel" type="unsigned long" dir="in">
10478 <desc>Color depth, bits per pixel.</desc>
10479 </param>
10480 <param name="bytesPerLine" type="unsigned long" dir="in">
10481 <desc>Size of one scan line, in bytes.</desc>
10482 </param>
10483 <param name="width" type="unsigned long" dir="in">
10484 <desc>Width of the guest display, in pixels.</desc>
10485 </param>
10486 <param name="height" type="unsigned long" dir="in">
10487 <desc>Height of the guest display, in pixels.</desc>
10488 </param>
10489 <param name="finished" type="boolean" dir="return">
10490 <desc>
10491 Can the VM start using the new frame buffer immediately
10492 after this method returns or it should wait for
10493 <link to="IDisplay::resizeCompleted"/>.
10494 </desc>
10495 </param>
10496 </method>
10497
10498 <method name="videoModeSupported">
10499 <desc>
10500 Returns whether the frame buffer implementation is willing to
10501 support a given video mode. In case it is not able to render
10502 the video mode (or for some reason not willing), it should
10503 return @c false. Usually this method is called when the guest
10504 asks the VMM device whether a given video mode is supported
10505 so the information returned is directly exposed to the guest.
10506 It is important that this method returns very quickly.
10507 </desc>
10508 <param name="width" type="unsigned long" dir="in"/>
10509 <param name="height" type="unsigned long" dir="in"/>
10510 <param name="bpp" type="unsigned long" dir="in"/>
10511 <param name="supported" type="boolean" dir="return"/>
10512 </method>
10513
10514 <method name="getVisibleRegion">
10515 <desc>
10516 Returns the visible region of this frame buffer.
10517
10518 If the @a rectangles parameter is @c null then the value of the
10519 @a count parameter is ignored and the number of elements necessary to
10520 describe the current visible region is returned in @a countCopied.
10521
10522 If @a rectangles is not @c null but @a count is less
10523 than the required number of elements to store region data, the method
10524 will report a failure. If @a count is equal or greater than the
10525 required number of elements, then the actual number of elements copied
10526 to the provided array will be returned in @a countCopied.
10527
10528 <note>
10529 The address of the provided array must be in the process space of
10530 this IFramebuffer object.
10531 </note>
10532 <note>
10533 Method not yet implemented.
10534 </note>
10535 </desc>
10536 <param name="rectangles" type="octet" mod="ptr" dir="in">
10537 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10538 </param>
10539 <param name="count" type="unsigned long" dir="in">
10540 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10541 </param>
10542 <param name="countCopied" type="unsigned long" dir="return">
10543 <desc>Number of elements copied to the @a rectangles array.</desc>
10544 </param>
10545 </method>
10546
10547 <method name="setVisibleRegion">
10548 <desc>
10549 Suggests a new visible region to this frame buffer. This region
10550 represents the area of the VM display which is a union of regions of
10551 all top-level windows of the guest operating system running inside the
10552 VM (if the Guest Additions for this system support this
10553 functionality). This information may be used by the frontends to
10554 implement the seamless desktop integration feature.
10555
10556 <note>
10557 The address of the provided array must be in the process space of
10558 this IFramebuffer object.
10559 </note>
10560 <note>
10561 The IFramebuffer implementation must make a copy of the provided
10562 array of rectangles.
10563 </note>
10564 <note>
10565 Method not yet implemented.
10566 </note>
10567 </desc>
10568 <param name="rectangles" type="octet" mod="ptr" dir="in">
10569 <desc>Pointer to the @c RTRECT array.</desc>
10570 </param>
10571 <param name="count" type="unsigned long" dir="in">
10572 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10573 </param>
10574 </method>
10575
10576 <method name="processVHWACommand">
10577 <desc>
10578 Posts a Video HW Acceleration Command to the frame buffer for processing.
10579 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10580 are posted from quest to the host to be processed by the host hardware.
10581
10582 <note>
10583 The address of the provided command must be in the process space of
10584 this IFramebuffer object.
10585 </note>
10586 </desc>
10587
10588 <param name="command" type="octet" mod="ptr" dir="in">
10589 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10590 </param>
10591 </method>
10592
10593 </interface>
10594
10595 <interface
10596 name="IFramebufferOverlay" extends="IFramebuffer"
10597 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10598 wsmap="suppress"
10599 >
10600 <desc>
10601 The IFramebufferOverlay interface represents an alpha blended overlay
10602 for displaying status icons above an IFramebuffer. It is always created
10603 not visible, so that it must be explicitly shown. It only covers a
10604 portion of the IFramebuffer, determined by its width, height and
10605 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10606 that order) format, and may be written to directly. Do re-read the
10607 width though, after setting it, as it may be adjusted (increased) to
10608 make it more suitable for the front end.
10609 </desc>
10610 <attribute name="x" type="unsigned long" readonly="yes">
10611 <desc>X position of the overlay, relative to the frame buffer.</desc>
10612 </attribute>
10613
10614 <attribute name="y" type="unsigned long" readonly="yes">
10615 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10616 </attribute>
10617
10618 <attribute name="visible" type="boolean" readonly="no">
10619 <desc>
10620 Whether the overlay is currently visible.
10621 </desc>
10622 </attribute>
10623
10624 <attribute name="alpha" type="unsigned long" readonly="no">
10625 <desc>
10626 The global alpha value for the overlay. This may or may not be
10627 supported by a given front end.
10628 </desc>
10629 </attribute>
10630
10631 <method name="move">
10632 <desc>
10633 Changes the overlay's position relative to the IFramebuffer.
10634 </desc>
10635 <param name="x" type="unsigned long" dir="in"/>
10636 <param name="y" type="unsigned long" dir="in"/>
10637 </method>
10638
10639 </interface>
10640
10641 <interface
10642 name="IDisplay" extends="$unknown"
10643 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10644 wsmap="managed"
10645 >
10646 <desc>
10647 The IDisplay interface represents the virtual machine's display.
10648
10649 The object implementing this interface is contained in each
10650 <link to="IConsole::display"/> attribute and represents the visual
10651 output of the virtual machine.
10652
10653 The virtual display supports pluggable output targets represented by the
10654 IFramebuffer interface. Examples of the output target are a window on
10655 the host computer or an RDP session's display on a remote computer.
10656 </desc>
10657 <attribute name="width" type="unsigned long" readonly="yes">
10658 <desc>Current display width.</desc>
10659 </attribute>
10660
10661 <attribute name="height" type="unsigned long" readonly="yes">
10662 <desc>Current display height.</desc>
10663 </attribute>
10664
10665 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10666 <desc>
10667 Current guest display color depth. Note that this may differ
10668 from <link to="IFramebuffer::bitsPerPixel"/>.
10669 </desc>
10670 </attribute>
10671
10672 <method name="setFramebuffer">
10673 <desc>
10674 Sets the framebuffer for given screen.
10675 </desc>
10676 <param name="screenId" type="unsigned long" dir="in"/>
10677 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10678 </method>
10679
10680 <method name="getFramebuffer">
10681 <desc>
10682 Queries the framebuffer for given screen.
10683 </desc>
10684 <param name="screenId" type="unsigned long" dir="in"/>
10685 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10686 <param name="xOrigin" type="long" dir="out"/>
10687 <param name="yOrigin" type="long" dir="out"/>
10688 </method>
10689
10690 <method name="setVideoModeHint">
10691 <desc>
10692 Asks VirtualBox to request the given video mode from
10693 the guest. This is just a hint and it cannot be guaranteed
10694 that the requested resolution will be used. Guest Additions
10695 are required for the request to be seen by guests. The caller
10696 should issue the request and wait for a resolution change and
10697 after a timeout retry.
10698
10699 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10700 parameters means that the corresponding values should be taken from the
10701 current video mode (i.e. left unchanged).
10702
10703 If the guest OS supports multi-monitor configuration then the @a display
10704 parameter specifies the number of the guest display to send the hint to:
10705 @c 0 is the primary display, @c 1 is the first secondary and
10706 so on. If the multi-monitor configuration is not supported, @a display
10707 must be @c 0.
10708
10709 <result name="E_INVALIDARG">
10710 The @a display is not associated with any monitor.
10711 </result>
10712
10713 </desc>
10714 <param name="width" type="unsigned long" dir="in"/>
10715 <param name="height" type="unsigned long" dir="in"/>
10716 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10717 <param name="display" type="unsigned long" dir="in"/>
10718 </method>
10719
10720 <method name="setSeamlessMode">
10721 <desc>
10722 Enables or disables seamless guest display rendering (seamless desktop
10723 integration) mode.
10724 <note>
10725 Calling this method has no effect if <link
10726 to="IGuest::supportsSeamless"/> returns @c false.
10727 </note>
10728 </desc>
10729 <param name="enabled" type="boolean" dir="in"/>
10730 </method>
10731
10732 <method name="takeScreenShot">
10733 <desc>
10734 Takes a screen shot of the requested size and copies it to the
10735 32-bpp buffer allocated by the caller and pointed to by @a address.
10736
10737 <note>This API can be used only by the COM/XPCOM C++ API as it
10738 requires pointer support. Use <link to="#takeScreenShotSlow" />
10739 with other language bindings.
10740 </note>
10741
10742 <result name="E_NOTIMPL">
10743 Feature not implemented.
10744 </result>
10745 <result name="VBOX_E_IPRT_ERROR">
10746 Could not take a screenshot.
10747 </result>
10748
10749 </desc>
10750 <param name="address" type="octet" mod="ptr" dir="in"/>
10751 <param name="width" type="unsigned long" dir="in"/>
10752 <param name="height" type="unsigned long" dir="in"/>
10753 </method>
10754
10755 <method name="takeScreenShotSlow">
10756 <desc>
10757 Takes a guest screen shot of the requested size and returns it as
10758 an array of bytes in uncompressed 32-bit ARGB format.
10759 This API is slow, but could be the only option to get guest screenshot
10760 for scriptable languages not allowed to manipulate with addresses
10761 directly.
10762
10763 <result name="E_NOTIMPL">
10764 Feature not implemented.
10765 </result>
10766 <result name="VBOX_E_IPRT_ERROR">
10767 Could not take a screenshot.
10768 </result>
10769 </desc>
10770 <param name="width" type="unsigned long" dir="in">
10771 <desc>
10772 Desired image width.
10773 </desc>
10774 </param>
10775 <param name="height" type="unsigned long" dir="in">
10776 <desc>
10777 Desired image height.
10778 </desc>
10779 </param>
10780 <param name="screenData" type="octet" dir="return" safearray="yes">
10781 <desc>
10782 Array with resulting screen data.
10783 </desc>
10784 </param>
10785 </method>
10786
10787 <method name="drawToScreen">
10788 <desc>
10789 Draws a 32-bpp image of the specified size from the given buffer
10790 to the given point on the VM display.
10791
10792 <result name="E_NOTIMPL">
10793 Feature not implemented.
10794 </result>
10795 <result name="VBOX_E_IPRT_ERROR">
10796 Could not draw to screen.
10797 </result>
10798
10799 </desc>
10800 <param name="address" type="octet" mod="ptr" dir="in"/>
10801 <param name="x" type="unsigned long" dir="in"/>
10802 <param name="y" type="unsigned long" dir="in"/>
10803 <param name="width" type="unsigned long" dir="in"/>
10804 <param name="height" type="unsigned long" dir="in"/>
10805 </method>
10806
10807 <method name="invalidateAndUpdate">
10808 <desc>
10809 Does a full invalidation of the VM display and instructs the VM
10810 to update it.
10811
10812 <result name="VBOX_E_IPRT_ERROR">
10813 Could not invalidate and update screen.
10814 </result>
10815
10816 </desc>
10817 </method>
10818
10819 <method name="resizeCompleted">
10820 <desc>
10821 Signals that a framebuffer has completed the resize operation.
10822
10823 <result name="VBOX_E_NOT_SUPPORTED">
10824 Operation only valid for external frame buffers.
10825 </result>
10826
10827 </desc>
10828 <param name="screenId" type="unsigned long" dir="in"/>
10829 </method>
10830
10831 <method name="updateCompleted">
10832 <desc>
10833 Signals that a framebuffer has completed the update operation.
10834
10835 <result name="VBOX_E_NOT_SUPPORTED">
10836 Operation only valid for external frame buffers.
10837 </result>
10838
10839 </desc>
10840 </method>
10841
10842 <method name="completeVHWACommand">
10843 <desc>
10844 Signals that the Video HW Acceleration command has completed.
10845 </desc>
10846
10847 <param name="command" type="octet" mod="ptr" dir="in">
10848 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10849 </param>
10850 </method>
10851
10852 </interface>
10853
10854 <!--
10855 // INetworkAdapter
10856 /////////////////////////////////////////////////////////////////////////
10857 -->
10858
10859 <enum
10860 name="NetworkAttachmentType"
10861 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10862 >
10863 <desc>
10864 Network attachment type.
10865 </desc>
10866
10867 <const name="Null" value="0">
10868 <desc>Null value, also means "not attached".</desc>
10869 </const>
10870 <const name="NAT" value="1"/>
10871 <const name="Bridged" value="2"/>
10872 <const name="Internal" value="3"/>
10873 <const name="HostOnly" value="4"/>
10874 </enum>
10875
10876 <enum
10877 name="NetworkAdapterType"
10878 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10879 >
10880 <desc>
10881 Network adapter type.
10882 </desc>
10883
10884 <const name="Null" value="0">
10885 <desc>Null value (never used by the API).</desc>
10886 </const>
10887 <const name="Am79C970A" value="1">
10888 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10889 </const>
10890 <const name="Am79C973" value="2">
10891 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10892 </const>
10893 <const name="I82540EM" value="3">
10894 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10895 </const>
10896 <const name="I82543GC" value="4">
10897 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10898 </const>
10899 <const name="I82545EM" value="5">
10900 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10901 </const>
10902 <const name="Virtio" value="6">
10903 <desc>Virtio network device.</desc>
10904 </const>
10905 </enum>
10906
10907 <interface
10908 name="INetworkAdapter" extends="$unknown"
10909 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10910 wsmap="managed"
10911 >
10912 <desc>
10913 Represents a virtual network adapter that is attached to a virtual machine.
10914 Each virtual machine has a fixed number of network adapter slots with one
10915 instance of this attached to each of them. Call
10916 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10917 is attached to a given slot in a given machine.
10918
10919 Each network adapter can be in one of five attachment modes, which are
10920 represented by the <link to="NetworkAttachmentType" /> enumeration;
10921 see the <link to="#attachmentType" /> attribute.
10922 </desc>
10923
10924 <attribute name="adapterType" type="NetworkAdapterType">
10925 <desc>
10926 Type of the virtual network adapter. Depending on this value,
10927 VirtualBox will provide a different virtual network hardware
10928 to the guest.
10929 </desc>
10930 </attribute>
10931
10932 <attribute name="slot" type="unsigned long" readonly="yes">
10933 <desc>
10934 Slot number this adapter is plugged into. Corresponds to
10935 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10936 to obtain this instance.
10937 </desc>
10938 </attribute>
10939
10940 <attribute name="enabled" type="boolean">
10941 <desc>
10942 Flag whether the network adapter is present in the
10943 guest system. If disabled, the virtual guest hardware will
10944 not contain this network adapter. Can only be changed when
10945 the VM is not running.
10946 </desc>
10947 </attribute>
10948
10949 <attribute name="MACAddress" type="wstring">
10950 <desc>
10951 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10952 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10953 </desc>
10954 </attribute>
10955
10956 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10957
10958 <attribute name="hostInterface" type="wstring">
10959 <desc>
10960 Name of the host network interface the VM is attached to.
10961 </desc>
10962 </attribute>
10963
10964 <attribute name="internalNetwork" type="wstring">
10965 <desc>
10966 Name of the internal network the VM is attached to.
10967 </desc>
10968 </attribute>
10969
10970 <attribute name="NATNetwork" type="wstring">
10971 <desc>
10972 Name of the NAT network the VM is attached to.
10973 </desc>
10974 </attribute>
10975
10976 <attribute name="cableConnected" type="boolean">
10977 <desc>
10978 Flag whether the adapter reports the cable as connected or not.
10979 It can be used to report offline situations to a VM.
10980 </desc>
10981 </attribute>
10982
10983 <attribute name="lineSpeed" type="unsigned long">
10984 <desc>
10985 Line speed reported by custom drivers, in units of 1 kbps.
10986 </desc>
10987 </attribute>
10988
10989 <attribute name="traceEnabled" type="boolean">
10990 <desc>
10991 Flag whether network traffic from/to the network card should be traced.
10992 Can only be toggled when the VM is turned off.
10993 </desc>
10994 </attribute>
10995
10996 <attribute name="traceFile" type="wstring">
10997 <desc>
10998 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10999 will be used.
11000 </desc>
11001 </attribute>
11002
11003 <method name="attachToNAT">
11004 <desc>
11005 Attach the network adapter to the Network Address Translation (NAT) interface.
11006 </desc>
11007 </method>
11008
11009 <method name="attachToBridgedInterface">
11010 <desc>
11011 Attach the network adapter to a bridged host interface.
11012 </desc>
11013 </method>
11014
11015 <method name="attachToInternalNetwork">
11016 <desc>
11017 Attach the network adapter to an internal network.
11018 </desc>
11019 </method>
11020
11021 <method name="attachToHostOnlyInterface">
11022 <desc>
11023 Attach the network adapter to the host-only network.
11024 </desc>
11025 </method>
11026
11027 <method name="detach">
11028 <desc>
11029 Detach the network adapter
11030 </desc>
11031 </method>
11032 </interface>
11033
11034
11035 <!--
11036 // ISerialPort
11037 /////////////////////////////////////////////////////////////////////////
11038 -->
11039
11040 <enum
11041 name="PortMode"
11042 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11043 >
11044 <desc>
11045 The PortMode enumeration represents possible communication modes for
11046 the virtual serial port device.
11047 </desc>
11048
11049 <const name="Disconnected" value="0">
11050 <desc>Virtual device is not attached to any real host device.</desc>
11051 </const>
11052 <const name="HostPipe" value="1">
11053 <desc>Virtual device is attached to a host pipe.</desc>
11054 </const>
11055 <const name="HostDevice" value="2">
11056 <desc>Virtual device is attached to a host device.</desc>
11057 </const>
11058 <const name="RawFile" value="3">
11059 <desc>Virtual device is attached to a raw file.</desc>
11060 </const>
11061 </enum>
11062
11063 <interface
11064 name="ISerialPort" extends="$unknown"
11065 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11066 wsmap="managed"
11067 >
11068
11069 <desc>
11070 The ISerialPort interface represents the virtual serial port device.
11071
11072 The virtual serial port device acts like an ordinary serial port
11073 inside the virtual machine. This device communicates to the real
11074 serial port hardware in one of two modes: host pipe or host device.
11075
11076 In host pipe mode, the #path attribute specifies the path to the pipe on
11077 the host computer that represents a serial port. The #server attribute
11078 determines if this pipe is created by the virtual machine process at
11079 machine startup or it must already exist before starting machine
11080 execution.
11081
11082 In host device mode, the #path attribute specifies the name of the
11083 serial port device on the host computer.
11084
11085 There is also a third communication mode: the disconnected mode. In this
11086 mode, the guest OS running inside the virtual machine will be able to
11087 detect the serial port, but all port write operations will be discarded
11088 and all port read operations will return no data.
11089
11090 <see>IMachine::getSerialPort</see>
11091 </desc>
11092
11093 <attribute name="slot" type="unsigned long" readonly="yes">
11094 <desc>
11095 Slot number this serial port is plugged into. Corresponds to
11096 the value you pass to <link to="IMachine::getSerialPort"/>
11097 to obtain this instance.
11098 </desc>
11099 </attribute>
11100
11101 <attribute name="enabled" type="boolean">
11102 <desc>
11103 Flag whether the serial port is enabled. If disabled,
11104 the serial port will not be reported to the guest OS.
11105 </desc>
11106 </attribute>
11107
11108 <attribute name="IOBase" type="unsigned long">
11109 <desc>Base I/O address of the serial port.</desc>
11110 </attribute>
11111
11112 <attribute name="IRQ" type="unsigned long">
11113 <desc>IRQ number of the serial port.</desc>
11114 </attribute>
11115
11116 <attribute name="hostMode" type="PortMode">
11117 <desc>
11118 How is this port connected to the host.
11119 <note>
11120 Changing this attribute may fail if the conditions for
11121 <link to="#path"/> are not met.
11122 </note>
11123 </desc>
11124 </attribute>
11125
11126 <attribute name="server" type="boolean">
11127 <desc>
11128 Flag whether this serial port acts as a server (creates a new pipe on
11129 the host) or as a client (uses the existing pipe). This attribute is
11130 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11131 </desc>
11132 </attribute>
11133
11134 <attribute name="path" type="wstring">
11135 <desc>
11136 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11137 PortMode_HostPipe, or the host serial device name when
11138 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11139 cases, setting a @c null or empty string as the attribute's value
11140 is an error. Otherwise, the value of this property is ignored.
11141 </desc>
11142 </attribute>
11143
11144 </interface>
11145
11146 <!--
11147 // IParallelPort
11148 /////////////////////////////////////////////////////////////////////////
11149 -->
11150
11151 <interface
11152 name="IParallelPort" extends="$unknown"
11153 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11154 wsmap="managed"
11155 >
11156
11157 <desc>
11158 The IParallelPort interface represents the virtual parallel port device.
11159
11160 The virtual parallel port device acts like an ordinary parallel port
11161 inside the virtual machine. This device communicates to the real
11162 parallel port hardware using the name of the parallel device on the host
11163 computer specified in the #path attribute.
11164
11165 Each virtual parallel port device is assigned a base I/O address and an
11166 IRQ number that will be reported to the guest operating system and used
11167 to operate the given parallel port from within the virtual machine.
11168
11169 <see>IMachine::getParallelPort</see>
11170 </desc>
11171
11172 <attribute name="slot" type="unsigned long" readonly="yes">
11173 <desc>
11174 Slot number this parallel port is plugged into. Corresponds to
11175 the value you pass to <link to="IMachine::getParallelPort"/>
11176 to obtain this instance.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="enabled" type="boolean">
11181 <desc>
11182 Flag whether the parallel port is enabled. If disabled,
11183 the parallel port will not be reported to the guest OS.
11184 </desc>
11185 </attribute>
11186
11187 <attribute name="IOBase" type="unsigned long">
11188 <desc>Base I/O address of the parallel port.</desc>
11189 </attribute>
11190
11191 <attribute name="IRQ" type="unsigned long">
11192 <desc>IRQ number of the parallel port.</desc>
11193 </attribute>
11194
11195 <attribute name="path" type="wstring">
11196 <desc>
11197 Host parallel device name. If this parallel port is enabled, setting a
11198 @c null or an empty string as this attribute's value will result into
11199 an error.
11200 </desc>
11201 </attribute>
11202
11203 </interface>
11204
11205
11206 <!--
11207 // IMachineDebugger
11208 /////////////////////////////////////////////////////////////////////////
11209 -->
11210
11211 <interface
11212 name="IMachineDebugger" extends="$unknown"
11213 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11214 wsmap="suppress"
11215 >
11216 <method name="resetStats">
11217 <desc>
11218 Reset VM statistics.
11219 </desc>
11220 <param name="pattern" type="wstring" dir="in">
11221 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11222 </param>
11223 </method>
11224
11225 <method name="dumpStats">
11226 <desc>
11227 Dumps VM statistics.
11228 </desc>
11229 <param name="pattern" type="wstring" dir="in">
11230 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11231 </param>
11232 </method>
11233
11234 <method name="getStats">
11235 <desc>
11236 Get the VM statistics in a XMLish format.
11237 </desc>
11238 <param name="pattern" type="wstring" dir="in">
11239 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11240 </param>
11241 <param name="withDescriptions" type="boolean" dir="in">
11242 <desc>Whether to include the descriptions.</desc>
11243 </param>
11244 <param name="stats" type="wstring" dir="out">
11245 <desc>The XML document containing the statistics.</desc>
11246 </param>
11247 </method>
11248
11249 <method name="injectNMI">
11250 <desc>
11251 Inject an NMI into a running VT-x/AMD-V VM.
11252 </desc>
11253 </method>
11254
11255 <attribute name="singlestep" type="boolean">
11256 <desc>Switch for enabling singlestepping.</desc>
11257 </attribute>
11258
11259 <attribute name="recompileUser" type="boolean">
11260 <desc>Switch for forcing code recompilation for user mode code.</desc>
11261 </attribute>
11262
11263 <attribute name="recompileSupervisor" type="boolean">
11264 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11265 </attribute>
11266
11267 <attribute name="PATMEnabled" type="boolean">
11268 <desc>Switch for enabling and disabling the PATM component.</desc>
11269 </attribute>
11270
11271 <attribute name="CSAMEnabled" type="boolean">
11272 <desc>Switch for enabling and disabling the CSAM component.</desc>
11273 </attribute>
11274
11275 <attribute name="logEnabled" type="boolean">
11276 <desc>Switch for enabling and disabling logging.</desc>
11277 </attribute>
11278
11279 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11280 <desc>
11281 Flag indicating whether the VM is currently making use of CPU hardware
11282 virtualization extensions.
11283 </desc>
11284 </attribute>
11285
11286 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11287 <desc>
11288 Flag indicating whether the VM is currently making use of the nested paging
11289 CPU hardware virtualization extension.
11290 </desc>
11291 </attribute>
11292
11293 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11294 <desc>
11295 Flag indicating whether the VM is currently making use of the VPID
11296 VT-x extension.
11297 </desc>
11298 </attribute>
11299
11300 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11301 <desc>
11302 Flag indicating whether the VM is currently making use of the Physical
11303 Address Extension CPU feature.
11304 </desc>
11305 </attribute>
11306
11307 <attribute name="virtualTimeRate" type="unsigned long">
11308 <desc>
11309 The rate at which the virtual time runs expressed as a percentage.
11310 The accepted range is 2% to 20000%.
11311 </desc>
11312 </attribute>
11313
11314 <!-- @todo method for setting log flags, groups and destination! -->
11315
11316 <attribute name="VM" type="unsigned long long" readonly="yes">
11317 <desc>
11318 Gets the VM handle. This is only for internal use while
11319 we carve the details of this interface.
11320 </desc>
11321 </attribute>
11322
11323 </interface>
11324
11325 <!--
11326 // IUSBController
11327 /////////////////////////////////////////////////////////////////////////
11328 -->
11329
11330 <interface
11331 name="IUSBController" extends="$unknown"
11332 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11333 wsmap="managed"
11334 >
11335 <attribute name="enabled" type="boolean">
11336 <desc>
11337 Flag whether the USB controller is present in the
11338 guest system. If disabled, the virtual guest hardware will
11339 not contain any USB controller. Can only be changed when
11340 the VM is powered off.
11341 </desc>
11342 </attribute>
11343
11344 <attribute name="enabledEhci" type="boolean">
11345 <desc>
11346 Flag whether the USB EHCI controller is present in the
11347 guest system. If disabled, the virtual guest hardware will
11348 not contain a USB EHCI controller. Can only be changed when
11349 the VM is powered off.
11350 </desc>
11351 </attribute>
11352
11353 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11354 <desc>
11355 USB standard version which the controller implements.
11356 This is a BCD which means that the major version is in the
11357 high byte and minor version is in the low byte.
11358 </desc>
11359 </attribute>
11360
11361 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11362 <desc>
11363 List of USB device filters associated with the machine.
11364
11365 If the machine is currently running, these filters are activated
11366 every time a new (supported) USB device is attached to the host
11367 computer that was not ignored by global filters
11368 (<link to="IHost::USBDeviceFilters"/>).
11369
11370 These filters are also activated when the machine is powered up.
11371 They are run against a list of all currently available USB
11372 devices (in states
11373 <link to="USBDeviceState_Available"/>,
11374 <link to="USBDeviceState_Busy"/>,
11375 <link to="USBDeviceState_Held"/>) that were not previously
11376 ignored by global filters.
11377
11378 If at least one filter matches the USB device in question, this
11379 device is automatically captured (attached to) the virtual USB
11380 controller of this machine.
11381
11382 <see>IUSBDeviceFilter, ::IUSBController</see>
11383 </desc>
11384 </attribute>
11385
11386 <method name="createDeviceFilter">
11387 <desc>
11388 Creates a new USB device filter. All attributes except
11389 the filter name are set to empty (any match),
11390 <i>active</i> is @c false (the filter is not active).
11391
11392 The created filter can then be added to the list of filters using
11393 <link to="#insertDeviceFilter"/>.
11394
11395 <result name="VBOX_E_INVALID_VM_STATE">
11396 The virtual machine is not mutable.
11397 </result>
11398
11399 <see>#deviceFilters</see>
11400 </desc>
11401 <param name="name" type="wstring" dir="in">
11402 <desc>
11403 Filter name. See <link to="IUSBDeviceFilter::name"/>
11404 for more info.
11405 </desc>
11406 </param>
11407 <param name="filter" type="IUSBDeviceFilter" dir="return">
11408 <desc>Created filter object.</desc>
11409 </param>
11410 </method>
11411
11412 <method name="insertDeviceFilter">
11413 <desc>
11414 Inserts the given USB device to the specified position
11415 in the list of filters.
11416
11417 Positions are numbered starting from <tt>0</tt>. If the specified
11418 position is equal to or greater than the number of elements in
11419 the list, the filter is added to the end of the collection.
11420
11421 <note>
11422 Duplicates are not allowed, so an attempt to insert a
11423 filter that is already in the collection, will return an
11424 error.
11425 </note>
11426
11427 <result name="VBOX_E_INVALID_VM_STATE">
11428 Virtual machine is not mutable.
11429 </result>
11430 <result name="E_INVALIDARG">
11431 USB device filter not created within this VirtualBox instance.
11432 </result>
11433 <result name="VBOX_E_INVALID_OBJECT_STATE">
11434 USB device filter already in list.
11435 </result>
11436
11437 <see>#deviceFilters</see>
11438 </desc>
11439 <param name="position" type="unsigned long" dir="in">
11440 <desc>Position to insert the filter to.</desc>
11441 </param>
11442 <param name="filter" type="IUSBDeviceFilter" dir="in">
11443 <desc>USB device filter to insert.</desc>
11444 </param>
11445 </method>
11446
11447 <method name="removeDeviceFilter">
11448 <desc>
11449 Removes a USB device filter from the specified position in the
11450 list of filters.
11451
11452 Positions are numbered starting from <tt>0</tt>. Specifying a
11453 position equal to or greater than the number of elements in
11454 the list will produce an error.
11455
11456 <see>#deviceFilters</see>
11457
11458 <result name="VBOX_E_INVALID_VM_STATE">
11459 Virtual machine is not mutable.
11460 </result>
11461 <result name="E_INVALIDARG">
11462 USB device filter list empty or invalid @a position.
11463 </result>
11464
11465 </desc>
11466 <param name="position" type="unsigned long" dir="in">
11467 <desc>Position to remove the filter from.</desc>
11468 </param>
11469 <param name="filter" type="IUSBDeviceFilter" dir="return">
11470 <desc>Removed USB device filter.</desc>
11471 </param>
11472 </method>
11473
11474 </interface>
11475
11476
11477 <!--
11478 // IUSBDevice
11479 /////////////////////////////////////////////////////////////////////////
11480 -->
11481
11482 <interface
11483 name="IUSBDevice" extends="$unknown"
11484 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11485 wsmap="managed"
11486 >
11487 <desc>
11488 The IUSBDevice interface represents a virtual USB device attached to the
11489 virtual machine.
11490
11491 A collection of objects implementing this interface is stored in the
11492 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11493 attached to a running virtual machine's USB controller.
11494 </desc>
11495
11496 <attribute name="id" type="uuid" mod="string" readonly="yes">
11497 <desc>
11498 Unique USB device ID. This ID is built from #vendorId,
11499 #productId, #revision and #serialNumber.
11500 </desc>
11501 </attribute>
11502
11503 <attribute name="vendorId" type="unsigned short" readonly="yes">
11504 <desc>Vendor ID.</desc>
11505 </attribute>
11506
11507 <attribute name="productId" type="unsigned short" readonly="yes">
11508 <desc>Product ID.</desc>
11509 </attribute>
11510
11511 <attribute name="revision" type="unsigned short" readonly="yes">
11512 <desc>
11513 Product revision number. This is a packed BCD represented as
11514 unsigned short. The high byte is the integer part and the low
11515 byte is the decimal.
11516 </desc>
11517 </attribute>
11518
11519 <attribute name="manufacturer" type="wstring" readonly="yes">
11520 <desc>Manufacturer string.</desc>
11521 </attribute>
11522
11523 <attribute name="product" type="wstring" readonly="yes">
11524 <desc>Product string.</desc>
11525 </attribute>
11526
11527 <attribute name="serialNumber" type="wstring" readonly="yes">
11528 <desc>Serial number string.</desc>
11529 </attribute>
11530
11531 <attribute name="address" type="wstring" readonly="yes">
11532 <desc>Host specific address of the device.</desc>
11533 </attribute>
11534
11535 <attribute name="port" type="unsigned short" readonly="yes">
11536 <desc>
11537 Host USB port number the device is physically
11538 connected to.
11539 </desc>
11540 </attribute>
11541
11542 <attribute name="version" type="unsigned short" readonly="yes">
11543 <desc>
11544 The major USB version of the device - 1 or 2.
11545 </desc>
11546 </attribute>
11547
11548 <attribute name="portVersion" type="unsigned short" readonly="yes">
11549 <desc>
11550 The major USB version of the host USB port the device is
11551 physically connected to - 1 or 2. For devices not connected to
11552 anything this will have the same value as the version attribute.
11553 </desc>
11554 </attribute>
11555
11556 <attribute name="remote" type="boolean" readonly="yes">
11557 <desc>
11558 Whether the device is physically connected to a remote VRDP
11559 client or to a local host machine.
11560 </desc>
11561 </attribute>
11562
11563 </interface>
11564
11565
11566 <!--
11567 // IUSBDeviceFilter
11568 /////////////////////////////////////////////////////////////////////////
11569 -->
11570
11571 <interface
11572 name="IUSBDeviceFilter" extends="$unknown"
11573 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11574 wsmap="managed"
11575 >
11576 <desc>
11577 The IUSBDeviceFilter interface represents an USB device filter used
11578 to perform actions on a group of USB devices.
11579
11580 This type of filters is used by running virtual machines to
11581 automatically capture selected USB devices once they are physically
11582 attached to the host computer.
11583
11584 A USB device is matched to the given device filter if and only if all
11585 attributes of the device match the corresponding attributes of the
11586 filter (that is, attributes are joined together using the logical AND
11587 operation). On the other hand, all together, filters in the list of
11588 filters carry the semantics of the logical OR operation. So if it is
11589 desirable to create a match like "this vendor id OR this product id",
11590 one needs to create two filters and specify "any match" (see below)
11591 for unused attributes.
11592
11593 All filter attributes used for matching are strings. Each string
11594 is an expression representing a set of values of the corresponding
11595 device attribute, that will match the given filter. Currently, the
11596 following filtering expressions are supported:
11597
11598 <ul>
11599 <li><i>Interval filters</i>. Used to specify valid intervals for
11600 integer device attributes (Vendor ID, Product ID and Revision).
11601 The format of the string is:
11602
11603 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11604
11605 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11606 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11607 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11608 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11609 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11610 possible integer is assumed.
11611 </li>
11612 <li><i>Boolean filters</i>. Used to specify acceptable values for
11613 boolean device attributes. The format of the string is:
11614
11615 <tt>true|false|yes|no|0|1</tt>
11616
11617 </li>
11618 <li><i>Exact match</i>. Used to specify a single value for the given
11619 device attribute. Any string that doesn't start with <tt>int:</tt>
11620 represents the exact match. String device attributes are compared to
11621 this string including case of symbols. Integer attributes are first
11622 converted to a string (see individual filter attributes) and then
11623 compared ignoring case.
11624
11625 </li>
11626 <li><i>Any match</i>. Any value of the corresponding device attribute
11627 will match the given filter. An empty or @c null string is
11628 used to construct this type of filtering expressions.
11629
11630 </li>
11631 </ul>
11632
11633 <note>
11634 On the Windows host platform, interval filters are not currently
11635 available. Also all string filter attributes
11636 (<link to="#manufacturer"/>, <link to="#product"/>,
11637 <link to="#serialNumber"/>) are ignored, so they behave as
11638 <i>any match</i> no matter what string expression is specified.
11639 </note>
11640
11641 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11642 </desc>
11643
11644 <attribute name="name" type="wstring">
11645 <desc>
11646 Visible name for this filter.
11647 This name is used to visually distinguish one filter from another,
11648 so it can neither be @c null nor an empty string.
11649 </desc>
11650 </attribute>
11651
11652 <attribute name="active" type="boolean">
11653 <desc>Whether this filter active or has been temporarily disabled.</desc>
11654 </attribute>
11655
11656 <attribute name="vendorId" type="wstring">
11657 <desc>
11658 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11659 The string representation for the <i>exact matching</i>
11660 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11661 (including leading zeroes).
11662 </desc>
11663 </attribute>
11664
11665 <attribute name="productId" type="wstring">
11666 <desc>
11667 <link to="IUSBDevice::productId">Product ID</link> filter.
11668 The string representation for the <i>exact matching</i>
11669 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11670 (including leading zeroes).
11671 </desc>
11672 </attribute>
11673
11674 <attribute name="revision" type="wstring">
11675 <desc>
11676 <link to="IUSBDevice::productId">Product revision number</link>
11677 filter. The string representation for the <i>exact matching</i>
11678 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11679 of the integer part of the revision, and <tt>F</tt> is the
11680 decimal digit of its fractional part (including leading and
11681 trailing zeros).
11682 Note that for interval filters, it's best to use the hexadecimal
11683 form, because the revision is stored as a 16 bit packed BCD value;
11684 so the expression <tt>int:0x0100-0x0199</tt> will match any
11685 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11686 </desc>
11687 </attribute>
11688
11689 <attribute name="manufacturer" type="wstring">
11690 <desc>
11691 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11692 </desc>
11693 </attribute>
11694
11695 <attribute name="product" type="wstring">
11696 <desc>
11697 <link to="IUSBDevice::product">Product</link> filter.
11698 </desc>
11699 </attribute>
11700
11701 <attribute name="serialNumber" type="wstring">
11702 <desc>
11703 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11704 </desc>
11705 </attribute>
11706
11707 <attribute name="port" type="wstring">
11708 <desc>
11709 <link to="IUSBDevice::port">Host USB port</link> filter.
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="remote" type="wstring">
11714 <desc>
11715 <link to="IUSBDevice::remote">Remote state</link> filter.
11716 <note>
11717 This filter makes sense only for machine USB filters,
11718 i.e. it is ignored by IHostUSBDeviceFilter objects.
11719 </note>
11720 </desc>
11721 </attribute>
11722
11723 <attribute name="maskedInterfaces" type="unsigned long">
11724 <desc>
11725 This is an advanced option for hiding one or more USB interfaces
11726 from the guest. The value is a bit mask where the bits that are set
11727 means the corresponding USB interface should be hidden, masked off
11728 if you like.
11729 This feature only works on Linux hosts.
11730 </desc>
11731 </attribute>
11732
11733 </interface>
11734
11735
11736 <!--
11737 // IHostUSBDevice
11738 /////////////////////////////////////////////////////////////////////////
11739 -->
11740
11741 <enum
11742 name="USBDeviceState"
11743 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11744 >
11745 <desc>
11746 USB device state. This enumeration represents all possible states
11747 of the USB device physically attached to the host computer regarding
11748 its state on the host computer and availability to guest computers
11749 (all currently running virtual machines).
11750
11751 Once a supported USB device is attached to the host, global USB
11752 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11753 either ignore the device, or put it to USBDeviceState_Held state, or do
11754 nothing. Unless the device is ignored by global filters, filters of all
11755 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11756 activated that can put it to USBDeviceState_Captured state.
11757
11758 If the device was ignored by global filters, or didn't match
11759 any filters at all (including guest ones), it is handled by the host
11760 in a normal way. In this case, the device state is determined by
11761 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11762 or USBDeviceState_Available, depending on the current device usage.
11763
11764 Besides auto-capturing based on filters, the device can be manually
11765 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11766 state is USBDeviceState_Busy, USBDeviceState_Available or
11767 USBDeviceState_Held.
11768
11769 <note>
11770 Due to differences in USB stack implementations in Linux and Win32,
11771 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11772 only to the Linux version of the product. This also means that (<link
11773 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11774 device state is USBDeviceState_Held.
11775 </note>
11776
11777 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11778 </desc>
11779
11780 <const name="NotSupported" value="0">
11781 <desc>
11782 Not supported by the VirtualBox server, not available to guests.
11783 </desc>
11784 </const>
11785 <const name="Unavailable" value="1">
11786 <desc>
11787 Being used by the host computer exclusively,
11788 not available to guests.
11789 </desc>
11790 </const>
11791 <const name="Busy" value="2">
11792 <desc>
11793 Being used by the host computer, potentially available to guests.
11794 </desc>
11795 </const>
11796 <const name="Available" value="3">
11797 <desc>
11798 Not used by the host computer, available to guests (the host computer
11799 can also start using the device at any time).
11800 </desc>
11801 </const>
11802 <const name="Held" value="4">
11803 <desc>
11804 Held by the VirtualBox server (ignored by the host computer),
11805 available to guests.
11806 </desc>
11807 </const>
11808 <const name="Captured" value="5">
11809 <desc>
11810 Captured by one of the guest computers, not available
11811 to anybody else.
11812 </desc>
11813 </const>
11814 </enum>
11815
11816 <interface
11817 name="IHostUSBDevice" extends="IUSBDevice"
11818 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11819 wsmap="managed"
11820 >
11821 <desc>
11822 The IHostUSBDevice interface represents a physical USB device attached
11823 to the host computer.
11824
11825 Besides properties inherited from IUSBDevice, this interface adds the
11826 <link to="#state"/> property that holds the current state of the USB
11827 device.
11828
11829 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11830 </desc>
11831
11832 <attribute name="state" type="USBDeviceState" readonly="yes">
11833 <desc>
11834 Current state of the device.
11835 </desc>
11836 </attribute>
11837
11838 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11839
11840 </interface>
11841
11842
11843 <!--
11844 // IHostUSBDeviceFilter
11845 /////////////////////////////////////////////////////////////////////////
11846 -->
11847
11848 <enum
11849 name="USBDeviceFilterAction"
11850 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11851 >
11852 <desc>
11853 Actions for host USB device filters.
11854 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11855 </desc>
11856
11857 <const name="Null" value="0">
11858 <desc>Null value (never used by the API).</desc>
11859 </const>
11860 <const name="Ignore" value="1">
11861 <desc>Ignore the matched USB device.</desc>
11862 </const>
11863 <const name="Hold" value="2">
11864 <desc>Hold the matched USB device.</desc>
11865 </const>
11866 </enum>
11867
11868 <interface
11869 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11870 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11871 wsmap="managed"
11872 >
11873 <desc>
11874 The IHostUSBDeviceFilter interface represents a global filter for a
11875 physical USB device used by the host computer. Used indirectly in
11876 <link to="IHost::USBDeviceFilters"/>.
11877
11878 Using filters of this type, the host computer determines the initial
11879 state of the USB device after it is physically attached to the
11880 host's USB controller.
11881
11882 <note>
11883 The <link to="#remote"/> attribute is ignored by this type of
11884 filters, because it makes sense only for
11885 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11886 </note>
11887
11888 <see>IHost::USBDeviceFilters</see>
11889 </desc>
11890
11891 <attribute name="action" type="USBDeviceFilterAction">
11892 <desc>
11893 Action performed by the host when an attached USB device
11894 matches this filter.
11895 </desc>
11896 </attribute>
11897
11898 </interface>
11899
11900 <!--
11901 // IAudioAdapter
11902 /////////////////////////////////////////////////////////////////////////
11903 -->
11904
11905 <enum
11906 name="AudioDriverType"
11907 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11908 >
11909 <desc>
11910 Host audio driver type.
11911 </desc>
11912
11913 <const name="Null" value="0">
11914 <desc>Null value, also means "dummy audio driver".</desc>
11915 </const>
11916 <const name="WinMM" value="1">
11917 <desc>Windows multimedia (Windows hosts only).</desc>
11918 </const>
11919 <const name="OSS" value="2">
11920 <desc>Open Sound System (Linux hosts only).</desc>
11921 </const>
11922 <const name="ALSA" value="3">
11923 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11924 </const>
11925 <const name="DirectSound" value="4">
11926 <desc>DirectSound (Windows hosts only).</desc>
11927 </const>
11928 <const name="CoreAudio" value="5">
11929 <desc>CoreAudio (Mac hosts only).</desc>
11930 </const>
11931 <const name="MMPM" value="6">
11932 <desc>Reserved for historical reasons.</desc>
11933 </const>
11934 <const name="Pulse" value="7">
11935 <desc>PulseAudio (Linux hosts only).</desc>
11936 </const>
11937 <const name="SolAudio" value="8">
11938 <desc>Solaris audio (Solaris hosts only).</desc>
11939 </const>
11940 </enum>
11941
11942 <enum
11943 name="AudioControllerType"
11944 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11945 >
11946 <desc>
11947 Virtual audio controller type.
11948 </desc>
11949
11950 <const name="AC97" value="0"/>
11951 <const name="SB16" value="1"/>
11952 </enum>
11953
11954 <interface
11955 name="IAudioAdapter" extends="$unknown"
11956 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11957 wsmap="managed"
11958 >
11959 <desc>
11960 The IAudioAdapter interface represents the virtual audio adapter of
11961 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11962 </desc>
11963 <attribute name="enabled" type="boolean">
11964 <desc>
11965 Flag whether the audio adapter is present in the
11966 guest system. If disabled, the virtual guest hardware will
11967 not contain any audio adapter. Can only be changed when
11968 the VM is not running.
11969 </desc>
11970 </attribute>
11971 <attribute name="audioController" type="AudioControllerType">
11972 <desc>
11973 The audio hardware we emulate.
11974 </desc>
11975 </attribute>
11976 <attribute name="audioDriver" type="AudioDriverType">
11977 <desc>
11978 Audio driver the adapter is connected to. This setting
11979 can only be changed when the VM is not running.
11980 </desc>
11981 </attribute>
11982 </interface>
11983
11984 <!--
11985 // IVRDPServer
11986 /////////////////////////////////////////////////////////////////////////
11987 -->
11988
11989 <enum
11990 name="VRDPAuthType"
11991 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11992 >
11993 <desc>
11994 VRDP authentication type.
11995 </desc>
11996
11997 <const name="Null" value="0">
11998 <desc>Null value, also means "no authentication".</desc>
11999 </const>
12000 <const name="External" value="1"/>
12001 <const name="Guest" value="2"/>
12002 </enum>
12003
12004 <interface
12005 name="IVRDPServer" extends="$unknown"
12006 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12007 wsmap="managed"
12008 >
12009 <attribute name="enabled" type="boolean">
12010 <desc>VRDP server status.</desc>
12011 </attribute>
12012
12013 <attribute name="ports" type="wstring">
12014 <desc>
12015 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12016 <note>
12017 This is a string of comma separated TCP port numbers or port number ranges.
12018 Example <tt>5000,5010-5012,5015</tt>
12019 </note>
12020 </desc>
12021 </attribute>
12022
12023 <attribute name="netAddress" type="wstring">
12024 <desc>VRDP server address.</desc>
12025 </attribute>
12026
12027 <attribute name="authType" type="VRDPAuthType">
12028 <desc>VRDP authentication method.</desc>
12029 </attribute>
12030
12031 <attribute name="authTimeout" type="unsigned long">
12032 <desc>Timeout for guest authentication. Milliseconds.</desc>
12033 </attribute>
12034
12035 <attribute name="allowMultiConnection" type="boolean">
12036 <desc>
12037 Flag whether multiple simultaneous connections to the VM are permitted.
12038 Note that this will be replaced by a more powerful mechanism in the future.
12039 </desc>
12040 </attribute>
12041
12042 <attribute name="reuseSingleConnection" type="boolean">
12043 <desc>
12044 Flag whether the existing connection must be dropped and a new connection
12045 must be established by the VRDP server, when a new client connects in single
12046 connection mode.
12047 </desc>
12048 </attribute>
12049
12050 </interface>
12051
12052
12053 <!--
12054 // ISharedFolder
12055 /////////////////////////////////////////////////////////////////////////
12056 -->
12057
12058 <interface
12059 name="ISharedFolder" extends="$unknown"
12060 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12061 wsmap="struct"
12062 >
12063 <desc>
12064 The ISharedFolder interface represents a folder in the host computer's
12065 file system accessible from the guest OS running inside a virtual
12066 machine using an associated logical name.
12067
12068 There are three types of shared folders:
12069 <ul>
12070 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12071 folders available to all virtual machines.</li>
12072 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12073 VM-specific shared folders available to the given virtual machine at
12074 startup.</li>
12075 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12076 VM-specific shared folders created in the session context (for
12077 example, when the virtual machine is running) and automatically
12078 discarded when the session is closed (the VM is powered off).</li>
12079 </ul>
12080
12081 Logical names of shared folders must be unique within the given scope
12082 (global, permanent or transient). However, they do not need to be unique
12083 across scopes. In this case, the definition of the shared folder in a
12084 more specific scope takes precedence over definitions in all other
12085 scopes. The order of precedence is (more specific to more general):
12086 <ol>
12087 <li>Transient definitions</li>
12088 <li>Permanent definitions</li>
12089 <li>Global definitions</li>
12090 </ol>
12091
12092 For example, if MyMachine has a shared folder named
12093 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12094 transient shared folder named <tt>C_DRIVE</tt> (that points
12095 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12096 of <tt>C_DRIVE</tt> in the guest OS so
12097 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12098 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12099 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12100 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12101 to <tt>C:\\</tt> if it still exists.
12102
12103 Note that permanent and transient shared folders of different machines
12104 are in different name spaces, so they don't overlap and don't need to
12105 have unique logical names.
12106
12107 <note>
12108 Global shared folders are not implemented in the current version of the
12109 product.
12110 </note>
12111 </desc>
12112
12113 <attribute name="name" type="wstring" readonly="yes">
12114 <desc>Logical name of the shared folder.</desc>
12115 </attribute>
12116
12117 <attribute name="hostPath" type="wstring" readonly="yes">
12118 <desc>Full path to the shared folder in the host file system.</desc>
12119 </attribute>
12120
12121 <attribute name="accessible" type="boolean" readonly="yes">
12122 <desc>
12123 Whether the folder defined by the host path is currently
12124 accessible or not.
12125 For example, the folder can be unaccessible if it is placed
12126 on the network share that is not available by the time
12127 this property is read.
12128 </desc>
12129 </attribute>
12130
12131 <attribute name="writable" type="boolean" readonly="yes">
12132 <desc>
12133 Whether the folder defined by the host path is writable or
12134 not.
12135 </desc>
12136 </attribute>
12137
12138 <attribute name="lastAccessError" type="wstring" readonly="yes">
12139 <desc>
12140 Text message that represents the result of the last accessibility
12141 check.
12142
12143 Accessibility checks are performed each time the <link to="#accessible"/>
12144 attribute is read. An empty string is returned if the last
12145 accessibility check was successful. A non-empty string indicates a
12146 failure and should normally describe a reason of the failure (for
12147 example, a file read error).
12148 </desc>
12149 </attribute>
12150
12151 </interface>
12152
12153 <!--
12154 // ISession
12155 /////////////////////////////////////////////////////////////////////////
12156 -->
12157
12158 <interface
12159 name="IInternalSessionControl" extends="$unknown"
12160 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12161 internal="yes"
12162 wsmap="suppress"
12163 >
12164 <method name="getPID">
12165 <desc>PID of the process that has created this Session object.
12166 </desc>
12167 <param name="pid" type="unsigned long" dir="return"/>
12168 </method>
12169
12170 <method name="getRemoteConsole">
12171 <desc>
12172 Returns the console object suitable for remote control.
12173
12174 <result name="VBOX_E_INVALID_VM_STATE">
12175 Session state prevents operation.
12176 </result>
12177 <result name="VBOX_E_INVALID_OBJECT_STATE">
12178 Session type prevents operation.
12179 </result>
12180
12181 </desc>
12182 <param name="console" type="IConsole" dir="return"/>
12183 </method>
12184
12185 <method name="assignMachine">
12186 <desc>
12187 Assigns the machine object associated with this direct-type
12188 session or informs the session that it will be a remote one
12189 (if @a machine == @c null).
12190
12191 <result name="VBOX_E_INVALID_VM_STATE">
12192 Session state prevents operation.
12193 </result>
12194 <result name="VBOX_E_INVALID_OBJECT_STATE">
12195 Session type prevents operation.
12196 </result>
12197
12198 </desc>
12199 <param name="machine" type="IMachine" dir="in"/>
12200 </method>
12201
12202 <method name="assignRemoteMachine">
12203 <desc>
12204 Assigns the machine and the (remote) console object associated with
12205 this remote-type session.
12206
12207 <result name="VBOX_E_INVALID_VM_STATE">
12208 Session state prevents operation.
12209 </result>
12210
12211 </desc>
12212 <param name="machine" type="IMachine" dir="in"/>
12213 <param name="console" type="IConsole" dir="in"/>
12214 </method>
12215
12216 <method name="updateMachineState">
12217 <desc>
12218 Updates the machine state in the VM process.
12219 Must be called only in certain cases
12220 (see the method implementation).
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="aMachineState" type="MachineState" dir="in"/>
12231 </method>
12232
12233 <method name="uninitialize">
12234 <desc>
12235 Uninitializes (closes) this session. Used by VirtualBox to close
12236 the corresponding remote session when the direct session dies
12237 or gets closed.
12238
12239 <result name="VBOX_E_INVALID_VM_STATE">
12240 Session state prevents operation.
12241 </result>
12242
12243 </desc>
12244 </method>
12245
12246 <method name="onNetworkAdapterChange">
12247 <desc>
12248 Triggered when settings of a network adapter of the
12249 associated virtual machine have changed.
12250
12251 <result name="VBOX_E_INVALID_VM_STATE">
12252 Session state prevents operation.
12253 </result>
12254 <result name="VBOX_E_INVALID_OBJECT_STATE">
12255 Session type prevents operation.
12256 </result>
12257
12258 </desc>
12259 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12260 <param name="changeAdapter" type="boolean" dir="in"/>
12261 </method>
12262
12263 <method name="onSerialPortChange">
12264 <desc>
12265 Triggered when settings of a serial port of the
12266 associated virtual machine have changed.
12267
12268 <result name="VBOX_E_INVALID_VM_STATE">
12269 Session state prevents operation.
12270 </result>
12271 <result name="VBOX_E_INVALID_OBJECT_STATE">
12272 Session type prevents operation.
12273 </result>
12274
12275 </desc>
12276 <param name="serialPort" type="ISerialPort" dir="in"/>
12277 </method>
12278
12279 <method name="onParallelPortChange">
12280 <desc>
12281 Triggered when settings of a parallel port of the
12282 associated virtual machine have changed.
12283
12284 <result name="VBOX_E_INVALID_VM_STATE">
12285 Session state prevents operation.
12286 </result>
12287 <result name="VBOX_E_INVALID_OBJECT_STATE">
12288 Session type prevents operation.
12289 </result>
12290
12291 </desc>
12292 <param name="parallelPort" type="IParallelPort" dir="in"/>
12293 </method>
12294
12295 <method name="onStorageControllerChange">
12296 <desc>
12297 Triggered when settings of a storage controller of the
12298 associated virtual machine have changed.
12299
12300 <result name="VBOX_E_INVALID_VM_STATE">
12301 Session state prevents operation.
12302 </result>
12303 <result name="VBOX_E_INVALID_OBJECT_STATE">
12304 Session type prevents operation.
12305 </result>
12306
12307 </desc>
12308 </method>
12309
12310 <method name="onMediumChange">
12311 <desc>
12312 Triggered when attached media of the
12313 associated virtual machine have changed.
12314
12315 <result name="VBOX_E_INVALID_VM_STATE">
12316 Session state prevents operation.
12317 </result>
12318 <result name="VBOX_E_INVALID_OBJECT_STATE">
12319 Session type prevents operation.
12320 </result>
12321
12322 </desc>
12323
12324 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12325 </method>
12326
12327 <method name="onVRDPServerChange">
12328 <desc>
12329 Triggered when settings of the VRDP server object of the
12330 associated virtual machine have changed.
12331
12332 <result name="VBOX_E_INVALID_VM_STATE">
12333 Session state prevents operation.
12334 </result>
12335 <result name="VBOX_E_INVALID_OBJECT_STATE">
12336 Session type prevents operation.
12337 </result>
12338
12339 </desc>
12340 </method>
12341
12342 <method name="onUSBControllerChange">
12343 <desc>
12344 Triggered when settings of the USB controller object of the
12345 associated virtual machine have changed.
12346
12347 <result name="VBOX_E_INVALID_VM_STATE">
12348 Session state prevents operation.
12349 </result>
12350 <result name="VBOX_E_INVALID_OBJECT_STATE">
12351 Session type prevents operation.
12352 </result>
12353
12354 </desc>
12355 </method>
12356
12357 <method name="onSharedFolderChange">
12358 <desc>
12359 Triggered when a permanent (global or machine) shared folder has been
12360 created or removed.
12361 <note>
12362 We don't pass shared folder parameters in this notification because
12363 the order in which parallel notifications are delivered is not defined,
12364 therefore it could happen that these parameters were outdated by the
12365 time of processing this notification.
12366 </note>
12367
12368 <result name="VBOX_E_INVALID_VM_STATE">
12369 Session state prevents operation.
12370 </result>
12371 <result name="VBOX_E_INVALID_OBJECT_STATE">
12372 Session type prevents operation.
12373 </result>
12374
12375 </desc>
12376 <param name="global" type="boolean" dir="in"/>
12377 </method>
12378
12379 <method name="onUSBDeviceAttach">
12380 <desc>
12381 Triggered when a request to capture a USB device (as a result
12382 of matched USB filters or direct call to
12383 <link to="IConsole::attachUSBDevice"/>) has completed.
12384 A @c null @a error object means success, otherwise it
12385 describes a failure.
12386
12387 <result name="VBOX_E_INVALID_VM_STATE">
12388 Session state prevents operation.
12389 </result>
12390 <result name="VBOX_E_INVALID_OBJECT_STATE">
12391 Session type prevents operation.
12392 </result>
12393
12394 </desc>
12395 <param name="device" type="IUSBDevice" dir="in"/>
12396 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12397 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12398 </method>
12399
12400 <method name="onUSBDeviceDetach">
12401 <desc>
12402 Triggered when a request to release the USB device (as a result
12403 of machine termination or direct call to
12404 <link to="IConsole::detachUSBDevice"/>) has completed.
12405 A @c null @a error object means success, otherwise it
12406 describes a failure.
12407
12408 <result name="VBOX_E_INVALID_VM_STATE">
12409 Session state prevents operation.
12410 </result>
12411 <result name="VBOX_E_INVALID_OBJECT_STATE">
12412 Session type prevents operation.
12413 </result>
12414
12415 </desc>
12416 <param name="id" type="uuid" mod="string" dir="in"/>
12417 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12418 </method>
12419
12420 <method name="onShowWindow">
12421 <desc>
12422 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12423 <link to="IMachine::showConsoleWindow"/> in order to notify
12424 console callbacks
12425 <link to="IConsoleCallback::onCanShowWindow"/>
12426 and <link to="IConsoleCallback::onShowWindow"/>.
12427
12428 <result name="VBOX_E_INVALID_OBJECT_STATE">
12429 Session type prevents operation.
12430 </result>
12431
12432 </desc>
12433 <param name="check" type="boolean" dir="in"/>
12434 <param name="canShow" type="boolean" dir="out"/>
12435 <param name="winId" type="unsigned long long" dir="out"/>
12436 </method>
12437
12438 <method name="accessGuestProperty">
12439 <desc>
12440 Called by <link to="IMachine::getGuestProperty"/> and by
12441 <link to="IMachine::setGuestProperty"/> in order to read and
12442 modify guest properties.
12443
12444 <result name="VBOX_E_INVALID_VM_STATE">
12445 Machine session is not open.
12446 </result>
12447 <result name="VBOX_E_INVALID_OBJECT_STATE">
12448 Session type is not direct.
12449 </result>
12450
12451 </desc>
12452 <param name="name" type="wstring" dir="in"/>
12453 <param name="value" type="wstring" dir="in"/>
12454 <param name="flags" type="wstring" dir="in"/>
12455 <param name="isSetter" type="boolean" dir="in"/>
12456 <param name="retValue" type="wstring" dir="out"/>
12457 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12458 <param name="retFlags" type="wstring" dir="out"/>
12459 </method>
12460
12461 <method name="enumerateGuestProperties">
12462 <desc>
12463 Return a list of the guest properties matching a set of patterns along
12464 with their values, time stamps and flags.
12465
12466 <result name="VBOX_E_INVALID_VM_STATE">
12467 Machine session is not open.
12468 </result>
12469 <result name="VBOX_E_INVALID_OBJECT_STATE">
12470 Session type is not direct.
12471 </result>
12472
12473 </desc>
12474 <param name="patterns" type="wstring" dir="in">
12475 <desc>
12476 The patterns to match the properties against as a comma-separated
12477 string. If this is empty, all properties currently set will be
12478 returned.
12479 </desc>
12480 </param>
12481 <param name="key" type="wstring" dir="out" safearray="yes">
12482 <desc>
12483 The key names of the properties returned.
12484 </desc>
12485 </param>
12486 <param name="value" type="wstring" dir="out" safearray="yes">
12487 <desc>
12488 The values of the properties returned. The array entries match the
12489 corresponding entries in the @a key array.
12490 </desc>
12491 </param>
12492 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12493 <desc>
12494 The time stamps of the properties returned. The array entries match
12495 the corresponding entries in the @a key array.
12496 </desc>
12497 </param>
12498 <param name="flags" type="wstring" dir="out" safearray="yes">
12499 <desc>
12500 The flags of the properties returned. The array entries match the
12501 corresponding entries in the @a key array.
12502 </desc>
12503 </param>
12504 </method>
12505
12506 </interface>
12507
12508 <interface
12509 name="ISession" extends="$dispatched"
12510 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12511 wsmap="managed"
12512 >
12513 <desc>
12514 The ISession interface represents a serialization primitive for virtual
12515 machines.
12516
12517 With VirtualBox, every time one wishes to manipulate a virtual machine
12518 (e.g. change its settings or start execution), a session object is
12519 required. Such an object must be passed to one of the session methods
12520 that open the given session, which then initiates the machine manipulation.
12521
12522 A session serves several purposes: it identifies to the inter-process VirtualBox
12523 code which process is currently working with the virtual machine, and it ensures
12524 that there are no incompatible requests from several processes for the
12525 same virtual machine. Session objects can therefore be thought of as mutex
12526 semaphores that lock virtual machines to prevent conflicting accesses from
12527 several processes.
12528
12529 How sessions objects are used depends on whether you use the Main API
12530 via COM or via the webservice:
12531
12532 <ul>
12533 <li>When using the COM API directly, an object of the Session class from the
12534 VirtualBox type library needs to be created. In regular COM C++ client code,
12535 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12536 This object will then act as a local session object in further calls to open
12537 a session.
12538 </li>
12539
12540 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12541 one session object automatically when <link to="IWebsessionManager::logon" />
12542 is called. A managed object reference to that session object can be retrieved by
12543 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12544 reference can then be used to open sessions.
12545 </li>
12546 </ul>
12547
12548 Sessions are mainly used in two variations:
12549
12550 <ul>
12551 <li>
12552 To start a virtual machine in a separate process, one would call
12553 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12554 object as its first parameter. This session then identifies the caller
12555 and lets him control the started machine (for example, pause machine
12556 execution or power it down) as well as be notified about machine
12557 execution state changes.
12558 </li>
12559
12560 <li>To alter machine settings, or to start machine execution within the
12561 current process, one needs to open a direct session for the machine first by
12562 calling <link to="IVirtualBox::openSession"/>. While a direct session
12563 is open within one process, no any other process may open another direct
12564 session for the same machine. This prevents the machine from being changed
12565 by other processes while it is running or while the machine is being configured.
12566 </li>
12567 </ul>
12568
12569 One also can attach to an existing direct session already opened by
12570 another process (for example, in order to send a control request to the
12571 virtual machine such as the pause or the reset request). This is done by
12572 calling <link to="IVirtualBox::openExistingSession"/>.
12573
12574 <note>
12575 Unless you are trying to write a new VirtualBox front-end that
12576 performs direct machine execution (like the VirtualBox or VBoxSDL
12577 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12578 session opened by <link to="IVirtualBox::openSession"/> and use this
12579 session only to change virtual machine settings. If you simply want to
12580 start virtual machine execution using one of the existing front-ends
12581 (for example the VirtualBox GUI or headless server), simply use
12582 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12583 will power up the machine automatically for you.
12584 </note>
12585 </desc>
12586
12587 <attribute name="state" type="SessionState" readonly="yes">
12588 <desc>Current state of this session.</desc>
12589 </attribute>
12590
12591 <attribute name="type" type="SessionType" readonly="yes">
12592 <desc>
12593 Type of this session. The value of this attribute is valid only
12594 if the session is currently open (i.e. its #state is
12595 SessionType_SessionOpen), otherwise an error will be returned.
12596 </desc>
12597 </attribute>
12598
12599 <attribute name="machine" type="IMachine" readonly="yes">
12600 <desc>Machine object associated with this session.</desc>
12601 </attribute>
12602
12603 <attribute name="console" type="IConsole" readonly="yes">
12604 <desc>Console object associated with this session.</desc>
12605 </attribute>
12606
12607 <method name="close">
12608 <desc>
12609 Closes a session that was previously opened.
12610
12611 It is recommended that every time an "open session" method (such as
12612 <link to="IVirtualBox::openRemoteSession" /> or
12613 <link to="IVirtualBox::openSession" />) has been called to
12614 manipulate a virtual machine, the caller invoke
12615 ISession::close() when it's done doing so. Since sessions are
12616 serialization primitives much like ordinary mutexes, they are
12617 best used the same way: for each "open" call, there should be
12618 a matching "close" call, even when errors occur.
12619
12620 Otherwise, if a direct session for a machine opened with
12621 <link to="IVirtualBox::openSession"/> is not explicitly closed
12622 when the application terminates, the state of the machine will
12623 be set to <link to="MachineState_Aborted" /> on the server.
12624
12625 Generally, it is recommended to close all open sessions explicitly
12626 before terminating the application (regardless of the reason for
12627 the termination).
12628
12629 <note>
12630 Do not expect the session state (<link to="ISession::state" />
12631 to return to "Closed" immediately after you invoke
12632 ISession::close(), particularly if you have started a remote
12633 session to execute the VM in a new process. The session state will
12634 automatically return to "Closed" once the VM is no longer executing,
12635 which can of course take a very long time.
12636 </note>
12637
12638 <result name="E_UNEXPECTED">
12639 Session is not open.
12640 </result>
12641
12642 </desc>
12643 </method>
12644
12645 </interface>
12646
12647 <!--
12648 // IStorageController
12649 /////////////////////////////////////////////////////////////////////////
12650 -->
12651
12652 <enum
12653 name="StorageBus"
12654 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12655 >
12656 <desc>
12657 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12658 see <link to="IStorageController::bus" />.
12659 </desc>
12660 <const name="Null" value="0">
12661 <desc>@c null value. Never used by the API.</desc>
12662 </const>
12663 <const name="IDE" value="1"/>
12664 <const name="SATA" value="2"/>
12665 <const name="SCSI" value="3"/>
12666 <const name="Floppy" value="4"/>
12667 </enum>
12668
12669 <enum
12670 name="StorageControllerType"
12671 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12672 >
12673 <desc>
12674 The exact variant of storage controller hardware presented
12675 to the guest; see <link to="IStorageController::controllerType" />.
12676 </desc>
12677
12678 <const name="Null" value="0">
12679 <desc>@c null value. Never used by the API.</desc>
12680 </const>
12681 <const name="LsiLogic" value="1">
12682 <desc>A SCSI controller of the LsiLogic variant.</desc>
12683 </const>
12684 <const name="BusLogic" value="2">
12685 <desc>A SCSI controller of the BusLogic variant.</desc>
12686 </const>
12687 <const name="IntelAhci" value="3">
12688 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12689 </const>
12690 <const name="PIIX3" value="4">
12691 <desc>An IDE controller of the PIIX3 variant.</desc>
12692 </const>
12693 <const name="PIIX4" value="5">
12694 <desc>An IDE controller of the PIIX4 variant.</desc>
12695 </const>
12696 <const name="ICH6" value="6">
12697 <desc>An IDE controller of the ICH6 variant.</desc>
12698 </const>
12699 <const name="I82078" value="7">
12700 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12701 </const>
12702 </enum>
12703
12704 <interface
12705 name="IStorageController" extends="$unknown"
12706 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12707 wsmap="managed"
12708 >
12709 <desc>
12710 Represents a storage controller that is attached to a virtual machine
12711 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12712 attached to storage controllers in a real computer, virtual drives
12713 (represented by <link to="IMediumAttachment" />) are attached to virtual
12714 storage controllers, represented by this interface.
12715
12716 As opposed to physical hardware, VirtualBox has a very generic concept
12717 of a storage controller, and for purposes of the Main API, all virtual
12718 storage is attached to virtual machines via instances of this interface.
12719 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12720 and Floppy (see <link to="#bus" />). Depending on which of these four is
12721 used, certain sub-types may be available and can be selected in
12722 <link to="#controllerType" />.
12723
12724 Depending on these settings, the guest operating system might see
12725 significantly different virtual hardware.
12726 </desc>
12727
12728 <attribute name="name" type="wstring" readonly="yes">
12729 <desc>
12730 Name of the storage controller, as originally specified with
12731 <link to="IMachine::addStorageController" />. This then uniquely
12732 identifies this controller with other method calls such as
12733 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12734 </desc>
12735 </attribute>
12736
12737 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12738 <desc>
12739 Maximum number of devices which can be attached to one port.
12740 </desc>
12741 </attribute>
12742
12743 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12744 <desc>
12745 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12746 </desc>
12747 </attribute>
12748
12749 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12750 <desc>
12751 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12752 </desc>
12753 </attribute>
12754
12755 <attribute name="instance" type="unsigned long">
12756 <desc>
12757 The instance number of the device in the running VM.
12758 </desc>
12759 </attribute>
12760
12761 <attribute name="portCount" type="unsigned long">
12762 <desc>
12763 The number of currently usable ports on the controller.
12764 The minimum and maximum number of ports for one controller are
12765 stored in <link to="IStorageController::minPortCount"/>
12766 and <link to="IStorageController::maxPortCount"/>.
12767 </desc>
12768 </attribute>
12769
12770 <attribute name="bus" type="StorageBus" readonly="yes">
12771 <desc>
12772 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12773 </desc>
12774 </attribute>
12775
12776 <attribute name="controllerType" type="StorageControllerType">
12777 <desc>
12778 The exact variant of storage controller hardware presented
12779 to the guest.
12780 Depending on this value, VirtualBox will provide a different
12781 virtual storage controller hardware to the guest.
12782 For SATA and floppy controllers, only one variant is available,
12783 but for IDE and SCSI, there are several.
12784
12785 For SCSI controllers, the default type is LsiLogic.
12786 </desc>
12787 </attribute>
12788
12789 <method name="GetIDEEmulationPort">
12790 <desc>
12791 Gets the corresponding port number which is emulated as an IDE device.
12792 Works only with SATA controllers.
12793
12794 <result name="E_INVALIDARG">
12795 The @a devicePosition is not in the range 0 to 3.
12796 </result>
12797 <result name="E_NOTIMPL">
12798 The storage controller type is not SATAIntelAhci.
12799 </result>
12800
12801 </desc>
12802 <param name="devicePosition" type="long" dir="in"/>
12803 <param name="portNumber" type="long" dir="return"/>
12804 </method>
12805
12806 <method name="SetIDEEmulationPort">
12807 <desc>
12808 Sets the port number which is emulated as an IDE device.
12809 Works only with SATA controllers.
12810
12811 <result name="E_INVALIDARG">
12812 The @a devicePosition is not in the range 0 to 3 or the
12813 @a portNumber is not in the range 0 to 29.
12814 </result>
12815 <result name="E_NOTIMPL">
12816 The storage controller type is not SATAIntelAhci.
12817 </result>
12818
12819 </desc>
12820 <param name="devicePosition" type="long" dir="in"/>
12821 <param name="portNumber" type="long" dir="in"/>
12822 </method>
12823
12824 </interface>
12825
12826<if target="wsdl">
12827
12828 <!--
12829 // IManagedObjectRef
12830 /////////////////////////////////////////////////////////////////////////
12831 -->
12832
12833 <interface
12834 name="IManagedObjectRef" extends="$unknown"
12835 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12836 internal="yes"
12837 wsmap="managed"
12838 wscpp="hardcoded"
12839 >
12840 <desc>
12841 Managed object reference.
12842
12843 Only within the webservice, a managed object reference (which is really
12844 an opaque number) allows a webservice client to address an object
12845 that lives in the address space of the webservice server.
12846
12847 Behind each managed object reference, there is a COM object that lives
12848 in the webservice server's address space. The COM object is not freed
12849 until the managed object reference is released, either by an explicit
12850 call to <link to="IManagedObjectRef::release" /> or by logging off from
12851 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12852 all objects created during the webservice session.
12853
12854 Whenever a method call of the VirtualBox API returns a COM object, the
12855 webservice representation of that method will instead return a
12856 managed object reference, which can then be used to invoke methods
12857 on that object.
12858 </desc>
12859
12860 <method name="getInterfaceName">
12861 <desc>
12862 Returns the name of the interface that this managed object represents,
12863 for example, "IMachine", as a string.
12864 </desc>
12865 <param name="return" type="wstring" dir="return"/>
12866 </method>
12867
12868 <method name="release">
12869 <desc>
12870 Releases this managed object reference and frees the resources that
12871 were allocated for it in the webservice server process. After calling
12872 this method, the identifier of the reference can no longer be used.
12873 </desc>
12874 </method>
12875
12876 </interface>
12877
12878 <!--
12879 // IWebsessionManager
12880 /////////////////////////////////////////////////////////////////////////
12881 -->
12882
12883 <interface
12884 name="IWebsessionManager" extends="$unknown"
12885 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12886 internal="yes"
12887 wsmap="global"
12888 wscpp="hardcoded"
12889 >
12890 <desc>
12891 Websession manager. This provides essential services
12892 to webservice clients.
12893 </desc>
12894 <method name="logon">
12895 <desc>
12896 Logs a new client onto the webservice and returns a managed object reference to
12897 the IVirtualBox instance, which the client can then use as a basis to further
12898 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12899 interface, in one way or the other.
12900 </desc>
12901 <param name="username" type="wstring" dir="in"/>
12902 <param name="password" type="wstring" dir="in"/>
12903 <param name="return" type="IVirtualBox" dir="return"/>
12904 </method>
12905
12906 <method name="getSessionObject">
12907 <desc>
12908 Returns a managed object reference to the internal ISession object that was created
12909 for this web service session when the client logged on.
12910
12911 <see>ISession</see>
12912 </desc>
12913 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12914 <param name="return" type="ISession" dir="return"/>
12915 </method>
12916
12917 <method name="logoff">
12918 <desc>
12919 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12920 and destroys all resources associated with the session (most importantly, all
12921 managed objects created in the server while the session was active).
12922 </desc>
12923 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12924 </method>
12925
12926 </interface>
12927
12928</if>
12929
12930 <!--
12931 // IPerformanceCollector & friends
12932 /////////////////////////////////////////////////////////////////////////
12933 -->
12934
12935 <interface
12936 name="IPerformanceMetric" extends="$unknown"
12937 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12938 >
12939 <desc>
12940 The IPerformanceMetric interface represents parameters of the given
12941 performance metric.
12942 </desc>
12943
12944 <attribute name="metricName" type="wstring" readonly="yes">
12945 <desc>
12946 Name of the metric.
12947 </desc>
12948 </attribute>
12949
12950 <attribute name="object" type="$unknown" readonly="yes">
12951 <desc>
12952 Object this metric belongs to.
12953 </desc>
12954 </attribute>
12955
12956 <attribute name="description" type="wstring" readonly="yes">
12957 <desc>
12958 Textual description of the metric.
12959 </desc>
12960 </attribute>
12961
12962 <attribute name="period" type="unsigned long" readonly="yes">
12963 <desc>
12964 Time interval between samples, measured in seconds.
12965 </desc>
12966 </attribute>
12967
12968 <attribute name="count" type="unsigned long" readonly="yes">
12969 <desc>
12970 Number of recent samples retained by the performance collector for this
12971 metric.
12972
12973 When the collected sample count exceeds this number, older samples
12974 are discarded.
12975 </desc>
12976 </attribute>
12977
12978 <attribute name="unit" type="wstring" readonly="yes">
12979 <desc>
12980 Unit of measurement.
12981 </desc>
12982 </attribute>
12983
12984 <attribute name="minimumValue" type="long" readonly="yes">
12985 <desc>
12986 Minimum possible value of this metric.
12987 </desc>
12988 </attribute>
12989
12990 <attribute name="maximumValue" type="long" readonly="yes">
12991 <desc>
12992 Maximum possible value of this metric.
12993 </desc>
12994 </attribute>
12995 </interface>
12996
12997 <interface
12998 name="IPerformanceCollector" extends="$unknown"
12999 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13000 wsmap="managed"
13001 >
13002 <desc>
13003 The IPerformanceCollector interface represents a service that collects and
13004 stores performance metrics data.
13005
13006 Performance metrics are associated with objects of interfaces like IHost and
13007 IMachine. Each object has a distinct set of performance metrics.
13008 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13009
13010 Metric data is collected at the specified intervals and is retained
13011 internally. The interval and the number of retained samples can be set
13012 with <link to="IPerformanceCollector::setupMetrics" />.
13013
13014 Metrics are organized hierarchically, with each level separated by a
13015 slash (/) character. Generally, the scheme for metric names is like this:
13016
13017 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13018
13019 "Category/Metric" together form the base metric name. A base metric is the
13020 smallest unit for which a sampling interval and the number of retained
13021 samples can be set. Only base metrics can be enabled and disabled. All
13022 sub-metrics are collected when their base metric is collected.
13023 Collected values for any set of sub-metrics can be queried with
13024 <link to="IPerformanceCollector::queryMetricsData" />.
13025
13026 For example "CPU/Load/User:avg"
13027 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13028 "average" aggregate. An aggregate function is computed over all retained
13029 data. Valid aggregate functions are:
13030
13031 <ul>
13032 <li>avg -- average</li>
13033 <li>min -- minimum</li>
13034 <li>max -- maximum</li>
13035 </ul>
13036
13037 When setting up
13038 metric parameters, querying metric data, enabling or disabling metrics
13039 wildcards can be used in metric names to specify a subset of metrics. For
13040 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13041 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13042 values without aggregates <tt>*:</tt> can be used.
13043
13044 The valid names for base metrics are:
13045
13046 <ul>
13047 <li>CPU/Load</li>
13048 <li>CPU/MHz</li>
13049 <li>RAM/Usage</li>
13050 </ul>
13051
13052 The general sequence for collecting and retrieving the metrics is:
13053 <ul>
13054 <li>
13055 Obtain an instance of IPerformanceCollector with
13056 <link to="IVirtualBox::performanceCollector" />
13057 </li>
13058 <li>
13059 Allocate and populate an array with references to objects the metrics
13060 will be collected for. Use references to IHost and IMachine objects.
13061 </li>
13062 <li>
13063 Allocate and populate an array with base metric names the data will be
13064 collected for.
13065 </li>
13066 <li>
13067 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13068 metric data will be collected and stored.
13069 </li>
13070 <li>
13071 Wait for the data to get collected.
13072 </li>
13073 <li>
13074 Allocate and populate an array with references to objects the metric
13075 values will be queried for. You can re-use the object array used for
13076 setting base metrics.
13077 </li>
13078 <li>
13079 Allocate and populate an array with metric names the data will be
13080 collected for. Note that metric names differ from base metric names.
13081 </li>
13082 <li>
13083 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13084 have been collected so far are returned. Note that the values are still
13085 retained internally and data collection continues.
13086 </li>
13087 </ul>
13088
13089 For an example of usage refer to the following files in VirtualBox SDK:
13090 <ul>
13091 <li>
13092 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13093 </li>
13094 <li>
13095 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13096 </li>
13097 </ul>
13098 </desc>
13099
13100 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13101 <desc>
13102 Array of unique names of metrics.
13103
13104 This array represents all metrics supported by the performance
13105 collector. Individual objects do not necessarily support all of them.
13106 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13107 list of supported metrics for a particular object.
13108 </desc>
13109 </attribute>
13110
13111 <method name="getMetrics">
13112 <desc>
13113 Returns parameters of specified metrics for a set of objects.
13114 <note>
13115 @c Null metrics array means all metrics. @c Null object array means
13116 all existing objects.
13117 </note>
13118 </desc>
13119 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13120 <desc>
13121 Metric name filter. Currently, only a comma-separated list of metrics
13122 is supported.
13123 </desc>
13124 </param>
13125 <param name="objects" type="$unknown" dir="in" safearray="yes">
13126 <desc>
13127 Set of objects to return metric parameters for.
13128 </desc>
13129 </param>
13130 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13131 <desc>
13132 Array of returned metric parameters.
13133 </desc>
13134 </param>
13135 </method>
13136
13137 <method name="setupMetrics">
13138 <desc>
13139 Sets parameters of specified base metrics for a set of objects. Returns
13140 an array of <link to="IPerformanceMetric" /> describing the metrics have
13141 been affected.
13142 <note>
13143 @c Null or empty metric name array means all metrics. @c Null or empty
13144 object array means all existing objects. If metric name array contains
13145 a single element and object array contains many, the single metric
13146 name array element is applied to each object array element to form
13147 metric/object pairs.
13148 </note>
13149 </desc>
13150 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13151 <desc>
13152 Metric name filter. Comma-separated list of metrics with wildcard
13153 support.
13154 </desc>
13155 </param>
13156 <param name="objects" type="$unknown" dir="in" safearray="yes">
13157 <desc>
13158 Set of objects to setup metric parameters for.
13159 </desc>
13160 </param>
13161 <param name="period" type="unsigned long" dir="in">
13162 <desc>
13163 Time interval in seconds between two consecutive samples of performance
13164 data.
13165 </desc>
13166 </param>
13167 <param name="count" type="unsigned long" dir="in">
13168 <desc>
13169 Number of samples to retain in performance data history. Older samples
13170 get discarded.
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="enableMetrics">
13181 <desc>
13182 Turns on collecting specified base metrics. Returns an array of
13183 <link to="IPerformanceMetric" /> describing the metrics have been
13184 affected.
13185 <note>
13186 @c Null or empty metric name array means all metrics. @c Null or empty
13187 object array means all existing objects. If metric name array contains
13188 a single element and object array contains many, the single metric
13189 name array element is applied to each object array element to form
13190 metric/object pairs.
13191 </note>
13192 </desc>
13193 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13194 <desc>
13195 Metric name filter. Comma-separated list of metrics with wildcard
13196 support.
13197 </desc>
13198 </param>
13199 <param name="objects" type="$unknown" dir="in" safearray="yes">
13200 <desc>
13201 Set of objects to enable metrics for.
13202 </desc>
13203 </param>
13204 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13205 <desc>
13206 Array of metrics that have been modified by the call to this method.
13207 </desc>
13208 </param>
13209 </method>
13210
13211 <method name="disableMetrics">
13212 <desc>
13213 Turns off collecting specified base metrics. Returns an array of
13214 <link to="IPerformanceMetric" /> describing the metrics have been
13215 affected.
13216 <note>
13217 @c Null or empty metric name array means all metrics. @c Null or empty
13218 object array means all existing objects. If metric name array contains
13219 a single element and object array contains many, the single metric
13220 name array element is applied to each object array element to form
13221 metric/object pairs.
13222 </note>
13223 </desc>
13224 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13225 <desc>
13226 Metric name filter. Comma-separated list of metrics with wildcard
13227 support.
13228 </desc>
13229 </param>
13230 <param name="objects" type="$unknown" dir="in" safearray="yes">
13231 <desc>
13232 Set of objects to disable metrics for.
13233 </desc>
13234 </param>
13235 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13236 <desc>
13237 Array of metrics that have been modified by the call to this method.
13238 </desc>
13239 </param>
13240 </method>
13241
13242 <method name="queryMetricsData">
13243 <desc>
13244 Queries collected metrics data for a set of objects.
13245
13246 The data itself and related metric information are returned in seven
13247 parallel and one flattened array of arrays. Elements of
13248 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13249 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13250 the same index describe one set of values corresponding to a single
13251 metric.
13252
13253 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13254 start and length of a sub-array is indicated by
13255 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13256 value for metric <tt>metricNames[i]</tt> is at
13257 <tt>returnData[returnIndices[i]]</tt>.
13258
13259 <note>
13260 @c Null or empty metric name array means all metrics. @c Null or empty
13261 object array means all existing objects. If metric name array contains
13262 a single element and object array contains many, the single metric
13263 name array element is applied to each object array element to form
13264 metric/object pairs.
13265 </note>
13266 <note>
13267 Data collection continues behind the scenes after call to
13268 @c queryMetricsData. The return data can be seen as the snapshot of
13269 the current state at the time of @c queryMetricsData call. The
13270 internally kept metric values are not cleared by the call. This makes
13271 possible querying different subsets of metrics or aggregates with
13272 subsequent calls. If periodic querying is needed it is highly
13273 suggested to query the values with @c interval*count period to avoid
13274 confusion. This way a completely new set of data values will be
13275 provided by each query.
13276 </note>
13277 </desc>
13278 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13279 <desc>
13280 Metric name filter. Comma-separated list of metrics with wildcard
13281 support.
13282 </desc>
13283 </param>
13284 <param name="objects" type="$unknown" dir="in" safearray="yes">
13285 <desc>
13286 Set of objects to query metrics for.
13287 </desc>
13288 </param>
13289 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13290 <desc>
13291 Names of metrics returned in @c returnData.
13292 </desc>
13293 </param>
13294 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13295 <desc>
13296 Objects associated with metrics returned in @c returnData.
13297 </desc>
13298 </param>
13299 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13300 <desc>
13301 Units of measurement for each returned metric.
13302 </desc>
13303 </param>
13304 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13305 <desc>
13306 Divisor that should be applied to return values in order to get
13307 floating point values. For example:
13308 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13309 will retrieve the floating point value of i-th sample of the first
13310 metric.
13311 </desc>
13312 </param>
13313 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13314 <desc>
13315 Sequence numbers of the first elements of value sequences of particular metrics
13316 returned in @c returnData. For aggregate metrics it is the sequence number of
13317 the sample the aggregate started calculation from.
13318 </desc>
13319 </param>
13320 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13321 <desc>
13322 Indices of the first elements of value sequences of particular metrics
13323 returned in @c returnData.
13324 </desc>
13325 </param>
13326 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13327 <desc>
13328 Lengths of value sequences of particular metrics.
13329 </desc>
13330 </param>
13331 <param name="returnData" type="long" dir="return" safearray="yes">
13332 <desc>
13333 Flattened array of all metric data containing sequences of values for
13334 each metric.
13335 </desc>
13336 </param>
13337 </method>
13338
13339 </interface>
13340
13341 <module name="VBoxSVC" context="LocalServer">
13342 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13343 namespace="virtualbox.org">
13344 <interface name="IVirtualBox" default="yes"/>
13345 </class>
13346 </module>
13347
13348 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13349 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13350 namespace="virtualbox.org">
13351 <interface name="ISession" default="yes"/>
13352 </class>
13353 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13354 namespace="virtualbox.org">
13355 <interface name="ILocalOwner" default="yes"/>
13356 <interface name="IVirtualBoxCallback"/>
13357 <interface name="IConsoleCallback"/>
13358 </class>
13359 </module>
13360
13361</library>
13362
13363</idl>
13364
13365<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette