VirtualBox

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

Last change on this file since 16509 was 16509, checked in by vboxsync, 16 years ago

#2954 & #3569: Linux TAP driver is embedded to vboxnetflt. API, VBoxManage and VirtualBox now provide host-only network attachment on Linux.

  • Property svn:eol-style set to native
File size: 467.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-2008 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
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession()"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession()"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession()"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession()"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="StorageBus"
719 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
720 >
721 <desc>Interface bus type for storage devices.</desc>
722
723 <const name="Null" value="0">
724 <desc>Null value (never used by the API).</desc>
725 </const>
726
727 <const name="IDE" value="1"/>
728 <const name="SATA" value="2"/>
729 </enum>
730
731 <enum
732 name="ClipboardMode"
733 uuid="33364716-4008-4701-8f14-be0fa3d62950"
734 >
735 <desc>
736 Host-Guest clipboard interchange mode.
737 </desc>
738
739 <const name="Disabled" value="0"/>
740 <const name="HostToGuest" value="1"/>
741 <const name="GuestToHost" value="2"/>
742 <const name="Bidirectional" value="3"/>
743 </enum>
744
745 <enum
746 name="Scope"
747 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
748 >
749 <desc>
750 Scope of the operation.
751
752 A generic enumeration used in various methods to define the action or
753 argument scope.
754 </desc>
755
756 <const name="Global" value="0"/>
757 <const name="Machine" value="1"/>
758 <const name="Session" value="2"/>
759 </enum>
760
761 <enum
762 name="GuestStatisticType"
763 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
764 >
765 <desc>
766 Statistics type for <link to="IGuest::getStatistic"/>.
767 </desc>
768
769 <const name="CPULoad_Idle" value="0">
770 <desc>
771 Idle CPU load (0-100%) for last interval.
772 </desc>
773 </const>
774 <const name="CPULoad_Kernel" value="1">
775 <desc>
776 Kernel CPU load (0-100%) for last interval.
777 </desc>
778 </const>
779 <const name="CPULoad_User" value="2">
780 <desc>
781 User CPU load (0-100%) for last interval.
782 </desc>
783 </const>
784 <const name="Threads" value="3">
785 <desc>
786 Total number of threads in the system.
787 </desc>
788 </const>
789 <const name="Processes" value="4">
790 <desc>
791 Total number of processes in the system.
792 </desc>
793 </const>
794 <const name="Handles" value="5">
795 <desc>
796 Total number of handles in the system.
797 </desc>
798 </const>
799 <const name="MemoryLoad" value="6">
800 <desc>
801 Memory load (0-100%).
802 </desc>
803 </const>
804 <const name="PhysMemTotal" value="7">
805 <desc>
806 Total physical memory in megabytes.
807 </desc>
808 </const>
809 <const name="PhysMemAvailable" value="8">
810 <desc>
811 Free physical memory in megabytes.
812 </desc>
813 </const>
814 <const name="PhysMemBalloon" value="9">
815 <desc>
816 Ballooned physical memory in megabytes.
817 </desc>
818 </const>
819 <const name="MemCommitTotal" value="10">
820 <desc>
821 Total amount of memory in the committed state in megabytes.
822 </desc>
823 </const>
824 <const name="MemKernelTotal" value="11">
825 <desc>
826 Total amount of memory used by the guest OS's kernel in megabytes.
827 </desc>
828 </const>
829 <const name="MemKernelPaged" value="12">
830 <desc>
831 Total amount of paged memory used by the guest OS's kernel in megabytes.
832 </desc>
833 </const>
834 <const name="MemKernelNonpaged" value="13">
835 <desc>
836 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
837 </desc>
838 </const>
839 <const name="MemSystemCache" value="14">
840 <desc>
841 Total amount of memory used by the guest OS's system cache in megabytes.
842 </desc>
843 </const>
844 <const name="PageFileSize" value="15">
845 <desc>
846 Pagefile size in megabytes.
847 </desc>
848 </const>
849 <const name="SampleNumber" value="16">
850 <desc>
851 Statistics sample number
852 </desc>
853 </const>
854 <const name="MaxVal" value="17"/>
855 </enum>
856
857 <enum
858 name="BIOSBootMenuMode"
859 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
860 >
861 <desc>
862 BIOS boot menu mode.
863 </desc>
864
865 <const name="Disabled" value="0"/>
866 <const name="MenuOnly" value="1"/>
867 <const name="MessageAndMenu" value="2"/>
868 </enum>
869
870 <enum
871 name="IDEControllerType"
872 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
873 >
874 <desc>
875 IDE controller type.
876 </desc>
877
878 <const name="Null" value="0">
879 <desc>Null value (never used by the API).</desc>
880 </const>
881 <const name="PIIX3" value="1"/>
882 <const name="PIIX4" value="2"/>
883 </enum>
884
885 <enum
886 name="DriveState"
887 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
888 >
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="NotMounted" value="1"/>
893 <const name="ImageMounted" value="2"/>
894 <const name="HostDriveCaptured" value="3"/>
895 </enum>
896
897 <enum
898 name="ProcessorFeature"
899 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
900 >
901 <desc>
902 CPU features.
903 </desc>
904
905 <const name="HWVirtEx" value="0"/>
906 <const name="PAE" value="1"/>
907 <const name="LongMode" value="2"/>
908 </enum>
909
910
911 <!--
912 // IVirtualBoxErrorInfo
913 /////////////////////////////////////////////////////////////////////////
914 -->
915
916 <interface
917 name="IVirtualBoxErrorInfo" extends="$errorinfo"
918 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
919 supportsErrorInfo="no"
920 wsmap="suppress"
921 >
922 <desc>
923 The IVirtualBoxErrorInfo interface represents extended error information.
924
925 Extended error information can be set by VirtualBox components after
926 unsuccessful or partially successful method invocation. This information
927 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
928 and then shown to the client in addition to the plain 32-bit result code.
929
930 In MS COM, this interface extends the IErrorInfo interface,
931 in XPCOM, it extends the nsIException interface. In both cases,
932 it provides a set of common attributes to retrieve error
933 information.
934
935 Sometimes invocation of some component's method may involve methods of
936 other components that may also fail (independently of this method's
937 failure), or a series of non-fatal errors may precede a fatal error that
938 causes method failure. In cases like that, it may be desirable to preserve
939 information about all errors happened during method invocation and deliver
940 it to the caller. The <link to="#next"/> attribute is intended
941 specifically for this purpose and allows to represent a chain of errors
942 through a single IVirtualBoxErrorInfo object set after method invocation.
943
944 Note that errors are stored to a chain in the reverse order, i.e. the
945 initial error object you query right after method invocation is the last
946 error set by the callee, the object it points to in the @a next attribute
947 is the previous error and so on, up to the first error (which is the last
948 in the chain).
949 </desc>
950
951 <attribute name="resultCode" type="result" readonly="yes">
952 <desc>
953 Result code of the error.
954 Usually, it will be the same as the result code returned
955 by the method that provided this error information, but not
956 always. For example, on Win32, CoCreateInstance() will most
957 likely return E_NOINTERFACE upon unsuccessful component
958 instantiation attempt, but not the value the component factory
959 returned.
960 <note>
961 In MS COM, there is no equivalent.
962 In XPCOM, it is the same as nsIException::result.
963 </note>
964 </desc>
965 </attribute>
966
967 <attribute name="interfaceID" type="uuid" readonly="yes">
968 <desc>
969 UUID of the interface that defined the error.
970 <note>
971 In MS COM, it is the same as IErrorInfo::GetGUID.
972 In XPCOM, there is no equivalent.
973 </note>
974 </desc>
975 </attribute>
976
977 <attribute name="component" type="wstring" readonly="yes">
978 <desc>
979 Name of the component that generated the error.
980 <note>
981 In MS COM, it is the same as IErrorInfo::GetSource.
982 In XPCOM, there is no equivalent.
983 </note>
984 </desc>
985 </attribute>
986
987 <attribute name="text" type="wstring" readonly="yes">
988 <desc>
989 Text description of the error.
990 <note>
991 In MS COM, it is the same as IErrorInfo::GetDescription.
992 In XPCOM, it is the same as nsIException::message.
993 </note>
994 </desc>
995 </attribute>
996
997 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
998 <desc>
999 Next error object if there is any, or @c null otherwise.
1000 <note>
1001 In MS COM, there is no equivalent.
1002 In XPCOM, it is the same as nsIException::inner.
1003 </note>
1004 </desc>
1005 </attribute>
1006
1007 </interface>
1008
1009
1010 <!--
1011 // IVirtualBox
1012 /////////////////////////////////////////////////////////////////////////
1013 -->
1014
1015 <interface
1016 name="IVirtualBoxCallback" extends="$unknown"
1017 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1018 wsmap="suppress"
1019 >
1020 <method name="onMachineStateChange">
1021 <desc>
1022 The execution state of the given machine has changed.
1023 <see>IMachine::state</see>
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="state" type="MachineState" dir="in">
1029 <desc>New execution state.</desc>
1030 </param>
1031 </method>
1032
1033 <method name="onMachineDataChange">
1034 <desc>
1035 Any of the settings of the given machine has changed.
1036 </desc>
1037 <param name="machineId" type="uuid" dir="in">
1038 <desc>ID of the machine this event relates to.</desc>
1039 </param>
1040 </method>
1041
1042 <method name="onExtraDataCanChange">
1043 <desc>
1044 Notification when someone tries to change extra data for
1045 either the given machine or (if null) global extra data.
1046 This gives the chance to veto against changes.
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>
1050 ID of the machine this event relates to
1051 (null ID for global extra data change requests).
1052 </desc>
1053 </param>
1054 <param name="key" type="wstring" dir="in">
1055 <desc>
1056 Extra data key for the attempted write.
1057 </desc>
1058 </param>
1059 <param name="value" type="wstring" dir="in">
1060 <desc>
1061 Extra data value for the given key.
1062 </desc>
1063 </param>
1064 <param name="error" type="wstring" dir="out">
1065 <desc>
1066 Optional error message describing the reason of the
1067 veto (ignored if this notification returns @c true).
1068 </desc>
1069 </param>
1070 <param name="allowChange" type="boolean" dir="return">
1071 <desc>
1072 Flag to indicate whether the callee agrees (@c true)
1073 or vetoes against the change (@c false).
1074 </desc>
1075 </param>
1076 </method>
1077
1078 <method name="onExtraDataChange">
1079 <desc>
1080 Notification when machine specific or global extra data
1081 has changed.
1082 </desc>
1083 <param name="machineId" type="uuid" dir="in">
1084 <desc>
1085 ID of the machine this event relates to.
1086 Null for global extra data changes.
1087 </desc>
1088 </param>
1089 <param name="key" type="wstring" dir="in">
1090 <desc>
1091 Extra data key that has changed.
1092 </desc>
1093 </param>
1094 <param name="value" type="wstring" dir="in">
1095 <desc>
1096 Extra data value for the given key.
1097 </desc>
1098 </param>
1099 </method>
1100
1101 <method name="onMediaRegistered">
1102 <desc>
1103 The given media was registered or unregistered
1104 within this VirtualBox installation.
1105
1106 The @a mediaType parameter describes what type of
1107 media the specified @a mediaId refers to. Possible
1108 values are:
1109
1110 <ul>
1111 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1112 that, if registered, can be obtained using the
1113 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1114 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1115 that, if registered, can be obtained using the
1116 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1117 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1118 that, if registered, can be obtained using the
1119 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1120 </ul>
1121
1122 Note that if this is a deregistration notification,
1123 there is no way to access the object representing the
1124 unregistered media. It is supposed that the
1125 application will do required cleanup based on the @a
1126 mediaId value.
1127 </desc>
1128 <param name="mediaId" type="uuid" dir="in">
1129 <desc>ID of the media this event relates to.</desc>
1130 </param>
1131 <param name="mediaType" type="DeviceType" dir="in">
1132 <desc>Type of the media this event relates to.</desc>
1133 </param>
1134 <param name="registered" type="boolean" dir="in">
1135 <desc>
1136 If true, the media was registered, otherwise it was
1137 unregistered.
1138 </desc>
1139 </param>
1140 </method>
1141
1142 <method name="onMachineRegistered">
1143 <desc>
1144 The given machine was registered or unregistered
1145 within this VirtualBox installation.
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="registered" type="boolean" dir="in">
1151 <desc>
1152 If true, the machine was registered, otherwise it was
1153 unregistered.
1154 </desc>
1155 </param>
1156 </method>
1157
1158 <method name="onSessionStateChange">
1159 <desc>
1160 The state of the session for the given machine was changed.
1161 <see>IMachine::sessionState</see>
1162 </desc>
1163 <param name="machineId" type="uuid" dir="in">
1164 <desc>ID of the machine this event relates to.</desc>
1165 </param>
1166 <param name="state" type="SessionState" dir="in">
1167 <desc>New session state.</desc>
1168 </param>
1169 </method>
1170
1171 <method name="onSnapshotTaken">
1172 <desc>
1173 A new snapshot of the machine has been taken.
1174 <see>ISnapshot</see>
1175 </desc>
1176 <param name="machineId" type="uuid" dir="in">
1177 <desc>ID of the machine this event relates to.</desc>
1178 </param>
1179 <param name="snapshotId" type="uuid" dir="in">
1180 <desc>ID of the new snapshot.</desc>
1181 </param>
1182 </method>
1183
1184 <method name="onSnapshotDiscarded">
1185 <desc>
1186 Snapshot of the given machine has been discarded.
1187
1188 <note>
1189 This notification is delivered <b>after</b> the snapshot
1190 object has been uninitialized on the server (so that any
1191 attempt to call its methods will return an error).
1192 </note>
1193
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>
1201 ID of the discarded snapshot. <tt>null</tt> means the
1202 current machine state has been discarded (restored from
1203 the current snapshot).
1204 </desc>
1205 </param>
1206 </method>
1207
1208 <method name="onSnapshotChange">
1209 <desc>
1210 Snapshot properties (name and/or description) have been changed.
1211 <see>ISnapshot</see>
1212 </desc>
1213 <param name="machineId" type="uuid" dir="in">
1214 <desc>ID of the machine this event relates to.</desc>
1215 </param>
1216 <param name="snapshotId" type="uuid" dir="in">
1217 <desc>ID of the changed snapshot.</desc>
1218 </param>
1219 </method>
1220
1221 <method name="onGuestPropertyChange">
1222 <desc>
1223 Notification when a guest property has changed.
1224 </desc>
1225 <param name="machineId" type="uuid" dir="in">
1226 <desc>
1227 ID of the machine this event relates to.
1228 </desc>
1229 </param>
1230 <param name="name" type="wstring" dir="in">
1231 <desc>
1232 The name of the property that has changed.
1233 </desc>
1234 </param>
1235 <param name="value" type="wstring" dir="in">
1236 <desc>
1237 The new property value.
1238 </desc>
1239 </param>
1240 <param name="flags" type="wstring" dir="in">
1241 <desc>
1242 The new property flags.
1243 </desc>
1244 </param>
1245 </method>
1246
1247 </interface>
1248
1249 <interface
1250 name="IVirtualBox" extends="$dispatched"
1251 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1252 wsmap="managed"
1253 >
1254 <desc>
1255 The IVirtualBox interface represents the main interface exposed by the
1256 product that provides virtual machine management.
1257
1258 An instance of IVirtualBox is required for the product to do anything
1259 useful. Even though the interface does not expose this, internally,
1260 IVirtualBox is implemented as a singleton and actually lives in the
1261 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1262 IVirtualBox can track the state of all virtual machines on a particular
1263 host, regardless of which frontend started them.
1264
1265 To enumerate all the virtual machines on the host, use the
1266 <link to="IVirtualBox::machines2"/> attribute.
1267 </desc>
1268
1269 <attribute name="version" type="wstring" readonly="yes">
1270 <desc>
1271 A string representing the version number of the product. The
1272 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1273 last number represents the build number and will frequently change.
1274 </desc>
1275 </attribute>
1276
1277 <attribute name="revision" type="unsigned long" readonly="yes">
1278 <desc>
1279 The internal build revision number of the product.
1280 </desc>
1281 </attribute>
1282
1283 <attribute name="packageType" type="wstring" readonly="yes">
1284 <desc>
1285 A string representing the package type of this product. The
1286 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1287 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1288 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1289 this.
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="homeFolder" type="wstring" readonly="yes">
1294 <desc>
1295 Full path to the directory where the global settings file,
1296 <tt>VirtualBox.xml</tt>, is stored.
1297
1298 In this version of VirtualBox, the value of this property is
1299 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1300 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1301 as determined by the host OS), and cannot be changed.
1302
1303 This path is also used as the base to resolve relative paths in
1304 places where relative paths are allowed (unless otherwise
1305 expressly indicated).
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1310 <desc>
1311 Full name of the global settings file.
1312 The value of this property corresponds to the value of
1313 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1314 </desc>
1315 </attribute>
1316
1317 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1318 <desc>
1319 Current version of the format of the global VirtualBox settings file
1320 (<tt>VirtualBox.xml</tt>).
1321
1322 The version string has the following format:
1323 <pre>
1324 x.y-platform
1325 </pre>
1326 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1327 versions, and <tt>platform</tt> is the platform identifier.
1328
1329 The current version usually matches the value of the
1330 <link to="#settingsFormatVersion"/> attribute unless the
1331 settings file was created by an older version of VirtualBox and there
1332 was a change of the settings file format since then.
1333
1334 Note that VirtualBox automatically converts settings files from older
1335 versions to the most recent version when reading them (usually at
1336 VirtualBox startup) but it doesn't save the changes back until
1337 you call a method that implicitly saves settings (such as
1338 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1339 explicitly. Therefore, if the value of this attribute differs from the
1340 value of <link to="#settingsFormatVersion"/>, then it
1341 means that the settings file was converted but the result of the
1342 conversion is not yet saved to disk.
1343
1344 The above feature may be used by interactive front-ends to inform users
1345 about the settings file format change and offer them to explicitly save
1346 all converted settings files (the global and VM-specific ones),
1347 optionally create backup copies of the old settings files before saving,
1348 etc.
1349
1350 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1355 <desc>
1356 Most recent version of the settings file format.
1357
1358 The version string has the following format:
1359 <pre>
1360 x.y-platform
1361 </pre>
1362 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1363 versions, and <tt>platform</tt> is the platform identifier.
1364
1365 VirtualBox uses this version of the format when saving settings files
1366 (either as a result of method calls that require to save settings or as
1367 a result of an explicit call to <link to="#saveSettings()"/>).
1368
1369 <see>settingsFileVersion</see>
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="host" type="IHost" readonly="yes">
1374 <desc>Associated host object.</desc>
1375 </attribute>
1376
1377 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1378 <desc>Associated system information object.</desc>
1379 </attribute>
1380
1381 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1382 <desc>
1383 Array of machine objects registered within this VirtualBox instance.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1388 <desc>
1389 Array of hard disk objects known to this VirtualBox installation.
1390
1391 This array contains only base (root) hard disks. All differencing
1392 hard disks of the given base hard disk can be enumerated using
1393 <link to="IHardDisk2::children"/>.
1394 </desc>
1395 </attribute>
1396
1397 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1398 <desc>
1399 Array of CD/DVD image objects registered with this VirtualBox instance.
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1404 <desc>
1405 Array of floppy image objects registered with this VirtualBox instance.
1406 </desc>
1407 </attribute>
1408
1409 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1410
1411 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1412
1413 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1414 <desc>
1415 Collection of global shared folders. Global shared folders are
1416 available to all virtual machines.
1417
1418 New shared folders are added to the collection using
1419 <link to="#createSharedFolder"/>. Existing shared folders can be
1420 removed using <link to="#removeSharedFolder"/>.
1421
1422 <note>
1423 In the current version of the product, global shared folders are not
1424 implemented and therefore this collection is always empty.
1425 </note>
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1430 <desc>
1431 Associated performance collector object.
1432 </desc>
1433 </attribute>
1434
1435 <method name="createMachine">
1436 <desc>
1437 Creates a new virtual machine.
1438
1439 The new machine is created unregistered, with the initial configuration
1440 set according to the specified guest OS type. A typical sequence of
1441 actions to create a new virtual machine is as follows:
1442
1443 <ol>
1444 <li>
1445 Call this method to have a new machine created. The returned machine
1446 object will be "mutable" allowing to change any machine property.
1447 </li>
1448
1449 <li>
1450 Configure the machine using the appropriate attributes and methods.
1451 </li>
1452
1453 <li>
1454 Call <link to="IMachine::saveSettings()" /> to write the settings
1455 to the machine's XML settings file. The configuration of the newly
1456 created machine will not be saved to disk until this method is
1457 called.
1458 </li>
1459
1460 <li>
1461 Call <link to="#registerMachine()" /> to add the machine to the list
1462 of machines known to VirtualBox.
1463 </li>
1464 </ol>
1465
1466 You should specify valid name for the newly created machine when calling
1467 this method. See the <link to="IMachine::name"/> attribute description
1468 for more details about the machine name.
1469
1470 The specified guest OS type identifier must match an ID of one of known
1471 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1472 array.
1473
1474 Every machine has a <i>settings file</i> that is used to store
1475 the machine configuration. This file is stored in a directory called the
1476 <i>machine settings subfolder</i>. Both the settings subfolder and file
1477 will have a name that corresponds to the name of the virtual machine.
1478 You can specify where to create the machine setting subfolder using the
1479 @a baseFolder argument. The base folder can be absolute (full path) or
1480 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1481 directory</link>.
1482
1483 If @a baseFolder is a null or empty string (which is recommended), the
1484 <link to="ISystemProperties::defaultMachineFolder">default machine
1485 settings folder</link> will be used as a base folder for the created
1486 machine. Otherwise the given base folder will be used. In either case,
1487 the full path to the resulting settings file has the following
1488 structure:
1489 <pre>
1490 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1491 </pre>
1492
1493 Note that if the resulting settings file already exists, this method
1494 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1495
1496 Optionally, you may specify an UUID of to assign to the created machine.
1497 However, this is not recommended and you should normally pass an empty
1498 (null) UUID to this method so that a new UUID will be automatically
1499 generated for every created machine.
1500
1501 <note>
1502 There is no way to change the name of the settings file or
1503 subfolder of the created machine directly.
1504 </note>
1505
1506 <result name="VBOX_E_OBJECT_NOT_FOUND">
1507 @a osTypeId is invalid.
1508 </result>
1509 <result name="VBOX_E_FILE_ERROR">
1510 Resulting settings file name is invalid or the settings file already
1511 exists or could not be created due to an I/O error.
1512 </result>
1513 <result name="E_INVALIDARG">
1514 @a name is empty or null.
1515 </result>
1516 </desc>
1517
1518 <param name="name" type="wstring" dir="in">
1519 <desc>Machine name.</desc>
1520 </param>
1521 <param name="osTypeId" type="wstring" dir="in">
1522 <desc>Guest OS Type ID.</desc>
1523 </param>
1524 <param name="baseFolder" type="wstring" dir="in">
1525 <desc>Base machine folder (optional).</desc>
1526 </param>
1527 <param name="id" type="uuid" dir="in">
1528 <desc>Machine UUID (optional).</desc>
1529 </param>
1530 <param name="machine" type="IMachine" dir="return">
1531 <desc>Created machine object.</desc>
1532 </param>
1533 </method>
1534
1535 <method name="createLegacyMachine">
1536 <desc>
1537 Creates a new virtual machine in "legacy" mode, using the specified
1538 settings file to store machine settings.
1539
1540 As opposed to machines created by <link to="#createMachine()"/>,
1541 the settings file of the machine created in "legacy" mode is not
1542 automatically renamed when the machine name is changed -- it will always
1543 remain the same as specified in this method call.
1544
1545 The specified settings file name can be absolute (full path) or relative
1546 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1547 directory</link>. If the file name doesn't contain an extension, the
1548 default extension (.xml) will be appended.
1549
1550 Note that the configuration of the newly created machine is not
1551 saved to disk (and therefore no settings file is created)
1552 until <link to="IMachine::saveSettings()"/> is called. If the
1553 specified settings file already exists, this method
1554 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1555
1556 See <link to="#createMachine()"/> for more information.
1557
1558 @deprecated This method may be removed later. Use <link
1559 to="IVirtualBox::createMachine()"/> instead.
1560
1561 <note>
1562 There is no way to change the name of the settings file
1563 of the machine created in "legacy" mode.
1564 </note>
1565
1566 <result name="VBOX_E_OBJECT_NOT_FOUND">
1567 @a osTypeId is invalid.
1568 </result>
1569 <result name="VBOX_E_FILE_ERROR">
1570 @a settingsFile is invalid or the settings file already exists or
1571 could not be created due to an I/O error.
1572 </result>
1573 <result name="E_INVALIDARG">
1574 @a name or @a settingsFile is empty or null.
1575 </result>
1576 </desc>
1577
1578 <param name="name" type="wstring" dir="in">
1579 <desc>Machine name.</desc>
1580 </param>
1581 <param name="osTypeId" type="wstring" dir="in">
1582 <desc>Machine OS Type ID.</desc>
1583 </param>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>Name of the machine settings file.</desc>
1586 </param>
1587 <param name="id" type="uuid" dir="in">
1588 <desc>Machine UUID (optional).</desc>
1589 </param>
1590 <param name="machine" type="IMachine" dir="return">
1591 <desc>Created machine object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openMachine">
1596 <desc>
1597 Opens a virtual machine from the existing settings file.
1598 The opened machine remains unregistered until you call
1599 <link to="#registerMachine()"/>.
1600
1601 The specified settings file name can be absolute
1602 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1603 VirtualBox home directory</link>. This file must exist
1604 and must be a valid machine settings file whose contents
1605 will be used to construct the machine object.
1606
1607 @deprecated Will be removed soon.
1608 <result name="VBOX_E_FILE_ERROR">
1609 Settings file name invalid, not found or sharing violation.
1610 </result>
1611 </desc>
1612 <param name="settingsFile" type="wstring" dir="in">
1613 <desc>
1614 Name of the machine settings file.
1615 </desc>
1616 </param>
1617 <param name="machine" type="IMachine" dir="return">
1618 <desc>Opened machine object.</desc>
1619 </param>
1620 <note>
1621 <link to="IMachine::settingsModified"/> will return
1622 false for the created machine, until any of machine settings
1623 are changed.
1624 </note>
1625 </method>
1626
1627 <method name="registerMachine">
1628 <desc>
1629
1630 Registers the machine previously created using
1631 <link to="#createMachine()"/> or opened using
1632 <link to="#openMachine()"/> within this VirtualBox installation. After
1633 successful method invocation, the
1634 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1635 to all registered callbacks.
1636
1637 <note>
1638 This method implicitly calls <link to="IMachine::saveSettings"/>
1639 to save all current machine settings before registering it.
1640 </note>
1641
1642 <result name="VBOX_E_OBJECT_NOT_FOUND">
1643 No matching virtual machine found.
1644 </result>
1645 <result name="VBOX_E_INVALID_OBJECT_STATE">
1646 Virtual machine was not created within this VirtualBox instance.
1647 </result>
1648
1649 </desc>
1650 <param name="machine" type="IMachine" dir="in"/>
1651 </method>
1652
1653 <method name="getMachine">
1654 <desc>
1655 Attempts to find a virtual machine given its UUID.
1656 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1657 instead.
1658
1659 <result name="VBOX_E_OBJECT_NOT_FOUND">
1660 Could not find registered machine matching @a id.
1661 </result>
1662
1663 </desc>
1664 <param name="id" type="uuid" dir="in"/>
1665 <param name="machine" type="IMachine" dir="return"/>
1666 </method>
1667
1668 <method name="findMachine">
1669 <desc>
1670 Attempts to find a virtual machine given its name.
1671 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1672 instead.
1673
1674 <result name="VBOX_E_OBJECT_NOT_FOUND">
1675 Could not find registered machine matching @a name.
1676 </result>
1677
1678 </desc>
1679 <param name="name" type="wstring" dir="in"/>
1680 <param name="machine" type="IMachine" dir="return"/>
1681 </method>
1682
1683 <method name="unregisterMachine">
1684 <desc>
1685
1686 Unregisters the machine previously registered using
1687 <link to="#registerMachine"/>. After successful method invocation, the
1688 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1689 to all registered callbacks.
1690
1691 <note>
1692 The specified machine must not be in the Saved state, have an open
1693 (or a spawning) direct session associated with it, have snapshots or
1694 have hard disks attached.
1695 </note>
1696
1697 <note>
1698 This method implicitly calls <link to="IMachine::saveSettings"/> to
1699 save all current machine settings before unregistering it.
1700 </note>
1701
1702 <note>
1703 If the given machine is inaccessible (see
1704 <link to="IMachine::accessible"/>), it will be unregistered and
1705 fully uninitialized right afterwards. As a result, the returned
1706 machine object will be unusable and an attempt to call
1707 <b>any</b> method will return the "Object not ready" error.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 Could not find registered machine matching @a id.
1712 </result>
1713 <result name="VBOX_E_INVALID_VM_STATE">
1714 Machine is in Saved state.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Machine has snapshot or open session or hard disk attached.
1718 </result>
1719
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the machine to unregister.</desc>
1723 </param>
1724 <param name="machine" type="IMachine" dir="return">
1725 <desc>Unregistered machine object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="openAppliance">
1730 <desc>
1731 Attempts to open the given appliance, which must be in Open Virtual Machine Format (OVF).
1732
1733 As prescribed by the OVF standard, VirtualBox supports OVF in two formats:
1734
1735 <ol>
1736 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
1737 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
1738 this descriptor file references other files, as OVF appliances distributed as a set of
1739 files most likely do, those files must be in the same directory as the descriptor file.</li>
1740
1741 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
1742 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
1743 files and optionally other files.</li>
1744 </ol>
1745
1746 In both cases, VirtualBox will open the OVF descriptor file, parse its contents and create a
1747 new instance of IAppliance representing the OVF file.
1748
1749 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
1750 returned IAppliance object can then be used to retrieve information about the appliance and
1751 import it into VirtualBox. The mere fact that this method returns successfully does not mean
1752 that VirtualBox supports all features requested by the appliance; see the documentation for
1753 <link to="IAppliance" /> for details.
1754
1755 </desc>
1756 <param name="file" type="wstring" dir="in">
1757 <desc>
1758 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
1759 on whether the appliance is distributed as a set of files or as a single file, respectively).
1760 </desc>
1761 </param>
1762 <param name="machine" type="IAppliance" dir="return">
1763 <desc>New appliance.</desc>
1764 </param>
1765 </method>
1766
1767 <method name="createHardDisk2">
1768 <desc>
1769 Creates a new base hard disk object that will use the given storage
1770 format and location for hard disk data.
1771
1772 Note that the actual storage unit is not created by this method. In
1773 order to do it, and before you are able to attach the created hard disk
1774 to virtual machines, you must call one of the following methods to
1775 allocate a format-specific storage unit at the specified location:
1776 <ul>
1777 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1778 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1779 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1780 </ul>
1781
1782 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1783 remain uninitialized until the hard disk storage unit is successfully
1784 created by one of the above methods.
1785
1786 After the storage unit is successfully created, the hard disk gets
1787 remembered by this VirtualBox installation and will be accessible
1788 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1789 methods. Remembered root (base) hard disks are also returned as part of
1790 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1791
1792 The list of all storage formats supported by this VirtualBox
1793 installation can be obtained using
1794 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1795 attribute is empty or <tt>null</tt> then the default storage format
1796 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1797 be used for creating a storage unit of the hard disk.
1798
1799 Note that the format of the location string is storage format specific.
1800 See <link to="IMedium::location"/>, IHardDisk2 and
1801 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a format identifier is invalid. See
1805 <link to="ISystemProperties::hardDiskFormats"/>.
1806 </result>
1807 <result name="VBOX_E_FILE_ERROR">
1808 @a location is a not valid file name (for file-based formats only).
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a format is a null or empty string.
1812 </result>
1813 </desc>
1814 <param name="format" type="wstring" dir="in">
1815 <desc>
1816 Identifier of the storage format to use for the new hard disk.
1817 </desc>
1818 </param>
1819 <param name="location" type="wstring" dir="in">
1820 <desc>
1821 Location of the storage unit for the new hard disk.
1822 </desc>
1823 </param>
1824 <param name="hardDisk" type="IHardDisk2" dir="return">
1825 <desc>Created hard disk object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="openHardDisk2">
1830 <desc>
1831 Opens a hard disk from an existing location.
1832
1833 After the hard disk is successfully opened by this method, it gets
1834 remembered by (known to) this VirtualBox installation and will be
1835 accessible through <link to="#getHardDisk2()"/> and
1836 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1837 are also returned as part of the <link to="#hardDisks2"/> array and can
1838 be attached to virtual machines. See IHardDisk2 for more details.
1839
1840 If a differencing hard disk is to be opened by this method, the
1841 operation will succeed only if its parent hard disk and all ancestors,
1842 if any, are already known to this VirtualBox installation (for example,
1843 were opened by this method before).
1844
1845 This method tries to guess the storage format of the specified hard disk
1846 by reading hard disk data at the specified location.
1847
1848 Note that the format of the location string is storage format specific.
1849 See <link to="IMedium::location"/>, IHardDisk2 and
1850 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1851
1852
1853 <result name="VBOX_E_FILE_ERROR">
1854 Invalid hard disk storage file location.
1855 </result>
1856 <result name="VBOX_E_IPRT_ERROR">
1857 Could not get hard disk storage format.
1858 </result>
1859 <result name="E_INVALIDARG">
1860 Invalid hard disk storage format.
1861 </result>
1862
1863 </desc>
1864 <param name="location" type="wstring" dir="in">
1865 <desc>
1866 Location of the storage unit that contains hard disk data in one of
1867 the supported storage formats.
1868 </desc>
1869 </param>
1870 <param name="hardDisk" type="IHardDisk2" dir="return">
1871 <desc>Opened hard disk object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getHardDisk2" const="yes">
1876 <desc>
1877 Returns a hard disk with the given UUID.
1878
1879 The hard disk with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously created by
1881 <link to="#createHardDisk2()"/> or opened by <link
1882 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1883
1884 <result name="VBOX_E_OBJECT_NOT_FOUND">
1885 No hard disk object matching @a id found.
1886 </result>
1887
1888 </desc>
1889 <param name="id" type="uuid" dir="in">
1890 <desc>UUID of the hard disk to look for.</desc>
1891 </param>
1892 <param name="hardDisk" type="IHardDisk2" dir="return">
1893 <desc>Found hard disk object.</desc>
1894 </param>
1895 </method>
1896
1897 <method name="findHardDisk2">
1898 <desc>
1899 Returns a hard disk that uses the given location to store hard
1900 disk data.
1901
1902 The given hard disk must be known to this VirtualBox installation, i.e.
1903 it must be previously created by
1904 <link to="#createHardDisk2()"/> or opened by <link
1905 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IHardDisk2::location"/> attribute of each known hard
1909 disk.
1910
1911 For locations represented by file names in the host's file system, the
1912 requested location can be a path relative to the
1913 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1914 only a file name without any path is given, the
1915 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1916 folder</link> will be prepended to the file name before searching. Note
1917 that on case sensitive file systems, a case sensitive comparison is
1918 performed, otherwise the case of symbols in the file path is ignored.
1919
1920 <result name="VBOX_E_OBJECT_NOT_FOUND">
1921 No hard disk object matching @a location found.
1922 </result>
1923
1924 </desc>
1925 <param name="location" type="wstring" dir="in">
1926 <desc>Location string to search for.</desc>
1927 </param>
1928 <param name="hardDisk" type="IHardDisk2" dir="return">
1929 <desc>Found hard disk object.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="openDVDImage">
1934 <desc>
1935 Opens a CD/DVD image contained in the specified file of the supported
1936 format and assigns it the given UUID.
1937
1938 After the image is successfully opened by this method, it gets
1939 remembered by (known to) this VirtualBox installation and will be
1940 accessible through <link to="#getDVDImage()"/> and
1941 <link to="#findDVDImage()"/> methods. Remembered images are also
1942 returned as part of the <link to="#DVDImages"/> array and can be mounted
1943 to virtual machines. See IMedium for more details.
1944
1945 See <link to="IMedium::location"/> to get more details about the format
1946 of the location string.
1947
1948 <note>
1949 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1950 </note>
1951
1952 <result name="VBOX_E_INVALID_OBJECT_STATE">
1953 CD/DVD image already exists in the media registry.
1954 </result>
1955
1956 </desc>
1957 <param name="location" type="wstring" dir="in">
1958 <desc>
1959 Full path to the file that contains a valid CD/DVD image.
1960 </desc>
1961 </param>
1962 <param name="id" type="uuid" dir="in">
1963 <desc>
1964 UUID to assign to the given image within this VirtualBox installation.
1965 If an empty (null) UUID is specified, the system will randomly
1966 generate a new UUID.
1967 </desc>
1968 </param>
1969 <param name="image" type="IDVDImage2" dir="return">
1970 <desc>Opened CD/DVD image object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="getDVDImage">
1975 <desc>
1976 Returns a CD/DVD image with the given UUID.
1977
1978 The image with the given UUID must be known to this VirtualBox
1979 installation, i.e. it must be previously opened by <link
1980 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1981
1982 <result name="VBOX_E_OBJECT_NOT_FOUND">
1983 No matching DVD image found in the media registry.
1984 </result>
1985
1986 </desc>
1987 <param name="id" type="uuid" dir="in">
1988 <desc>UUID of the image to look for.</desc>
1989 </param>
1990 <param name="image" type="IDVDImage2" dir="return">
1991 <desc>Found CD/DVD image object.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="findDVDImage">
1996 <desc>
1997 Returns a CD/DVD image with the given image location.
1998
1999 The image with the given UUID must be known to this VirtualBox
2000 installation, i.e. it must be previously opened by <link
2001 to="#openDVDImage()"/>, or mounted to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2005
2006 The requested location can be a path relative to the
2007 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2008 only a file name without any path is given, the
2009 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2010 folder</link> will be prepended to the file name before searching. Note
2011 that on case sensitive file systems, a case sensitive comparison is
2012 performed, otherwise the case in the file path is ignored.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Invalid image file location.
2016 </result>
2017 <result name="VBOX_E_OBJECT_NOT_FOUND">
2018 No matching DVD image found in the media registry.
2019 </result>
2020
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>CD/DVD image file path to look for.</desc>
2024 </param>
2025 <param name="image" type="IDVDImage2" dir="return">
2026 <desc>Found CD/DVD image object.</desc>
2027 </param>
2028 </method>
2029
2030 <method name="openFloppyImage">
2031 <desc>
2032 Opens a floppy image contained in the specified file of the supported
2033 format and assigns it the given UUID.
2034
2035 After the image is successfully opened by this method, it gets
2036 remembered by (known to) this VirtualBox installation and will be
2037 accessible through <link to="#getFloppyImage()"/> and
2038 <link to="#findFloppyImage()"/> methods. Remembered images are also
2039 returned as part of the <link to="#floppyImages"/> array and can be
2040 mounted to virtual machines. See IMedium for more details.
2041
2042 See <link to="IMedium::location"/> to get more details about the format
2043 of the location string.
2044
2045 <result name="VBOX_E_FILE_ERROR">
2046 Floppy image specified by @a location not accessible.
2047 </result>
2048 <result name="VBOX_E_INVALID_OBJECT_STATE">
2049 Floppy image already exists in the media registry.
2050 </result>
2051
2052 <note>
2053 Currently, only raw floppy images are supported by VirtualBox.
2054 </note>
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid floppy image.
2059 </desc>
2060 </param>
2061 <param name="id" type="uuid" dir="in">
2062 <desc>
2063 UUID to assign to the given image file within this VirtualBox
2064 installation. If an empty (null) UUID is specified, the system will
2065 randomly generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IFloppyImage2" dir="return">
2069 <desc>Opened floppy image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getFloppyImage">
2074 <desc>
2075 Returns a floppy image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching floppy image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="uuid" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IFloppyImage2" dir="return">
2090 <desc>Found floppy image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findFloppyImage">
2095 <desc>
2096 Returns a floppy image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known floppy image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case of symbols in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching floppy image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>Floppy image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IFloppyImage2" dir="return">
2125 <desc>Found floppy image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="getGuestOSType">
2130 <desc>
2131 Returns an object describing the specified guest OS type.
2132
2133 The requested guest OS type is specified using a string which is a
2134 mnemonic identifier of the guest operating system, such as
2135 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2136 particular virtual machine can be read or set using the
2137 <link to="IMachine::OSTypeId"/> attribute.
2138
2139 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2140 available guest OS type objects. Each object has an
2141 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2142 the guest OS this object describes.
2143
2144 <result name="E_INVALIDARG">
2145 @a id is not a valid Guest OS type.
2146 </result>
2147
2148 </desc>
2149 <param name="id" type="wstring" dir="in">
2150 <desc>Guest OS type ID string.</desc>
2151 </param>
2152 <param name="type" type="IGuestOSType" dir="return">
2153 <desc>Guest OS type object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="createSharedFolder">
2158 <desc>
2159 Creates a new global shared folder by associating the given logical
2160 name with the given host path, adds it to the collection of shared
2161 folders and starts sharing it. Refer to the description of
2162 <link to="ISharedFolder"/> to read more about logical names.
2163 <note>
2164 In the current implementation, this operation is not
2165 implemented.
2166 </note>
2167 </desc>
2168 <param name="name" type="wstring" dir="in">
2169 <desc>Unique logical name of the shared folder.</desc>
2170 </param>
2171 <param name="hostPath" type="wstring" dir="in">
2172 <desc>Full path to the shared folder in the host file system.</desc>
2173 </param>
2174 <param name="writable" type="boolean" dir="in">
2175 <desc>Whether the share is writable or readonly</desc>
2176 </param>
2177 </method>
2178
2179 <method name="removeSharedFolder">
2180 <desc>
2181 Removes the global shared folder with the given name previously
2182 created by <link to="#createSharedFolder"/> from the collection of
2183 shared folders and stops sharing it.
2184 <note>
2185 In the current implementation, this operation is not
2186 implemented.
2187 </note>
2188 </desc>
2189 <param name="name" type="wstring" dir="in">
2190 <desc>Logical name of the shared folder to remove.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="getNextExtraDataKey">
2195 <desc>
2196 Returns the global extra data key name following the supplied key.
2197
2198 An error is returned if the supplied @a key does not exist. @c NULL is
2199 returned in @a nextKey if the supplied key is the last key. When
2200 supplying @c NULL for the @a key, the first key item is returned in @a
2201 nextKey (if there is any). @a nextValue is an optional parameter and
2202 if supplied, the next key's value is returned in it.
2203
2204 <result name="VBOX_E_OBJECT_NOT_FOUND">
2205 Extra data @a key not found.
2206 </result>
2207
2208 </desc>
2209 <param name="key" type="wstring" dir="in">
2210 <desc>Name of the data key to follow.</desc>
2211 </param>
2212 <param name="nextKey" type="wstring" dir="out">
2213 <desc>Name of the next data key.</desc>
2214 </param>
2215 <param name="nextValue" type="wstring" dir="out">
2216 <desc>Value of the next data key.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="getExtraData">
2221 <desc>
2222 Returns associated global extra data.
2223
2224 If the requested data @a key does not exist, this function will
2225 succeed and return @c NULL in the @a value argument.
2226
2227 <result name="VBOX_E_FILE_ERROR">
2228 Settings file not accessible.
2229 </result>
2230 <result name="VBOX_E_XML_ERROR">
2231 Could not parse the settings file.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to get.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="return">
2239 <desc>Value of the requested data key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="setExtraData">
2244 <desc>
2245 Sets associated global extra data.
2246
2247 If you pass @c NULL as a key @a value, the given @a key will be
2248 deleted.
2249
2250 <note>
2251 Before performing the actual data change, this method will ask all
2252 registered callbacks using the
2253 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2254 notification for a permission. If one of the callbacks refuses the
2255 new value, the change will not be performed.
2256 </note>
2257 <note>
2258 On success, the
2259 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2260 is called to inform all registered callbacks about a successful data
2261 change.
2262 </note>
2263
2264 <result name="VBOX_E_FILE_ERROR">
2265 Settings file not accessible.
2266 </result>
2267 <result name="VBOX_E_XML_ERROR">
2268 Could not parse the settings file.
2269 </result>
2270 <result name="E_ACCESSDENIED">
2271 Modification request refused.
2272 </result>
2273
2274 </desc>
2275 <param name="key" type="wstring" dir="in">
2276 <desc>Name of the data key to set.</desc>
2277 </param>
2278 <param name="value" type="wstring" dir="in">
2279 <desc>Value to assign to the key.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="openSession">
2284 <desc>
2285 Opens a new direct session with the given virtual machine.
2286
2287 A direct session acts as a local lock on the given VM.
2288 There can be only one direct session open at a time for every
2289 virtual machine, protecting the VM from being manipulated by
2290 conflicting actions from different processes. Only after a
2291 direct session has been opened, one can change all VM settings
2292 and execute the VM in the process space of the session object.
2293
2294 Sessions therefore can be compared to mutex semaphores that
2295 lock a given VM for modification and execution.
2296 See <link to="ISession">ISession</link> for details.
2297
2298 <note>Unless you are writing a new VM frontend, you will not
2299 want to execute a VM in the current process. To spawn a new
2300 process that executes a VM, use
2301 <link to="IVirtualBox::openRemoteSession" />
2302 instead.</note>
2303
2304 Upon successful return, the session object can be used to
2305 get access to the machine and to the VM console.
2306
2307 In VirtualBox terminology, the machine becomes "mutable" after
2308 a session has been opened. Note that the "mutable" machine
2309 object, on which you may invoke IMachine methods to change its
2310 settings, will be a different object from the immutable IMachine
2311 objects returned by various IVirtualBox methods. To obtain a
2312 mutable IMachine object (upon which you can invoke settings methods),
2313 use the <link to="ISession::machine" /> attribute.
2314
2315 One must always call <link to="ISession::close" /> to release the
2316 lock on the machine, or the machine's state will eventually be
2317 set to "Aborted".
2318
2319 In other words, to change settings on a machine, the following
2320 sequence is typically performed:
2321
2322 <ol>
2323 <li>Call this method (openSession) to have a machine locked for
2324 the current session.</li>
2325
2326 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2327
2328 <li>Change the settings of the machine.</li>
2329
2330 <li>Call <link to="IMachine::saveSettings" />.</li>
2331
2332 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2333 </ol>
2334
2335 <result name="E_UNEXPECTED">
2336 Virtual machine not registered.
2337 </result>
2338 <result name="E_ACCESSDENIED">
2339 Process not started by OpenRemoteSession.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching virtual machine found.
2343 </result>
2344 <result name="VBOX_E_INVALID_OBJECT_STATE">
2345 Session already open or being opened.
2346 </result>
2347 <result name="VBOX_E_VM_ERROR">
2348 Failed to assign machine to session.
2349 </result>
2350
2351 </desc>
2352 <param name="session" type="ISession" dir="in">
2353 <desc>
2354 Session object that will represent the opened session after
2355 successful method invocation. This object must not represent
2356 the already open session.
2357 <note>
2358 This session will be automatically closed if the
2359 VirtualBox server is terminated for some reason.
2360 </note>
2361 </desc>
2362 </param>
2363 <param name="machineId" type="uuid" dir="in">
2364 <desc>ID of the virtual machine to open a session with.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="openRemoteSession">
2369 <desc>
2370 Spawns a new process that executes a virtual machine (called a
2371 "remote session").
2372
2373 Opening a remote session causes the VirtualBox server to start a new
2374 process that opens a direct session with the given VM. As a result, the
2375 VM is locked by that direct session in the new process, preventing
2376 conflicting changes from other processes. Since sessions act as locks
2377 that prevent conflicting changes, one cannot open a remote session
2378 for a VM that already has another open session (direct or remote), or
2379 is currently in the process of opening one (see <link
2380 to="IMachine::sessionState"/>).
2381
2382 While the remote session still provides some level of control over the
2383 VM execution to the caller (using the <link to="IConsole" /> interface),
2384 not all VM settings are available for modification within the remote
2385 session context.
2386
2387 This operation can take some time (a new VM is started in a new process,
2388 for which memory and other resources need to be set up). Because of this,
2389 an <link to="IProgress" /> is returned to allow the caller to wait for this
2390 asynchronous operation to be completed. Until then, the remote session
2391 object remains in the closed state, and accessing the machine or its
2392 console through it is invalid. It is recommended to use
2393 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2394 completion.
2395
2396 As with all <link to="ISession" /> objects, it is recommended to call
2397 <link to="ISession::close" /> on the local session object once openRemoteSession()
2398 has been called. However, the session's state (see <link to="ISession::state" />)
2399 will not return to "Closed" until the remote session has also closed (i.e.
2400 until the VM is no longer running). In that case, however, the state of
2401 the session will automatically change back to "Closed".
2402
2403 Currently supported session types (values of the @a type
2404 argument) are:
2405 <ul>
2406 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2407 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2408 </ul>
2409
2410 The @a environment argument is a string containing definitions of
2411 environment variables in the following format:
2412 @code
2413 NAME[=VALUE]\n
2414 NAME[=VALUE]\n
2415 ...
2416 @endcode
2417 where <tt>\\n</tt> is the new line character. These environment
2418 variables will be appended to the environment of the VirtualBox server
2419 process. If an environment variable exists both in the server process
2420 and in this list, the value from this list takes precedence over the
2421 server's variable. If the value of the environment variable is
2422 omitted, this variable will be removed from the resulting environment.
2423 If the environment string is @c null, the server environment is
2424 inherited by the started process as is.
2425
2426 <see>openExistingSession</see>
2427
2428 <result name="E_UNEXPECTED">
2429 Virtual machine not registered.
2430 </result>
2431 <result name="E_INVALIDARG">
2432 Invalid session type @a type.
2433 </result>
2434 <result name="VBOX_E_OBJECT_NOT_FOUND">
2435 No machine matching @a machineId found.
2436 </result>
2437 <result name="VBOX_E_INVALID_OBJECT_STATE">
2438 Session already open or being opened.
2439 </result>
2440 <result name="VBOX_E_IPRT_ERROR">
2441 Launching process for machine failed.
2442 </result>
2443 <result name="VBOX_E_VM_ERROR">
2444 Failed to assign machine to session.
2445 </result>
2446
2447 </desc>
2448 <param name="session" type="ISession" dir="in">
2449 <desc>
2450 Session object that will represent the opened remote session
2451 after successful method invocation (this object must not
2452 represent an already open session).
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 <param name="type" type="wstring" dir="in">
2459 <desc>
2460 Type of the remote session (case sensitive).
2461 </desc>
2462 </param>
2463 <param name="environment" type="wstring" dir="in">
2464 <desc>
2465 Environment to pass to the opened session (may be @c null).
2466 </desc>
2467 </param>
2468 <param name="progress" type="IProgress" dir="return">
2469 <desc>Progress object to track the operation completion.</desc>
2470 </param>
2471 </method>
2472
2473 <method name="openExistingSession">
2474 <desc>
2475 Opens a new remote session with the virtual machine for
2476 which a direct session is already open.
2477
2478 The remote session provides some level of control over the VM
2479 execution (using the IConsole interface) to the caller; however,
2480 within the remote session context, not all VM settings are available
2481 for modification.
2482
2483 As opposed to <link to="#openRemoteSession()"/>, the number of
2484 remote sessions opened this way is not limited by the API
2485
2486 <note>
2487 It is an error to open a remote session with the machine that
2488 doesn't have an open direct session.
2489 </note>
2490
2491 <result name="E_UNEXPECTED">
2492 Virtual machine not registered.
2493 </result>
2494 <result name="VBOX_E_OBJECT_NOT_FOUND">
2495 No machine matching @a machineId found.
2496 </result>
2497 <result name="VBOX_E_INVALID_OBJECT_STATE">
2498 Session already open or being opened.
2499 </result>
2500 <result name="VBOX_E_INVALID_SESSION_STATE">
2501 Direct session state not Open.
2502 </result>
2503 <result name="VBOX_E_VM_ERROR">
2504 Failed to get console object from direct session or assign
2505 machine to session.
2506 </result>
2507
2508 <see>openRemoteSession</see>
2509 </desc>
2510 <param name="session" type="ISession" dir="in">
2511 <desc>
2512 Session object that will represent the open remote session
2513 after successful method invocation. This object must not
2514 represent an already open session.
2515 <note>
2516 This session will be automatically closed when the peer
2517 (direct) session dies or gets closed.
2518 </note>
2519 </desc>
2520 </param>
2521 <param name="machineId" type="uuid" dir="in">
2522 <desc>ID of the virtual machine to open a session with.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="registerCallback">
2527 <desc>
2528 Registers a new global VirtualBox callback. The methods of the given
2529 callback object will be called by VirtualBox when an appropriate
2530 event occurs.
2531
2532 <result name="E_INVALIDARG">
2533 Registering a @c NULL @a callback is pretty pointless, ain't it?
2534 <!-- See if someone is actually reading this and objects :-) -->
2535 </result>
2536
2537 </desc>
2538 <param name="callback" type="IVirtualBoxCallback" dir="in">
2539 <desc>Callback object to register.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="unregisterCallback">
2544 <desc>
2545 Unregisters the previously registered global VirtualBox callback.
2546
2547 <result name="E_INVALIDARG">
2548 Specified @a callback not registered.
2549 </result>
2550
2551 </desc>
2552 <param name="callback" type="IVirtualBoxCallback" dir="in">
2553 <desc>Callback object to unregister.</desc>
2554 </param>
2555 </method>
2556
2557 <method name="waitForPropertyChange">
2558 <desc>
2559 Blocks the caller until any of the properties represented by the @a
2560 what argument changes the value or until the given timeout interval
2561 expires.
2562
2563 The @a what argument is a comma separated list of property masks that
2564 describe properties the caller is interested in. The property mask is
2565 a string in the following format:
2566
2567 <pre>
2568 [[group.]subgroup.]name
2569 </pre>
2570
2571 where @c name is the property name and @c group, @c subgroup are zero
2572 or more property group specifiers. Each element (group or name) in
2573 the property mask may be either a Latin string or an asterisk symbol
2574 (@c "*") which is used to match any string for the given element. A
2575 property mask that doesn't contain asterisk symbols represents a
2576 single fully qualified property name.
2577
2578 Groups in the fully qualified property name go from more generic (the
2579 left-most part) to more specific (the right-most part). The first
2580 element is usually a name of the object the property belongs to. The
2581 second element may be either a property name, or a child object name,
2582 or an index if the preceding element names an object which is one of
2583 many objects of the same type. This way, property names form a
2584 hierarchy of properties. Here are some examples of property names:
2585
2586 <table>
2587 <tr>
2588 <td><tt>VirtualBox.version</tt></td>
2589 <td><link to="IVirtualBox::version"/> property</td>
2590 </tr>
2591 <tr>
2592 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2593 <td><link to="IMachine::name"/> property of the machine with the
2594 given UUID</td>
2595 </tr>
2596 </table>
2597
2598 Most property names directly correspond to the properties of objects
2599 (components) provided by the VirtualBox library and may be used to
2600 track changes to these properties. However, there may be
2601 pseudo-property names that don't correspond to any existing object's
2602 property directly, as well as there may be object properties that
2603 don't have a corresponding property name that is understood by this
2604 method, and therefore changes to such properties cannot be
2605 tracked. See individual object's property descriptions to get a
2606 fully qualified property name that can be used with this method (if
2607 any).
2608
2609 There is a special property mask @c "*" (i.e. a string consisting of a
2610 single asterisk symbol) that can be used to match all properties.
2611 Below are more examples of property masks:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.*</tt></td>
2616 <td>Track all properties of the VirtualBox object</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.*.name</tt></td>
2620 <td>Track changes to the <link to="IMachine::name"/> property of
2621 all registered virtual machines</td>
2622 </tr>
2623 </table>
2624
2625 <note>
2626 This function is not implemented in the current version of the
2627 product.
2628 </note>
2629 </desc>
2630 <param name="what" type="wstring" dir="in">
2631 <desc>Comma separated list of property masks.</desc>
2632 </param>
2633 <param name="timeout" type="unsigned long" dir="in">
2634 <desc>
2635 Wait timeout in milliseconds.
2636 Specify -1 for an indefinite wait.
2637 </desc>
2638 </param>
2639 <param name="changed" type="wstring" dir="out">
2640 <desc>
2641 Comma separated list of properties that have been changed and caused
2642 this method to return to the caller.
2643 </desc>
2644 </param>
2645 <param name="values" type="wstring" dir="out">
2646 <desc>Reserved, not currently used.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="saveSettings">
2651 <desc>
2652 Saves the global settings to the global settings file
2653 (<link to="#settingsFilePath"/>).
2654
2655 This method is only useful for explicitly saving the global settings
2656 file after it has been auto-converted from the old format to the most
2657 recent format (see <link to="#settingsFileVersion"/> for details).
2658 Normally, the global settings file is implicitly saved when a global
2659 setting is changed.
2660
2661 <result name="VBOX_E_FILE_ERROR">
2662 Settings file not accessible.
2663 </result>
2664 <result name="VBOX_E_XML_ERROR">
2665 Could not parse the settings file.
2666 </result>
2667
2668 </desc>
2669 </method>
2670
2671 <method name="saveSettingsWithBackup">
2672 <desc>
2673 Creates a backup copy of the global settings file
2674 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2675 calls <link to="#saveSettings()"/>.
2676
2677 Note that the backup copy is created <b>only</b> if the settings file
2678 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2679 details). Otherwise, this call is fully equivalent to
2680 <link to="#saveSettings()"/> and no backup copying is done.
2681
2682 The backup copy is created in the same directory where the original
2683 settings file is located. It is given the following file name:
2684 <pre>
2685 original.xml.x.y-platform.bak
2686 </pre>
2687 where <tt>original.xml</tt> is the original settings file name
2688 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2689 format of the settings file (before auto-conversion).
2690
2691 If the given backup file already exists, this method will try to add the
2692 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2693 0 to 9) and copy it again until it succeeds. If all suffixes are
2694 occupied, or if any other copy error occurs, this method will return a
2695 failure.
2696
2697 If the copy operation succeeds, the @a bakFileName return argument will
2698 receive a full path to the created backup file (for informational
2699 purposes). Note that this will happen even if the subsequent
2700 <link to="#saveSettings()"/> call performed by this method after the
2701 copy operation, fails.
2702
2703 <note>
2704 The VirtualBox API never calls this method. It is intended purely for
2705 the purposes of creating backup copies of the settings files by
2706 front-ends before saving the results of the automatically performed
2707 settings conversion to disk.
2708 </note>
2709
2710 <see>settingsFileVersion</see>
2711
2712 <result name="VBOX_E_FILE_ERROR">
2713 Settings file not accessible.
2714 </result>
2715 <result name="VBOX_E_XML_ERROR">
2716 Could not parse the settings file.
2717 </result>
2718 <result name="VBOX_E_IPRT_ERROR">
2719 Could not copy the settings file.
2720 </result>
2721
2722 </desc>
2723 <param name="bakFileName" type="wstring" dir="return">
2724 <desc>Full path to the created backup copy.</desc>
2725 </param>
2726 </method>
2727
2728 </interface>
2729
2730 <!--
2731 // IAppliance
2732 /////////////////////////////////////////////////////////////////////////
2733 -->
2734
2735 <enum
2736 name="CIMOSType"
2737 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2738 >
2739 <desc>
2740 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2741 </desc>
2742
2743 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2744 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2745 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2746 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2747 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2748 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2749 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2750 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2751 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2752 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2753 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2754 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2755 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2756 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2757 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2758 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2759 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2760 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2761 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2762 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2763 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2764 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2765 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2766 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2767 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2768 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2769 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2770 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2771 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2772 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2773 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2774 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2775 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2776 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2777 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2778 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2779 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2780 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2781 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2782 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2783 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2784 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2785 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2786 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2787 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2788 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2789 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2790 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2791 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2792 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2793 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2794 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2795 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2796 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2797 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2798 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2799 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2800 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2801 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2802 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2803 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2804 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2805 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2806 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2807 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2808 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2809 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2810 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2811 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2812 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2813 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2814 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2815 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2816 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2817 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2818 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2819 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2820 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2821 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2822 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2823 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2824 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2825 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2826 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2827 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2828 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2829 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2830 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2831 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2832 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2833 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2834 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2835 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2836 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2837 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2838 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2839 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2840 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2841 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2842 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2843 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2844 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2845 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2846 </enum>
2847
2848 <enum
2849 name="OVFResourceType"
2850 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2851 >
2852 <desc>
2853 OVF resource type.
2854 </desc>
2855
2856 <const name="Other" value="1" />
2857 <const name="ComputerSystem" value="2" />
2858 <const name="Processor" value="3" />
2859 <const name="Memory" value="4" />
2860 <const name="IdeController" value="5" />
2861 <const name="ParallelScsiHba" value="6" />
2862 <const name="FcHba" value="7" />
2863 <const name="iScsiHba" value="8" />
2864 <const name="IbHca" value="9" />
2865 <const name="EthernetAdapter" value="10" />
2866 <const name="OtherNetworkAdapter" value="11" />
2867 <const name="IoSlot" value="12" />
2868 <const name="IoDevice" value="13" />
2869 <const name="FloppyDrive" value="14" />
2870 <const name="CdDrive" value="15" />
2871 <const name="DvdDrive" value="16" />
2872 <const name="HardDisk" value="17" />
2873 <const name="UsbController" value="23" />
2874 <const name="SoundCard" value="35" />
2875 </enum>
2876
2877 <interface
2878 name="IAppliance" extends="$unknown"
2879 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2880 wsmap="managed"
2881 >
2882 <desc>
2883 Represents an appliance in OVF format. An instance of this is returned by
2884 <link to="IVirtualBox::openAppliance" />.
2885
2886 Importing an OVF appliance into VirtualBox is a three-step process:
2887
2888 <ol>
2889 <li>
2890 Call <link to="IVirtualBox::openAppliance" /> with the full path of the OVF
2891 file. So long as the appliance file is syntactically valid, this will succeed
2892 and return an instance of IAppliance that contains the parsed data from the
2893 OVF file.
2894 </li>
2895
2896 <li>The caller should then invoke <link to="#interpret" />, which
2897 analyzes the OVF data and sets up the contents of the IAppliance attributes
2898 accordingly. These can be inspected by a VirtualBox front-end such as the GUI,
2899 and the suggestions can be displayed to the user. For example, the virtual system
2900 will contain the virtual hardware prescribed by the OVF (network and hardware
2901 adapters, virtual disk images, memory size and so on), and the GUI can then give
2902 the user the option to confirm and/or change these suggestions.
2903 </li>
2904
2905 <li>Finally, the caller should invoke <link to="#importAppliance" />, which will
2906 create virtual machines in VirtualBox as instances of <link to="IMachine" /> that
2907 match the information in the virtual system descriptions.
2908 </li>
2909 </ol>
2910
2911 </desc>
2912
2913 <attribute name="path" type="wstring" readonly="yes">
2914 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2915 the <tt>.ova</tt> file passed to <link to="IVirtualBox::openAppliance" />.</desc>
2916 </attribute>
2917
2918 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2919 <desc>
2920 Array of virtual disk definitions. One such description exists for each
2921 disk definition in the OVF; each string array item represents one such piece of
2922 disk information, with the information fields separated by tab (\t) characters.
2923
2924 The caller should be prepared for additional fields being appended to
2925 this string in future versions of VirtualBox and therefore check for
2926 the number of tabs in the strings returned.
2927
2928 In the current version, the following eight fields are returned per string
2929 in the array:
2930
2931 <ol>
2932 <li>Disk ID (unique string identifier given to disk)</li>
2933 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2934 <li>Populated size (optional unsigned integer indicating the current size of the
2935 disk; can be approximate; -1 if unspecified)</li>
2936 <li>Format (string identifying the disk format, typically
2937 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2938 <li>Reference (where to find the disk image, typically a file name; if empty,
2939 then the disk should be created on import)</li>
2940 <li>Image size (optional unsigned integer indicating the size of the image,
2941 which need not necessarily be the same as the values specified above, since
2942 the image may be compressed or sparse; -1 if not specified)</li>
2943 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2944 presently unsupported and always -1)</li>
2945 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2946 </ol>
2947 </desc>
2948 </attribute>
2949
2950 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2951 <desc>
2952 Array of virtual system descriptions. One such description is created
2953 for each virtual system found in the OVF. The array is empty until after <link to="#interpret" />
2954 has been called.
2955 </desc>
2956 </attribute>
2957
2958 <method name="interpret">
2959 <desc>
2960 Interprets the OVF data that was read when the appliance was constructed. After
2961 calling this method, one can inspect the
2962 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2963 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2964 the appliance.
2965
2966 Calling this method is the second step of importing an appliance into VirtualBox;
2967 see <link to="IAppliance" /> for an overview.
2968 </desc>
2969 </method>
2970
2971 <method name="importAppliance">
2972 <desc>
2973 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2974 and other interfaces that match the information contained in the appliance as
2975 closely as possible, as represented by the import instructions in the
2976 <link to="#virtualSystemDescriptions" /> array.
2977
2978 Calling this method is the final step of importing an appliance into VirtualBox;
2979 see <link to="IAppliance" /> for an overview.
2980 </desc>
2981
2982 <param name="aProgress" type="IProgress" dir="out">
2983 <desc></desc>
2984 </param>
2985 </method>
2986
2987 </interface>
2988
2989 <enum
2990 name="VirtualSystemDescriptionType"
2991 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
2992 >
2993 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2994 a configuration value.</desc>
2995
2996 <const name="Ignore" value="1" />
2997 <const name="Name" value="2" />
2998 <const name="OS" value="3" />
2999 <const name="CPU" value="4" />
3000 <const name="Memory" value="5" />
3001 <const name="HardDiskControllerIDE" value="6" />
3002 <const name="HardDiskControllerSATA" value="7" />
3003 <const name="HardDiskControllerSCSI" value="8" />
3004 <const name="HardDiskImage" value="9" />
3005 <const name="CDROM" value="10" />
3006 <const name="Floppy" value="11" />
3007 <const name="NetworkAdapter" value="12" />
3008 <const name="USBController" value="13" />
3009 <const name="SoundCard" value="14" />
3010
3011 </enum>
3012
3013 <interface
3014 name="IVirtualSystemDescription" extends="$unknown"
3015 uuid="c76de96b-b316-4a42-9afb-18ce08cce0c9"
3016 wsmap="managed"
3017 >
3018
3019 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3020 After <link to="IAppliance::interpret" /> has been called, that array contains
3021 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3022 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3023 into VirtualBox.
3024 </desc>
3025
3026 <method name="getDescription">
3027 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3028 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3029
3030 The list below identifies the value sets that are possible depending on the
3031 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3032 the array item with the same index in aOrigValue[] will contain the original value as contained
3033 in the OVF file (just for informational purposes), and the corresponding item in aConfigValues[]
3034 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3035 the aExtraConfigValues[] array item may also be used.
3036
3037 <ul>
3038 <li>
3039 "OS": the guest operating system type. There must be exactly one such array item on import. The
3040 corresponding item in aConfigValues[] contains the suggested guest operating system for VirtualBox.
3041 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3042 item in aOrigValues[] will contain a numerical value that described the operating system in the OVF
3043 (see <link to="CIMOSType" />).
3044 </li>
3045 <li>
3046 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3047 if none is present on import, then an automatic name will be created from the operating system
3048 type. The correponding item im aOrigValues[] will contain the suggested virtual machine name
3049 from the OVF file, and aConfigValues[] will contain a suggestion for a unique VirtualBox
3050 <link to="IMachine" /> name that does not exist yet.
3051 </li>
3052 <li>
3053 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3054 </li>
3055 <li>
3056 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3057 is present on import, then VirtualBox will set a meaningful default based on the operating system
3058 type.
3059 </li>
3060 <li>
3061 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3062 The items in aOrigValues[] and aConfigValues[] will either be "LsiLogic" or "BusLogic". The
3063 matching item in the aRefs[] array will contain an integer that other items of the "Harddisk"
3064 type can use to specify which hard disk controller a virtual disk should be connected to.
3065 </li>
3066 <li>
3067 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3068 has no value in aOrigValues[] or aAutoValues[]. The matching item in the aRefs[] array will be
3069 used as with SCSI controllers (see above).
3070 </li>
3071 <li>
3072 "Harddisk": a virtual hard disk, most probably as a reference to an image file. There can be an
3073 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. The
3074 array item in aOrigValues[] will contain the file specification from the OVF file, whereas the item
3075 in aConfigValues[] will contain a qualified path specification where the hard disk image should
3076 be copied to; this target image will then be registered with VirtualBox.
3077 The matching item in the aRefs[] array must contain a integer specifying the hard disk controller
3078 to connect the image to. This number must be the same as the integer used by one of the hard disk
3079 controller items (SCSI, SATA or IDE; see above).
3080 </li>
3081 <li>
3082 "NetworkAdapter": a network adapter. (todo document)
3083 </li>
3084 <li>
3085 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3086 present, sound support will be enabled for the new virtual machine. Note that the virtual
3087 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3088 may be different from the virtual soundcard expected by the appliance.
3089 </li>
3090 </ul>
3091
3092 </desc>
3093
3094 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3095 <desc></desc>
3096 </param>
3097
3098 <param name="aRefs" type="unsigned long" dir="out" safearray="yes">
3099 <desc></desc>
3100 </param>
3101
3102 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
3103 <desc></desc>
3104 </param>
3105
3106 <param name="aConfigValues" type="wstring" dir="out" safearray="yes">
3107 <desc></desc>
3108 </param>
3109
3110 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3111 <desc></desc>
3112 </param>
3113
3114 </method>
3115
3116 <method name="SetFinalValues">
3117 <desc></desc>
3118
3119 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3120 <desc></desc>
3121 </param>
3122
3123 </method>
3124
3125 </interface>
3126
3127
3128 <!--
3129 // IMachine
3130 /////////////////////////////////////////////////////////////////////////
3131 -->
3132
3133 <enumerator
3134 name="IMachineEnumerator" type="IMachine"
3135 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3136 />
3137
3138 <collection
3139 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3140 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3141 readonly="yes"
3142 />
3143
3144 <interface
3145 name="IInternalMachineControl" extends="$unknown"
3146 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3147 internal="yes"
3148 wsmap="suppress"
3149 >
3150 <method name="updateState">
3151 <desc>
3152 Updates the VM state.
3153 <note>
3154 This operation will also update the settings file with
3155 the correct information about the saved state file
3156 and delete this file from disk when appropriate.
3157 </note>
3158 </desc>
3159 <param name="state" type="MachineState" dir="in"/>
3160 </method>
3161
3162 <method name="getIPCId">
3163 <param name="id" type="wstring" dir="return"/>
3164 </method>
3165
3166 <method name="runUSBDeviceFilters">
3167 <desc>
3168 Asks the server to run USB devices filters of the associated
3169 machine against the given USB device and tell if there is
3170 a match.
3171 <note>
3172 Intended to be used only for remote USB devices. Local
3173 ones don't require to call this method (this is done
3174 implicitly by the Host and USBProxyService).
3175 </note>
3176 </desc>
3177 <param name="device" type="IUSBDevice" dir="in"/>
3178 <param name="matched" type="boolean" dir="out"/>
3179 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3180 </method>
3181
3182 <method name="captureUSBDevice">
3183 <desc>
3184 Requests a capture of the given host USB device.
3185 When the request is completed, the VM process will
3186 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3187 notification.
3188 </desc>
3189 <param name="id" type="uuid" dir="in"/>
3190 </method>
3191
3192 <method name="detachUSBDevice">
3193 <desc>
3194 Notification that a VM is going to detach (done = false) or has
3195 already detached (done = true) the given USB device.
3196 When the done = true request is completed, the VM process will
3197 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3198 notification.
3199 <note>
3200 In the done = true case, the server must run its own filters
3201 and filters of all VMs but this one on the detached device
3202 as if it were just attached to the host computer.
3203 </note>
3204 </desc>
3205 <param name="id" type="uuid" dir="in"/>
3206 <param name="done" type="boolean" dir="in"/>
3207 </method>
3208
3209 <method name="autoCaptureUSBDevices">
3210 <desc>
3211 Requests a capture all matching USB devices attached to the host.
3212 When the request is completed, the VM process will
3213 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3214 notification per every captured device.
3215 </desc>
3216 </method>
3217
3218 <method name="detachAllUSBDevices">
3219 <desc>
3220 Notification that a VM that is being powered down. The done
3221 parameter indicates whether which stage of the power down
3222 we're at. When done = false the VM is announcing its
3223 intentions, while when done = true the VM is reporting
3224 what it has done.
3225 <note>
3226 In the done = true case, the server must run its own filters
3227 and filters of all VMs but this one on all detach devices as
3228 if they were just attached to the host computer.
3229 </note>
3230 </desc>
3231 <param name="done" type="boolean" dir="in"/>
3232 </method>
3233
3234 <method name="onSessionEnd">
3235 <desc>
3236 Triggered by the given session object when the session is about
3237 to close normally.
3238 </desc>
3239 <param name="session" type="ISession" dir="in">
3240 <desc>Session that is being closed</desc>
3241 </param>
3242 <param name="progress" type="IProgress" dir="return">
3243 <desc>
3244 Used to wait until the corresponding machine is actually
3245 dissociated from the given session on the server.
3246 Returned only when this session is a direct one.
3247 </desc>
3248 </param>
3249 </method>
3250
3251 <method name="beginSavingState">
3252 <desc>
3253 Called by the VM process to inform the server it wants to
3254 save the current state and stop the VM execution.
3255 </desc>
3256 <param name="progress" type="IProgress" dir="in">
3257 <desc>
3258 Progress object created by the VM process to wait until
3259 the state is saved.
3260 </desc>
3261 </param>
3262 <param name="stateFilePath" type="wstring" dir="out">
3263 <desc>
3264 File path the VM process must save the execution state to.
3265 </desc>
3266 </param>
3267 </method>
3268
3269 <method name="endSavingState">
3270 <desc>
3271 Called by the VM process to inform the server that saving
3272 the state previously requested by #beginSavingState is either
3273 successfully finished or there was a failure.
3274
3275 <result name="VBOX_E_FILE_ERROR">
3276 Settings file not accessible.
3277 </result>
3278 <result name="VBOX_E_XML_ERROR">
3279 Could not parse the settings file.
3280 </result>
3281
3282 </desc>
3283
3284 <param name="success" type="boolean" dir="in">
3285 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3286 otherwise.
3287 </desc>
3288 </param>
3289 </method>
3290
3291 <method name="adoptSavedState">
3292 <desc>
3293 Gets called by IConsole::adoptSavedState.
3294 <result name="VBOX_E_FILE_ERROR">
3295 Invalid saved state file path.
3296 </result>
3297 </desc>
3298 <param name="savedStateFile" type="wstring" dir="in">
3299 <desc>Path to the saved state file to adopt.</desc>
3300 </param>
3301 </method>
3302
3303 <method name="beginTakingSnapshot">
3304 <desc>
3305 Called by the VM process to inform the server it wants to
3306 take a snapshot.
3307
3308 <result name="VBOX_E_FILE_ERROR">
3309 Settings file not accessible.
3310 </result>
3311 <result name="VBOX_E_XML_ERROR">
3312 Could not parse the settings file.
3313 </result>
3314 </desc>
3315 <param name="initiator" type="IConsole" dir="in">
3316 <desc>The console object that initiated this call.</desc>
3317 </param>
3318 <param name="name" type="wstring" dir="in">
3319 <desc>Snapshot name.</desc>
3320 </param>
3321 <param name="description" type="wstring" dir="in">
3322 <desc>Snapshot description.</desc>
3323 </param>
3324 <param name="progress" type="IProgress" dir="in">
3325 <desc>
3326 Progress object created by the VM process to wait until
3327 the state is saved (only for online snapshots).
3328 </desc>
3329 </param>
3330 <param name="stateFilePath" type="wstring" dir="out">
3331 <desc>
3332 File path the VM process must save the execution state to.
3333 </desc>
3334 </param>
3335 <param name="serverProgress" type="IProgress" dir="out">
3336 <desc>
3337 Progress object created by the server process to wait until
3338 the snapshot is taken (VDI diff creation, etc.).
3339 </desc>
3340 </param>
3341 </method>
3342
3343 <method name="endTakingSnapshot">
3344 <desc>
3345 Called by the VM process to inform the server that the snapshot
3346 previously requested by #beginTakingSnapshot is either
3347 successfully taken or there was a failure.
3348 </desc>
3349
3350 <param name="success" type="boolean" dir="in">
3351 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3352 </param>
3353 </method>
3354
3355 <method name="discardSnapshot">
3356 <desc>
3357 Gets called by IConsole::discardSnapshot.
3358 <result name="VBOX_E_INVALID_OBJECT_STATE">
3359 Snapshot has more than one child snapshot.
3360 </result>
3361 </desc>
3362 <param name="initiator" type="IConsole" dir="in">
3363 <desc>The console object that initiated this call.</desc>
3364 </param>
3365 <param name="id" type="uuid" dir="in">
3366 <desc>UUID of the snapshot to discard.</desc>
3367 </param>
3368 <param name="machineState" type="MachineState" dir="out">
3369 <desc>New machine state after this operation is started.</desc>
3370 </param>
3371 <param name="progress" type="IProgress" dir="return">
3372 <desc>Progress object to track the operation completion.</desc>
3373 </param>
3374 </method>
3375
3376 <method name="discardCurrentState">
3377 <desc>
3378 Gets called by IConsole::discardCurrentState.
3379 <result name="VBOX_E_INVALID_OBJECT_STATE">
3380 Virtual machine does not have any snapshot.
3381 </result>
3382 </desc>
3383 <param name="initiator" type="IConsole" dir="in">
3384 <desc>The console object that initiated this call.</desc>
3385 </param>
3386 <param name="machineState" type="MachineState" dir="out">
3387 <desc>New machine state after this operation is started.</desc>
3388 </param>
3389 <param name="progress" type="IProgress" dir="return">
3390 <desc>Progress object to track the operation completion.</desc>
3391 </param>
3392 </method>
3393
3394 <method name="discardCurrentSnapshotAndState">
3395 <desc>
3396 Gets called by IConsole::discardCurrentSnapshotAndState.
3397 <result name="VBOX_E_INVALID_OBJECT_STATE">
3398 Virtual machine does not have any snapshot.
3399 </result>
3400 </desc>
3401 <param name="initiator" type="IConsole" dir="in">
3402 <desc>The console object that initiated this call.</desc>
3403 </param>
3404 <param name="machineState" type="MachineState" dir="out">
3405 <desc>New machine state after this operation is started.</desc>
3406 </param>
3407 <param name="progress" type="IProgress" dir="return">
3408 <desc>Progress object to track the operation completion.</desc>
3409 </param>
3410 </method>
3411
3412 <method name="pullGuestProperties">
3413 <desc>
3414 Get the list of the guest properties matching a set of patterns along
3415 with their values, time stamps and flags and give responsibility for
3416 managing properties to the console.
3417 </desc>
3418 <param name="name" type="wstring" dir="out" safearray="yes">
3419 <desc>
3420 The names of the properties returned.
3421 </desc>
3422 </param>
3423 <param name="value" type="wstring" dir="out" safearray="yes">
3424 <desc>
3425 The values of the properties returned. The array entries match the
3426 corresponding entries in the @a name array.
3427 </desc>
3428 </param>
3429 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3430 <desc>
3431 The time stamps of the properties returned. The array entries match
3432 the corresponding entries in the @a name array.
3433 </desc>
3434 </param>
3435 <param name="flags" type="wstring" dir="out" safearray="yes">
3436 <desc>
3437 The flags of the properties returned. The array entries match the
3438 corresponding entries in the @a name array.
3439 </desc>
3440 </param>
3441 </method>
3442
3443 <method name="pushGuestProperties">
3444 <desc>
3445 Set the list of the guest properties matching a set of patterns along
3446 with their values, time stamps and flags and return responsibility for
3447 managing properties to IMachine.
3448 </desc>
3449 <param name="name" type="wstring" dir="in" safearray="yes">
3450 <desc>
3451 The names of the properties.
3452 </desc>
3453 </param>
3454 <param name="value" type="wstring" dir="in" safearray="yes">
3455 <desc>
3456 The values of the properties. The array entries match the
3457 corresponding entries in the @a name array.
3458 </desc>
3459 </param>
3460 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3461 <desc>
3462 The time stamps of the properties. The array entries match
3463 the corresponding entries in the @a name array.
3464 </desc>
3465 </param>
3466 <param name="flags" type="wstring" dir="in" safearray="yes">
3467 <desc>
3468 The flags of the properties. The array entries match the
3469 corresponding entries in the @a name array.
3470 </desc>
3471 </param>
3472 </method>
3473 <method name="pushGuestProperty">
3474 <desc>
3475 Update a single guest property in IMachine.
3476 </desc>
3477 <param name="name" type="wstring" dir="in">
3478 <desc>
3479 The name of the property to be updated.
3480 </desc>
3481 </param>
3482 <param name="value" type="wstring" dir="in">
3483 <desc>
3484 The value of the property.
3485 </desc>
3486 </param>
3487 <param name="timestamp" type="unsigned long long" dir="in">
3488 <desc>
3489 The timestamp of the property.
3490 </desc>
3491 </param>
3492 <param name="flags" type="wstring" dir="in">
3493 <desc>
3494 The flags of the property.
3495 </desc>
3496 </param>
3497 </method>
3498 </interface>
3499
3500 <interface
3501 name="IBIOSSettings" extends="$unknown"
3502 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3503 wsmap="managed"
3504 >
3505 <desc>
3506 The IBIOSSettings interface represents BIOS settings of the virtual
3507 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3508 </desc>
3509 <attribute name="logoFadeIn" type="boolean">
3510 <desc>Fade in flag for BIOS logo animation.</desc>
3511 </attribute>
3512
3513 <attribute name="logoFadeOut" type="boolean">
3514 <desc>Fade out flag for BIOS logo animation.</desc>
3515 </attribute>
3516
3517 <attribute name="logoDisplayTime" type="unsigned long">
3518 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3519 </attribute>
3520
3521 <attribute name="logoImagePath" type="wstring">
3522 <desc>Local file system path for external BIOS image.</desc>
3523 </attribute>
3524
3525 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3526 <desc>Mode of the BIOS boot device menu.</desc>
3527 </attribute>
3528
3529 <attribute name="ACPIEnabled" type="boolean">
3530 <desc>ACPI support flag.</desc>
3531 </attribute>
3532
3533 <attribute name="IOAPICEnabled" type="boolean">
3534 <desc>
3535 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3536 and support IRQs above 15.
3537 </desc>
3538 </attribute>
3539
3540 <attribute name="timeOffset" type="long long">
3541 <desc>
3542 Offset in milliseconds from the host system time. This allows for
3543 guests running with a different system date/time than the host.
3544 It is equivalent to setting the system date/time in the BIOS except
3545 it is not an absolute value but a relative one. Guest Additions
3546 time synchronization honors this offset.
3547 </desc>
3548 </attribute>
3549
3550 <attribute name="PXEDebugEnabled" type="boolean">
3551 <desc>
3552 PXE debug logging flag. If set, VirtualBox will write extensive
3553 PXE trace information to the release log.
3554 </desc>
3555 </attribute>
3556
3557 <attribute name="IDEControllerType" type="IDEControllerType">
3558 <desc>
3559 Type of the virtual IDE controller. Depending on this value,
3560 VirtualBox will provide different virtual IDE hardware
3561 devices to the guest.
3562 </desc>
3563 </attribute>
3564
3565 </interface>
3566
3567 <interface
3568 name="IMachine" extends="$unknown"
3569 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3570 wsmap="managed"
3571 >
3572 <desc>
3573 The IMachine interface represents a virtual machine, or guest, created
3574 in VirtualBox.
3575
3576 This interface is used in two contexts. First of all, a collection of
3577 objects implementing this interface is stored in the
3578 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3579 machines that are currently registered with this VirtualBox
3580 installation. Also, once a session has been opened for the given virtual
3581 machine (e.g. the virtual machine is running), the machine object
3582 associated with the open session can be queried from the session object;
3583 see <link to="ISession"/> for details.
3584
3585 The main role of this interface is to expose the settings of the virtual
3586 machine and provide methods to change various aspects of the virtual
3587 machine's configuration. For machine objects stored in the
3588 <link to="IVirtualBox::machines2"/> collection, all attributes are
3589 read-only unless explicitly stated otherwise in individual attribute
3590 and method descriptions. In order to change a machine setting, a session
3591 for this machine must be opened using one of
3592 <link to="IVirtualBox::openSession"/>,
3593 <link to="IVirtualBox::openRemoteSession"/> or
3594 <link to="IVirtualBox::openExistingSession"/> methods. After the
3595 session has been successfully opened, a mutable machine object needs to
3596 be queried from the session object and then the desired settings changes
3597 can be applied to the returned object using IMachine attributes and
3598 methods. See the ISession interface description for more information
3599 about sessions.
3600
3601 Note that the IMachine interface does not provide methods to control
3602 virtual machine execution (such as start the machine, or power it
3603 down) -- these methods are grouped in a separate IConsole
3604 interface. Refer to the IConsole interface description to get more
3605 information about this topic.
3606
3607 <see>ISession, IConsole</see>
3608 </desc>
3609
3610 <attribute name="parent" type="IVirtualBox" readonly="yes">
3611 <desc>Associated parent object.</desc>
3612 </attribute>
3613
3614 <attribute name="accessible" type="boolean" readonly="yes">
3615 <desc>
3616 Whether this virtual machine is currently accessible or not.
3617
3618 The machine is considered to be inaccessible when:
3619 <ul>
3620 <li>It is a registered virtual machine, and
3621 </li>
3622 <li>Its settings file is inaccessible (for example, it is
3623 located on a network share that is not accessible during
3624 VirtualBox startup, or becomes inaccessible later, or if
3625 the settings file can be read but is invalid).
3626 </li>
3627 </ul>
3628
3629 Otherwise, the value of this property is always <tt>true</tt>.
3630
3631 Every time this property is read, the accessibility state of
3632 this machine is re-evaluated. If the returned value is |false|,
3633 the <link to="#accessError"/> property may be used to get the
3634 detailed error information describing the reason of
3635 inaccessibility.
3636
3637 When the machine is inaccessible, only the following properties
3638 can be used on it:
3639 <ul>
3640 <li><link to="#parent"/></li>
3641 <li><link to="#id"/></li>
3642 <li><link to="#settingsFilePath"/></li>
3643 <li><link to="#accessible"/></li>
3644 <li><link to="#accessError"/></li>
3645 </ul>
3646
3647 An attempt to access any other property or method will return
3648 an error.
3649
3650 The only possible action you can perform on an inaccessible
3651 machine is to unregister it using the
3652 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3653 for the accessibility state once more by querying this
3654 property).
3655
3656 <note>
3657 In the current implementation, once this property returns
3658 <tt>true</tt>, the machine will never become inaccessible
3659 later, even if its settings file cannot be successfully
3660 read/written any more (at least, until the VirtualBox
3661 server is restarted). This limitation may be removed in
3662 future releases.
3663 </note>
3664 </desc>
3665 </attribute>
3666
3667 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3668 <desc>
3669 Error information describing the reason of machine
3670 inaccessibility.
3671
3672 Reading this property is only valid after the last call to
3673 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3674 machine is currently unaccessible). Otherwise, a null
3675 IVirtualBoxErrorInfo object will be returned.
3676 </desc>
3677 </attribute>
3678
3679 <attribute name="name" type="wstring">
3680 <desc>
3681 Name of the virtual machine.
3682
3683 Besides being used for human-readable identification purposes
3684 everywhere in VirtualBox, the virtual machine name is also used
3685 as a name of the machine's settings file and as a name of the
3686 subdirectory this settings file resides in. Thus, every time you
3687 change the value of this property, the settings file will be
3688 renamed once you call <link to="#saveSettings()"/> to confirm the
3689 change. The containing subdirectory will be also renamed, but
3690 only if it has exactly the same name as the settings file
3691 itself prior to changing this property (for backward compatibility
3692 with previous API releases). The above implies the following
3693 limitations:
3694 <ul>
3695 <li>The machine name cannot be empty.</li>
3696 <li>The machine name can contain only characters that are valid
3697 file name characters according to the rules of the file
3698 system used to store VirtualBox configuration.</li>
3699 <li>You cannot have two or more machines with the same name
3700 if they use the same subdirectory for storing the machine
3701 settings files.</li>
3702 <li>You cannot change the name of the machine if it is running,
3703 or if any file in the directory containing the settings file
3704 is being used by another running machine or by any other
3705 process in the host operating system at a time when
3706 <link to="#saveSettings()"/> is called.
3707 </li>
3708 </ul>
3709 If any of the above limitations are hit, <link to="#saveSettings()"/>
3710 will return an appropriate error message explaining the exact
3711 reason and the changes you made to this machine will not be
3712 saved.
3713 <note>
3714 For "legacy" machines created using the
3715 <link to="IVirtualBox::createLegacyMachine()"/> call,
3716 the above naming limitations do not apply because the
3717 machine name does not affect the settings file name.
3718 The settings file name remains the same as it was specified
3719 during machine creation and never changes.
3720 </note>
3721 </desc>
3722 </attribute>
3723
3724 <attribute name="description" type="wstring">
3725 <desc>
3726 Description of the virtual machine.
3727
3728 The description attribute can contain any text and is
3729 typically used to describe the hardware and software
3730 configuration of the virtual machine in detail (i.e. network
3731 settings, versions of the installed software and so on).
3732 </desc>
3733 </attribute>
3734
3735 <attribute name="id" type="uuid" readonly="yes">
3736 <desc>UUID of the virtual machine.</desc>
3737 </attribute>
3738
3739 <attribute name="OSTypeId" type="wstring">
3740 <desc>
3741 User-defined identifier of the Guest OS type.
3742 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3743 an IGuestOSType object representing details about the given
3744 Guest OS type.
3745 <note>
3746 This value may differ from the value returned by
3747 <link to="IGuest::OSTypeId"/> if Guest Additions are
3748 installed to the guest OS.
3749 </note>
3750 </desc>
3751 </attribute>
3752
3753 <attribute name="HardwareVersion" type="wstring">
3754 <desc>Hardware version identifier. Internal use only for now.</desc>
3755 </attribute>
3756
3757 <attribute name="CPUCount" type="unsigned long">
3758 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3759 </attribute>
3760
3761 <attribute name="memorySize" type="unsigned long">
3762 <desc>System memory size in megabytes.</desc>
3763 </attribute>
3764
3765 <attribute name="memoryBalloonSize" type="unsigned long">
3766 <desc>Initial memory balloon size in megabytes.</desc>
3767 </attribute>
3768
3769 <attribute name="statisticsUpdateInterval" type="unsigned long">
3770 <desc>Initial interval to update guest statistics in seconds.</desc>
3771 </attribute>
3772
3773 <attribute name="VRAMSize" type="unsigned long">
3774 <desc>Video memory size in megabytes.</desc>
3775 </attribute>
3776
3777 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3778 <desc>
3779 This setting determines whether VirtualBox allows guests to make use
3780 of the 3D graphics support available on the host. Currently limited
3781 to OpenGL only. </desc>
3782 </attribute>
3783
3784 <attribute name="monitorCount" type="unsigned long">
3785 <desc>
3786 Number of virtual monitors.
3787 <note>
3788 Only effective on Windows XP and later guests with
3789 Guest Additions installed.
3790 </note>
3791 </desc>
3792 </attribute>
3793
3794 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3795 <desc>Object containing all BIOS settings.</desc>
3796 </attribute>
3797
3798 <attribute name="HWVirtExEnabled" type="TSBool">
3799 <desc>
3800 This setting determines whether VirtualBox will try to make use of
3801 the host CPU's hardware virtualization extensions such as Intel VT-x
3802 and AMD-V. Note that in case such extensions are not available,
3803 they will not be used.
3804 </desc>
3805 </attribute>
3806
3807 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3808 <desc>
3809 This setting determines whether VirtualBox will try to make use of
3810 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3811 such extensions are not available, they will not be used.
3812 </desc>
3813 </attribute>
3814
3815 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3816 <desc>
3817 This setting determines whether VirtualBox will try to make use of
3818 the VPID extension of Intel VT-x. Note that in case such extensions are
3819 not available, they will not be used.
3820 </desc>
3821 </attribute>
3822
3823 <attribute name="PAEEnabled" type="boolean" default="false">
3824 <desc>
3825 This setting determines whether VirtualBox will expose the Physical Address
3826 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3827 is not available, it will not be reported.
3828 </desc>
3829 </attribute>
3830
3831 <attribute name="snapshotFolder" type="wstring">
3832 <desc>
3833 Full path to the directory used to store snapshot data
3834 (differencing hard disks and saved state files) of this machine.
3835
3836 The initial value of this property is
3837 <tt>&lt;</tt><link to="#settingsFilePath">
3838 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3839 <link to="#id">machine_uuid</link>
3840 <tt>&gt;</tt>.
3841
3842 Currently, it is an error to try to change this property on
3843 a machine that has snapshots (because this would require to
3844 move possibly large files to a different location).
3845 A separate method will be available for this purpose later.
3846
3847 <note>
3848 Setting this property to <tt>null</tt> will restore the
3849 initial value.
3850 </note>
3851 <note>
3852 When setting this property, the specified path can be
3853 absolute (full path) or relative to the directory where the
3854 <link to="#settingsFilePath">machine settings file</link>
3855 is located. When reading this property, a full path is
3856 always returned.
3857 </note>
3858 <note>
3859 The specified path may not exist, it will be created
3860 when necessary.
3861 </note>
3862 </desc>
3863 </attribute>
3864
3865 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3866 <desc>VRDP server object.</desc>
3867 </attribute>
3868
3869 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3870 <desc>Array of hard disks attached to this machine.</desc>
3871 </attribute>
3872
3873 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3874 <desc>Associated DVD drive object.</desc>
3875 </attribute>
3876
3877 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3878 <desc>Associated floppy drive object.</desc>
3879 </attribute>
3880
3881 <attribute name="USBController" type="IUSBController" readonly="yes">
3882 <desc>
3883 Associated USB controller object.
3884
3885 <note>
3886 This method may set a @ref com_warnings "warning result code".
3887 </note>
3888 <note>
3889 If USB functionality is not available in the given edition of
3890 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3891 </note>
3892 </desc>
3893 </attribute>
3894
3895 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3896 <desc>Associated audio adapter, always present.</desc>
3897 </attribute>
3898
3899 <attribute name="SATAController" type="ISATAController" readonly="yes">
3900 <desc>
3901 Associated SATA controller object.
3902 </desc>
3903 </attribute>
3904
3905 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3906 <desc>
3907 Full name of the file containing machine settings data.
3908 </desc>
3909 </attribute>
3910
3911 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3912 <desc>
3913 Current version of the format of the settings file of this machine
3914 (<link to="#settingsFilePath"/>).
3915
3916 The version string has the following format:
3917 <pre>
3918 x.y-platform
3919 </pre>
3920 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3921 versions, and <tt>platform</tt> is the platform identifier.
3922
3923 The current version usually matches the value of the
3924 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3925 settings file was created by an older version of VirtualBox and there
3926 was a change of the settings file format since then.
3927
3928 Note that VirtualBox automatically converts settings files from older
3929 versions to the most recent version when reading them (usually at
3930 VirtualBox startup) but it doesn't save the changes back until
3931 you call a method that implicitly saves settings (such as
3932 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3933 explicitly. Therefore, if the value of this attribute differs from the
3934 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3935 means that the settings file was converted but the result of the
3936 conversion is not yet saved to disk.
3937
3938 The above feature may be used by interactive front-ends to inform users
3939 about the settings file format change and offer them to explicitly save
3940 all converted settings files (the global and VM-specific ones),
3941 optionally create backup copies of the old settings files before saving,
3942 etc.
3943
3944 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3945 </desc>
3946 </attribute>
3947
3948 <attribute name="settingsModified" type="boolean" readonly="yes">
3949 <desc>
3950 Whether the settings of this machine have been modified
3951 (but neither yet saved nor discarded).
3952 <note>
3953 Reading this property is only valid on instances returned
3954 by <link to="ISession::machine"/> and on new machines
3955 created by <link to="IVirtualBox::createMachine"/> or opened
3956 by <link to="IVirtualBox::openMachine"/> but not
3957 yet registered, or on unregistered machines after calling
3958 <link to="IVirtualBox::unregisterMachine"/>. For all other
3959 cases, the settings can never be modified.
3960 </note>
3961 <note>
3962 For newly created unregistered machines, the value of this
3963 property is always TRUE until <link to="#saveSettings()"/>
3964 is called (no matter if any machine settings have been
3965 changed after the creation or not). For opened machines
3966 the value is set to FALSE (and then follows to normal rules).
3967 </note>
3968 </desc>
3969 </attribute>
3970
3971 <attribute name="sessionState" type="SessionState" readonly="yes">
3972 <desc>Current session state for this machine.</desc>
3973 </attribute>
3974
3975 <attribute name="sessionType" type="wstring" readonly="yes">
3976 <desc>
3977 Type of the session. If <link to="#sessionState"/> is
3978 SessionSpawning or SessionOpen, this attribute contains the
3979 same value as passed to the
3980 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3981 type parameter. If the session was opened directly using
3982 <link to="IVirtualBox::openSession()"/>, or if
3983 <link to="#sessionState"/> is SessionClosed, the value of this
3984 attribute is @c null.
3985 </desc>
3986 </attribute>
3987
3988 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3989 <desc>
3990 Identifier of the session process. This attribute contains the
3991 platform-dependent identifier of the process that has opened a
3992 direct session for this machine using the
3993 <link to="IVirtualBox::openSession()"/> call. The returned value
3994 is only valid if <link to="#sessionState"/> is SessionOpen or
3995 SessionClosing (i.e. a session is currently open or being
3996 closed) by the time this property is read.
3997 </desc>
3998 </attribute>
3999
4000 <attribute name="state" type="MachineState" readonly="yes">
4001 <desc>Current execution state of this machine.</desc>
4002 </attribute>
4003
4004 <attribute name="lastStateChange" type="long long" readonly="yes">
4005 <desc>
4006 Time stamp of the last execution state change,
4007 in milliseconds since 1970-01-01 UTC.
4008 </desc>
4009 </attribute>
4010
4011 <attribute name="stateFilePath" type="wstring" readonly="yes">
4012 <desc>
4013 Full path to the file that stores the execution state of
4014 the machine when it is in the <link to="MachineState_Saved"/> state.
4015 <note>
4016 When the machine is not in the Saved state, this attribute
4017 <tt>null</tt>.
4018 </note>
4019 </desc>
4020 </attribute>
4021
4022 <attribute name="logFolder" type="wstring" readonly="yes">
4023 <desc>
4024 Full path to the folder that stores a set of rotated log files
4025 recorded during machine execution. The most recent log file is
4026 named <tt>VBox.log</tt>, the previous log file is
4027 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4028 in the current version).
4029 </desc>
4030 </attribute>
4031
4032 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4033 <desc>
4034 Current snapshot of this machine.
4035 <note>
4036 A <tt>null</tt> object is returned if the machine doesn't
4037 have snapshots.
4038 </note>
4039 <see><link to="ISnapshot"/></see>
4040 </desc>
4041 </attribute>
4042
4043 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4044 <desc>
4045 Number of snapshots taken on this machine. Zero means the
4046 machine doesn't have any snapshots.
4047 </desc>
4048 </attribute>
4049
4050 <attribute name="currentStateModified" type="boolean" readonly="yes">
4051 <desc>
4052 Returns <tt>true</tt> if the current state of the machine is not
4053 identical to the state stored in the current snapshot.
4054
4055 The current state is identical to the current snapshot right
4056 after one of the following calls are made:
4057 <ul>
4058 <li><link to="IConsole::discardCurrentState"/> or
4059 <link to="IConsole::discardCurrentSnapshotAndState"/>
4060 </li>
4061 <li><link to="IConsole::takeSnapshot"/> (issued on a
4062 powered off or saved machine, for which
4063 <link to="#settingsModified"/> returns <tt>false</tt>)
4064 </li>
4065 <li><link to="IMachine::setCurrentSnapshot"/>
4066 </li>
4067 </ul>
4068
4069 The current state remains identical until one of the following
4070 happens:
4071 <ul>
4072 <li>settings of the machine are changed</li>
4073 <li>the saved state is discarded</li>
4074 <li>the current snapshot is discarded</li>
4075 <li>an attempt to execute the machine is made</li>
4076 </ul>
4077
4078 <note>
4079 For machines that don't have snapshots, this property is
4080 always <tt>false</tt>.
4081 </note>
4082 </desc>
4083 </attribute>
4084
4085 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4086 <desc>
4087 Collection of shared folders for this machine (permanent shared
4088 folders). These folders are shared automatically at machine startup
4089 and available only to the guest OS installed within this machine.
4090
4091 New shared folders are added to the collection using
4092 <link to="#createSharedFolder"/>. Existing shared folders can be
4093 removed using <link to="#removeSharedFolder"/>.
4094 </desc>
4095 </attribute>
4096
4097 <attribute name="clipboardMode" type="ClipboardMode">
4098 <desc>
4099 Synchronization mode between the host OS clipboard
4100 and the guest OS clipboard.
4101 </desc>
4102 </attribute>
4103
4104 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4105 <desc>
4106 A comma-separated list of simple glob patterns. Changes to guest
4107 properties whose name matches one of the patterns will generate an
4108 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4109 </desc>
4110 </attribute>
4111
4112 <method name="setBootOrder">
4113 <desc>
4114 Puts the given device to the specified position in
4115 the boot order.
4116
4117 To indicate that no device is associated with the given position,
4118 <link to="DeviceType_Null"/> should be used.
4119
4120 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4121
4122 <result name="E_INVALIDARG">
4123 Boot @a position out of range.
4124 </result>
4125 <result name="E_NOTIMPL">
4126 Booting from USB @a device currently not supported.
4127 </result>
4128
4129 </desc>
4130 <param name="position" type="unsigned long" dir="in">
4131 <desc>
4132 Position in the boot order (<tt>1</tt> to the total number of
4133 devices the machine can boot from, as returned by
4134 <link to="ISystemProperties::maxBootPosition"/>).
4135 </desc>
4136 </param>
4137 <param name="device" type="DeviceType" dir="in">
4138 <desc>
4139 The type of the device used to boot at the given position.
4140 </desc>
4141 </param>
4142 </method>
4143
4144 <method name="getBootOrder" const="yes">
4145 <desc>
4146 Returns the device type that occupies the specified
4147 position in the boot order.
4148
4149 @todo [remove?]
4150 If the machine can have more than one device of the returned type
4151 (such as hard disks), then a separate method should be used to
4152 retrieve the individual device that occupies the given position.
4153
4154 If here are no devices at the given position, then
4155 <link to="DeviceType_Null"/> is returned.
4156
4157 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4158
4159 <result name="E_INVALIDARG">
4160 Boot @a position out of range.
4161 </result>
4162
4163 </desc>
4164 <param name="position" type="unsigned long" dir="in">
4165 <desc>
4166 Position in the boot order (<tt>1</tt> to the total number of
4167 devices the machine can boot from, as returned by
4168 <link to="ISystemProperties::maxBootPosition"/>).
4169 </desc>
4170 </param>
4171 <param name="device" type="DeviceType" dir="return">
4172 <desc>
4173 Device at the given position.
4174 </desc>
4175 </param>
4176 </method>
4177
4178 <method name="attachHardDisk2">
4179 <desc>
4180 Attaches a virtual hard disk identified by the given UUID @a id
4181 to a device slot of the specified bus.
4182
4183 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4184 specify the primary or secondary IDE controller, respectively. The
4185 SATA bus supports 30 channels, so this parameter can be a number
4186 ranging from @c 0 to @c 29.
4187
4188 For the primary controller of the IDE bus, the @a device number can be
4189 either @c 0 or @c 1, to specify the master or the slave device,
4190 respectively. For the secondary IDE controller, the device number is
4191 always @c 1 because the master device is reserved for the CD-ROM drive.
4192
4193 For the SATA bus, the @a device parameter is currently unused and
4194 must be @c 0.
4195
4196 The specified device slot must not have another disk attached to it, or
4197 this method will fail.
4198
4199 See <link to="IHardDisk2"/> for more detailed information about
4200 attaching hard disks.
4201
4202 <note>
4203 You cannot attach a hard disk to a running machine. Also, you cannot
4204 attach a hard disk to a newly created machine until this machine's
4205 settings are saved to disk using <link to="#saveSettings()"/>.
4206 </note>
4207 <note>
4208 If the hard disk is being attached indirectly, a new differencing hard
4209 disk will implicitly be created for it and attached instead. If the
4210 changes made to the machine settings (including this indirect
4211 attachment) are later cancelled using <link to="#discardSettings()"/>,
4212 this implicitly created differencing hard disk will implicitly
4213 be deleted.
4214 </note>
4215
4216 <result name="E_INVALIDARG">
4217 SATA device, SATA channel, IDE channel or IDE slot out of range.
4218 </result>
4219 <result name="VBOX_E_INVALID_OBJECT_STATE">
4220 Attempt to attach hard disk to an unregistered virtual machine.
4221 </result>
4222 <result name="VBOX_E_INVALID_VM_STATE">
4223 Invalid machine state.
4224 </result>
4225 <result name="VBOX_E_OBJECT_IN_USE">
4226 Hard disk already attached to this or another virtual machine.
4227 </result>
4228
4229 </desc>
4230 <param name="id" type="uuid" dir="in">
4231 <desc>UUID of the hard disk to attach.</desc>
4232 </param>
4233 <param name="bus" type="StorageBus" dir="in">
4234 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4235 </param>
4236 <param name="channel" type="long" dir="in">
4237 <desc>Channel to attach the hard disk to.</desc>
4238 </param>
4239 <param name="device" type="long" dir="in">
4240 <desc>
4241 Device slot in the given channel to attach the hard disk to.
4242 </desc>
4243 </param>
4244 </method>
4245
4246 <method name="getHardDisk2" const="yes">
4247 <desc>
4248 Returns the virtual hard disk attached to a device slot of the specified
4249 bus.
4250
4251 Note that if the hard disk was indirectly attached by
4252 <link to="#attachHardDisk2()"/> to the given device slot then this
4253 method will return not the same object as passed to the
4254 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4255 more detailed information about attaching hard disks.
4256
4257 <result name="VBOX_E_OBJECT_NOT_FOUND">
4258 No hard disk attached to given slot/bus.
4259 </result>
4260
4261 </desc>
4262 <param name="bus" type="StorageBus" dir="in">
4263 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4264 </param>
4265 <param name="channel" type="long" dir="in">
4266 <desc>Channel to query.</desc>
4267 </param>
4268 <param name="device" type="long" dir="in">
4269 <desc>Device slot in the given channel to query.</desc>
4270 </param>
4271 <param name="hardDisk" type="IHardDisk2" dir="return">
4272 <desc>Attached hard disk object.</desc>
4273 </param>
4274 </method>
4275
4276 <method name="detachHardDisk2">
4277 <desc>
4278 Detaches the virtual hard disk attached to a device slot of the
4279 specified bus.
4280
4281 Detaching the hard disk from the virtual machine is deferred. This means
4282 that the hard disk remains associated with the machine when this method
4283 returns and gets actually de-associated only after a successful
4284 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4285 for more detailed information about attaching hard disks.
4286
4287 <note>
4288 You cannot detach the hard disk from a running machine.
4289 </note>
4290 <note>
4291 Detaching differencing hard disks implicitly created by <link
4292 to="#attachHardDisk2()"/> for the indirect attachment using this
4293 method will <b>not</b> implicitly delete them. The
4294 <link to="IHardDisk2::deleteStorage()"/> operation should be
4295 explicitly performed by the caller after the hard disk is successfully
4296 detached and the settings are saved with
4297 <link to="#saveSettings()"/>, if it is the desired action.
4298 </note>
4299
4300 <result name="VBOX_E_INVALID_VM_STATE">
4301 Attempt to detach hard disk from a running virtual machine.
4302 </result>
4303 <result name="VBOX_E_OBJECT_NOT_FOUND">
4304 No hard disk attached to given slot/bus.
4305 </result>
4306 <result name="VBOX_E_NOT_SUPPORTED">
4307 Hard disk format does not support storage deletion.
4308 </result>
4309
4310 </desc>
4311 <param name="bus" type="StorageBus" dir="in">
4312 <desc>Bus to detach the hard disk from.</desc>
4313 </param>
4314 <param name="channel" type="long" dir="in">
4315 <desc>Channel number to detach the hard disk from.</desc>
4316 </param>
4317 <param name="device" type="long" dir="in">
4318 <desc>Device slot number to detach the hard disk from.</desc>
4319 </param>
4320 </method>
4321
4322 <method name="getNetworkAdapter" const="yes">
4323 <desc>
4324 Returns the network adapter associated with the given slot.
4325 Slots are numbered sequentially, starting with zero. The total
4326 number of adapters per machine is defined by the
4327 <link to="ISystemProperties::networkAdapterCount"/> property,
4328 so the maximum slot number is one less than that property's value.
4329
4330 <result name="E_INVALIDARG">
4331 Invalid @a slot number.
4332 </result>
4333
4334 </desc>
4335 <param name="slot" type="unsigned long" dir="in"/>
4336 <param name="adapter" type="INetworkAdapter" dir="return"/>
4337 </method>
4338
4339 <method name="getSerialPort" const="yes">
4340 <desc>
4341 Returns the serial port associated with the given slot.
4342 Slots are numbered sequentially, starting with zero. The total
4343 number of serial ports per machine is defined by the
4344 <link to="ISystemProperties::serialPortCount"/> property,
4345 so the maximum slot number is one less than that property's value.
4346
4347 <result name="E_INVALIDARG">
4348 Invalid @a slot number.
4349 </result>
4350
4351 </desc>
4352 <param name="slot" type="unsigned long" dir="in"/>
4353 <param name="port" type="ISerialPort" dir="return"/>
4354 </method>
4355
4356 <method name="getParallelPort" const="yes">
4357 <desc>
4358 Returns the parallel port associated with the given slot.
4359 Slots are numbered sequentially, starting with zero. The total
4360 number of parallel ports per machine is defined by the
4361 <link to="ISystemProperties::parallelPortCount"/> property,
4362 so the maximum slot number is one less than that property's value.
4363
4364 <result name="E_INVALIDARG">
4365 Invalid @a slot number.
4366 </result>
4367
4368 </desc>
4369 <param name="slot" type="unsigned long" dir="in"/>
4370 <param name="port" type="IParallelPort" dir="return"/>
4371 </method>
4372
4373 <method name="getNextExtraDataKey">
4374 <desc>
4375 Returns the machine-specific extra data key name following the
4376 supplied key.
4377
4378 An error is returned if the supplied @a key does not exist. @c NULL is
4379 returned in @a nextKey if the supplied key is the last key. When
4380 supplying @c NULL for the @a key, the first key item is returned in @a
4381 nextKey (if there is any). @a nextValue is an optional parameter and
4382 if supplied, the next key's value is returned in it.
4383
4384 <result name="VBOX_E_OBJECT_NOT_FOUND">
4385 Extra data @a key not found.
4386 </result>
4387
4388 </desc>
4389 <param name="key" type="wstring" dir="in">
4390 <desc>Name of the data key to follow.</desc>
4391 </param>
4392 <param name="nextKey" type="wstring" dir="out">
4393 <desc>Name of the next data key.</desc>
4394 </param>
4395 <param name="nextValue" type="wstring" dir="out">
4396 <desc>Value of the next data key.</desc>
4397 </param>
4398 </method>
4399
4400 <method name="getExtraData">
4401 <desc>
4402 Returns associated machine-specific extra data.
4403
4404 If the requested data @a key does not exist, this function will
4405 succeed and return @c NULL in the @a value argument.
4406
4407 <result name="VBOX_E_FILE_ERROR">
4408 Settings file not accessible.
4409 </result>
4410 <result name="VBOX_E_XML_ERROR">
4411 Could not parse the settings file.
4412 </result>
4413
4414 </desc>
4415 <param name="key" type="wstring" dir="in">
4416 <desc>Name of the data key to get.</desc>
4417 </param>
4418 <param name="value" type="wstring" dir="return">
4419 <desc>Value of the requested data key.</desc>
4420 </param>
4421 </method>
4422
4423 <method name="setExtraData">
4424 <desc>
4425 Sets associated machine-specific extra data.
4426
4427 If you pass @c NULL as a key @a value, the given @a key will be
4428 deleted.
4429
4430 <note>
4431 Before performing the actual data change, this method will ask all
4432 registered callbacks using the
4433 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4434 notification for a permission. If one of the callbacks refuses the
4435 new value, the change will not be performed.
4436 </note>
4437 <note>
4438 On success, the
4439 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4440 is called to inform all registered callbacks about a successful data
4441 change.
4442 </note>
4443 <note>
4444 This method can be called outside the machine session and therefore
4445 it's a caller's responsibility to handle possible race conditions
4446 when several clients change the same key at the same time.
4447 </note>
4448
4449 <result name="VBOX_E_FILE_ERROR">
4450 Settings file not accessible.
4451 </result>
4452 <result name="VBOX_E_XML_ERROR">
4453 Could not parse the settings file.
4454 </result>
4455
4456 </desc>
4457 <param name="key" type="wstring" dir="in">
4458 <desc>Name of the data key to set.</desc>
4459 </param>
4460 <param name="value" type="wstring" dir="in">
4461 <desc>Value to assign to the key.</desc>
4462 </param>
4463 </method>
4464
4465 <method name="saveSettings">
4466 <desc>
4467 Saves any changes to machine settings made since the session
4468 has been opened or a new machine has been created, or since the
4469 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4470 For registered machines, new settings become visible to all
4471 other VirtualBox clients after successful invocation of this
4472 method.
4473 <note>
4474 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4475 notification event after the configuration has been successfully
4476 saved (only for registered machines).
4477 </note>
4478 <note>
4479 Calling this method is only valid on instances returned
4480 by <link to="ISession::machine"/> and on new machines
4481 created by <link to="IVirtualBox::createMachine"/> but not
4482 yet registered, or on unregistered machines after calling
4483 <link to="IVirtualBox::unregisterMachine"/>.
4484 </note>
4485
4486 <result name="VBOX_E_FILE_ERROR">
4487 Settings file not accessible.
4488 </result>
4489 <result name="VBOX_E_XML_ERROR">
4490 Could not parse the settings file.
4491 </result>
4492 <result name="E_ACCESSDENIED">
4493 Modification request refused.
4494 </result>
4495
4496 </desc>
4497 </method>
4498
4499 <method name="saveSettingsWithBackup">
4500 <desc>
4501 Creates a backup copy of the machine settings file (<link
4502 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4503 <link to="#saveSettings()"/>.
4504
4505 Note that the backup copy is created <b>only</b> if the settings file
4506 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4507 details). Otherwise, this call is fully equivalent to
4508 <link to="#saveSettings()"/> and no backup copying is done.
4509
4510 The backup copy is created in the same directory where the original
4511 settings file is located. It is given the following file name:
4512 <pre>
4513 original.xml.x.y-platform.bak
4514 </pre>
4515 where <tt>original.xml</tt> is the original settings file name
4516 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4517 format of the settings file (before auto-conversion).
4518
4519 If the given backup file already exists, this method will try to add the
4520 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4521 0 to 9) and copy it again until it succeeds. If all suffixes are
4522 occupied, or if any other copy error occurs, this method will return a
4523 failure.
4524
4525 If the copy operation succeeds, the @a bakFileName return argument will
4526 receive a full path to the created backup file (for informational
4527 purposes). Note that this will happen even if the subsequent
4528 <link to="#saveSettings()"/> call performed by this method after the
4529 copy operation, fails.
4530
4531 <note>
4532 The VirtualBox API never calls this method. It is intended purely for
4533 the purposes of creating backup copies of the settings files by
4534 front-ends before saving the results of the automatically performed
4535 settings conversion to disk.
4536 </note>
4537
4538 <see>settingsFileVersion</see>
4539
4540 <result name="VBOX_E_FILE_ERROR">
4541 Settings file not accessible.
4542 </result>
4543 <result name="VBOX_E_XML_ERROR">
4544 Could not parse the settings file.
4545 </result>
4546 <result name="VBOX_E_INVALID_VM_STATE">
4547 Virtual machine is not mutable.
4548 </result>
4549 <result name="E_ACCESSDENIED">
4550 Modification request refused.
4551 </result>
4552
4553 </desc>
4554 <param name="bakFileName" type="wstring" dir="return">
4555 <desc>Full path to the created backup copy.</desc>
4556 </param>
4557 </method>
4558
4559 <method name="discardSettings">
4560 <desc>
4561 Discards any changes to the machine settings made since the session
4562 has been opened or since the last call to <link to="#saveSettings()"/>
4563 or <link to="#discardSettings"/>.
4564 <note>
4565 Calling this method is only valid on instances returned
4566 by <link to="ISession::machine"/> and on new machines
4567 created by <link to="IVirtualBox::createMachine"/> or
4568 opened by <link to="IVirtualBox::openMachine"/> but not
4569 yet registered, or on unregistered machines after calling
4570 <link to="IVirtualBox::unregisterMachine"/>.
4571 </note>
4572
4573 <result name="VBOX_E_INVALID_VM_STATE">
4574 Virtual machine is not mutable.
4575 </result>
4576
4577 </desc>
4578 </method>
4579
4580 <method name="deleteSettings">
4581 <desc>
4582 Deletes the settings file of this machine from disk.
4583 The machine must not be registered in order for this operation
4584 to succeed.
4585 <note>
4586 <link to="#settingsModified"/> will return TRUE after this
4587 method successfully returns.
4588 </note>
4589 <note>
4590 Calling this method is only valid on instances returned
4591 by <link to="ISession::machine"/> and on new machines
4592 created by <link to="IVirtualBox::createMachine"/> or
4593 opened by <link to="IVirtualBox::openMachine"/> but not
4594 yet registered, or on unregistered machines after calling
4595 <link to="IVirtualBox::unregisterMachine"/>.
4596 </note>
4597 <note>
4598 The deleted machine settings file can be restored (saved again)
4599 by calling <link to="#saveSettings()"/>.
4600 </note>
4601
4602 <result name="VBOX_E_INVALID_VM_STATE">
4603 Cannot delete settings of a registered machine or
4604 machine not mutable.
4605 </result>
4606 <result name="VBOX_E_IPRT_ERROR">
4607 Could not delete the settings file.
4608 </result>
4609
4610 </desc>
4611 </method>
4612
4613 <method name="getSnapshot">
4614 <desc>
4615 Returns a snapshot of this machine with the given UUID.
4616 A <tt>null</tt> UUID can be used to obtain the first snapshot
4617 taken on this machine. This is useful if you want to traverse
4618 the whole tree of snapshots starting from the root.
4619
4620 <result name="VBOX_E_OBJECT_NOT_FOUND">
4621 Virtual machine has no snapshots or snapshot not found.
4622 </result>
4623
4624 </desc>
4625 <param name="id" type="uuid" dir="in">
4626 <desc>UUID of the snapshot to get</desc>
4627 </param>
4628 <param name="snapshot" type="ISnapshot" dir="return">
4629 <desc>Snapshot object with the given UUID.</desc>
4630 </param>
4631 </method>
4632
4633 <method name="findSnapshot">
4634 <desc>
4635 Returns a snapshot of this machine with the given name.
4636
4637 <result name="VBOX_E_OBJECT_NOT_FOUND">
4638 Virtual machine has no snapshots or snapshot not found.
4639 </result>
4640
4641 </desc>
4642 <param name="name" type="wstring" dir="in">
4643 <desc>Name of the snapshot to find</desc>
4644 </param>
4645 <param name="snapshot" type="ISnapshot" dir="return">
4646 <desc>Snapshot object with the given name.</desc>
4647 </param>
4648 </method>
4649
4650 <method name="setCurrentSnapshot">
4651 <desc>
4652 Sets the current snapshot of this machine.
4653 <note>
4654 In the current implementation, this operation is not
4655 implemented.
4656 </note>
4657 </desc>
4658 <param name="id" type="uuid" dir="in">
4659 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4660 </param>
4661 </method>
4662
4663 <method name="createSharedFolder">
4664 <desc>
4665 Creates a new permanent shared folder by associating the given logical
4666 name with the given host path, adds it to the collection of shared
4667 folders and starts sharing it. Refer to the description of
4668 <link to="ISharedFolder"/> to read more about logical names.
4669
4670 <result name="VBOX_E_OBJECT_IN_USE">
4671 Shared folder already exists.
4672 </result>
4673 <result name="VBOX_E_FILE_ERROR">
4674 Shared folder @a hostPath not accessible.
4675 </result>
4676
4677 </desc>
4678 <param name="name" type="wstring" dir="in">
4679 <desc>Unique logical name of the shared folder.</desc>
4680 </param>
4681 <param name="hostPath" type="wstring" dir="in">
4682 <desc>Full path to the shared folder in the host file system.</desc>
4683 </param>
4684 <param name="writable" type="boolean" dir="in">
4685 <desc>Whether the share is writable or readonly</desc>
4686 </param>
4687 </method>
4688
4689 <method name="removeSharedFolder">
4690 <desc>
4691 Removes the permanent shared folder with the given name previously
4692 created by <link to="#createSharedFolder"/> from the collection of
4693 shared folders and stops sharing it.
4694
4695 <result name="VBOX_E_INVALID_VM_STATE">
4696 Virtual machine is not mutable.
4697 </result>
4698 <result name="VBOX_E_OBJECT_NOT_FOUND">
4699 Shared folder @a name does not exist.
4700 </result>
4701
4702 </desc>
4703 <param name="name" type="wstring" dir="in">
4704 <desc>Logical name of the shared folder to remove.</desc>
4705 </param>
4706 </method>
4707
4708 <method name="canShowConsoleWindow">
4709 <desc>
4710 Returns @c true if the VM console process can activate the
4711 console window and bring it to foreground on the desktop of
4712 the host PC.
4713 <note>
4714 This method will fail if a session for this machine is not
4715 currently open.
4716 </note>
4717
4718 <result name="VBOX_E_INVALID_VM_STATE">
4719 Machine session is not open.
4720 </result>
4721
4722 </desc>
4723 <param name="canShow" type="boolean" dir="return">
4724 <desc>
4725 @c true if the console window can be shown and @c
4726 false otherwise.
4727 </desc>
4728 </param>
4729 </method>
4730
4731 <method name="showConsoleWindow">
4732 <desc>
4733 Activates the console window and brings it to foreground on
4734 the desktop of the host PC. Many modern window managers on
4735 many platforms implement some sort of focus stealing
4736 prevention logic, so that it may be impossible to activate
4737 a window without the help of the currently active
4738 application. In this case, this method will return a non-zero
4739 identifier that represents the top-level window of the VM
4740 console process. The caller, if it represents a currently
4741 active process, is responsible to use this identifier (in a
4742 platform-dependent manner) to perform actual window
4743 activation.
4744 <note>
4745 This method will fail if a session for this machine is not
4746 currently open.
4747 </note>
4748
4749 <result name="VBOX_E_INVALID_VM_STATE">
4750 Machine session is not open.
4751 </result>
4752
4753 </desc>
4754 <param name="winId" type="unsigned long long" dir="return">
4755 <desc>
4756 Platform-dependent identifier of the top-level VM console
4757 window, or zero if this method has performed all actions
4758 necessary to implement the <i>show window</i> semantics for
4759 the given platform and/or VirtualBox front-end.
4760 </desc>
4761 </param>
4762 </method>
4763
4764 <method name="getGuestProperty">
4765 <desc>
4766 Reads an entry from the machine's guest property store.
4767
4768 <result name="VBOX_E_INVALID_VM_STATE">
4769 Machine session is not open.
4770 </result>
4771
4772 </desc>
4773 <param name="name" type="wstring" dir="in">
4774 <desc>
4775 The name of the property to read.
4776 </desc>
4777 </param>
4778 <param name="value" type="wstring" dir="out">
4779 <desc>
4780 The value of the property. If the property does not exist then this
4781 will be empty.
4782 </desc>
4783 </param>
4784 <param name="timestamp" type="unsigned long long" dir="out">
4785 <desc>
4786 The time at which the property was last modified, as seen by the
4787 server process.
4788 </desc>
4789 </param>
4790 <param name="flags" type="wstring" dir="out">
4791 <desc>
4792 Additional property parameters, passed as a comma-separated list of
4793 "name=value" type entries.
4794 </desc>
4795 </param>
4796 </method>
4797
4798 <method name="getGuestPropertyValue">
4799 <desc>
4800 Reads a value from the machine's guest property store.
4801
4802 <result name="VBOX_E_INVALID_VM_STATE">
4803 Machine session is not open.
4804 </result>
4805
4806 </desc>
4807 <param name="property" type="wstring" dir="in">
4808 <desc>
4809 The name of the property to read.
4810 </desc>
4811 </param>
4812 <param name="value" type="wstring" dir="return">
4813 <desc>
4814 The value of the property. If the property does not exist then this
4815 will be empty.
4816 </desc>
4817 </param>
4818 </method>
4819
4820 <method name="getGuestPropertyTimestamp">
4821 <desc>
4822 Reads a property timestamp from the machine's guest property store.
4823
4824 <result name="VBOX_E_INVALID_VM_STATE">
4825 Machine session is not open.
4826 </result>
4827
4828 </desc>
4829 <param name="property" type="wstring" dir="in">
4830 <desc>
4831 The name of the property to read.
4832 </desc>
4833 </param>
4834 <param name="value" type="unsigned long long" dir="return">
4835 <desc>
4836 The timestamp. If the property does not exist then this will be
4837 empty.
4838 </desc>
4839 </param>
4840 </method>
4841
4842 <method name="setGuestProperty">
4843 <desc>
4844 Sets, changes or deletes an entry in the machine's guest property
4845 store.
4846
4847 <result name="E_ACCESSDENIED">
4848 Property cannot be changed.
4849 </result>
4850 <result name="E_INVALIDARG">
4851 Invalid @a flags.
4852 </result>
4853 <result name="VBOX_E_INVALID_VM_STATE">
4854 Virtual machine is not mutable or session not open.
4855 </result>
4856 <result name="VBOX_E_INVALID_OBJECT_STATE">
4857 Cannot set transient property when machine not running.
4858 </result>
4859
4860 </desc>
4861 <param name="property" type="wstring" dir="in">
4862 <desc>
4863 The name of the property to set, change or delete.
4864 </desc>
4865 </param>
4866 <param name="value" type="wstring" dir="in">
4867 <desc>
4868 The new value of the property to set, change or delete. If the
4869 property does not yet exist and value is non-empty, it will be
4870 created. If the value is empty, the key will be deleted if it
4871 exists.
4872 </desc>
4873 </param>
4874 <param name="flags" type="wstring" dir="in">
4875 <desc>
4876 Additional property parameters, passed as a comma-separated list of
4877 "name=value" type entries.
4878 </desc>
4879 </param>
4880 </method>
4881
4882 <method name="setGuestPropertyValue">
4883 <desc>
4884 Sets, changes or deletes a value in the machine's guest property
4885 store. The flags field will be left unchanged or created empty for a
4886 new property.
4887
4888 <result name="E_ACCESSDENIED">
4889 Property cannot be changed.
4890 </result>
4891 <result name="VBOX_E_INVALID_VM_STATE">
4892 Virtual machine is not mutable or session not open.
4893 </result>
4894 <result name="VBOX_E_INVALID_OBJECT_STATE">
4895 Cannot set transient property when machine not running.
4896 </result>
4897 </desc>
4898
4899 <param name="property" type="wstring" dir="in">
4900 <desc>
4901 The name of the property to set, change or delete.
4902 </desc>
4903 </param>
4904 <param name="value" type="wstring" dir="in">
4905 <desc>
4906 The new value of the property to set, change or delete. If the
4907 property does not yet exist and value is non-empty, it will be
4908 created. If value is empty, the property will be deleted if it
4909 exists.
4910 </desc>
4911 </param>
4912 </method>
4913
4914 <method name="enumerateGuestProperties">
4915 <desc>
4916 Return a list of the guest properties matching a set of patterns along
4917 with their values, time stamps and flags.
4918 </desc>
4919 <param name="patterns" type="wstring" dir="in">
4920 <desc>
4921 The patterns to match the properties against, separated by '|'
4922 characters. If this is empty or NULL, all properties will match.
4923 </desc>
4924 </param>
4925 <param name="name" type="wstring" dir="out" safearray="yes">
4926 <desc>
4927 The names of the properties returned.
4928 </desc>
4929 </param>
4930 <param name="value" type="wstring" dir="out" safearray="yes">
4931 <desc>
4932 The values of the properties returned. The array entries match the
4933 corresponding entries in the @a name array.
4934 </desc>
4935 </param>
4936 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4937 <desc>
4938 The time stamps of the properties returned. The array entries match
4939 the corresponding entries in the @a name array.
4940 </desc>
4941 </param>
4942 <param name="flags" type="wstring" dir="out" safearray="yes">
4943 <desc>
4944 The flags of the properties returned. The array entries match the
4945 corresponding entries in the @a name array.
4946 </desc>
4947 </param>
4948 </method>
4949</interface>
4950
4951 <!--
4952 // IConsole
4953 /////////////////////////////////////////////////////////////////////////
4954 -->
4955
4956 <interface
4957 name="IConsoleCallback" extends="$unknown"
4958 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4959 wsmap="suppress"
4960 >
4961
4962 <method name="onMousePointerShapeChange">
4963 <desc>
4964 Notification when the guest mouse pointer shape has
4965 changed. The new shape data is given.
4966 </desc>
4967 <param name="visible" type="boolean" dir="in">
4968 <desc>
4969 Flag whether the pointer is visible.
4970 </desc>
4971 </param>
4972 <param name="alpha" type="boolean" dir="in">
4973 <desc>
4974 Flag whether the pointer has an alpha channel.
4975 </desc>
4976 </param>
4977 <param name="xHot" type="unsigned long" dir="in">
4978 <desc>
4979 The pointer hot spot x coordinate.
4980 </desc>
4981 </param>
4982 <param name="yHot" type="unsigned long" dir="in">
4983 <desc>
4984 The pointer hot spot y coordinate.
4985 </desc>
4986 </param>
4987 <param name="width" type="unsigned long" dir="in">
4988 <desc>
4989 Width of the pointer shape in pixels.
4990 </desc>
4991 </param>
4992 <param name="height" type="unsigned long" dir="in">
4993 <desc>
4994 Height of the pointer shape in pixels.
4995 </desc>
4996 </param>
4997 <param name="shape" type="octet" mod="ptr" dir="in">
4998 <desc>
4999 Address of the shape buffer.
5000
5001 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5002 followed by a 32-bpp XOR (color) mask.
5003
5004 For pointers without alpha channel the XOR mask pixels are 32
5005 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5006 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5007
5008 An AND mask is used for pointers with alpha channel, so if the
5009 callback does not support alpha, the pointer could be
5010 displayed as a normal color pointer.
5011
5012 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5013 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5014 height</tt>. The padding bits at the end of each scanline are
5015 undefined.
5016
5017 The XOR mask follows the AND mask on the next 4-byte aligned
5018 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5019 Bytes in the gap between the AND and the XOR mask are undefined.
5020 The XOR mask scanlines have no gap between them and the size of
5021 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5022
5023 <note>
5024 If @a shape is 0, only the pointer visibility is changed.
5025 </note>
5026 </desc>
5027 </param>
5028 </method>
5029
5030 <method name="onMouseCapabilityChange">
5031 <desc>
5032 Notification when the mouse capabilities reported by the
5033 guest have changed. The new capabilities are passed.
5034 </desc>
5035 <param name="supportsAbsolute" type="boolean" dir="in"/>
5036 <param name="needsHostCursor" type="boolean" dir="in"/>
5037 </method>
5038
5039 <method name="onKeyboardLedsChange">
5040 <desc>
5041 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5042 to alter the state of the keyboard LEDs.
5043 </desc>
5044 <param name="numLock" type="boolean" dir="in"/>
5045 <param name="capsLock" type="boolean" dir="in"/>
5046 <param name="scrollLock" type="boolean" dir="in"/>
5047 </method>
5048
5049 <method name="onStateChange">
5050 <desc>
5051 Notification when the execution state of the machine has changed.
5052 The new state will be given.
5053 </desc>
5054 <param name="state" type="MachineState" dir="in"/>
5055 </method>
5056
5057 <method name="onAdditionsStateChange">
5058 <desc>
5059 Notification when a Guest Additions property changes.
5060 Interested callees should query IGuest attributes to
5061 find out what has changed.
5062 </desc>
5063 </method>
5064
5065 <method name="onDVDDriveChange">
5066 <desc>
5067 Notification when a property of the
5068 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5069 Interested callees should use IDVDDrive methods to find out what has
5070 changed.
5071 </desc>
5072 </method>
5073
5074 <method name="onFloppyDriveChange">
5075 <desc>
5076 Notification when a property of the
5077 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5078 Interested callees should use IFloppyDrive methods to find out what
5079 has changed.
5080 </desc>
5081 </method>
5082
5083 <method name="onNetworkAdapterChange">
5084 <desc>
5085 Notification when a property of one of the
5086 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5087 changes. Interested callees should use INetworkAdapter methods and
5088 attributes to find out what has changed.
5089 </desc>
5090 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5091 <desc>Network adapter that is subject to change.</desc>
5092 </param>
5093 </method>
5094
5095 <method name="onSerialPortChange">
5096 <desc>
5097 Notification when a property of one of the
5098 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5099 Interested callees should use ISerialPort methods and attributes
5100 to find out what has changed.
5101 </desc>
5102 <param name="serialPort" type="ISerialPort" dir="in">
5103 <desc>Serial port that is subject to change.</desc>
5104 </param>
5105 </method>
5106
5107 <method name="onParallelPortChange">
5108 <desc>
5109 Notification when a property of one of the
5110 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5111 changes. Interested callees should use ISerialPort methods and
5112 attributes to find out what has changed.
5113 </desc>
5114 <param name="parallelPort" type="IParallelPort" dir="in">
5115 <desc>Parallel port that is subject to change.</desc>
5116 </param>
5117 </method>
5118
5119 <method name="onVRDPServerChange">
5120 <desc>
5121 Notification when a property of the
5122 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5123 Interested callees should use IVRDPServer methods and attributes to
5124 find out what has changed.
5125 </desc>
5126 </method>
5127
5128 <method name="onUSBControllerChange">
5129 <desc>
5130 Notification when a property of the virtual
5131 <link to="IMachine::USBController">USB controller</link> changes.
5132 Interested callees should use IUSBController methods and attributes to
5133 find out what has changed.
5134 </desc>
5135 </method>
5136
5137 <method name="onUSBDeviceStateChange">
5138 <desc>
5139 Notification when a USB device is attached to or detached from
5140 the virtual USB controller.
5141
5142 This notification is sent as a result of the indirect
5143 request to attach the device because it matches one of the
5144 machine USB filters, or as a result of the direct request
5145 issued by <link to="IConsole::attachUSBDevice"/> or
5146 <link to="IConsole::detachUSBDevice"/>.
5147
5148 This notification is sent in case of both a succeeded and a
5149 failed request completion. When the request succeeds, the @a
5150 error parameter is @c null, and the given device has been
5151 already added to (when @a attached is @c true) or removed from
5152 (when @a attached is @c false) the collection represented by
5153 <link to="IConsole::USBDevices"/>. On failure, the collection
5154 doesn't change and the @a error parameter represents the error
5155 message describing the failure.
5156
5157 </desc>
5158 <param name="device" type="IUSBDevice" dir="in">
5159 <desc>Device that is subject to state change.</desc>
5160 </param>
5161 <param name="attached" type="boolean" dir="in">
5162 <desc>
5163 <tt>true</tt> if the device was attached
5164 and <tt>false</tt> otherwise.
5165 </desc>
5166 </param>
5167 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5168 <desc>
5169 <tt>null</tt> on success or an error message object on
5170 failure.
5171 </desc>
5172 </param>
5173 </method>
5174
5175 <method name="onSharedFolderChange">
5176 <desc>
5177 Notification when a shared folder is added or removed.
5178 The @a scope argument defines one of three scopes:
5179 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5180 (<link to="Scope_Global">Global</link>),
5181 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5182 the machine (<link to="Scope_Machine">Machine</link>) or <link
5183 to="IConsole::sharedFolders">transient shared folders</link> of the
5184 machine (<link to="Scope_Session">Session</link>). Interested callees
5185 should use query the corresponding collections to find out what has
5186 changed.
5187 </desc>
5188 <param name="scope" type="Scope" dir="in">
5189 <desc>Scope of the notification.</desc>
5190 </param>
5191 </method>
5192
5193 <method name="onRuntimeError">
5194 <desc>
5195 Notification when an error happens during the virtual
5196 machine execution.
5197
5198 There are three kinds of runtime errors:
5199 <ul>
5200 <li><i>fatal</i></li>
5201 <li><i>non-fatal with retry</i></li>
5202 <li><i>non-fatal warnings</i></li>
5203 </ul>
5204
5205 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5206 to <tt>true</tt>. In case of fatal errors, the virtual machine
5207 execution is always paused before calling this notification, and
5208 the notification handler is supposed either to immediately save
5209 the virtual machine state using <link to="IConsole::saveState()"/>
5210 or power it off using <link to="IConsole::powerDown()"/>.
5211 Resuming the execution can lead to unpredictable results.
5212
5213 <b>Non-fatal</b> errors and warnings are indicated by the
5214 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5215 is in the Paused state by the time the error notification is
5216 received, it means that the user can <i>try to resume</i> the machine
5217 execution after attempting to solve the problem that caused the
5218 error. In this case, the notification handler is supposed
5219 to show an appropriate message to the user (depending on the
5220 value of the @a id parameter) that offers several actions such
5221 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5222 wants to retry, the notification handler should continue
5223 the machine execution using the <link to="IConsole::resume()"/>
5224 call. If the machine execution is not Paused during this
5225 notification, then it means this notification is a <i>warning</i>
5226 (for example, about a fatal condition that can happen very soon);
5227 no immediate action is required from the user, the machine
5228 continues its normal execution.
5229
5230 Note that in either case the notification handler
5231 <b>must not</b> perform any action directly on a thread
5232 where this notification is called. Everything it is allowed to
5233 do is to post a message to another thread that will then talk
5234 to the user and take the corresponding action.
5235
5236 Currently, the following error identifiers are known:
5237 <ul>
5238 <li><tt>"HostMemoryLow"</tt></li>
5239 <li><tt>"HostAudioNotResponding"</tt></li>
5240 <li><tt>"VDIStorageFull"</tt></li>
5241 </ul>
5242
5243 <note>
5244 This notification is not designed to be implemented by
5245 more than one callback at a time. If you have multiple
5246 IConsoleCallback instances registered on the given
5247 IConsole object, make sure you simply do nothing but
5248 return @c S_OK from all but one of them that does actual
5249 user notification and performs necessary actions.
5250 </note>
5251
5252 </desc>
5253 <param name="fatal" type="boolean" dir="in">
5254 <desc>Whether the error is fatal or not</desc>
5255 </param>
5256 <param name="id" type="wstring" dir="in">
5257 <desc>Error identifier</desc>
5258 </param>
5259 <param name="message" type="wstring" dir="in">
5260 <desc>Optional error message</desc>
5261 </param>
5262 </method>
5263
5264 <method name="onCanShowWindow">
5265 <desc>
5266 Notification when a call to
5267 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5268 front-end to check if a subsequent call to
5269 <link to="IMachine::showConsoleWindow()"/> can succeed.
5270
5271 The callee should give an answer appropriate to the current
5272 machine state in the @a canShow argument. This answer must
5273 remain valid at least until the next
5274 <link to="IConsole::state">machine state</link> change.
5275
5276 <note>
5277 This notification is not designed to be implemented by
5278 more than one callback at a time. If you have multiple
5279 IConsoleCallback instances registered on the given
5280 IConsole object, make sure you simply do nothing but
5281 return @c true and @c S_OK from all but one of them that
5282 actually manages console window activation.
5283 </note>
5284 </desc>
5285 <param name="canShow" type="boolean" dir="return">
5286 <desc>
5287 @c true if the console window can be shown and @c
5288 false otherwise.
5289 </desc>
5290 </param>
5291 </method>
5292
5293 <method name="onShowWindow">
5294 <desc>
5295 Notification when a call to
5296 <link to="IMachine::showConsoleWindow()"/>
5297 requests the console window to be activated and brought to
5298 foreground on the desktop of the host PC.
5299
5300 This notification should cause the VM console process to
5301 perform the requested action as described above. If it is
5302 impossible to do it at a time of this notification, this
5303 method should return a failure.
5304
5305 Note that many modern window managers on many platforms
5306 implement some sort of focus stealing prevention logic, so
5307 that it may be impossible to activate a window without the
5308 help of the currently active application (which is supposedly
5309 an initiator of this notification). In this case, this method
5310 must return a non-zero identifier that represents the
5311 top-level window of the VM console process. The caller, if it
5312 represents a currently active process, is responsible to use
5313 this identifier (in a platform-dependent manner) to perform
5314 actual window activation.
5315
5316 This method must set @a winId to zero if it has performed all
5317 actions necessary to complete the request and the console
5318 window is now active and in foreground, to indicate that no
5319 further action is required on the caller's side.
5320
5321 <note>
5322 This notification is not designed to be implemented by
5323 more than one callback at a time. If you have multiple
5324 IConsoleCallback instances registered on the given
5325 IConsole object, make sure you simply do nothing but
5326 return @c S_OK from all but one of them that actually
5327 manages console window activation.
5328 </note>
5329 </desc>
5330 <param name="winId" type="unsigned long long" dir="return">
5331 <desc>
5332 Platform-dependent identifier of the top-level VM console
5333 window, or zero if this method has performed all actions
5334 necessary to implement the <i>show window</i> semantics for
5335 the given platform and/or this VirtualBox front-end.
5336 </desc>
5337 </param>
5338 </method>
5339
5340 </interface>
5341
5342 <interface
5343 name="IRemoteDisplayInfo" extends="$unknown"
5344 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5345 wsmap="struct"
5346 >
5347 <desc>
5348 Contains information about the remote display (VRDP) capabilities and status.
5349 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5350 </desc>
5351
5352 <attribute name="active" type="boolean" readonly="yes">
5353 <desc>
5354 Whether the remote display connection is active.
5355 </desc>
5356 </attribute>
5357
5358 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5359 <desc>
5360 How many times a client connected.
5361 </desc>
5362 </attribute>
5363
5364 <attribute name="beginTime" type="long long" readonly="yes">
5365 <desc>
5366 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5367 </desc>
5368 </attribute>
5369
5370 <attribute name="endTime" type="long long" readonly="yes">
5371 <desc>
5372 When the last connection was terminated or the current time, if
5373 connection is still active, in milliseconds since 1970-01-01 UTC.
5374 </desc>
5375 </attribute>
5376
5377 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5378 <desc>
5379 How many bytes were sent in last or current, if still active, connection.
5380 </desc>
5381 </attribute>
5382
5383 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5384 <desc>
5385 How many bytes were sent in all connections.
5386 </desc>
5387 </attribute>
5388
5389 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5390 <desc>
5391 How many bytes were received in last or current, if still active, connection.
5392 </desc>
5393 </attribute>
5394
5395 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5396 <desc>
5397 How many bytes were received in all connections.
5398 </desc>
5399 </attribute>
5400
5401 <attribute name="user" type="wstring" readonly="yes">
5402 <desc>
5403 Login user name supplied by the client.
5404 </desc>
5405 </attribute>
5406
5407 <attribute name="domain" type="wstring" readonly="yes">
5408 <desc>
5409 Login domain name supplied by the client.
5410 </desc>
5411 </attribute>
5412
5413 <attribute name="clientName" type="wstring" readonly="yes">
5414 <desc>
5415 The client name supplied by the client.
5416 </desc>
5417 </attribute>
5418
5419 <attribute name="clientIP" type="wstring" readonly="yes">
5420 <desc>
5421 The IP address of the client.
5422 </desc>
5423 </attribute>
5424
5425 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5426 <desc>
5427 The client software version number.
5428 </desc>
5429 </attribute>
5430
5431 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5432 <desc>
5433 Public key exchange method used when connection was established.
5434 Values: 0 - RDP4 public key exchange scheme.
5435 1 - X509 certificates were sent to client.
5436 </desc>
5437 </attribute>
5438
5439 </interface>
5440
5441 <interface
5442 name="IConsole" extends="$unknown"
5443 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5444 wsmap="managed"
5445 >
5446 <desc>
5447 The IConsole interface represents an interface to control virtual
5448 machine execution.
5449
5450 The console object that implements the IConsole interface is obtained
5451 from a session object after the session for the given machine has been
5452 opened using one of <link to="IVirtualBox::openSession"/>,
5453 <link to="IVirtualBox::openRemoteSession"/> or
5454 <link to="IVirtualBox::openExistingSession"/> methods.
5455
5456 Methods of the IConsole interface allow the caller to query the current
5457 virtual machine execution state, pause the machine or power it down, save
5458 the machine state or take a snapshot, attach and detach removable media
5459 and so on.
5460
5461 <see>ISession</see>
5462 </desc>
5463
5464 <attribute name="machine" type="IMachine" readonly="yes">
5465 <desc>
5466 Machine object this console is sessioned with.
5467 <note>
5468 This is a convenience property, it has the same value as
5469 <link to="ISession::machine"/> of the corresponding session
5470 object.
5471 </note>
5472 </desc>
5473 </attribute>
5474
5475 <attribute name="state" type="MachineState" readonly="yes">
5476 <desc>
5477 Current execution state of the machine.
5478 <note>
5479 This property always returns the same value as the corresponding
5480 property of the IMachine object this console is sessioned with.
5481 For the process that owns (executes) the VM, this is the
5482 preferable way of querying the VM state, because no IPC
5483 calls are made.
5484 </note>
5485 </desc>
5486 </attribute>
5487
5488 <attribute name="guest" type="IGuest" readonly="yes">
5489 <desc>Guest object.</desc>
5490 </attribute>
5491
5492 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5493 <desc>
5494 Virtual keyboard object.
5495 <note>
5496 If the machine is not running, any attempt to use
5497 the returned object will result in an error.
5498 </note>
5499 </desc>
5500 </attribute>
5501
5502 <attribute name="mouse" type="IMouse" readonly="yes">
5503 <desc>
5504 Virtual mouse object.
5505 <note>
5506 If the machine is not running, any attempt to use
5507 the returned object will result in an error.
5508 </note>
5509 </desc>
5510 </attribute>
5511
5512 <attribute name="display" type="IDisplay" readonly="yes">
5513 <desc>Virtual display object.
5514 <note>
5515 If the machine is not running, any attempt to use
5516 the returned object will result in an error.
5517 </note>
5518 </desc>
5519 </attribute>
5520
5521 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5522 <desc>Debugging interface.</desc>
5523 </attribute>
5524
5525 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5526 <desc>
5527 Collection of USB devices currently attached to the virtual
5528 USB controller.
5529 <note>
5530 The collection is empty if the machine is not running.
5531 </note>
5532 </desc>
5533 </attribute>
5534
5535 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5536 <desc>
5537 List of USB devices currently attached to the remote VRDP client.
5538 Once a new device is physically attached to the remote host computer,
5539 it appears in this list and remains there until detached.
5540 </desc>
5541 </attribute>
5542
5543 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5544 <desc>
5545 Collection of shared folders for the current session. These folders
5546 are called transient shared folders because they are available to the
5547 guest OS running inside the associated virtual machine only for the
5548 duration of the session (as opposed to
5549 <link to="IMachine::sharedFolders"/> which represent permanent shared
5550 folders). When the session is closed (e.g. the machine is powered down),
5551 these folders are automatically discarded.
5552
5553 New shared folders are added to the collection using
5554 <link to="#createSharedFolder"/>. Existing shared folders can be
5555 removed using <link to="#removeSharedFolder"/>.
5556 </desc>
5557 </attribute>
5558
5559 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5560 <desc>
5561 Interface that provides information on Remote Display (VRDP) connection.
5562 </desc>
5563 </attribute>
5564
5565 <method name="powerUp">
5566 <desc>
5567 Starts the virtual machine execution using the current machine
5568 state (that is, its current execution state, current settings and
5569 current hard disks).
5570
5571 If the machine is powered off or aborted, the execution will
5572 start from the beginning (as if the real hardware were just
5573 powered on).
5574
5575 If the machine is in the <link to="MachineState_Saved"/> state,
5576 it will continue its execution the point where the state has
5577 been saved.
5578
5579 <note>
5580 Unless you are trying to write a new VirtualBox front-end that
5581 performs direct machine execution (like the VirtualBox or VBoxSDL
5582 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5583 session opened by <link to="IVirtualBox::openSession"/> and use this
5584 session only to change virtual machine settings. If you simply want to
5585 start virtual machine execution using one of the existing front-ends
5586 (for example the VirtualBox GUI or headless server), simply use
5587 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5588 power up the machine automatically for you.
5589 </note>
5590
5591 <see>#saveState</see>
5592 <result name="VBOX_E_INVALID_VM_STATE">
5593 Virtual machine already running.
5594 </result>
5595 <result name="VBOX_E_HOST_ERROR">
5596 Host interface does not exist or name not set.
5597 </result>
5598 <result name="VBOX_E_FILE_ERROR">
5599 Invalid saved state file.
5600 </result>
5601 </desc>
5602 <param name="progress" type="IProgress" dir="return">
5603 <desc>Progress object to track the operation completion.</desc>
5604 </param>
5605 </method>
5606
5607 <method name="powerUpPaused">
5608 <desc>
5609 Identical to powerUp except that the VM will enter the
5610 <link to="MachineState_Paused"/> state, instead of
5611 <link to="MachineState_Running"/>.
5612
5613 <see>#powerUp</see>
5614 <result name="VBOX_E_INVALID_VM_STATE">
5615 Virtual machine already running.
5616 </result>
5617 <result name="VBOX_E_HOST_ERROR">
5618 Host interface does not exist or name not set.
5619 </result>
5620 <result name="VBOX_E_FILE_ERROR">
5621 Invalid saved state file.
5622 </result>
5623 </desc>
5624 <param name="progress" type="IProgress" dir="return">
5625 <desc>Progress object to track the operation completion.</desc>
5626 </param>
5627 </method>
5628
5629 <method name="powerDown">
5630 <desc>
5631 Stops the virtual machine execution.
5632 After this operation completes, the machine will go to the
5633 PoweredOff state.
5634
5635 @deprecated This method will be removed in VirtualBox 2.1 where the
5636 powerDownAsync() method will take its name. Do not use this method in
5637 the code.
5638 <result name="VBOX_E_INVALID_VM_STATE">
5639 Virtual machine must be Running, Paused or Stuck to be powered down.
5640 </result>
5641 <result name="VBOX_E_VM_ERROR">
5642 Unable to power off or destroy virtual machine.
5643 </result>
5644 </desc>
5645 </method>
5646
5647 <method name="powerDownAsync">
5648 <desc>
5649 Initiates the power down procedure to stop the virtual machine
5650 execution.
5651
5652 The completion of the power down procedure is tracked using the returned
5653 IProgress object. After the operation is complete, the machine will go
5654 to the PoweredOff state.
5655
5656 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5657 where the original powerDown() method will be removed. You will need to
5658 rename "powerDownAsync" to "powerDown" in your sources to make them
5659 build with version 2.1.
5660 <result name="VBOX_E_INVALID_VM_STATE">
5661 Virtual machine must be Running, Paused or Stuck to be powered down.
5662 </result>
5663 </desc>
5664 <param name="progress" type="IProgress" dir="return">
5665 <desc>Progress object to track the operation completion.</desc>
5666 </param>
5667 </method>
5668
5669 <method name="reset">
5670 <desc>Resets the virtual machine.
5671 <result name="VBOX_E_INVALID_VM_STATE">
5672 Virtual machine not in Running state.
5673 </result>
5674 <result name="VBOX_E_VM_ERROR">
5675 Virtual machine error in reset operation.
5676 </result>
5677 </desc>
5678 </method>
5679
5680 <method name="pause">
5681 <desc>Pauses the virtual machine execution.
5682 <result name="VBOX_E_INVALID_VM_STATE">
5683 Virtual machine not in Running state.
5684 </result>
5685 <result name="VBOX_E_VM_ERROR">
5686 Virtual machine error in suspend operation.
5687 </result>
5688 </desc>
5689 </method>
5690
5691 <method name="resume">
5692 <desc>Resumes the virtual machine execution.
5693 <result name="VBOX_E_INVALID_VM_STATE">
5694 Virtual machine not in Paused state.
5695 </result>
5696 <result name="VBOX_E_VM_ERROR">
5697 Virtual machine error in resume operation.
5698 </result>
5699 </desc>
5700 </method>
5701
5702 <method name="powerButton">
5703 <desc>Sends the ACPI power button event to the guest.
5704 <result name="VBOX_E_INVALID_VM_STATE">
5705 Virtual machine not in Running state.
5706 </result>
5707 <result name="VBOX_E_PDM_ERROR">
5708 Controlled power off failed.
5709 </result>
5710 </desc>
5711 </method>
5712
5713 <method name="sleepButton">
5714 <desc>Sends the ACPI sleep button event to the guest.
5715 <result name="VBOX_E_INVALID_VM_STATE">
5716 Virtual machine not in Running state.
5717 </result>
5718 <result name="VBOX_E_PDM_ERROR">
5719 Sending sleep button event failed.
5720 </result>
5721 </desc>
5722 </method>
5723
5724 <method name="getPowerButtonHandled">
5725 <desc>Checks if the last power button event was handled by guest.
5726 <result name="VBOX_E_PDM_ERROR">
5727 Checking if the event was handled by the guest OS failed.
5728 </result>
5729 </desc>
5730 <param name="handled" type="boolean" dir="return"/>
5731 </method>
5732
5733 <method name="getGuestEnteredACPIMode">
5734 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5735 G1 (sleeping). If this method returns false, the guest will
5736 most likely not respond to external ACPI events.
5737 <result name="VBOX_E_INVALID_VM_STATE">
5738 Virtual machine not in Running state.
5739 </result>
5740 </desc>
5741 <param name="entered" type="boolean" dir="return"/>
5742 </method>
5743
5744 <method name="saveState">
5745 <desc>
5746 Saves the current execution state of a running virtual machine
5747 and stops its execution.
5748
5749 After this operation completes, the machine will go to the
5750 Saved state. Next time it is powered up, this state will
5751 be restored and the machine will continue its execution from
5752 the place where it was saved.
5753
5754 This operation differs from taking a snapshot to the effect
5755 that it doesn't create new differencing hard disks. Also, once
5756 the machine is powered up from the state saved using this method,
5757 the saved state is deleted, so it will be impossible to return
5758 to this state later.
5759
5760 <note>
5761 On success, this method implicitly calls
5762 <link to="IMachine::saveSettings()"/> to save all current machine
5763 settings (including runtime changes to the DVD drive, etc.).
5764 Together with the impossibility to change any VM settings when it is
5765 in the Saved state, this guarantees adequate hardware
5766 configuration of the machine when it is restored from the saved
5767 state file.
5768 </note>
5769
5770 <note>
5771 The machine must be in the Running or Paused state, otherwise
5772 the operation will fail.
5773 </note>
5774 <result name="VBOX_E_INVALID_VM_STATE">
5775 Virtual machine state neither Running nor Paused.
5776 </result>
5777 <result name="VBOX_E_FILE_ERROR">
5778 Failed to create directory for saved state file.
5779 </result>
5780
5781 <see><link to="#takeSnapshot"/></see>
5782 </desc>
5783 <param name="progress" type="IProgress" dir="return">
5784 <desc>Progress object to track the operation completion.</desc>
5785 </param>
5786 </method>
5787
5788 <method name="adoptSavedState">
5789 <desc>
5790 Associates the given saved state file to the virtual machine.
5791
5792 On success, the machine will go to the Saved state. Next time it is
5793 powered up, it will be restored from the adopted saved state and
5794 continue execution from the place where the saved state file was
5795 created.
5796
5797 The specified saved state file path may be absolute or relative to the
5798 folder the VM normally saves the state to (usually,
5799 <link to="IMachine::snapshotFolder"/>).
5800
5801 <note>
5802 It's a caller's responsibility to make sure the given saved state
5803 file is compatible with the settings of this virtual machine that
5804 represent its virtual hardware (memory size, hard disk configuration
5805 etc.). If there is a mismatch, the behavior of the virtual machine
5806 is undefined.
5807 </note>
5808 <result name="VBOX_E_INVALID_VM_STATE">
5809 Virtual machine state neither PoweredOff nor Aborted.
5810 </result>
5811 </desc>
5812 <param name="savedStateFile" type="wstring" dir="in">
5813 <desc>Path to the saved state file to adopt.</desc>
5814 </param>
5815 </method>
5816
5817 <method name="discardSavedState">
5818 <desc>
5819 Discards (deletes) the saved state of the virtual machine
5820 previously created by <link to="#saveState"/>. Next time the
5821 machine is powered up, a clean boot will occur.
5822 <note>
5823 This operation is equivalent to resetting or powering off
5824 the machine without doing a proper shutdown in the guest OS.
5825 </note>
5826 <result name="VBOX_E_INVALID_VM_STATE">
5827 Virtual machine not in state Saved.
5828 </result>
5829 </desc>
5830 </method>
5831
5832 <method name="getDeviceActivity">
5833 <desc>
5834 Gets the current activity type of a given device or device group.
5835 <result name="E_INVALIDARG">
5836 Invalid device type.
5837 </result>
5838 </desc>
5839 <param name="type" type="DeviceType" dir="in"/>
5840 <param name="activity" type="DeviceActivity" dir="return"/>
5841 </method>
5842
5843 <method name="attachUSBDevice">
5844 <desc>
5845 Attaches a host USB device with the given UUID to the
5846 USB controller of the virtual machine.
5847
5848 The device needs to be in one of the following states:
5849 <link to="USBDeviceState_Busy"/>,
5850 <link to="USBDeviceState_Available"/> or
5851 <link to="USBDeviceState_Held"/>,
5852 otherwise an error is immediately returned.
5853
5854 When the device state is
5855 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5856 be returned if the host computer refuses to release it for some reason.
5857
5858 <see>IUSBController::deviceFilters, USBDeviceState</see>
5859 <result name="VBOX_E_INVALID_VM_STATE">
5860 Virtual machine state neither Running nor Paused.
5861 </result>
5862 <result name="VBOX_E_PDM_ERROR">
5863 Virtual machine does not have a USB controller.
5864 </result>
5865 </desc>
5866 <param name="id" type="uuid" dir="in">
5867 <desc>UUID of the host USB device to attach.</desc>
5868 </param>
5869 </method>
5870
5871 <method name="detachUSBDevice">
5872 <desc>
5873 Detaches an USB device with the given UUID from the USB controller
5874 of the virtual machine.
5875
5876 After this method succeeds, the VirtualBox server re-initiates
5877 all USB filters as if the device were just physically attached
5878 to the host, but filters of this machine are ignored to avoid
5879 a possible automatic re-attachment.
5880
5881 <see>IUSBController::deviceFilters, USBDeviceState</see>
5882
5883 <result name="VBOX_E_PDM_ERROR">
5884 Virtual machine does not have a USB controller.
5885 </result>
5886 <result name="E_INVALIDARG">
5887 USB device not attached to this virtual machine.
5888 </result>
5889 </desc>
5890 <param name="id" type="uuid" dir="in">
5891 <desc>UUID of the USB device to detach.</desc>
5892 </param>
5893 <param name="device" type="IUSBDevice" dir="return">
5894 <desc>Detached USB device.</desc>
5895 </param>
5896 </method>
5897
5898 <method name="createSharedFolder">
5899 <desc>
5900 Creates a transient new shared folder by associating the given logical
5901 name with the given host path, adds it to the collection of shared
5902 folders and starts sharing it. Refer to the description of
5903 <link to="ISharedFolder"/> to read more about logical names.
5904
5905 <result name="VBOX_E_INVALID_VM_STATE">
5906 Virtual machine in Saved state or currently changing state.
5907 </result>
5908 <result name="VBOX_E_FILE_ERROR">
5909 Shared folder already exists or not accessible.
5910 </result>
5911 </desc>
5912 <param name="name" type="wstring" dir="in">
5913 <desc>Unique logical name of the shared folder.</desc>
5914 </param>
5915 <param name="hostPath" type="wstring" dir="in">
5916 <desc>Full path to the shared folder in the host file system.</desc>
5917 </param>
5918 <param name="writable" type="boolean" dir="in">
5919 <desc>Whether the share is writable or readonly</desc>
5920 </param>
5921 </method>
5922
5923 <method name="removeSharedFolder">
5924 <desc>
5925 Removes a transient shared folder with the given name previously
5926 created by <link to="#createSharedFolder"/> from the collection of
5927 shared folders and stops sharing it.
5928 <result name="VBOX_E_INVALID_VM_STATE">
5929 Virtual machine in Saved state or currently changing state.
5930 </result>
5931 <result name="VBOX_E_FILE_ERROR">
5932 Shared folder does not exists.
5933 </result>
5934 </desc>
5935 <param name="name" type="wstring" dir="in">
5936 <desc>Logical name of the shared folder to remove.</desc>
5937 </param>
5938 </method>
5939
5940 <method name="takeSnapshot">
5941 <desc>
5942 Saves the current execution state and all settings of the
5943 machine and creates differencing images for all
5944 normal (non-independent) hard disks.
5945
5946 This method can be called for a PoweredOff, Saved, Running or
5947 Paused virtual machine. When the machine is PoweredOff, an
5948 offline <link to="ISnapshot">snapshot</link> is created,
5949 in all other cases -- an online snapshot.
5950
5951 The taken snapshot is always based on the
5952 <link to="IMachine::currentSnapshot">current
5953 snapshot</link> of the associated virtual machine and becomes
5954 a new current snapshot.
5955
5956 <note>
5957 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5958 save all current machine settings before taking an offline snapshot.
5959 </note>
5960
5961 <see>ISnapshot, <link to="#saveState"/></see>
5962 <result name="VBOX_E_INVALID_VM_STATE">
5963 Virtual machine currently changing state.
5964 </result>
5965 </desc>
5966 <param name="name" type="wstring" dir="in">
5967 <desc>Short name for the snapshot.</desc>
5968 </param>
5969 <param name="description" type="wstring" dir="in">
5970 <desc>Optional description of the snapshot.</desc>
5971 </param>
5972 <param name="progress" type="IProgress" dir="return">
5973 <desc>Progress object to track the operation completion.</desc>
5974 </param>
5975 </method>
5976
5977 <method name="discardSnapshot">
5978 <desc>
5979
5980 Starts discarding the specified snapshot. The execution state
5981 and settings of the associated machine stored in the snapshot
5982 will be deleted. The contents of all differencing hard disks of
5983 this snapshot will be merged with the contents of their
5984 dependent child hard disks to keep the, disks valid (in other
5985 words, all changes represented by hard disks being discarded
5986 will be propagated to their child hard disks). After that, this
5987 snapshot's differencing hard disks will be deleted. The parent
5988 of this snapshot will become a new parent for all its child
5989 snapshots.
5990
5991 If the discarded snapshot is the current one, its parent
5992 snapshot will become a new current snapshot. The current machine
5993 state is not directly affected in this case, except that
5994 currently attached differencing hard disks based on hard disks
5995 of the discarded snapshot will be also merged as described
5996 above.
5997
5998 If the discarded snapshot is the first one (the root snapshot)
5999 and it has exactly one child snapshot, this child snapshot will
6000 become the first snapshot after discarding. If there are no
6001 children at all (i.e. the first snapshot is the only snapshot of
6002 the machine), both the current and the first snapshot of the
6003 machine will be set to null. In all other cases, the first
6004 snapshot cannot be discarded.
6005
6006 You cannot discard the snapshot if it
6007 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6008 hard disks that have differencing hard disks based on them. Snapshots of
6009 such kind can be discarded only when every normal hard disk has either
6010 no children at all or exactly one child. In the former case, the normal
6011 hard disk simply becomes unused (i.e. not attached to any VM). In the
6012 latter case, it receives all the changes stored in the child hard disk,
6013 and then it replaces the child hard disk in the configuration of the
6014 corresponding snapshot or machine.
6015
6016 Also, you cannot discard the snapshot if it stores hard disks
6017 (of any type) having differencing child hard disks that belong
6018 to other machines. Such snapshots can be only discarded after
6019 you discard all snapshots of other machines containing "foreign"
6020 child disks, or detach these "foreign" child disks from machines
6021 they are attached to.
6022
6023 One particular example of the snapshot storing normal hard disks
6024 is the first snapshot of a virtual machine that had normal hard
6025 disks attached when taking the snapshot. Be careful when
6026 discarding such snapshots because this implicitly commits
6027 changes (made since the snapshot being discarded has been taken)
6028 to normal hard disks (as described above), which may be not what
6029 you want.
6030
6031 The virtual machine is put to
6032 the <link to="MachineState_Discarding">Discarding</link> state until
6033 the discard operation is completed.
6034
6035 <note>
6036 The machine must not be running, otherwise the operation
6037 will fail.
6038 </note>
6039
6040 <note>
6041 Child hard disks of all normal hard disks of the discarded snapshot
6042 must be accessible (see <link to="IMedium::state"/>) for this
6043 operation to succeed. In particular, this means that all virtual
6044 machines, whose hard disks are directly or indirectly based on the
6045 hard disks of discarded snapshot, must be powered off.
6046 </note>
6047 <note>
6048 Merging hard disk contents can be very time and disk space
6049 consuming, if these disks are big in size and have many
6050 children. However, if the snapshot being discarded is the last
6051 (head) snapshot on the branch, the operation will be rather
6052 quick.
6053 </note>
6054 <note>
6055 Note that discarding the current snapshot
6056 will implicitly call <link to="IMachine::saveSettings()"/> to
6057 make all current machine settings permanent.
6058 </note>
6059 <result name="VBOX_E_INVALID_VM_STATE">
6060 Virtual machine is running.
6061 </result>
6062 </desc>
6063 <param name="id" type="uuid" dir="in">
6064 <desc>UUID of the snapshot to discard.</desc>
6065 </param>
6066 <param name="progress" type="IProgress" dir="return">
6067 <desc>Progress object to track the operation completion.</desc>
6068 </param>
6069 </method>
6070
6071 <method name="discardCurrentState">
6072 <desc>
6073 This operation is similar to <link to="#discardSnapshot()"/> but
6074 affects the current machine state. This means that the state stored in
6075 the current snapshot will become a new current state, and all current
6076 settings of the machine and changes stored in differencing hard disks
6077 will be lost.
6078
6079 After this operation is successfully completed, new empty differencing
6080 hard disks are created for all normal hard disks of the machine.
6081
6082 If the current snapshot of the machine is an online snapshot, the
6083 machine will go to the <link to="MachineState_Saved"> saved
6084 state</link>, so that the next time it is powered on, the execution
6085 state will be restored from the current snapshot.
6086
6087 <note>
6088 The machine must not be running, otherwise the operation will fail.
6089 </note>
6090
6091 <note>
6092 If the machine state is <link to="MachineState_Saved">Saved</link>
6093 prior to this operation, the saved state file will be implicitly
6094 discarded (as if <link to="IConsole::discardSavedState()"/> were
6095 called).
6096 </note>
6097
6098 <result name="VBOX_E_INVALID_VM_STATE">
6099 Virtual machine is running.
6100 </result>
6101 </desc>
6102 <param name="progress" type="IProgress" dir="return">
6103 <desc>Progress object to track the operation completion.</desc>
6104 </param>
6105 </method>
6106
6107 <method name="discardCurrentSnapshotAndState">
6108 <desc>
6109
6110 This method is equivalent to
6111 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6112 (currentSnapshot.id(), progress) followed by
6113 <link to="#discardCurrentState()"/>.
6114
6115 As a result, the machine will be fully restored from the
6116 snapshot preceding the current snapshot, while both the current
6117 snapshot and the current machine state will be discarded.
6118
6119 If the current snapshot is the first snapshot of the machine (i.e. it
6120 has the only snapshot), the current machine state will be
6121 discarded <b>before</b> discarding the snapshot. In other words, the
6122 machine will be restored from its last snapshot, before discarding
6123 it. This differs from performing a single
6124 <link to="#discardSnapshot()"/> call (note that no
6125 <link to="#discardCurrentState()"/> will be possible after it)
6126 to the effect that the latter will preserve the current state instead of
6127 discarding it.
6128
6129 Unless explicitly mentioned otherwise, all remarks and
6130 limitations of the above two methods also apply to this method.
6131
6132 <note>
6133 The machine must not be running, otherwise the operation
6134 will fail.
6135 </note>
6136
6137 <note>
6138 If the machine state is <link to="MachineState_Saved">Saved</link>
6139 prior to this operation, the saved state file will be implicitly
6140 discarded (as if <link to="#discardSavedState()"/> were
6141 called).
6142 </note>
6143
6144 <note>
6145 This method is more efficient than calling both of the above
6146 methods separately: it requires less IPC calls and provides
6147 a single progress object.
6148 </note>
6149
6150 <result name="VBOX_E_INVALID_VM_STATE">
6151 Virtual machine is running.
6152 </result>
6153 </desc>
6154 <param name="progress" type="IProgress" dir="return">
6155 <desc>Progress object to track the operation completion.</desc>
6156 </param>
6157 </method>
6158
6159 <method name="registerCallback">
6160 <desc>
6161 Registers a new console callback on this instance. The methods of the
6162 callback interface will be called by this instance when the appropriate
6163 event occurs.
6164 </desc>
6165 <param name="callback" type="IConsoleCallback" dir="in"/>
6166 </method>
6167
6168 <method name="unregisterCallback">
6169 <desc>
6170 Unregisters the console callback previously registered using
6171 <link to="#registerCallback"/>.
6172 <result name="E_INVALIDARG">
6173 Given @a callback handler is not registered.
6174 </result>
6175 </desc>
6176 <param name="callback" type="IConsoleCallback" dir="in"/>
6177 </method>
6178 </interface>
6179
6180 <!--
6181 // IHost
6182 /////////////////////////////////////////////////////////////////////////
6183 -->
6184
6185 <interface
6186 name="IHostDVDDrive" extends="$unknown"
6187 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6188 wsmap="managed"
6189 >
6190 <desc>
6191 The IHostDVDDrive interface represents the physical CD/DVD drive
6192 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6193 </desc>
6194
6195 <attribute name="name" type="wstring" readonly="yes">
6196 <desc>
6197 Returns the platform-specific device identifier.
6198 On DOS-like platforms, it is a drive name (e.g. R:).
6199 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6200 </desc>
6201 </attribute>
6202 <attribute name="description" type="wstring" readonly="yes">
6203 <desc>
6204 Returns a human readable description for the drive. This
6205 description usually contains the product and vendor name. A
6206 @c null string is returned if the description is not available.
6207 </desc>
6208 </attribute>
6209 <attribute name="udi" type="wstring" readonly="yes">
6210 <desc>
6211 Returns the unique device identifier for the drive. This
6212 attribute is reserved for future use instead of
6213 <link to="#name"/>. Currently it is not used and may return
6214 @c null on some platforms.
6215 </desc>
6216 </attribute>
6217
6218 </interface>
6219
6220 <enumerator
6221 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6222 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6223 />
6224
6225 <collection
6226 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6227 enumerator="IHostDVDDriveEnumerator"
6228 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6229 readonly="yes"
6230 >
6231 <method name="findByName">
6232 <desc>
6233 Searches this collection for a host drive with the given name.
6234 <note>
6235 The method returns an error if the given name does not
6236 correspond to any host drive in the collection.
6237 </note>
6238 </desc>
6239 <param name="name" type="wstring" dir="in">
6240 <desc>Name of the host drive to search for</desc>
6241 </param>
6242 <param name="drive" type="IHostDVDDrive" dir="return">
6243 <desc>Found host drive object</desc>
6244 </param>
6245 </method>
6246 </collection>
6247
6248 <interface
6249 name="IHostFloppyDrive" extends="$unknown"
6250 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6251 wsmap="managed"
6252 >
6253 <desc>
6254 The IHostFloppyDrive interface represents the physical floppy drive
6255 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6256 </desc>
6257 <attribute name="name" type="wstring" readonly="yes">
6258 <desc>
6259 Returns the platform-specific device identifier.
6260 On DOS-like platforms, it is a drive name (e.g. A:).
6261 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6262 </desc>
6263 </attribute>
6264 <attribute name="description" type="wstring" readonly="yes">
6265 <desc>
6266 Returns a human readable description for the drive. This
6267 description usually contains the product and vendor name. A
6268 @c null string is returned if the description is not available.
6269 </desc>
6270 </attribute>
6271 <attribute name="udi" type="wstring" readonly="yes">
6272 <desc>
6273 Returns the unique device identifier for the drive. This
6274 attribute is reserved for future use instead of
6275 <link to="#name"/>. Currently it is not used and may return
6276 @c null on some platforms.
6277 </desc>
6278 </attribute>
6279 </interface>
6280
6281 <enumerator
6282 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6283 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6284 />
6285
6286 <collection
6287 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6288 enumerator="IHostFloppyDriveEnumerator"
6289 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6290 readonly="yes"
6291 >
6292 <method name="findByName">
6293 <desc>
6294 Searches this collection for a host drive with the given name.
6295 <note>
6296 The method returns an error if the given name does not
6297 correspond to any host drive in the collection.
6298 </note>
6299 </desc>
6300 <param name="name" type="wstring" dir="in">
6301 <desc>Name of the host drive to search for</desc>
6302 </param>
6303 <param name="drive" type="IHostFloppyDrive" dir="return">
6304 <desc>Found host drive object</desc>
6305 </param>
6306 </method>
6307 </collection>
6308
6309 <enum
6310 name="HostNetworkInterfaceType"
6311 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6312 >
6313 <desc>
6314 Type of encapsulation. Ethernet encapsulation includes both wired and
6315 wireless Ethernet connections.
6316 <see>IHostNetworkInterface</see>
6317 </desc>
6318
6319 <const name="Unknown" value="0">
6320 <desc>
6321 The type of interface cannot be determined.
6322 </desc>
6323 </const>
6324 <const name="Ethernet" value="1">
6325 <desc>
6326 Ethernet frame encapsulation.
6327 </desc>
6328 </const>
6329 <const name="PPP" value="2">
6330 <desc>
6331 Point-to-point protocol encapsulation.
6332 </desc>
6333 </const>
6334 <const name="SLIP" value="3">
6335 <desc>
6336 Serial line IP encapsulation.
6337 </desc>
6338 </const>
6339 </enum>
6340
6341 <enum
6342 name="HostNetworkInterfaceStatus"
6343 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6344 >
6345 <desc>
6346 Current status of the interface.
6347 <see>IHostNetworkInterface</see>
6348 </desc>
6349
6350 <const name="Unknown" value="0">
6351 <desc>
6352 The state of interface cannot be determined.
6353 </desc>
6354 </const>
6355 <const name="Up" value="1">
6356 <desc>
6357 The interface is fully operational.
6358 </desc>
6359 </const>
6360 <const name="Down" value="2">
6361 <desc>
6362 The interface is not functioning.
6363 </desc>
6364 </const>
6365 </enum>
6366
6367 <interface
6368 name="IHostNetworkInterface" extends="$unknown"
6369 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6370 wsmap="managed"
6371 >
6372 <desc>
6373 Reprents one of host's network interfaces. IP V6 address and network
6374 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6375 separated by colons.
6376 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6377 </desc>
6378 <attribute name="name" type="wstring" readonly="yes">
6379 <desc>Returns the host network interface name.</desc>
6380 </attribute>
6381
6382 <attribute name="id" type="uuid" readonly="yes">
6383 <desc>Returns the interface UUID.</desc>
6384 </attribute>
6385
6386 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6387 <desc>Returns the IP V4 address of the interface.</desc>
6388 </attribute>
6389
6390 <attribute name="networkMask" type="unsigned long" readonly="yes">
6391 <desc>Returns the network mask of the interface.</desc>
6392 </attribute>
6393
6394 <attribute name="IPV6Address" type="wstring" readonly="yes">
6395 <desc>Returns the IP V6 address of the interface.</desc>
6396 </attribute>
6397
6398 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6399 <desc>Returns the IP V6 network mask of the interface.</desc>
6400 </attribute>
6401
6402 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6403 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6404 </attribute>
6405
6406 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6407 <desc>Type of protocol encapsulation used.</desc>
6408 </attribute>
6409
6410 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6411 <desc>Status of the interface.</desc>
6412 </attribute>
6413 </interface>
6414
6415 <interface
6416 name="IHost" extends="$unknown"
6417 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6418 wsmap="managed"
6419 >
6420 <desc>
6421 The IHost interface represents the physical machine that this VirtualBox
6422 installation runs on.
6423
6424 An object implementing this interface is returned by the
6425 <link to="IVirtualBox::host" /> attribute. This interface contains
6426 read-only information about the host's physical hardware (such as what
6427 processors and disks are available, what the host operating system is,
6428 and so on) and also allows for manipulating some of the host's hardware,
6429 such as global USB device filters and host interface networking.
6430
6431 </desc>
6432 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6433 <desc>List of DVD drives available on the host.</desc>
6434 </attribute>
6435
6436 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6437 <desc>List of floppy drives available on the host.</desc>
6438 </attribute>
6439
6440 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6441 <desc>
6442 List of USB devices currently attached to the host.
6443 Once a new device is physically attached to the host computer,
6444 it appears in this list and remains there until detached.
6445
6446 <note>
6447 This method may set a @ref com_warnings "warning result code".
6448 </note>
6449 <note>
6450 If USB functionality is not available in the given edition of
6451 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6452 </note>
6453 </desc>
6454 </attribute>
6455
6456 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6457 <desc>
6458 List of USB device filters in action.
6459 When a new device is physically attached to the host computer,
6460 filters from this list are applied to it (in order they are stored
6461 in the list). The first matched filter will determine the
6462 <link to="IHostUSBDeviceFilter::action">action</link>
6463 performed on the device.
6464
6465 Unless the device is ignored by these filters, filters of all
6466 currently running virtual machines
6467 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6468
6469 <note>
6470 This method may set a @ref com_warnings "warning result code".
6471 </note>
6472 <note>
6473 If USB functionality is not available in the given edition of
6474 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6475 </note>
6476
6477 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6478 </desc>
6479 </attribute>
6480
6481 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6482 <desc>List of host network interfaces currently defined on the host.</desc>
6483 </attribute>
6484
6485 <attribute name="processorCount" type="unsigned long" readonly="yes">
6486 <desc>Number of (logical) CPUs installed in the host system.</desc>
6487 </attribute>
6488
6489 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6490 <desc>Number of (logical) CPUs online in the host system.</desc>
6491 </attribute>
6492
6493 <method name="getProcessorSpeed">
6494 <desc>Query the (approximate) maximum speed of a specified host CPU in
6495 Megahertz.
6496 </desc>
6497 <param name="cpuId" type="unsigned long" dir="in">
6498 <desc>
6499 Identifier of the CPU.
6500 </desc>
6501 </param>
6502 <param name="speed" type="unsigned long" dir="return">
6503 <desc>
6504 Speed value. 0 is returned if value is not known or @a cpuId is
6505 invalid.
6506 </desc>
6507 </param>
6508 </method>
6509
6510 <method name="getProcessorFeature">
6511 <desc>Query whether a CPU feature is supported or not.</desc>
6512 <param name="feature" type="ProcessorFeature" dir="in">
6513 <desc>
6514 CPU Feature identifier.
6515 </desc>
6516 </param>
6517 <param name="supported" type="boolean" dir="return">
6518 <desc>
6519 Feature is supported or not.
6520 </desc>
6521 </param>
6522 </method>
6523
6524 <method name="getProcessorDescription">
6525 <desc>Query the model string of a specified host CPU.
6526 <note>
6527 This function is not implemented in the current version of the
6528 product.
6529 </note>
6530 </desc>
6531 <param name="cpuId" type="unsigned long" dir="in">
6532 <desc>
6533 Identifier of the CPU.
6534 </desc>
6535 </param>
6536 <param name="description" type="wstring" dir="return">
6537 <desc>
6538 Model string. A NULL string is returned if value is not known or
6539 @a cpuId is invalid.
6540 </desc>
6541 </param>
6542 </method>
6543
6544 <attribute name="memorySize" type="unsigned long" readonly="yes">
6545 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6546 </attribute>
6547
6548 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6549 <desc>Available system memory in the host system.</desc>
6550 </attribute>
6551
6552 <attribute name="operatingSystem" type="wstring" readonly="yes">
6553 <desc>Name of the host system's operating system.</desc>
6554 </attribute>
6555
6556 <attribute name="OSVersion" type="wstring" readonly="yes">
6557 <desc>Host operating system's version string.</desc>
6558 </attribute>
6559
6560 <attribute name="UTCTime" type="long long" readonly="yes">
6561 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6562 </attribute>
6563
6564<if target="midl">
6565 <method name="createHostNetworkInterface">
6566 <desc>
6567 Creates a new adapter for Host Interface Networking.
6568 <result name="E_INVALIDARG">
6569 Host network interface @a name already exists.
6570 </result>
6571 </desc>
6572 <param name="name" type="wstring" dir="in">
6573 <desc>
6574 Adapter name.
6575 </desc>
6576 </param>
6577 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6578 <desc>
6579 Created host interface object.
6580 </desc>
6581 </param>
6582 <param name="progress" type="IProgress" dir="return">
6583 <desc>
6584 Progress object to track the operation completion.
6585 </desc>
6586 </param>
6587 </method>
6588 <method name="removeHostNetworkInterface">
6589 <desc>
6590 Removes the given host network interface.
6591 <result name="VBOX_E_OBJECT_NOT_FOUND">
6592 No host network interface matching @a id found.
6593 </result>
6594 </desc>
6595 <param name="id" type="uuid" dir="in">
6596 <desc>
6597 Adapter GUID.
6598 </desc>
6599 </param>
6600 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6601 <desc>
6602 Removed host interface object.
6603 </desc>
6604 </param>
6605 <param name="progress" type="IProgress" dir="return">
6606 <desc>
6607 Progress object to track the operation completion.
6608 </desc>
6609 </param>
6610 </method>
6611</if>
6612
6613 <method name="createUSBDeviceFilter">
6614 <desc>
6615 Creates a new USB device filter. All attributes except
6616 the filter name are set to <tt>null</tt> (any match),
6617 <i>active</i> is <tt>false</tt> (the filter is not active).
6618
6619 The created filter can be added to the list of filters using
6620 <link to="#insertUSBDeviceFilter()"/>.
6621
6622 <see>#USBDeviceFilters</see>
6623 </desc>
6624 <param name="name" type="wstring" dir="in">
6625 <desc>
6626 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6627 for more info.
6628 </desc>
6629 </param>
6630 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6631 <desc>Created filter object.</desc>
6632 </param>
6633 </method>
6634
6635 <method name="insertUSBDeviceFilter">
6636 <desc>
6637 Inserts the given USB device to the specified position
6638 in the list of filters.
6639
6640 Positions are numbered starting from <tt>0</tt>. If the specified
6641 position is equal to or greater than the number of elements in
6642 the list, the filter is added at the end of the collection.
6643
6644 <note>
6645 Duplicates are not allowed, so an attempt to insert a
6646 filter that is already in the list, will return an
6647 error.
6648 </note>
6649 <note>
6650 This method may set a @ref com_warnings "warning result code".
6651 </note>
6652 <note>
6653 If USB functionality is not available in the given edition of
6654 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6655 </note>
6656
6657 <see>#USBDeviceFilters</see>
6658
6659 <result name="VBOX_E_INVALID_OBJECT_STATE">
6660 USB device filter is not created within this VirtualBox instance.
6661 </result>
6662 <result name="E_INVALIDARG">
6663 USB device filter already in list.
6664 </result>
6665
6666 </desc>
6667 <param name="position" type="unsigned long" dir="in">
6668 <desc>Position to insert the filter to.</desc>
6669 </param>
6670 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6671 <desc>USB device filter to insert.</desc>
6672 </param>
6673 </method>
6674
6675 <method name="removeUSBDeviceFilter">
6676 <desc>
6677 Removes a USB device filter from the specified position in the
6678 list of filters.
6679
6680 Positions are numbered starting from <tt>0</tt>. Specifying a
6681 position equal to or greater than the number of elements in
6682 the list will produce an error.
6683
6684 <note>
6685 This method may set a @ref com_warnings "warning result code".
6686 </note>
6687 <note>
6688 If USB functionality is not available in the given edition of
6689 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6690 </note>
6691
6692 <see>#USBDeviceFilters</see>
6693
6694 <result name="E_INVALIDARG">
6695 USB device filter list empty or invalid @a position.
6696 </result>
6697
6698 </desc>
6699 <param name="position" type="unsigned long" dir="in">
6700 <desc>Position to remove the filter from.</desc>
6701 </param>
6702 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6703 <desc>Removed USB device filter.</desc>
6704 </param>
6705 </method>
6706
6707 <method name="findHostNetworkInterfaceByName">
6708 <desc>
6709 Searches through all host network interfaces for an interface with
6710 the given name.
6711 <note>
6712 The method returns an error if the given name does not
6713 correspond to any host network interface.
6714 </note>
6715 </desc>
6716 <param name="name" type="wstring" dir="in">
6717 <desc>Name of the host network interface to search for.</desc>
6718 </param>
6719 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6720 <desc>Found host network interface object.</desc>
6721 </param>
6722 </method>
6723 <method name="findHostNetworkInterfaceById">
6724 <desc>
6725 Searches through all host network interfaces for an interface with
6726 the given GUID.
6727 <note>
6728 The method returns an error if the given GUID does not
6729 correspond to any host network interface.
6730 </note>
6731 </desc>
6732 <param name="id" type="uuid" dir="in">
6733 <desc>GUID of the host network interface to search for.</desc>
6734 </param>
6735 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6736 <desc>Found host network interface object.</desc>
6737 </param>
6738 </method>
6739 </interface>
6740
6741 <!--
6742 // ISystemProperties
6743 /////////////////////////////////////////////////////////////////////////
6744 -->
6745
6746 <interface
6747 name="ISystemProperties"
6748 extends="$unknown"
6749 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6750 wsmap="managed"
6751 >
6752 <desc>
6753 The ISystemProperties interface represents global properties of the given
6754 VirtualBox installation.
6755
6756 These properties define limits and default values for various attributes
6757 and parameters. Most of the properties are read-only, but some can be
6758 changed by a user.
6759 </desc>
6760
6761 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6762 <desc>Minimum guest system memory in Megabytes.</desc>
6763 </attribute>
6764
6765 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6766 <desc>Maximum guest system memory in Megabytes.</desc>
6767 </attribute>
6768
6769 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6770 <desc>Minimum guest video memory in Megabytes.</desc>
6771 </attribute>
6772
6773 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6774 <desc>Maximum guest video memory in Megabytes.</desc>
6775 </attribute>
6776
6777 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6778 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6779 </attribute>
6780
6781 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6782 <desc>
6783 Number of network adapters associated with every
6784 <link to="IMachine"/> instance.
6785 </desc>
6786 </attribute>
6787
6788 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6789 <desc>
6790 Number of serial ports associated with every
6791 <link to="IMachine"/> instance.
6792 </desc>
6793 </attribute>
6794
6795 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6796 <desc>
6797 Number of parallel ports associated with every
6798 <link to="IMachine"/> instance.
6799 </desc>
6800 </attribute>
6801
6802 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6803 <desc>
6804 Maximum device position in the boot order. This value corresponds
6805 to the total number of devices a machine can boot from, to make it
6806 possible to include all possible devices to the boot list.
6807 <see><link to="IMachine::setBootOrder()"/></see>
6808 </desc>
6809 </attribute>
6810
6811 <attribute name="defaultMachineFolder" type="wstring">
6812 <desc>
6813 Full path to the default directory used to create new or open
6814 existing machines when a settings file name contains no
6815 path.
6816
6817 The initial value of this property is
6818 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6819 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6820
6821 <note>
6822 Setting this property to <tt>null</tt> will restore the
6823 initial value.
6824 </note>
6825 <note>
6826 When settings this property, the specified path can be
6827 absolute (full path) or relative
6828 to the <link to="IVirtualBox::homeFolder">
6829 VirtualBox home directory</link>.
6830 When reading this property, a full path is
6831 always returned.
6832 </note>
6833 <note>
6834 The specified path may not exist, it will be created
6835 when necessary.
6836 </note>
6837
6838 <see>
6839 <link to="IVirtualBox::createMachine()"/>,
6840 <link to="IVirtualBox::openMachine()"/>
6841 </see>
6842 </desc>
6843 </attribute>
6844
6845 <attribute name="defaultHardDiskFolder" type="wstring">
6846 <desc>
6847 Full path to the default directory used to create new or open existing
6848 virtual disks.
6849
6850 This path is used when the storage unit of a hard disk is a regular file
6851 in the host's file system and only a file name that contains no path is
6852 given.
6853
6854 The initial value of this property is
6855 <tt>&lt;</tt>
6856 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6857 <tt>&gt;/HardDisks</tt>.
6858
6859 <note>
6860 Setting this property to <tt>null</tt> will restore the
6861 initial value.
6862 </note>
6863 <note>
6864 When settings this property, the specified path can be relative
6865 to the
6866 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6867 absolute. When reading this property, a full path is
6868 always returned.
6869 </note>
6870 <note>
6871 The specified path may not exist, it will be created
6872 when necessary.
6873 </note>
6874
6875 <see>
6876 IHardDisk2,
6877 <link to="IVirtualBox::createHardDisk2()"/>,
6878 <link to="IVirtualBox::openHardDisk2()"/>,
6879 <link to="IMedium::location"/>
6880 </see>
6881 </desc>
6882 </attribute>
6883
6884 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6885 <desc>
6886 List of all hard disk storage formats supported by this VirtualBox
6887 installation.
6888
6889 Keep in mind that the hard disk format identifier
6890 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6891 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6892 hard disk format is a case-insensitive string. This means that, for
6893 example, all of the following strings:
6894 <pre>
6895 "VDI"
6896 "vdi"
6897 "VdI"</pre>
6898 refer to the same hard disk format.
6899
6900 Note that the virtual hard disk framework is backend-based, therefore
6901 the list of supported formats depends on what backends are currently
6902 installed.
6903
6904 <see>
6905 <link to="IHardDiskFormat"/>,
6906 </see>
6907 </desc>
6908 </attribute>
6909
6910 <attribute name="defaultHardDiskFormat" type="wstring">
6911 <desc>
6912 Identifier of the default hard disk format used by VirtualBox.
6913
6914 The hard disk format set by this attribute is used by VirtualBox
6915 when the hard disk format was not specified explicitly. One example is
6916 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6917 format argument. A more complex example is implicit creation of
6918 differencing hard disks when taking a snapshot of a virtual machine:
6919 this operation will try to use a format of the parent hard disk first
6920 and if this format does not support differencing hard disks the default
6921 format specified by this argument will be used.
6922
6923 The list of supported hard disk formats may be obtained by the
6924 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6925 format must have a capability to create differencing hard disks;
6926 otherwise opeartions that create hard disks implicitly may fail
6927 unexpectedly.
6928
6929 The initial value of this property is <tt>VDI</tt> in the current
6930 version of the VirtualBox product, but may change in the future.
6931
6932 <note>
6933 Setting this property to <tt>null</tt> will restore the
6934 initial value.
6935 </note>
6936
6937 <see>
6938 <link to="#hardDiskFormats"/>,
6939 <link to="IHardDiskFormat::id"/>,
6940 <link to="IVirtualBox::createHardDisk2()"/>
6941 </see>
6942 </desc>
6943 </attribute>
6944
6945 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6946 <desc>
6947 Library that provides authentication for VRDP clients. The library
6948 is used if a virtual machine's authentication type is set to "external"
6949 in the VM RemoteDisplay configuration.
6950
6951 The system library extension (".DLL" or ".so") must be omitted.
6952 A full path can be specified; if not, then the library must reside on the
6953 system's default library path.
6954
6955 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6956 of that name in one of the default VirtualBox library directories.
6957
6958 For details about VirtualBox authentication libraries and how to implement
6959 them, please refer to the VirtualBox manual.
6960
6961 <note>
6962 Setting this property to <tt>null</tt> will restore the
6963 initial value.
6964 </note>
6965 </desc>
6966 </attribute>
6967
6968 <attribute name="webServiceAuthLibrary" type="wstring">
6969 <desc>
6970 Library that provides authentication for webservice clients. The library
6971 is used if a virtual machine's authentication type is set to "external"
6972 in the VM RemoteDisplay configuration and will be called from
6973 within the <link to="IWebsessionManager::logon" /> implementation.
6974
6975 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6976 there is no per-VM setting for this, as the webservice is a global
6977 resource (if it is running). Only for this setting (for the webservice),
6978 setting this value to a literal "null" string disables authentication,
6979 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6980 no matter what user name and password are supplied.
6981
6982 The initial value of this property is <tt>VRDPAuth</tt>,
6983 meaning that the webservice will use the same authentication
6984 library that is used by default for VBoxVRDP (again, see
6985 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6986 The format and calling convention of authentication libraries
6987 is the same for the webservice as it is for VBoxVRDP.
6988
6989 </desc>
6990 </attribute>
6991
6992 <attribute name="HWVirtExEnabled" type="boolean">
6993 <desc>
6994 This specifies the default value for hardware virtualization
6995 extensions. If enabled, virtual machines will make use of
6996 hardware virtualization extensions such as Intel VT-x and
6997 AMD-V by default. This value can be overridden by each VM
6998 using their <link to="IMachine::HWVirtExEnabled" /> property.
6999 </desc>
7000 </attribute>
7001
7002 <attribute name="LogHistoryCount" type="unsigned long">
7003 <desc>
7004 This value specifies how many old release log files are kept.
7005 </desc>
7006 </attribute>
7007 </interface>
7008
7009 <!--
7010 // IGuest
7011 /////////////////////////////////////////////////////////////////////////
7012 -->
7013
7014 <interface
7015 name="IGuestOSType" extends="$unknown"
7016 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
7017 wsmap="struct"
7018 >
7019 <desc>
7020 </desc>
7021
7022 <attribute name="familyId" type="wstring" readonly="yes">
7023 <desc>Guest OS family identifier string.</desc>
7024 </attribute>
7025
7026 <attribute name="familyDescription" type="wstring" readonly="yes">
7027 <desc>Human readable description of the guest OS family.</desc>
7028 </attribute>
7029
7030 <attribute name="id" type="wstring" readonly="yes">
7031 <desc>Guest OS identifier string.</desc>
7032 </attribute>
7033
7034 <attribute name="description" type="wstring" readonly="yes">
7035 <desc>Human readable description of the guest OS.</desc>
7036 </attribute>
7037
7038 <attribute name="is64Bit" type="boolean" readonly="yes">
7039 <desc>Returns @c true if the given OS is 64-bit</desc>
7040 </attribute>
7041
7042 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7043 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7044 </attribute>
7045
7046 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7047 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7048 </attribute>
7049
7050 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7051 <desc>Recommended RAM size in Megabytes.</desc>
7052 </attribute>
7053
7054 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7055 <desc>Recommended video RAM size in Megabytes.</desc>
7056 </attribute>
7057
7058 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7059 <desc>Recommended hard disk size in Megabytes.</desc>
7060 </attribute>
7061
7062 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7063 <desc>Returns recommended network adapter for this OS type.</desc>
7064 </attribute>
7065 </interface>
7066
7067
7068 <enumerator
7069 name="IGuestOSTypeEnumerator" type="IGuestOSType"
7070 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
7071 />
7072
7073 <collection
7074 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
7075 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
7076 readonly="yes"
7077 />
7078
7079 <interface
7080 name="IGuest" extends="$unknown"
7081 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7082
7083 wsmap="suppress"
7084 >
7085 <desc>
7086 The IGuest interface represents information about the operating system
7087 running inside the virtual machine. Used in
7088 <link to="IConsole::guest"/>.
7089
7090 IGuest provides information about the guest operating system, whether
7091 Guest Additions are installed and other OS-specific virtual machine
7092 properties.
7093 </desc>
7094
7095 <attribute name="OSTypeId" type="wstring" readonly="yes">
7096 <desc>
7097 Identifier of the Guest OS type as reported by the Guest
7098 Additions.
7099 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7100 an IGuestOSType object representing details about the given
7101 Guest OS type.
7102 <note>
7103 If Guest Additions are not installed, this value will be
7104 the same as <link to="IMachine::OSTypeId"/>.
7105 </note>
7106 </desc>
7107 </attribute>
7108
7109 <attribute name="additionsActive" type="boolean" readonly="yes">
7110 <desc>
7111 Flag whether the Guest Additions are installed and active
7112 in which case their version will be returned by the
7113 <link to="#additionsVersion"/> property.
7114 </desc>
7115 </attribute>
7116
7117 <attribute name="additionsVersion" type="wstring" readonly="yes">
7118 <desc>
7119 Version of the Guest Additions (3 decimal numbers separated
7120 by dots) or empty when the Additions are not installed. The
7121 Additions may also report a version but yet not be active as
7122 the version might be refused by VirtualBox (incompatible) or
7123 other failures occurred.
7124 </desc>
7125 </attribute>
7126
7127 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7128 <desc>
7129 Flag whether seamless guest display rendering (seamless desktop
7130 integration) is supported.
7131 </desc>
7132 </attribute>
7133
7134 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7135 <desc>
7136 Flag whether the guest is in graphics mode. If it is not, then
7137 seamless rendering will not work, resize hints are not immediately
7138 acted on and guest display resizes are probably not initiated by
7139 the guest additions.
7140 </desc>
7141 </attribute>
7142
7143 <attribute name="memoryBalloonSize" type="unsigned long">
7144 <desc>Guest system memory balloon size in megabytes.</desc>
7145 </attribute>
7146
7147 <attribute name="statisticsUpdateInterval" type="unsigned long">
7148 <desc>Interval to update guest statistics in seconds.</desc>
7149 </attribute>
7150
7151 <method name="setCredentials">
7152 <desc>
7153 Store login credentials that can be queried by guest operating
7154 systems with Additions installed. The credentials are transient
7155 to the session and the guest may also choose to erase them. Note
7156 that the caller cannot determine whether the guest operating system
7157 has queried or made use of the credentials.
7158
7159 <result name="VBOX_E_VM_ERROR">
7160 VMM device is not available.
7161 </result>
7162
7163 </desc>
7164 <param name="userName" type="wstring" dir="in">
7165 <desc>User name string, can be empty</desc>
7166 </param>
7167 <param name="password" type="wstring" dir="in">
7168 <desc>Password string, can be empty</desc>
7169 </param>
7170 <param name="domain" type="wstring" dir="in">
7171 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7172 </param>
7173 <param name="allowInteractiveLogon" type="boolean" dir="in">
7174 <desc>
7175 Flag whether the guest should alternatively allow the user to
7176 interactively specify different credentials. This flag might
7177 not be supported by all versions of the Additions.
7178 </desc>
7179 </param>
7180 </method>
7181
7182 <method name="getStatistic">
7183 <desc>
7184 Query specified guest statistics as reported by the VirtualBox Additions.
7185 </desc>
7186 <param name="cpuId" type="unsigned long" dir="in">
7187 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7188 </param>
7189 <param name="statistic" type="GuestStatisticType" dir="in">
7190 <desc>Statistic type.</desc>
7191 </param>
7192 <param name="statVal" type="unsigned long" dir="out">
7193 <desc>Statistics value</desc>
7194 </param>
7195 </method>
7196
7197 </interface>
7198
7199
7200 <!--
7201 // IProgress
7202 /////////////////////////////////////////////////////////////////////////
7203 -->
7204
7205 <enumerator
7206 name="IProgressEnumerator" type="IProgress"
7207 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7208 />
7209
7210 <collection
7211 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7212 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7213 readonly="yes"
7214 />
7215
7216 <interface
7217 name="IProgress" extends="$unknown"
7218 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7219 wsmap="managed"
7220 >
7221 <desc>
7222 The IProgress interface represents a task progress object that allows
7223 to wait for the completion of some asynchronous task.
7224
7225 The task consists of one or more operations that run sequentially,
7226 one after one. There is an individual percent of completion of the
7227 current operation and the percent of completion of the task as a
7228 whole. Similarly, you can wait for the completion of a particular
7229 operation or for the completion of the whole task.
7230
7231 Every operation is identified by a number (starting from 0)
7232 and has a separate description.
7233 </desc>
7234
7235 <attribute name="id" type="uuid" readonly="yes">
7236 <desc>ID of the task.</desc>
7237 </attribute>
7238
7239 <attribute name="description" type="wstring" readonly="yes">
7240 <desc>Description of the task.</desc>
7241 </attribute>
7242
7243 <attribute name="initiator" type="$unknown" readonly="yes">
7244 <desc>Initiator of the task.</desc>
7245 </attribute>
7246
7247 <attribute name="cancelable" type="boolean" readonly="yes">
7248 <desc>Whether the task can be interrupted.</desc>
7249 </attribute>
7250
7251 <attribute name="percent" type="long" readonly="yes">
7252 <desc>
7253 Current task progress value in percent.
7254 This value depends on how many operations are already complete.
7255 </desc>
7256 </attribute>
7257
7258 <attribute name="completed" type="boolean" readonly="yes">
7259 <desc>Whether the task has been completed.</desc>
7260 </attribute>
7261
7262 <attribute name="canceled" type="boolean" readonly="yes">
7263 <desc>Whether the task has been canceled.</desc>
7264 </attribute>
7265
7266 <attribute name="resultCode" type="result" readonly="yes">
7267 <desc>
7268 Result code of the progress task.
7269 Valid only if <link to="#completed"/> is true.
7270 </desc>
7271 </attribute>
7272
7273 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7274 <desc>
7275 Extended information about the unsuccessful result of the
7276 progress operation. May be NULL when no extended information
7277 is available.
7278 Valid only if <link to="#completed"/> is true and
7279 <link to="#resultCode"/> indicates a failure.
7280 </desc>
7281 </attribute>
7282
7283 <attribute name="operationCount" type="unsigned long" readonly="yes">
7284 <desc>
7285 Number of operations this task is divided into.
7286 Every task consists of at least one operation.
7287 </desc>
7288 </attribute>
7289
7290 <attribute name="operation" type="unsigned long" readonly="yes">
7291 <desc>Number of the operation being currently executed.</desc>
7292 </attribute>
7293
7294 <attribute name="operationDescription" type="wstring" readonly="yes">
7295 <desc>
7296 Description of the operation being currently executed.
7297 </desc>
7298 </attribute>
7299
7300 <attribute name="operationPercent" type="long" readonly="yes">
7301 <desc>Current operation progress value in percent.</desc>
7302 </attribute>
7303
7304 <method name="waitForCompletion">
7305 <desc>
7306 Waits until the task is done (including all operations) with a
7307 given timeout.
7308
7309 <result name="VBOX_E_IPRT_ERROR">
7310 Failed to wait for task completion.
7311 </result>
7312
7313 </desc>
7314 <param name="timeout" type="long" dir="in">
7315 <desc>
7316 Timeout value in milliseconds.
7317 Specify -1 for an indefinite wait.
7318 </desc>
7319 </param>
7320 </method>
7321
7322 <method name="waitForOperationCompletion">
7323 <desc>
7324 Waits until the given operation is done with a given timeout.
7325
7326 <result name="VBOX_E_IPRT_ERROR">
7327 Failed to wait for operation completion.
7328 </result>
7329
7330 </desc>
7331 <param name="operation" type="unsigned long" dir="in">
7332 <desc>
7333 Number of the operation to wait for.
7334 Must be less than <link to="#operationCount"/>.
7335 </desc>
7336 </param>
7337 <param name="timeout" type="long" dir="in">
7338 <desc>
7339 Timeout value in milliseconds.
7340 Specify -1 for an indefinite wait.
7341 </desc>
7342 </param>
7343 </method>
7344
7345 <method name="cancel">
7346 <desc>
7347 Cancels the task.
7348 <note>
7349 If <link to="#cancelable"/> is <tt>false</tt>, then
7350 this method will fail.
7351 </note>
7352
7353 <result name="VBOX_E_INVALID_OBJECT_STATE">
7354 Operation cannot be canceled.
7355 </result>
7356
7357 </desc>
7358 </method>
7359
7360 </interface>
7361
7362
7363 <!--
7364 // ISnapshot
7365 /////////////////////////////////////////////////////////////////////////
7366 -->
7367
7368 <enumerator
7369 name="ISnapshotEnumerator" type="ISnapshot"
7370 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7371 />
7372
7373 <collection
7374 name="ISnapshotCollection" type="ISnapshot"
7375 enumerator="ISnapshotEnumerator"
7376 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7377 readonly="yes"
7378 />
7379
7380 <interface
7381 name="ISnapshot" extends="$unknown"
7382 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7383 wsmap="managed"
7384 >
7385 <desc>
7386 The ISnapshot interface represents a snapshot of the virtual
7387 machine.
7388
7389 The <i>snapshot</i> stores all the information about a virtual
7390 machine necessary to bring it to exactly the same state as it was at
7391 the time of taking the snapshot. The snapshot includes:
7392
7393 <ul>
7394 <li>all settings of the virtual machine (i.e. its hardware
7395 configuration: RAM size, attached hard disks, etc.)
7396 </li>
7397 <li>the execution state of the virtual machine (memory contents,
7398 CPU state, etc.).
7399 </li>
7400 </ul>
7401
7402 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7403 or <i>online</i> (taken when the VM is running). The execution
7404 state of the offline snapshot is called a <i>zero execution state</i>
7405 (it doesn't actually contain any information about memory contents
7406 or the CPU state, assuming that all hardware is just powered off).
7407
7408 <h3>Snapshot branches</h3>
7409
7410 Snapshots can be chained. Chained snapshots form a branch where
7411 every next snapshot is based on the previous one. This chaining is
7412 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7413 description). This means that every time a new snapshot is created,
7414 a new differencing hard disk is implicitly created for all normal
7415 hard disks attached to the given virtual machine. This allows to
7416 fully restore hard disk contents when the machine is later reverted
7417 to a particular snapshot.
7418
7419 In the current implementation, multiple snapshot branches within one
7420 virtual machine are not allowed. Every machine has a single branch,
7421 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7422 snapshot to the top of that branch.
7423
7424 Existing snapshots can be discarded using
7425 <link to="IConsole::discardSnapshot()"/>.
7426
7427 <h3>Current snapshot</h3>
7428
7429 Every virtual machine has a current snapshot, identified by
7430 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7431 a base for the <i>current machine state</i> (see below), to the effect
7432 that all normal hard disks of the machine and its execution
7433 state are based on this snapshot.
7434
7435 In the current implementation, the current snapshot is always the
7436 last taken snapshot (i.e. the head snapshot on the branch) and it
7437 cannot be changed.
7438
7439 The current snapshot is <tt>null</tt> if the machine doesn't have
7440 snapshots at all; in this case the current machine state is just
7441 current settings of this machine plus its current execution state.
7442
7443 <h3>Current machine state</h3>
7444
7445 The current machine state is what represented by IMachine instances got
7446 directly from IVirtualBox
7447 using <link
7448 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7449 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7450 to instances returned by <link to="ISnapshot::machine"/>). This state
7451 is always used when the machine is <link to="IConsole::powerUp"> powered
7452 on</link>.
7453
7454 The current machine state also includes the current execution state.
7455 If the machine is being currently executed
7456 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7457 and above), its execution state is just what's happening now.
7458 If it is powered off (<link to="MachineState_PoweredOff"/> or
7459 <link to="MachineState_Aborted"/>), it has a zero execution state.
7460 If the machine is saved (<link to="MachineState_Saved"/>), its
7461 execution state is what saved in the execution state file
7462 (<link to="IMachine::stateFilePath"/>).
7463
7464 If the machine is in the saved state, then, next time it is powered
7465 on, its execution state will be fully restored from the saved state
7466 file and the execution will continue from the point where the state
7467 was saved.
7468
7469 Similarly to snapshots, the current machine state can be discarded
7470 using <link to="IConsole::discardCurrentState()"/>.
7471
7472 <h3>Taking and discarding snapshots</h3>
7473
7474 The table below briefly explains the meaning of every snapshot
7475 operation:
7476
7477 <table>
7478 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7479
7480 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7481
7482 <td>Save the current state of the virtual machine, including all
7483 settings, contents of normal hard disks and the current modifications
7484 to immutable hard disks (for online snapshots)</td>
7485
7486 <td>The current state is not changed (the machine will continue
7487 execution if it is being executed when the snapshot is
7488 taken)</td></tr>
7489
7490 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7491
7492 <td>Forget the state of the virtual machine stored in the snapshot:
7493 dismiss all saved settings and delete the saved execution state (for
7494 online snapshots)</td>
7495
7496 <td>Other snapshots (including child snapshots, if any) and the
7497 current state are not directly affected</td></tr>
7498
7499 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7500
7501 <td>Restore the current state of the virtual machine from the state
7502 stored in the current snapshot, including all settings and hard disk
7503 contents</td>
7504
7505 <td>The current state of the machine existed prior to this operation
7506 is lost</td></tr>
7507
7508 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7509
7510 <td>Completely revert the virtual machine to the state it was in
7511 before the current snapshot has been taken</td>
7512
7513 <td>The current state, as well as the current snapshot, are
7514 lost</td></tr>
7515
7516 </table>
7517
7518 </desc>
7519
7520 <attribute name="id" type="uuid" readonly="yes">
7521 <desc>UUID of the snapshot.</desc>
7522 </attribute>
7523
7524 <attribute name="name" type="wstring">
7525 <desc>Short name of the snapshot.</desc>
7526 </attribute>
7527
7528 <attribute name="description" type="wstring">
7529 <desc>Optional description of the snapshot.</desc>
7530 </attribute>
7531
7532 <attribute name="timeStamp" type="long long" readonly="yes">
7533 <desc>
7534 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7535 </desc>
7536 </attribute>
7537
7538 <attribute name="online" type="boolean" readonly="yes">
7539 <desc>
7540 <tt>true</tt> if this snapshot is an online snapshot and
7541 <tt>false</tt> otherwise.
7542
7543 <note>
7544 When this attribute is <tt>true</tt>, the
7545 <link to="IMachine::stateFilePath"/> attribute of the
7546 <link to="#machine"/> object associated with this snapshot
7547 will point to the saved state file. Otherwise, it will be
7548 <tt>null</tt>.
7549 </note>
7550 </desc>
7551 </attribute>
7552
7553 <attribute name="machine" type="IMachine" readonly="yes">
7554 <desc>
7555 Virtual machine this snapshot is taken on. This object
7556 stores all settings the machine had when taking this snapshot.
7557 <note>
7558 The returned machine object is immutable, i.e. no
7559 any settings can be changed.
7560 </note>
7561 </desc>
7562 </attribute>
7563
7564 <attribute name="parent" type="ISnapshot" readonly="yes">
7565 <desc>
7566 Parent snapshot (a snapshot this one is based on).
7567 <note>
7568 It's not an error to read this attribute on a snapshot
7569 that doesn't have a parent -- a null object will be
7570 returned to indicate this.
7571 </note>
7572 </desc>
7573 </attribute>
7574
7575 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7576 <desc>
7577 Child snapshots (all snapshots having this one as a parent).
7578 <note>
7579 In the current implementation, there can be only one
7580 child snapshot, or no children at all, meaning this is the
7581 last (head) snapshot.
7582 </note>
7583 </desc>
7584 </attribute>
7585
7586 </interface>
7587
7588
7589 <!--
7590 // IMedia
7591 /////////////////////////////////////////////////////////////////////////
7592 -->
7593
7594 <enum
7595 name="MediaState"
7596 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7597 >
7598 <desc>
7599 Virtual media state.
7600 <see>IMedia</see>
7601 </desc>
7602
7603 <const name="NotCreated" value="0">
7604 <desc>
7605 Associated media storage does not exist (either was not created yet or
7606 was deleted).
7607 </desc>
7608 </const>
7609 <const name="Created" value="1">
7610 <desc>
7611 Associated storage exists and accessible.
7612 </desc>
7613 </const>
7614 <const name="LockedRead" value="2">
7615 <desc>
7616 Media is locked for reading, no data modification is possible.
7617 </desc>
7618 </const>
7619 <const name="LockedWrite" value="3">
7620 <desc>
7621 Media is locked for writing, no concurrent data reading or modification
7622 is possible.
7623 </desc>
7624 </const>
7625 <const name="Inaccessible" value="4">
7626 <desc>
7627 Associated media storage is not accessible.
7628 </desc>
7629 </const>
7630 <const name="Creating" value="5">
7631 <desc>
7632 Associated media storage is being created.
7633 </desc>
7634 </const>
7635 <const name="Deleting" value="6">
7636 <desc>
7637 Associated media storage is being deleted.
7638 </desc>
7639 </const>
7640 </enum>
7641
7642 <interface
7643 name="IMedium" extends="$unknown"
7644 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7645 wsmap="managed"
7646 >
7647 <desc>
7648 The IMedium interface is a common interface for all objects representing
7649 virtual media such as hard disks, DVD images.
7650
7651 Each medium is associated with a storage unit (such as a file on the host
7652 computer or a network resource) that holds actual data. The location of
7653 the storage unit is represented by the #location attribute. The value of
7654 this attribute is media type dependent.
7655
7656 The exact media type may be determined by querying the appropriate
7657 interface such as:
7658 <ul>
7659 <li>IHardDisk2 (virtual hard disks)</li>
7660 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7661 <li>IFloppyImage2 (raw floppy image files)</li>
7662 </ul>
7663
7664 Existing media are opened using the following methods, depending on the
7665 media type:
7666 <ul>
7667 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7668 <li><link to="IVirtualBox::openDVDImage()"/></li>
7669 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7670 </ul>
7671
7672 New hard disk media are created using the
7673 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7674 images are created outside VirtualBox, usually by storing a copy
7675 of the real medium of the corresponding type in a regular file.
7676
7677 <h3>Known Media</h3>
7678
7679 When an existing medium gets opened for the first time, it gets
7680 automatically remembered by the given VirtualBox installation or, in other
7681 words, becomes a <i>known medium</i>. Known media are stored in the media
7682 registry transparently maintained by VirtualBox and stored in settings
7683 files so that this registry is preserved when VirtualBox is not running.
7684
7685 Newly created virtual hard disks get remembered only when the associated
7686 storage unit is actually created (see IHardDisk2 for more details).
7687
7688 All known media can be enumerated using
7689 <link to="IVirtualBox::hardDisks2"/>,
7690 <link to="IVirtualBox::DVDImages"/> and
7691 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7692 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7693 and similar methods or by location using
7694 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7695
7696 Only known media can be attached to virtual machines.
7697
7698 Removing known media from the media registry is performed when the given
7699 medium is closed using the <link to="#close()"/> method or when its
7700 associated storage unit is deleted (only for hard disks).
7701
7702 <h3>Accessibility Checks</h3>
7703
7704 The given medium (with the created storage unit) is considered to be
7705 <i>accessible</i> when its storage unit can be successfully read from.
7706 Accessible media are indicated by the <link to="MediaState_Created"/>
7707 value of the <link to="#state"/> attribute. When the storage unit cannot
7708 be read (for example, because it is located on a disconnected network
7709 resource, or was accidentally deleted outside VirtualBox), the medium is
7710 considered to be <i>inaccessible</i> which is indicated by the
7711 <link to="MediaState_Inaccessible"/> state. The details about the reason
7712 of being inaccessible can be obtained using the
7713 <link to="#lastAccessError"/> attribute.
7714
7715 A new accessibility check is performed each time the <link to="#state"/>
7716 attribute is read. Please note that this check may take long time (several
7717 seconds or even minutes, depending on the storage unit location and
7718 format), and will block the calling thread until finished. For this
7719 reason, it is recommended to never read this attribute on the main UI
7720 thread to avoid making the UI unresponsive.
7721
7722 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7723 created for the first time), all known media are in the
7724 <link to="MediaState_Inaccessible"/> state but the value of the <link
7725 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7726 accessibility check is made on startup. This is done to make the
7727 VirtualBox object ready for serving requests as
7728 fast as possible and let the end-user application decide if it needs to
7729 check media accessibility right away or not.
7730 </desc>
7731
7732 <attribute name="id" type="uuid" readonly="yes">
7733 <desc>
7734 UUID of the medium. For a newly created medium, this value is a randomly
7735 generated UUID.
7736
7737 <note>
7738 For media in one of MediaState_NotCreated, MediaState_Creating or
7739 MediaState_Deleting states, the value of this property is undefined
7740 and will most likely be an empty UUID.
7741 </note>
7742 </desc>
7743 </attribute>
7744
7745 <attribute name="description" type="wstring">
7746 <desc>
7747 Optional description of the medium. For newly created media, the value
7748 of this attribute value is <tt>null</tt>.
7749
7750 Media types that don't support this attribute will return E_NOTIMPL in
7751 attempt to get or set this attribute's value.
7752
7753 <note>
7754 For some storage types, reading this attribute may return an outdated
7755 (last known) value when <link to="#state"/> is <link
7756 to="MediaState_Inaccessible"/> or <link
7757 to="MediaState_LockedWrite"/> because the value of this attribute is
7758 stored within the storage unit itself. Also note that changing the
7759 attribute value is not possible in such case, as well as when the
7760 medium is the <link to="MediaState_LockedRead"/> state.
7761 </note>
7762 </desc>
7763 </attribute>
7764
7765 <attribute name="state" type="MediaState" readonly="yes">
7766 <desc>
7767 Current media state. Inspect <link to="MediaState"/> values for details.
7768
7769 Reading this attribute may take long time because a new accessibility
7770 check of the storage unit is performed every time the attribute is read.
7771 This check may cause a significant delay if the storage unit of the
7772 given medium is, for example, a file located on a network share which is
7773 not currently accessible due to connectivity problems -- the call will
7774 not return until a timeout interval defined by the host OS for this
7775 operation expires.
7776
7777 If the last known state of the medium is <link to="MediaState_Created"/>
7778 and the accessibility check fails then the state would be set to
7779 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7780 may be used to get more details about the failure. If the state of the
7781 medium is <link to="MediaState_LockedRead"/> or
7782 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7783 non-null value of <link to="#lastAccessError"/> will indicate a failed
7784 accessibility check in this case.
7785
7786 Note that not all media states are applicable to certain media types.
7787 For example, states <link to="MediaState_NotCreated"/>,
7788 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7789 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7790 IFloppyImage2 media.
7791 </desc>
7792 </attribute>
7793
7794 <attribute name="location" type="wstring">
7795 <desc>
7796 Location of the storage unit holding media data.
7797
7798 The format of the location string is media type specific. For media
7799 types that use regular files in a host's file system, the location
7800 string is just a full file name.
7801
7802 Some media types may support changing the storage unit location by
7803 simply changing the value of this property. If this operation is not
7804 supported, the implementation will return E_NOTIMPL in attempt to set
7805 this attribute's value.
7806
7807 When setting a value of the location attribute which is a regular file
7808 in the host's file system, the given file name may be either relative to
7809 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7810 absolute. Note that if the given location specification does not contain
7811 the file extension part then a proper default extension will be
7812 automatically appended by the implementation depending on the media type.
7813 </desc>
7814 </attribute>
7815
7816 <attribute name="name" type="wstring" readonly="yes">
7817 <desc>
7818 Name of the storage unit holding media data.
7819
7820 The returned string is a short version of the <link to="#location"/>
7821 attribute that is suitable for representing the medium in situations
7822 where the full location specification is too long (such as lists
7823 and comboboxes in GUI frontends). This string is also used by frontends
7824 to sort the media list alphabetically when needed.
7825
7826 For example, for locations that are regular files in the host's file
7827 system, the value of this attribute is just a file name (+ extension),
7828 without the path specification.
7829
7830 Note that as opposed to the <link to="#location"/> attribute, the name
7831 attribute will not necessary be unique for a list of media of the
7832 given type and format.
7833 </desc>
7834 </attribute>
7835
7836 <attribute name="size" type="unsigned long long" readonly="yes">
7837 <desc>
7838 Physical size of the storage unit used to hold media data (in bytes).
7839
7840 <note>
7841 For media whose <link to="#state"/> is <link
7842 to="MediaState_Inaccessible"/>, the value of this property is the
7843 last known size. For <link to="MediaState_NotCreated"/> media,
7844 the returned value is zero.
7845 </note>
7846 </desc>
7847 </attribute>
7848
7849 <attribute name="lastAccessError" type="wstring" readonly="yes">
7850 <desc>
7851 Text message that represents the result of the last accessibility
7852 check.
7853
7854 Accessibility checks are performed each time the <link to="#state"/>
7855 attribute is read. A @c null string is returned if the last
7856 accessibility check was successful. A non-null string indicates a
7857 failure and should normally describe a reason of the failure (for
7858 example, a file read error).
7859 </desc>
7860 </attribute>
7861
7862 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7863 <desc>
7864 Array of UUIDs of all machines this medium is attached to.
7865
7866 A <tt>null</tt> array is returned if this medium is not attached to any
7867 machine or to any machine's snapshot.
7868
7869 <note>
7870 The returned array will include a machine even if this medium is not
7871 attached to that machine in the current state but attached to it in
7872 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7873 details.
7874 </note>
7875 </desc>
7876 </attribute>
7877
7878 <method name="getSnapshotIds">
7879 <desc>
7880 Returns an array of UUIDs of all snapshots of the given machine where
7881 this medium is attached to it.
7882
7883 If the medium is attached to the machine in the current state, then the
7884 first element in the array will always be the ID of the queried machine
7885 (i.e. the value equal to the @c machineId argument), followed by
7886 snapshot IDs (if any).
7887
7888 If the medium is not attached to the machine in the current state, then
7889 the array will contain only snapshot IDs.
7890
7891 The returned array may be <tt>null</tt> if this medium is not attached
7892 to the given machine at all, neither in the current state nor in one of
7893 snapshots.
7894 </desc>
7895 <param name="machineId" type="uuid" dir="in">
7896 <desc>
7897 UUID of the machine to query.
7898 </desc>
7899 </param>
7900 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7901 <desc>
7902 Array of snapshot UUIDs of the given machine using this medium.
7903 </desc>
7904 </param>
7905 </method>
7906
7907 <method name="lockRead">
7908 <desc>
7909 Locks this medium for reading.
7910
7911 The read lock is shared: many clients can simultaneously lock the
7912 same media for reading unless it is already locked for writing (see
7913 <link to="#lockWrite()"/>) in which case an error is returned.
7914
7915 When the medium is locked for reading, it cannot be modified
7916 from within VirtualBox. This means that any method that changes
7917 the properties of this medium or contents of the storage unit
7918 will return an error (unless explicitly stated otherwise) and
7919 that an attempt to start a virtual machine that wants to modify
7920 the medium will also fail.
7921
7922 When the virtual machine is started up, it locks for reading all
7923 media it uses in read-only mode. If some media cannot be locked
7924 for reading, the startup procedure will fail.
7925
7926 The medium locked for reading must be unlocked using the <link
7927 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7928 can be nested and must be followed by the same number of paired
7929 <link to="#unlockRead()"/> calls.
7930
7931 This method sets the media state to <link
7932 to="MediaState_LockedRead"/> on success. The state prior to
7933 this call must be <link to="MediaState_Created"/>, <link
7934 to="MediaState_Inaccessible"/> or <link
7935 to="MediaState_LockedRead"/>. As you can see, inaccessible
7936 media can be locked too. This is not an error; this method
7937 performs a logical lock that prevents modifications of this
7938 media through the VirtualBox API, not a physical lock of the
7939 underlying storage unit.
7940
7941 This method returns the current state of the medium
7942 <b>before</b> the operation.
7943
7944 <result name="VBOX_E_INVALID_OBJECT_STATE">
7945 Invalid media state (e.g. not created, locked, inaccessible,
7946 creating, deleting).
7947 </result>
7948
7949 </desc>
7950 <param name="state" type="MediaState" dir="return">
7951 <desc>
7952 State of the medium after the operation.
7953 </desc>
7954 </param>
7955 </method>
7956
7957 <method name="unlockRead">
7958 <desc>
7959 Cancels the read lock previously set by <link to="#lockRead()"/>.
7960
7961 Either on success or on failure, this method returns the current state
7962 of the medium <b>after</b> the operation.
7963
7964 See <link to="#lockRead()"/> for more details.
7965
7966 <result name="VBOX_E_INVALID_OBJECT_STATE">
7967 Medium not locked for reading.
7968 </result>
7969
7970 </desc>
7971 <param name="state" type="MediaState" dir="return">
7972 <desc>
7973 State of the medium after the operation.
7974 </desc>
7975 </param>
7976 </method>
7977
7978 <method name="lockWrite">
7979 <desc>
7980 Locks this medium for writing.
7981
7982 The write lock, as opposed to <link to="#lockRead()"/>, is
7983 exclusive: there may be only one client that holds a write lock
7984 and there may be no read locks while the write lock is held.
7985
7986 When the medium is locked for writing, it cannot be modified
7987 from within VirtualBox and it is not guaranteed that the values
7988 of its properties are up-to-date. Any method that changes the
7989 properties of this medium or contents of the storage unit will
7990 return an error ((unless explicitly stated otherwise) and an
7991 attempt to start a virtual machine that wants to modify or to
7992 read the medium will also fail.
7993
7994 When the virtual machine is started up, it locks for writing all
7995 media it uses to write data to. If some media cannot be locked
7996 for writing, the startup procedure will fail.
7997
7998 The medium locked for writing must be unlocked using the <link
7999 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
8000 can <b>not</b> be nested and must be followed by a paired <link
8001 to="#unlockWrite()"/> call.
8002
8003 This method sets the media state to <link
8004 to="MediaState_LockedWrite"/> on success. The state prior to
8005 this call must be <link to="MediaState_Created"/> or <link
8006 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8007 media can be locked too. This is not an error; this method
8008 performs a logical lock that prevents modifications of this
8009 media through the VirtualBox API, not a physical lock of the
8010 underlying storage unit.
8011
8012 Either on success or on failure, this method returns the current
8013 state of the medium <b>before</b> the operation.
8014
8015 <result name="VBOX_E_INVALID_OBJECT_STATE">
8016 Invalid media state (e.g. not created, locked, inaccessible,
8017 creating, deleting).
8018 </result>
8019
8020 </desc>
8021 <param name="state" type="MediaState" dir="return">
8022 <desc>
8023 State of the medium after the operation.
8024 </desc>
8025 </param>
8026 </method>
8027
8028 <method name="unlockWrite">
8029 <desc>
8030 Cancels the write lock previously set by <link to="#lockWrite()"/>.
8031
8032 Either on success or on failure, this method returns the current
8033 state of the medium <b>after</b> the operation.
8034
8035 See <link to="#lockWrite()"/> for more details.
8036
8037 <result name="VBOX_E_INVALID_OBJECT_STATE">
8038 Medium not locked for writing.
8039 </result>
8040
8041 </desc>
8042 <param name="state" type="MediaState" dir="return">
8043 <desc>
8044 State of the medium after the operation.
8045 </desc>
8046 </param>
8047 </method>
8048
8049 <method name="close">
8050 <desc>
8051 Closes this medium.
8052
8053 The hard disk must not be attached to any known virtual machine
8054 and must not have any known child hard disks, otherwise the
8055 operation will fail.
8056
8057 When the hard disk is successfully closed, it gets removed from
8058 the list of remembered hard disks, but its storage unit is not
8059 deleted. In particular, this means that this hard disk can be
8060 later opened again using the <link
8061 to="IVirtualBox::openHardDisk2"/> call.
8062
8063 Note that after this method successfully returns, the given hard
8064 disk object becomes uninitialized. This means that any attempt
8065 to call any of its methods or attributes will fail with the
8066 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8067
8068 <result name="VBOX_E_INVALID_OBJECT_STATE">
8069 Invalid media state (other than not created, created or
8070 inaccessible).
8071 </result>
8072 <result name="VBOX_E_OBJECT_IN_USE">
8073 Medium attached to virtual machine.
8074 </result>
8075 <result name="VBOX_E_FILE_ERROR">
8076 Settings file not accessible.
8077 </result>
8078 <result name="VBOX_E_XML_ERROR">
8079 Could not parse the settings file.
8080 </result>
8081
8082 </desc>
8083 </method>
8084
8085 </interface>
8086
8087
8088 <!--
8089 // IHardDisk2
8090 /////////////////////////////////////////////////////////////////////////
8091 -->
8092
8093 <enum
8094 name="HardDiskType"
8095 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8096 >
8097 <desc>
8098 Virtual hard disk type.
8099 <see>IHardDisk</see>
8100 </desc>
8101
8102 <const name="Normal" value="0">
8103 <desc>
8104 Normal hard disk (attached directly or indirectly, preserved
8105 when taking snapshots).
8106 </desc>
8107 </const>
8108 <const name="Immutable" value="1">
8109 <desc>
8110 Immutable hard disk (attached indirectly, changes are wiped out
8111 after powering off the virtual machine).
8112 </desc>
8113 </const>
8114 <const name="Writethrough" value="2">
8115 <desc>
8116 Write through hard disk (attached directly, ignored when
8117 taking snapshots).
8118 </desc>
8119 </const>
8120 </enum>
8121
8122 <interface
8123 name="IHardDisk2Attachment" extends="$unknown"
8124 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8125 wsmap="struct"
8126 >
8127 <desc>
8128 The IHardDisk2Attachment interface represents a hard disk attachment of a
8129 virtual machine.
8130
8131 Every hard disk attachment specifies a slot of the virtual hard disk
8132 controller and a virtual hard disk attached to this slot.
8133
8134 The array of hard disk attachments is returned by
8135 <link to="IMachine::hardDisk2Attachments"/>.
8136
8137 <note>
8138 With the COM API, this is an interface like all the others. With the
8139 webservice, this is mapped to a structure, so querying the attribute
8140 will not return an object, but a complete structure.
8141 </note>
8142 </desc>
8143 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8144 <desc>Hard disk object associated with this attachment.</desc>
8145 </attribute>
8146
8147 <attribute name="bus" type="StorageBus" readonly="yes">
8148 <desc>Interface bus of this attachment.</desc>
8149 </attribute>
8150
8151 <attribute name="channel" type="long" readonly="yes">
8152 <desc>Channel number of this attachment.</desc>
8153 </attribute>
8154
8155 <attribute name="device" type="long" readonly="yes">
8156 <desc>Device slot number of this attachment.</desc>
8157 </attribute>
8158
8159 </interface>
8160
8161 <interface
8162 name="IHardDisk2" extends="IMedium"
8163 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8164 wsmap="managed"
8165 >
8166 <desc>
8167 The IHardDisk2 interface represents a virtual hard disk drive
8168 used by a virtual machine.
8169
8170 Virtual hard disk objects virtualize the hard disk hardware and look like
8171 regular hard disks for the guest OS running inside the virtual machine.
8172
8173 <h3>Hard Disk Types</h3>
8174
8175 There are three types of hard disks:
8176 <link to="HardDiskType_Normal">Normal</link>,
8177 <link to="HardDiskType_Immutable">Immutable</link> and
8178 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8179 hard disk defines how the hard disk is attached to a virtual machine and
8180 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8181 machine with the attached hard disk is taken. The type of the hard disk is
8182 defined by the <link to="#type"/> attribute.
8183
8184 All hard disks can be also divided in two big groups: <i>base</i> hard
8185 disks and <i>differencing</i> hard disks. A base hard disk contains all
8186 sectors of the hard disk data in its storage unit and therefore can be
8187 used independently. On the contrary, a differencing hard disk contains
8188 only some part of the hard disk data (a subset of sectors) and needs
8189 another hard disk to get access to the missing sectors of data. This
8190 another hard disk is called a <i>parent</i> hard disk and defines a hard
8191 disk to which this differencing hard disk is known to be <i>linked to</i>.
8192 The parent hard disk may be itself a differencing hard disk. This
8193 way, differencing hard disks form a linked hard disk chain. This chain
8194 always ends with the base hard disk which is sometimes referred to as the
8195 root hard disk of this chain. Note that several differencing hard disks
8196 may be linked to the same parent hard disk. This way, all known hard disks
8197 form a hard disk tree which is based on their parent-child relationship.
8198
8199 Differencing hard disks can be distinguished from base hard disks by
8200 querying the <link to="#parent"/> attribute: base hard disks do not have
8201 parents they would depend on, so the value of this attribute is always
8202 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8203 the hard disk tree (from the child hard disk to its parent). It is also
8204 possible to walk down the tree using the <link to="#children"/>
8205 attribute.
8206
8207 Note that the type of all differencing hard disks is
8208 <link to="HardDiskType_Normal">Normal</link>; all other values are
8209 meaningless for them. Base hard disks may be of any type.
8210
8211 <h3>Creating Hard Disks</h3>
8212
8213 New base hard disks are created using
8214 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8215 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8216 disks are usually implicitly created by VirtualBox when needed but may
8217 also be created explicitly using <link to="#createDiffStorage()"/>.
8218
8219 After the hard disk is successfully created (including the storage unit)
8220 or opened, it becomes a known hard disk (remembered in the internal media
8221 registry). Known hard disks can be attached to a virtual machine, accessed
8222 through <link to="IVirtualBox::getHardDisk2()"/> and
8223 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8224 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8225
8226 The following methods, besides <link to="IMedium::close()"/>,
8227 automatically remove the hard disk from the media registry:
8228 <ul>
8229 <li><link to="#deleteStorage()"/></li>
8230 <li><link to="#mergeTo()"/></li>
8231 </ul>
8232
8233 If the storage unit of the hard disk is a regular file in the host's
8234 file system then the rules stated in the description of the
8235 <link to="IMedium::location"/> attribute apply when setting its value. In
8236 addition, a plain file name without any path may be given, in which case
8237 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8238 folder</link> will be prepended to it.
8239
8240 <h4>Automatic composition of the file name part</h4>
8241
8242 Another extension to the <link to="IMedium::location"/> attribute is that
8243 there is a possibility to cause VirtualBox to compose a unique value for
8244 the file name part of the location using the UUID of the hard disk. This
8245 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8246 e.g. before the storage unit is created, and works as follows. You set the
8247 value of the <link to="IMedium::location"/> attribute to a location
8248 specification which only contains the path specification but not the file
8249 name part and ends with either a forward slash or a backslash character.
8250 In response, VirtualBox will generate a new UUID for the hard disk and
8251 compose the file name using the following pattern:
8252 <pre>
8253 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8254 </pre>
8255 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8256 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8257 is the default extension for the storage format of this hard disk. After
8258 that, you may call any of the methods that create a new hard disk storage
8259 unit and they will use the generated UUID and file name.
8260
8261 <h3>Attaching Hard Disks</h3>
8262
8263 Hard disks are attached to virtual machines using the
8264 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8265 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8266 <link to="#type"/>, hard disks are attached either
8267 <i>directly</i> or <i>indirectly</i>.
8268
8269 When a hard disk is being attached directly, it is associated with the
8270 virtual machine and used for hard disk operations when the machine is
8271 running. When a hard disk is being attached indirectly, a new differencing
8272 hard disk linked to it is implicitly created and this differencing hard
8273 disk is associated with the machine and used for hard disk operations.
8274 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8275 a direct attachment then the same hard disk will be returned in response
8276 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8277 an indirect attachment is performed then
8278 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8279 differencing hard disk, not the original one passed to <link
8280 to="IMachine::attachHardDisk2()"/>. The following table shows the
8281 dependency of the attachment type on the hard disk type:
8282
8283 <table>
8284 <tr>
8285 <th>Hard Disk Type</th>
8286 <th>Direct or Indirect?</th>
8287 </tr>
8288 <tr>
8289 <td>Normal (Base)</td>
8290 <td>
8291 Normal base hard disks that do not have children (i.e. differencing
8292 hard disks linked to them) and that are not already attached to
8293 virtual machines in snapshots are attached <b>directly</b>.
8294 Otherwise, they are attached <b>indirectly</b> because having
8295 dependent children or being part of the snapshot makes it impossible
8296 to modify hard disk contents without breaking the integrity of the
8297 dependent party. The <link to="#readOnly"/> attribute allows to
8298 quickly determine the kind of the attachment for the given hard
8299 disk. Note that if a normal base hard disk is to be indirectly
8300 attached to a virtual machine with snapshots then a special
8301 procedure called <i>smart attachment</i> is performed (see below).
8302 </td>
8303 </tr>
8304 <tr>
8305 <td>Normal (Differencing)</td>
8306 <td>
8307 Differencing hard disks are like normal base hard disks: attached
8308 <b>directly</b> if they do not have children and are not attached to
8309 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8310 that the smart attachment procedure is never performed for
8311 differencing hard disks.
8312 </td>
8313 </tr>
8314 <tr>
8315 <td>Immutable</td>
8316 <td>
8317 Immutable hard disks are always attached <b>indirectly</b> because
8318 they are designed to be non-writable. If an immutable hard disk is
8319 attached to a virtual machine with snapshots then a special
8320 procedure called smart attachment is performed (see below).
8321 </td>
8322 </tr>
8323 <tr>
8324 <td>Writethrough</td>
8325 <td>
8326 Writethrough hard disks are always attached <b>directly</b>, also as
8327 designed. This also means that writethrough hard disks cannot have
8328 other hard disks linked to them at all.
8329 </td>
8330 </tr>
8331 </table>
8332
8333 Note that the same hard disk, regardless of its type, may be attached to
8334 more than one virtual machine at a time. In this case, the machine that is
8335 started first gains exclusive access to the hard disk and attempts to
8336 start other machines having this hard disk attached will fail until the
8337 first machine is powered down.
8338
8339 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8340 that the given hard disk remains associated with the given machine after a
8341 successful <link to="IMachine::detachHardDisk2()"/> call until
8342 <link to="IMachine::saveSettings()"/> is called to save all changes to
8343 machine settings to disk. This deferring is necessary to guarantee that
8344 the hard disk configuration may be restored at any time by a call to
8345 <link to="IMachine::discardSettings()"/> before the settings
8346 are saved (committed).
8347
8348 Note that if <link to="IMachine::discardSettings()"/> is called after
8349 indirectly attaching some hard disks to the machine but before a call to
8350 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8351 all differencing hard disks implicitly created by
8352 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8353 Such implicitly created hard disks will also be immediately deleted when
8354 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8355 call if it is made before <link to="IMachine::saveSettings()"/>. This
8356 implicit deletion is safe because newly created differencing hard
8357 disks do not contain any user data.
8358
8359 However, keep in mind that detaching differencing hard disks that were
8360 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8361 before the last <link to="IMachine::saveSettings()"/> call will
8362 <b>not</b> implicitly delete them as they may already contain some data
8363 (for example, as a result of virtual machine execution). If these hard
8364 disks are no more necessary, the caller can always delete them explicitly
8365 using <link to="#deleteStorage()"/> after they are actually de-associated
8366 from this machine by the <link to="IMachine::saveSettings()"/> call.
8367
8368 <h3>Smart Attachment</h3>
8369
8370 When normal base or immutable hard disks are indirectly attached to a
8371 virtual machine then some additional steps are performed to make sure the
8372 virtual machine will have the most recent "view" of the hard disk being
8373 attached. These steps include walking through the machine's snapshots
8374 starting from the current one and going through ancestors up to the first
8375 snapshot. Hard disks attached to the virtual machine in all
8376 of the encountered snapshots are checked whether they are descendants of
8377 the given normal base or immutable hard disk. The first found child (which
8378 is the differencing hard disk) will be used instead of the normal base or
8379 immutable hard disk as a parent for creating a new differencing hard disk
8380 that will be actually attached to the machine. And only if no descendants
8381 are found or if the virtual machine does not have any snapshots then the
8382 normal base or immutable hard disk will be used itself as a parent for
8383 this differencing hard disk.
8384
8385 It is easier to explain what smart attachment does using the
8386 following example:
8387 <pre>
8388BEFORE attaching B.vdi: AFTER attaching B.vdi:
8389
8390Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8391 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8392 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8393 Snapshot 4 (none) Snapshot 4 (none)
8394 CurState (none) CurState (D3->D2.vdi)
8395
8396 NOT
8397 ...
8398 CurState (D3->B.vdi)
8399 </pre>
8400 The first column is the virtual machine configuration before the base hard
8401 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8402 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8403 mean that the hard disk that is actually attached to the machine is a
8404 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8405 another hard disk, <tt>B.vdi</tt>.
8406
8407 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8408 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8409 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8410 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8411 it cannot be attached directly and needs an indirect attachment (i.e.
8412 implicit creation of a new differencing hard disk). Due to the smart
8413 attachment procedure, the new differencing hard disk
8414 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8415 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8416 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8417 machine.
8418
8419 Note that if there is more than one descendant hard disk of the given base
8420 hard disk found in a snapshot, and there is an exact device, channel and
8421 bus match, then this exact match will be used. Otherwise, the youngest
8422 descendant will be picked up.
8423
8424 There is one more important aspect of the smart attachment procedure which
8425 is not related to snapshots at all. Before walking through the snapshots
8426 as described above, the backup copy of the current list of hard disk
8427 attachment is searched for descendants. This backup copy is created when
8428 the hard disk configuration is changed for the first time after the last
8429 <link to="IMachine::saveSettings()"/> call and used by
8430 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8431 changes. When such a descendant is found in this backup copy, it will be
8432 simply re-attached back, without creating a new differencing hard disk for
8433 it. This optimization is necessary to make it possible to re-attach the
8434 base or immutable hard disk to a different bus, channel or device slot
8435 without losing the contents of the differencing hard disk actually
8436 attached to the machine in place of it.
8437 </desc>
8438
8439 <attribute name="format" type="wstring" readonly="yes">
8440 <desc>
8441 Storage format of this hard disk.
8442
8443 The value of this attribute is a string that specifies a backend used to
8444 store hard disk data. The storage format is defined when you create a
8445 new hard disk or automatically detected when you open an existing hard
8446 disk medium, and cannot be changed later.
8447
8448 The list of all storage formats supported by this VirtualBox
8449 installation can be obtained using
8450 <link to="ISystemProperties::hardDiskFormats"/>.
8451 </desc>
8452 </attribute>
8453
8454 <attribute name="type" type="HardDiskType">
8455 <desc>
8456 Type (role) of this hard disk.
8457
8458 The following constraints apply when changing the value of this
8459 attribute:
8460 <ul>
8461 <li>If a hard disk is attached to a virtual machine (either in the
8462 current state or in one of the snapshots), its type cannot be
8463 changed.
8464 </li>
8465 <li>As long as the hard disk has children, its type cannot be set
8466 to <link to="HardDiskType_Writethrough"/>.
8467 </li>
8468 <li>The type of all differencing hard disks is
8469 <link to="HardDiskType_Normal"/> and cannot be changed.
8470 </li>
8471 </ul>
8472
8473 The type of a newly created or opened hard disk is set to
8474 <link to="HardDiskType_Normal"/>.
8475 </desc>
8476 </attribute>
8477
8478 <attribute name="parent" type="IHardDisk2" readonly="yes">
8479 <desc>
8480 Parent of this hard disk (a hard disk this hard disk is directly based
8481 on).
8482
8483 Only differencing hard disks have parents. For base (non-differencing)
8484 hard disks, <tt>null</tt> is returned.
8485 </desc>
8486 </attribute>
8487
8488 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8489 <desc>
8490 Children of this hard disk (all differencing hard disks directly based
8491 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8492 does not have any children.
8493 </desc>
8494 </attribute>
8495
8496 <attribute name="root" type="IHardDisk2" readonly="yes">
8497 <desc>
8498 Root hard disk of this hard disk.
8499
8500 If this is a differencing hard disk, its root hard disk is the base hard
8501 disk the given hard disk branch starts from. For all other types of hard
8502 disks, this property returns the hard disk object itself (i.e. the same
8503 object this property is read on).
8504 </desc>
8505 </attribute>
8506
8507 <attribute name="readOnly" type="boolean" readonly="yes">
8508 <desc>
8509 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8510 otherwise.
8511
8512 A hard disk is considered to be read-only when its contents cannot be
8513 modified without breaking the integrity of other parties that depend on
8514 this hard disk such as its child hard disks or snapshots of virtual
8515 machines where this hard disk is attached to these machines. If there
8516 are no children and no such snapshots then there is no dependency and
8517 the hard disk is not read-only.
8518
8519 The value of this attribute can be used to determine the kind of the
8520 attachment that will take place when attaching this hard disk to a
8521 virtual machine. If the value is <tt>false</tt> then the hard disk will
8522 be attached directly. If the value is <tt>true</tt> then the hard disk
8523 will be attached indirectly by creating a new differencing child hard
8524 disk for that. See the interface description for more information.
8525
8526 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8527 disks are always read-only while all
8528 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8529 always not.
8530
8531 <note>
8532 The read-only condition represented by this attribute is related to
8533 the hard disk type and usage, not to the current
8534 <link to="IMedium::state">media state</link> and not to the read-only
8535 state of the storage unit.
8536 </note>
8537 </desc>
8538 </attribute>
8539
8540 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8541 <desc>
8542 Logical size of this hard disk (in megabytes), as reported to the
8543 guest OS running inside the virtual machine this disk is
8544 attached to. The logical size is defined when the hard disk is created
8545 and cannot be changed later.
8546
8547 <note>
8548 Reading this property on a differencing hard disk will return the size
8549 of its <link to="#root"/> hard disk.
8550 </note>
8551 <note>
8552 For hard disks whose state is <link to="#state"/> is <link
8553 to="MediaState_Inaccessible"/>, the value of this property is the
8554 last known logical size. For <link to="MediaState_NotCreated"/> hard
8555 disks, the returned value is zero.
8556 </note>
8557 </desc>
8558 </attribute>
8559
8560 <!-- storage methods -->
8561
8562 <method name="getProperty">
8563 <desc>
8564 Returns the value of the custom hard disk property with the given name.
8565
8566 The list of all properties supported by the given hard disk format can
8567 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8568
8569 Note that if this method returns a <tt>null</tt> @a value, the requested
8570 property is supported but currently not assigned any value.
8571
8572 <result name="VBOX_E_OBJECT_NOT_FOUND">
8573 Requested property does not exist (not supported by the format).
8574 </result>
8575 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8576 </desc>
8577 <param name="name" type="wstring" dir="in">
8578 <desc>Name of the property to get.</desc>
8579 </param>
8580 <param name="value" type="wstring" dir="return">
8581 <desc>Current property value.</desc>
8582 </param>
8583 </method>
8584
8585 <method name="setProperty">
8586 <desc>
8587 Sets the value of the custom hard disk property with the given name.
8588
8589 The list of all properties supported by the given hard disk format can
8590 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8591
8592 Note that setting the property value to <tt>null</tt> is equivalent to
8593 deleting the existing value. A default value (if it is defined for this
8594 property) will be used by the format backend in this case.
8595
8596 <result name="VBOX_E_OBJECT_NOT_FOUND">
8597 Requested property does not exist (not supported by the format).
8598 </result>
8599 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8600 </desc>
8601 <param name="name" type="wstring" dir="in">
8602 <desc>Name of the property to set.</desc>
8603 </param>
8604 <param name="value" type="wstring" dir="in">
8605 <desc>Property value to set.</desc>
8606 </param>
8607 </method>
8608
8609 <method name="getProperties">
8610 <desc>
8611 Returns values for a group of properties in one call.
8612
8613 The names of the properties to get are specified using the @a names
8614 argument which is a list of comma-separated property names or
8615 <tt>null</tt> if all properties are to be returned. Note that currently
8616 the value of this argument is ignored and the method always returns all
8617 existing properties.
8618
8619 The list of all properties supported by the given hard disk format can
8620 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8621
8622 The method returns two arrays, the array of property names corresponding
8623 to the @a names argument and the current values of these properties.
8624 Both arrays have the same number of elements with each elemend at the
8625 given index in the first array corresponds to an element at the same
8626 index in the second array.
8627
8628 Note that for properties that do not have assigned values,
8629 <tt>null</tt> is returned at the appropriate index in the @a
8630 returnValues array.
8631
8632 </desc>
8633 <param name="names" type="wstring" dir="in">
8634 <desc>
8635 Names of properties to get.
8636 </desc>
8637 </param>
8638 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8639 <desc>Names of returned properties.</desc>
8640 </param>
8641 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8642 <desc>Values of returned properties.</desc>
8643 </param>
8644 </method>
8645
8646 <method name="setProperties">
8647 <desc>
8648 Sets values for a group of properties in one call.
8649
8650 The names of the properties to set are passed in the @a names
8651 array along with the new values for them in the @a values array. Both
8652 arrays have the same number of elements with each elemend at the given
8653 index in the first array corresponding to an element at the same index
8654 in the second array.
8655
8656 If there is at least one property name in @a names that is not valid,
8657 the method will fail before changing the values of any other properties
8658 from the @a names array.
8659
8660 Using this method over <link to="#setProperty()"/> is preferred if you
8661 need to set several properties at once since it will result into less
8662 IPC calls.
8663
8664 The list of all properties supported by the given hard disk format can
8665 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8666
8667 Note that setting the property value to <tt>null</tt> is equivalent to
8668 deleting the existing value. A default value (if it is defined for this
8669 property) will be used by the format backend in this case.
8670 </desc>
8671 <param name="names" type="wstring" safearray="yes" dir="in">
8672 <desc>Names of properties to set.</desc>
8673 </param>
8674 <param name="values" type="wstring" safearray="yes" dir="in">
8675 <desc>Values of properties to set.</desc>
8676 </param>
8677 </method>
8678
8679 <!-- storage methods -->
8680
8681 <method name="createDynamicStorage">
8682 <desc>
8683 Starts creating a dynamically expanding hard disk storage unit in the
8684 background. The previous storage unit created for this object, if
8685 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8686 the operation will fail.
8687
8688 Before the operation starts, the hard disk is placed in
8689 <link to="MediaState_Creating"/> state. If the create operation
8690 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8691 state.
8692
8693 After the returned progress object reports that the operation has
8694 successfully completed, the media state will be set to <link
8695 to="MediaState_Created"/>, the hard disk will be remembered by this
8696 VirtualBox installation and may be attached to virtual machines.
8697
8698 <result name="VBOX_E_NOT_SUPPORTED">
8699 Dynamic storage creation operation is not supported. See <link
8700 to="IHardDiskFormat::capabilities"/>.
8701 </result>
8702 </desc>
8703 <param name="logicalSize" type="unsigned long long" dir="in">
8704 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8705 </param>
8706 <param name="progress" type="IProgress" dir="return">
8707 <desc>Progress object to track the operation completion.</desc>
8708 </param>
8709 </method>
8710
8711 <method name="createFixedStorage">
8712 <desc>
8713 Starts creating a fixed-size hard disk storage unit in the background.
8714 The previous storage unit created for this object, if
8715 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8716 the operation will fail.
8717
8718 Before the operation starts, the hard disk is placed to
8719 <link to="MediaState_Creating"/> state. If the create operation
8720 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8721 state.
8722
8723 After the returned progress object reports that the operation is
8724 successfully complete, the media state will be set to <link
8725 to="MediaState_Created"/>, the hard disk will be remembered by this
8726 VirtualBox installation and may be attached to virtual machines.
8727
8728 <result name="VBOX_E_NOT_SUPPORTED">
8729 Fixed storage creation operation is not supported. See
8730 <link to="IHardDiskFormat::capabilities"/>.
8731 </result>
8732 </desc>
8733 <param name="logicalSize" type="unsigned long long" dir="in">
8734 <desc>Logical size of the hard disk in megabytes.</desc>
8735 </param>
8736 <param name="progress" type="IProgress" dir="return">
8737 <desc>Progress object to track the operation completion.</desc>
8738 </param>
8739 </method>
8740
8741 <method name="deleteStorage">
8742 <desc>
8743 Starts deleting the storage unit of this hard disk.
8744
8745 The hard disk must not be attached to any known virtual machine and must
8746 not have any known child hard disks, otherwise the operation will fail.
8747 It will also fail if there is no storage unit to delete or if deletion
8748 is already in progress, or if the hard disk is being in use (locked for
8749 read or for write) or inaccessible. Therefore, the only valid state for
8750 this operation to succeed is <link to="MediaState_Created"/>.
8751
8752 Before the operation starts, the hard disk is placed to
8753 <link to="MediaState_Deleting"/> state and gets removed from the list
8754 of remembered hard disks (media registry). If the delete operation
8755 fails, the media will be remembered again and placed back to
8756 <link to="MediaState_Created"/> state.
8757
8758 After the returned progress object reports that the operation is
8759 complete, the media state will be set to
8760 <link to="MediaState_NotCreated"/> and you will be able to use one of
8761 the storage creation methods to create it again.
8762
8763 <see>#close()</see>
8764
8765 <result name="VBOX_E_OBJECT_IN_USE">
8766 Hard disk is attached to a virtual machine.
8767 </result>
8768 <result name="VBOX_E_NOT_SUPPORTED">
8769 Storage deletion is not allowed because neither of storage creation
8770 operations are supported. See
8771 <link to="IHardDiskFormat::capabilities"/>.
8772 </result>
8773
8774 <note>
8775 If the deletion operation fails, it is not guaranteed that the storage
8776 unit still exists. You may check the <link to="IMedium::state"/> value
8777 to answer this question.
8778 </note>
8779 </desc>
8780 <param name="progress" type="IProgress" dir="return">
8781 <desc>Progress object to track the operation completion.</desc>
8782 </param>
8783 </method>
8784
8785 <!-- diff methods -->
8786
8787 <method name="createDiffStorage">
8788 <desc>
8789 Starts creating an empty differencing storage unit based on this hard
8790 disk in the format and at the location defined by the @a target
8791 argument.
8792
8793 The target hard disk must be in <link to="MediaState_NotCreated"/>
8794 state (i.e. must not have an existing storage unit). Upon successful
8795 completion, this operation will set the type of the target hard disk to
8796 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8797 represent the differencing hard disk data in the given format (according
8798 to the storage format of the target object).
8799
8800 After the returned progress object reports that the operation is
8801 successfully complete, the target hard disk gets remembered by this
8802 VirtualBox installation and may be attached to virtual machines.
8803
8804 <note>
8805 The hard disk will be set to <link to="MediaState_LockedRead"/>
8806 state for the duration of this operation.
8807 </note>
8808 <result name="VBOX_E_OBJECT_IN_USE">
8809 Hard disk not in NotCreated state.
8810 </result>
8811 </desc>
8812 <param name="target" type="IHardDisk2" dir="in">
8813 <desc>Target hard disk.</desc>
8814 </param>
8815 <param name="progress" type="IProgress" dir="return">
8816 <desc>Progress object to track the operation completion.</desc>
8817 </param>
8818 </method>
8819
8820 <method name="mergeTo">
8821 <desc>
8822 Starts merging the contents of this hard disk and all intermediate
8823 differencing hard disks in the chain to the given target hard disk.
8824
8825 The target hard disk must be either a descendant of this hard disk or
8826 its ancestor (otherwise this method will immediately return a failure).
8827 It follows that there are two logical directions of the merge operation:
8828 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8829 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8830 chain:
8831
8832 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8833
8834 Here, calling this method on the <tt>Base</tt> hard disk object with
8835 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8836 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8837 merge. Note that in both cases the contents of the resulting hard disk
8838 will be the same, the only difference is the hard disk object that takes
8839 the result of the merge operation. In case of the forward merge in the
8840 above example, the result will be written to <tt>Diff_2</tt>; in case of
8841 the backward merge, the result will be written to <tt>Base</tt>. In
8842 other words, the result of the operation is always stored in the target
8843 hard disk.
8844
8845 Upon successful operation completion, the storage units of all hard
8846 disks in the chain between this (source) hard disk and the target hard
8847 disk, including the source hard disk itself, will be automatically
8848 deleted and the relevant hard disk objects (including this hard disk)
8849 will become uninitialized. This means that any attempt to call any of
8850 their methods or attributes will fail with the
8851 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8852 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8853 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8854 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8855 disk itself since it will no longer be based on any other hard disk.
8856
8857 Considering the above, all of the following conditions must be met in
8858 order for the merge operation to succeed:
8859 <ul>
8860 <li>
8861 Neither this (source) hard disk nor any intermediate
8862 differencing hard disk in the chain between it and the target
8863 hard disk is attached to any virtual machine.
8864 </li>
8865 <li>
8866 Neither the source hard disk nor the target hard disk is an
8867 <link to="HardDiskType_Immutable"/> hard disk.
8868 </li>
8869 <li>
8870 The part of the hard disk tree from the source hard disk to the
8871 target hard disk is a linear chain, i.e. all hard disks in this
8872 chain have exactly one child which is the next hard disk in this
8873 chain. The only exception from this rule is the target hard disk in
8874 the forward merge operation; it is allowed to have any number of
8875 child hard disks because the merge operation will hot change its
8876 logical contents (as it is seen by the guest OS or by children).
8877 </li>
8878 <li>
8879 None of the involved hard disks are in
8880 <link to="MediaState_LockedRead"/> or
8881 <link to="MediaState_LockedWrite"/> state.
8882 </li>
8883 </ul>
8884
8885 <note>
8886 This (source) hard disk and all intermediates will be placed to <link
8887 to="MediaState_Deleting"/> state and the target hard disk will be
8888 placed to <link to="MediaState_LockedWrite"/> state and for the
8889 duration of this operation.
8890 </note>
8891 </desc>
8892 <param name="targetId" type="uuid" dir="in">
8893 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8894 </param>
8895 <param name="progress" type="IProgress" dir="return">
8896 <desc>Progress object to track the operation completion.</desc>
8897 </param>
8898 </method>
8899
8900 <!-- clone methods -->
8901
8902 <method name="cloneTo">
8903 <desc>
8904 Starts creating a clone of this hard disk in the format and at the
8905 location defined by the @a target argument.
8906
8907 The target hard disk must be in <link to="MediaState_NotCreated"/>
8908 state (i.e. must not have an existing storage unit). Upon successful
8909 completion, the cloned hard disk will contain exactly the same sector
8910 data as the hard disk being cloned, except that a new UUID for the clone
8911 will be randomly generated.
8912
8913 After the returned progress object reports that the operation is
8914 successfully complete, the target hard disk gets remembered by this
8915 VirtualBox installation and may be attached to virtual machines.
8916
8917 <note>
8918 If the cloned hard disk is a differencing hard disk, it will inherit
8919 parent dependency of the original hard disk.
8920 </note>
8921 <note>
8922 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8923 state for the duration of this operation.
8924 </note>
8925 </desc>
8926 <param name="target" type="IHardDisk2" dir="in">
8927 <desc>Target hard disk.</desc>
8928 </param>
8929 <param name="progress" type="IProgress" dir="return">
8930 <desc>Progress object to track the operation completion.</desc>
8931 </param>
8932 </method>
8933
8934 <method name="flattenTo">
8935 <desc>
8936 Starts creating a deep (independent) clone of this hard disk in the
8937 format and at the location defined by the @a target argument.
8938
8939 This operation is similar to <link to="#cloneTo()"/> except that when
8940 applied to a differencing hard disk, it will also copy missing hard disk
8941 data from all parent hard disks it is linked to. This will make the
8942 created clone an independent base hard disk that contains all hard disk
8943 data and does not need any other hard disks to operate.
8944
8945 After the returned progress object reports that the operation is
8946 successfully complete, the target hard disk gets remembered by this
8947 VirtualBox installation and may be attached to virtual machines.
8948
8949 <note>
8950 For base hard disks, this operation is identical to
8951 <link to="#cloneTo()"/>.
8952 </note>
8953 <note>
8954 This hard disk and all its parent hard disks will be placed to <link
8955 to="MediaState_LockedRead"/> state for the duration of this
8956 operation.
8957 </note>
8958 </desc>
8959 <param name="target" type="IHardDisk2" dir="in">
8960 <desc>Target hard disk.</desc>
8961 </param>
8962 <param name="progress" type="IProgress" dir="return">
8963 <desc>Progress object to track the operation completion.</desc>
8964 </param>
8965 </method>
8966
8967 <method name="compact">
8968 <desc>
8969 Starts compacting of this hard disk. This means that the disk is
8970 transformed into a possibly more compact storage representation.
8971 This potentially creates temporary images, which can require a
8972 substantial amount of additional disk space.
8973
8974 After the returned progress object reports that the operation is
8975 successfully complete, the media state will be set back to the
8976 current state.
8977
8978 <note>
8979 This hard disk and all its parent hard disks will be placed to <link
8980 to="MediaState_LockedRead"/> state for the duration of this
8981 operation.
8982 </note>
8983 </desc>
8984 <param name="progress" type="IProgress" dir="return">
8985 <desc>Progress object to track the operation completion.</desc>
8986 </param>
8987 </method>
8988
8989 </interface>
8990
8991
8992 <!--
8993 // IHardDiskFormat
8994 /////////////////////////////////////////////////////////////////////////
8995 -->
8996
8997 <enum
8998 name="DataType"
8999 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9000 >
9001 <const name="Int32" value="0"/>
9002 <const name="Int8" value="1"/>
9003 <const name="String" value="2"/>
9004 </enum>
9005
9006 <enum
9007 name="DataFlags"
9008 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9009 >
9010 <const name="None" value="0x00"/>
9011 <const name="Mandatory" value="0x01"/>
9012 <const name="Expert" value="0x02"/>
9013 <const name="Array" value="0x04"/>
9014 <const name="FlagMask" value="0x07"/>
9015 </enum>
9016
9017 <enum
9018 name="HardDiskFormatCapabilities"
9019 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9020 >
9021 <desc>
9022 Hard disk format capability flags.
9023 </desc>
9024
9025 <const name="Uuid" value="0x01">
9026 <desc>
9027 Supports UUIDs as expected by VirtualBox code.
9028 </desc>
9029 </const>
9030
9031 <const name="CreateFixed" value="0x02">
9032 <desc>
9033 Supports creating fixed size images, allocating all space instantly.
9034 </desc>
9035 </const>
9036
9037 <const name="CreateDynamic" value="0x04">
9038 <desc>
9039 Supports creating dynamically growing images, allocating space on
9040 demand.
9041 </desc>
9042 </const>
9043
9044 <const name="CreateSplit2G" value="0x08">
9045 <desc>
9046 Supports creating images split in chunks of a bit less than 2 GBytes.
9047 </desc>
9048 </const>
9049
9050 <const name="Differencing" value="0x10">
9051 <desc>
9052 Supports being used as a format for differencing hard disks (see <link
9053 to="IHardDisk2::createDiffStorage"/>).
9054 </desc>
9055 </const>
9056
9057 <const name="Asynchronous" value="0x20">
9058 <desc>
9059 Supports asynchronous I/O operations for at least some configurations.
9060 </desc>
9061 </const>
9062
9063 <const name="File" value="0x40">
9064 <desc>
9065 The format backend operates on files (the <link to="IMedium::location"/>
9066 attribute of the hard disk specifies a file used to store hard disk
9067 data; for a list of supported file extensions see
9068 <link to="IHardDiskFormat::fileExtensions"/>).
9069 </desc>
9070 </const>
9071
9072 <const name="Properties" value="0x80">
9073 <desc>
9074 The format backend uses the property interface to configure the storage
9075 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9076 method is used to get access to properties supported by the given hard
9077 disk format).
9078 </desc>
9079 </const>
9080
9081 <const name="CapabilityMask" value="0xFF"/>
9082 </enum>
9083
9084 <interface
9085 name="IHardDiskFormat" extends="$unknown"
9086 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9087 wsmap="managed"
9088 >
9089 <desc>
9090 The IHardDiskFormat interface represents a virtual hard disk format.
9091
9092 Each hard disk format has an associated backend which is used to handle
9093 hard disks stored in this format. This interface provides information
9094 about the properties of the associated backend.
9095
9096 Each hard disk format is identified by a string represented by the
9097 <link to="#id"/> attribute. This string is used in calls like
9098 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
9099 format.
9100
9101 The list of all supported hard disk formats can be obtained using
9102 <link to="ISystemProperties::hardDiskFormats"/>.
9103
9104 <see>IHardDisk2</see>
9105 </desc>
9106
9107 <attribute name="id" type="wstring" readonly="yes">
9108 <desc>
9109 Identifier of this format.
9110
9111 The format identifier is a non-null non-empty ASCII string. Note that
9112 this string is case-insensitive. This means that, for example, all of
9113 the following strings:
9114 <pre>
9115 "VDI"
9116 "vdi"
9117 "VdI"</pre>
9118 refer to the same hard disk format.
9119
9120 This string is used in methods of other interfaces where it is necessary
9121 to specify a hard disk format, such as
9122 <link to="IVirtualBox::createHardDisk2()"/>.
9123 </desc>
9124 </attribute>
9125
9126 <attribute name="name" type="wstring" readonly="yes">
9127 <desc>
9128 Human readable description of this format.
9129
9130 Mainly for use in file open dialogs.
9131 </desc>
9132 </attribute>
9133
9134 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9135 <desc>
9136 Array of strings containing the supported file extensions.
9137
9138 The first extension in the array is the extension preferred by the
9139 backend. It is recommended to use this extension when specifying a
9140 location of the storage unit for a new hard disk.
9141
9142 Note that some backends do not work on files, so this array may be
9143 empty.
9144
9145 <see>IHardDiskFormat::capabilities</see>
9146 </desc>
9147 </attribute>
9148
9149 <attribute name="capabilities" type="unsigned long" readonly="yes">
9150 <desc>
9151 Capabilities of the format as a set of bit flags.
9152
9153 For the meaning of individual capability flags see
9154 <link to="HardDiskFormatCapabilities"/>.
9155 </desc>
9156 </attribute>
9157
9158 <method name="describeProperties">
9159 <desc>
9160 Returns several arrays describing the properties supported by this
9161 format.
9162
9163 An element with the given index in each array describes one
9164 property. Thus, the number of elements in each returned array is the
9165 same and corresponds to the number of supported properties.
9166
9167 The returned arrays are filled in only if the
9168 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9169 All arguments must be non-NULL.
9170
9171 <see>DataType</see>
9172 <see>DataFlags</see>
9173 </desc>
9174
9175 <param name="names" type="wstring" safearray="yes" dir="out">
9176 <desc>Array of property names.</desc>
9177 </param>
9178 <param name="description" type="wstring" safearray="yes" dir="out">
9179 <desc>Array of property descriptions.</desc>
9180 </param>
9181 <param name="types" type="DataType" safearray="yes" dir="out">
9182 <desc>Array of property types.</desc>
9183 </param>
9184 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9185 <desc>Array of property flags.</desc>
9186 </param>
9187 <param name="defaults" type="wstring" safearray="yes" dir="out">
9188 <desc>Array of default property values.</desc>
9189 </param>
9190 </method>
9191
9192 </interface>
9193
9194
9195 <!--
9196 // IFloppyImage2
9197 /////////////////////////////////////////////////////////////////////////
9198 -->
9199
9200 <interface
9201 name="IFloppyImage2" extends="IMedium"
9202 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9203 wsmap="managed"
9204 >
9205 <desc>
9206 The IFloppyImage2 interface represents a medium containing the image
9207 of a floppy disk.
9208 </desc>
9209
9210 </interface>
9211
9212
9213 <!--
9214 // IDVDImage2
9215 /////////////////////////////////////////////////////////////////////////
9216 -->
9217
9218 <interface
9219 name="IDVDImage2" extends="IMedium"
9220 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9221 wsmap="managed"
9222 >
9223 <desc>
9224 The IDVDImage2 interface represents a medium containing the image
9225 of a CD or DVD disk in the ISO format.
9226 </desc>
9227
9228 </interface>
9229
9230
9231 <!--
9232 // IDVDDrive
9233 /////////////////////////////////////////////////////////////////////////
9234 -->
9235
9236 <interface
9237 name="IDVDDrive" extends="$unknown"
9238 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9239 wsmap="managed"
9240 >
9241 <desc>
9242 The IDVDDrive interface represents the virtual CD/DVD drive of the
9243 virtual machine. An object of this type is returned by
9244 <link to="IMachine::DVDDrive"/>.
9245 </desc>
9246
9247 <attribute name="state" type="DriveState" readonly="yes">
9248 <desc>Current drive state.</desc>
9249 </attribute>
9250
9251 <attribute name="passthrough" type="boolean">
9252 <desc>
9253 When a host drive is mounted and passthrough is enabled
9254 the guest OS will be able to directly send SCSI commands to
9255 the host drive. This enables the guest OS to use CD/DVD writers
9256 but is potentially dangerous.
9257 </desc>
9258 </attribute>
9259
9260 <method name="mountImage">
9261 <desc>Mounts a CD/DVD image with the specified UUID.
9262
9263 <result name="VBOX_E_FILE_ERROR">
9264 Invalid image file location.
9265 </result>
9266 <result name="VBOX_E_OBJECT_NOT_FOUND">
9267 Could not find a CD/DVD image matching @a imageID.
9268 </result>
9269 <result name="VBOX_E_INVALID_OBJECT_STATE">
9270 Invalid media state.
9271 </result>
9272
9273 </desc>
9274 <param name="imageId" type="uuid" dir="in"/>
9275 </method>
9276
9277 <method name="captureHostDrive">
9278 <desc>Captures the specified host CD/DVD drive.</desc>
9279 <param name="drive" type="IHostDVDDrive" dir="in"/>
9280 </method>
9281
9282 <method name="unmount">
9283 <desc>Unmounts the currently mounted image or host drive.</desc>
9284 </method>
9285
9286 <method name="getImage">
9287 <desc>Returns the currently mounted CD/DVD image.</desc>
9288 <param name="image" type="IDVDImage2" dir="return"/>
9289 </method>
9290
9291 <method name="getHostDrive">
9292 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9293 <param name="drive" type="IHostDVDDrive" dir="return"/>
9294 </method>
9295
9296 </interface>
9297
9298
9299 <!--
9300 // IFloppyDrive
9301 /////////////////////////////////////////////////////////////////////////
9302 -->
9303
9304 <interface
9305 name="IFloppyDrive" extends="$unknown"
9306 uuid="159412cd-bab8-452e-8097-218a020825a6"
9307 wsmap="managed"
9308 >
9309 <desc>
9310 The IFloppyDrive interface represents the virtual floppy drive of the
9311 virtual machine. An object of this type is returned by
9312 <link to="IMachine::floppyDrive" />.
9313 </desc>
9314
9315 <attribute name="enabled" type="boolean">
9316 <desc>
9317 Flag whether the floppy drive is enabled. If it is disabled,
9318 the floppy drive will not be reported to the guest OS.
9319 </desc>
9320 </attribute>
9321
9322 <attribute name="state" type="DriveState" readonly="yes">
9323 <desc>Current drive state.</desc>
9324 </attribute>
9325
9326 <method name="mountImage">
9327 <desc>Mounts a floppy image with the specified UUID.
9328
9329 <result name="VBOX_E_FILE_ERROR">
9330 Invalid image file location.
9331 </result>
9332 <result name="VBOX_E_OBJECT_NOT_FOUND">
9333 Could not find a floppy image matching @a imageID.
9334 </result>
9335 <result name="VBOX_E_INVALID_OBJECT_STATE">
9336 Invalid media state.
9337 </result>
9338
9339 </desc>
9340 <param name="imageId" type="uuid" dir="in"/>
9341 </method>
9342
9343 <method name="captureHostDrive">
9344 <desc>Captures the specified host floppy drive.</desc>
9345 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9346 </method>
9347
9348 <method name="unmount">
9349 <desc>Unmounts the currently mounted image or host drive.</desc>
9350 </method>
9351
9352 <method name="getImage">
9353 <desc>Returns the currently mounted floppy image.</desc>
9354 <param name="image" type="IFloppyImage2" dir="return"/>
9355 </method>
9356
9357 <method name="getHostDrive">
9358 <desc>Returns the currently mounted host floppy drive.</desc>
9359 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9360 </method>
9361
9362 </interface>
9363
9364
9365 <!--
9366 // IKeyboard
9367 /////////////////////////////////////////////////////////////////////////
9368 -->
9369
9370 <interface
9371 name="IKeyboard" extends="$unknown"
9372 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9373 wsmap="managed"
9374 >
9375 <desc>
9376 The IKeyboard interface represents the virtual machine's keyboard. Used
9377 in <link to="IConsole::keyboard"/>.
9378
9379 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9380 to the virtual machine.
9381
9382 </desc>
9383 <method name="putScancode">
9384 <desc>Sends a scancode to the keyboard.
9385
9386 <result name="VBOX_E_IPRT_ERROR">
9387 Could not send scan code to virtual keyboard.
9388 </result>
9389
9390 </desc>
9391 <param name="scancode" type="long" dir="in"/>
9392 </method>
9393
9394 <method name="putScancodes">
9395 <desc>Sends an array of scancodes to the keyboard.
9396
9397 <result name="VBOX_E_IPRT_ERROR">
9398 Could not send all scan codes to virtual keyboard.
9399 </result>
9400
9401 </desc>
9402 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9403 <param name="codesStored" type="unsigned long" dir="return"/>
9404 </method>
9405
9406 <method name="putCAD">
9407 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9408 function is nothing special, it is just a convenience function
9409 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9410
9411 <result name="VBOX_E_IPRT_ERROR">
9412 Could not send all scan codes to virtual keyboard.
9413 </result>
9414
9415 </desc>
9416 </method>
9417
9418 </interface>
9419
9420
9421 <!--
9422 // IMouse
9423 /////////////////////////////////////////////////////////////////////////
9424 -->
9425
9426 <enum
9427 name="MouseButtonState"
9428 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9429 >
9430 <desc>
9431 Mouse button state.
9432 </desc>
9433
9434 <const name="LeftButton" value="0x01"/>
9435 <const name="RightButton" value="0x02"/>
9436 <const name="MiddleButton" value="0x04"/>
9437 <const name="WheelUp" value="0x08"/>
9438 <const name="WheelDown" value="0x10"/>
9439 <const name="MouseStateMask" value="0x1F"/>
9440 </enum>
9441
9442 <interface
9443 name="IMouse" extends="$unknown"
9444 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9445 wsmap="managed"
9446 >
9447 <desc>
9448 The IMouse interface represents the virtual machine's mouse. Used in
9449 <link to="IConsole::mouse"/>.
9450
9451 Through this interface, the virtual machine's virtual mouse can be
9452 controlled.
9453 </desc>
9454
9455 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9456 <desc>
9457 Whether the guest OS supports absolute mouse pointer positioning
9458 or not.
9459 <note>
9460 VirtualBox Guest Tools need to be installed to the guest OS
9461 in order to enable absolute mouse positioning support.
9462 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9463 callback to be instantly informed about changes of this attribute
9464 during virtual machine execution.
9465 </note>
9466 <see><link to="#putMouseEventAbsolute"/></see>
9467 </desc>
9468 </attribute>
9469
9470 <method name="putMouseEvent">
9471 <desc>
9472 Initiates a mouse event using relative pointer movements
9473 along x and y axis.
9474
9475 <result name="E_ACCESSDENIED">
9476 Console not powered up.
9477 </result>
9478 <result name="VBOX_E_IPRT_ERROR">
9479 Could not send mouse event to virtual mouse.
9480 </result>
9481
9482 </desc>
9483
9484 <param name="dx" type="long" dir="in">
9485 <desc>
9486 Amount of pixels the mouse should move to the right.
9487 Negative values move the mouse to the left.
9488 </desc>
9489 </param>
9490 <param name="dy" type="long" dir="in">
9491 <desc>
9492 Amount of pixels the mouse should move downwards.
9493 Negative values move the mouse upwards.
9494 </desc>
9495 </param>
9496 <param name="dz" type="long" dir="in">
9497 <desc>
9498 Amount of mouse wheel moves.
9499 Positive values describe clockwise wheel rotations,
9500 negative values describe counterclockwise rotations.
9501 </desc>
9502 </param>
9503 <param name="buttonState" type="long" dir="in">
9504 <desc>
9505 The current state of mouse buttons. Every bit represents
9506 a mouse button as follows:
9507 <table>
9508 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9509 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9510 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9511 </table>
9512 A value of <tt>1</tt> means the corresponding button is pressed.
9513 otherwise it is released.
9514 </desc>
9515 </param>
9516 </method>
9517
9518 <method name="putMouseEventAbsolute">
9519 <desc>
9520 Positions the mouse pointer using absolute x and y coordinates.
9521 These coordinates are expressed in pixels and
9522 start from <tt>[1,1]</tt> which corresponds to the top left
9523 corner of the virtual display.
9524
9525 <result name="E_ACCESSDENIED">
9526 Console not powered up.
9527 </result>
9528 <result name="VBOX_E_IPRT_ERROR">
9529 Could not send mouse event to virtual mouse.
9530 </result>
9531
9532 <note>
9533 This method will have effect only if absolute mouse
9534 positioning is supported by the guest OS.
9535 </note>
9536
9537 <see><link to="#absoluteSupported"/></see>
9538 </desc>
9539
9540 <param name="x" type="long" dir="in">
9541 <desc>
9542 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9543 </desc>
9544 </param>
9545 <param name="y" type="long" dir="in">
9546 <desc>
9547 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9548 </desc>
9549 </param>
9550 <param name="dz" type="long" dir="in">
9551 <desc>
9552 Amount of mouse wheel moves.
9553 Positive values describe clockwise wheel rotations,
9554 negative values describe counterclockwise rotations.
9555 </desc>
9556 </param>
9557 <param name="buttonState" type="long" dir="in">
9558 <desc>
9559 The current state of mouse buttons. Every bit represents
9560 a mouse button as follows:
9561 <table>
9562 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9563 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9564 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9565 </table>
9566 A value of <tt>1</tt> means the corresponding button is pressed.
9567 otherwise it is released.
9568 </desc>
9569 </param>
9570 </method>
9571
9572 </interface>
9573
9574 <!--
9575 // IDisplay
9576 /////////////////////////////////////////////////////////////////////////
9577 -->
9578
9579 <enum
9580 name="FramebufferAccelerationOperation"
9581 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9582 >
9583 <desc>
9584 Frame buffer acceleration operation.
9585 </desc>
9586
9587 <const name="SolidFillAcceleration" value="1"/>
9588 <const name="ScreenCopyAcceleration" value="2"/>
9589 </enum>
9590
9591 <enum
9592 name="FramebufferPixelFormat"
9593 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9594 >
9595 <desc>
9596 Format of the video memory buffer. Constants represented by this enum can
9597 be used to test for particular values of <link
9598 to="IFramebuffer::pixelFormat"/>. See also <link
9599 to="IFramebuffer::requestResize()"/>.
9600
9601 See also www.fourcc.org for more information about FOURCC pixel formats.
9602 </desc>
9603
9604 <const name="Opaque" value="0">
9605 <desc>
9606 Unknown buffer format (the user may not assume any particular format of
9607 the buffer).
9608 </desc>
9609 </const>
9610 <const name="FOURCC_RGB" value="0x32424752">
9611 <desc>
9612 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9613 bit layout).
9614 </desc>
9615 </const>
9616 </enum>
9617
9618 <interface
9619 name="IFramebuffer" extends="$unknown"
9620 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9621 wsmap="suppress"
9622 >
9623 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9624 <desc>Address of the start byte of the frame buffer.</desc>
9625 </attribute>
9626
9627 <attribute name="width" type="unsigned long" readonly="yes">
9628 <desc>Frame buffer width, in pixels.</desc>
9629 </attribute>
9630
9631 <attribute name="height" type="unsigned long" readonly="yes">
9632 <desc>Frame buffer height, in pixels.</desc>
9633 </attribute>
9634
9635 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9636 <desc>
9637 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9638 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9639 are: 8, 15, 16, 24 and 32.
9640 </desc>
9641 </attribute>
9642
9643 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9644 <desc>
9645 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9646 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9647 size of the scan line must be aligned to 32 bits.
9648 </desc>
9649 </attribute>
9650
9651 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9652 <desc>
9653 Frame buffer pixel format. It's either one of the values defined by <link
9654 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9655 <note>
9656 This attribute must never return <link
9657 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9658 <link to="#address"/> points to must be always known.
9659 </note>
9660 </desc>
9661 </attribute>
9662
9663 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9664 <desc>
9665 Defines whether this frame buffer uses the virtual video card's memory
9666 buffer (guest VRAM) directly or not. See <link
9667 to="IFramebuffer::requestResize()"/> for more information.
9668 </desc>
9669 </attribute>
9670
9671 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9672 <desc>
9673 Hint from the frame buffer about how much of the standard
9674 screen height it wants to use for itself. This information is
9675 exposed to the guest through the VESA BIOS and VMMDev interface
9676 so that it can use it for determining its video mode table. It
9677 is not guaranteed that the guest respects the value.
9678 </desc>
9679 </attribute>
9680
9681 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9682 <desc>
9683 An alpha-blended overlay which is superposed over the frame buffer.
9684 The initial purpose is to allow the display of icons providing
9685 information about the VM state, including disk activity, in front
9686 ends which do not have other means of doing that. The overlay is
9687 designed to controlled exclusively by IDisplay. It has no locking
9688 of its own, and any changes made to it are not guaranteed to be
9689 visible until the affected portion of IFramebuffer is updated. The
9690 overlay can be created lazily the first time it is requested. This
9691 attribute can also return NULL to signal that the overlay is not
9692 implemented.
9693 </desc>
9694 </attribute>
9695
9696 <attribute name="winId" type="unsigned long long" readonly="yes">
9697 <desc>
9698 Platform-dependent identifier of the window where context of this
9699 frame buffer is drawn, or zero if there's no such window.
9700 </desc>
9701 </attribute>
9702
9703 <method name="lock">
9704 <desc>
9705 Locks the frame buffer.
9706 Gets called by the IDisplay object where this frame buffer is
9707 bound to.
9708 </desc>
9709 </method>
9710
9711 <method name="unlock">
9712 <desc>
9713 Unlocks the frame buffer.
9714 Gets called by the IDisplay object where this frame buffer is
9715 bound to.
9716 </desc>
9717 </method>
9718
9719 <method name="notifyUpdate">
9720 <desc>
9721 Informs about an update.
9722 Gets called by the display object where this buffer is
9723 registered.
9724 </desc>
9725 <param name="x" type="unsigned long" dir="in"/>
9726 <param name="y" type="unsigned long" dir="in"/>
9727 <param name="width" type="unsigned long" dir="in"/>
9728 <param name="height" type="unsigned long" dir="in"/>
9729 <param name="finished" type="boolean" dir="return"/>
9730 </method>
9731
9732 <method name="requestResize">
9733 <desc>
9734 Requests a size and pixel format change.
9735
9736 There are two modes of working with the video buffer of the virtual
9737 machine. The <i>indirect</i> mode implies that the IFramebuffer
9738 implementation allocates a memory buffer for the requested display mode
9739 and provides it to the virtual machine. In <i>direct</i> mode, the
9740 IFramebuffer implementation uses the memory buffer allocated and owned
9741 by the virtual machine. This buffer represents the video memory of the
9742 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9743 usually faster because the implementation gets a raw pointer to the
9744 guest VRAM buffer which it can directly use for visualizing the contents
9745 of the virtual display, as opposed to the indirect mode where the
9746 contents of guest VRAM are copied to the memory buffer provided by
9747 the implementation every time a display update occurs.
9748
9749 It is important to note that the direct mode is really fast only when
9750 the implementation uses the given guest VRAM buffer directly, for
9751 example, by blitting it to the window representing the virtual machine's
9752 display, which saves at least one copy operation comparing to the
9753 indirect mode. However, using the guest VRAM buffer directly is not
9754 always possible: the format and the color depth of this buffer may be
9755 not supported by the target window, or it may be unknown (opaque) as in
9756 case of text or non-linear multi-plane VGA video modes. In this case,
9757 the indirect mode (that is always available) should be used as a
9758 fallback: when the guest VRAM contents are copied to the
9759 implementation-provided memory buffer, color and format conversion is
9760 done automatically by the underlying code.
9761
9762 The @a pixelFormat parameter defines whether the direct mode is
9763 available or not. If @a pixelFormat is <link
9764 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9765 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9766 bytesPerLine parameters must be ignored and the implementation must use
9767 the indirect mode (where it provides its own buffer in one of the
9768 supported formats). In all other cases, @a pixelFormat together with @a
9769 bitsPerPixel and @a bytesPerLine define the format of the video memory
9770 buffer pointed to by the @a VRAM parameter and the implementation is
9771 free to choose which mode to use. To indicate that this frame buffer uses
9772 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9773 attribute must return <tt>true</tt> and <link to="#address"/> must
9774 return exactly the same address that is passed in the @a VRAM parameter
9775 of this method; otherwise it is assumed that the indirect strategy is
9776 chosen.
9777
9778 The @a width and @a height parameters represent the size of the
9779 requested display mode in both modes. In case of indirect mode, the
9780 provided memory buffer should be big enough to store data of the given
9781 display mode. In case of direct mode, it is guaranteed that the given @a
9782 VRAM buffer contains enough space to represent the display mode of the
9783 given size. Note that this frame buffer's <link to="#width"/> and <link
9784 to="#height"/> attributes must return exactly the same values as
9785 passed to this method after the resize is completed (see below).
9786
9787 The @a finished output parameter determines if the implementation has
9788 finished resizing the frame buffer or not. If, for some reason, the
9789 resize cannot be finished immediately during this call, @a finished
9790 must be set to @c false, and the implementation must call
9791 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9792 this method as soon as possible. If @a finished is @c false, the
9793 machine will not call any frame buffer methods until
9794 <link to="IDisplay::resizeCompleted()"/> is called.
9795
9796 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9797 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9798 this frame buffer must return exactly the same values as specified in the
9799 parameters of this method, after the resize is completed. If the
9800 indirect mode is chosen, these attributes must return values describing
9801 the format of the implementation's own memory buffer <link
9802 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9803 value must always correlate with <link to="#pixelFormat"/>. Note that
9804 the <link to="#pixelFormat"/> attribute must never return <link
9805 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9806
9807 <note>
9808 This method is called by the IDisplay object under the
9809 <link to="#lock()"/> provided by this IFramebuffer
9810 implementation. If this method returns @c false in @a finished, then
9811 this lock is not released until
9812 <link to="IDisplay::resizeCompleted()"/> is called.
9813 </note>
9814 </desc>
9815 <param name="screenId" type="unsigned long" dir="in">
9816 <desc>
9817 Logical screen number. Must be used in the corresponding call to
9818 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9819 </desc>
9820 </param>
9821 <param name="pixelFormat" type="unsigned long" dir="in">
9822 <desc>
9823 Pixel format of the memory buffer pointed to by @a VRAM.
9824 See also <link to="FramebufferPixelFormat"/>.
9825 </desc>
9826 </param>
9827 <param name="VRAM" type="octet" mod="ptr" dir="in">
9828 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9829 </param>
9830 <param name="bitsPerPixel" type="unsigned long" dir="in">
9831 <desc>Color depth, bits per pixel.</desc>
9832 </param>
9833 <param name="bytesPerLine" type="unsigned long" dir="in">
9834 <desc>Size of one scan line, in bytes.</desc>
9835 </param>
9836 <param name="width" type="unsigned long" dir="in">
9837 <desc>Width of the guest display, in pixels.</desc>
9838 </param>
9839 <param name="height" type="unsigned long" dir="in">
9840 <desc>Height of the guest display, in pixels.</desc>
9841 </param>
9842 <param name="finished" type="boolean" dir="return">
9843 <desc>
9844 Can the VM start using the new frame buffer immediately
9845 after this method returns or it should wait for
9846 <link to="IDisplay::resizeCompleted()"/>.
9847 </desc>
9848 </param>
9849 </method>
9850
9851 <method name="operationSupported">
9852 <desc>
9853 Returns whether the given acceleration operation is supported
9854 by the IFramebuffer implementation. If not, the display object
9855 will not attempt to call the corresponding IFramebuffer entry
9856 point. Even if an operation is indicated as supported, the
9857 IFramebuffer implementation always has the option to return non
9858 supported from the corresponding acceleration method in which
9859 case the operation will be performed by the display engine. This
9860 allows for reduced IFramebuffer implementation complexity where
9861 only common cases are handled.
9862 </desc>
9863 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9864 <param name="supported" type="boolean" dir="return"/>
9865 </method>
9866
9867 <method name="videoModeSupported">
9868 <desc>
9869 Returns whether the frame buffer implementation is willing to
9870 support a given video mode. In case it is not able to render
9871 the video mode (or for some reason not willing), it should
9872 return false. Usually this method is called when the guest
9873 asks the VMM device whether a given video mode is supported
9874 so the information returned is directly exposed to the guest.
9875 It is important that this method returns very quickly.
9876 </desc>
9877 <param name="width" type="unsigned long" dir="in"/>
9878 <param name="height" type="unsigned long" dir="in"/>
9879 <param name="bpp" type="unsigned long" dir="in"/>
9880 <param name="supported" type="boolean" dir="return"/>
9881 </method>
9882
9883 <method name="solidFill">
9884 <desc>
9885 Fills the specified rectangle on screen with a solid color.
9886 </desc>
9887 <param name="x" type="unsigned long" dir="in"/>
9888 <param name="y" type="unsigned long" dir="in"/>
9889 <param name="width" type="unsigned long" dir="in"/>
9890 <param name="height" type="unsigned long" dir="in"/>
9891 <param name="color" type="unsigned long" dir="in"/>
9892 <param name="handled" type="boolean" dir="return"/>
9893 </method>
9894
9895 <method name="copyScreenBits">
9896 <desc>
9897 Copies specified rectangle on the screen.
9898 </desc>
9899 <param name="xDst" type="unsigned long" dir="in"/>
9900 <param name="yDst" type="unsigned long" dir="in"/>
9901 <param name="xSrc" type="unsigned long" dir="in"/>
9902 <param name="ySrc" type="unsigned long" dir="in"/>
9903 <param name="width" type="unsigned long" dir="in"/>
9904 <param name="height" type="unsigned long" dir="in"/>
9905 <param name="handled" type="boolean" dir="return"/>
9906 </method>
9907
9908 <method name="getVisibleRegion">
9909 <desc>
9910 Returns the visible region of this frame buffer.
9911
9912 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9913 @a count parameter is ignored and the number of elements necessary to
9914 describe the current visible region is returned in @a countCopied.
9915
9916 If @a rectangles is not <tt>NULL</tt> but @a count is less
9917 than the required number of elements to store region data, the method
9918 will report a failure. If @a count is equal or greater than the
9919 required number of elements, then the actual number of elements copied
9920 to the provided array will be returned in @a countCopied.
9921
9922 <note>
9923 The address of the provided array must be in the process space of
9924 this IFramebuffer object.
9925 </note>
9926 <note>
9927 Method not yet implemented.
9928 </note>
9929 </desc>
9930 <param name="rectangles" type="octet" mod="ptr" dir="in">
9931 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9932 </param>
9933 <param name="count" type="unsigned long" dir="in">
9934 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9935 </param>
9936 <param name="countCopied" type="unsigned long" dir="return">
9937 <desc>Number of elements copied to the @a rectangles array.</desc>
9938 </param>
9939 </method>
9940
9941 <method name="setVisibleRegion">
9942 <desc>
9943 Suggests a new visible region to this frame buffer. This region
9944 represents the area of the VM display which is a union of regions of
9945 all top-level windows of the guest operating system running inside the
9946 VM (if the Guest Additions for this system support this
9947 functionality). This information may be used by the frontends to
9948 implement the seamless desktop integration feature.
9949
9950 <note>
9951 The address of the provided array must be in the process space of
9952 this IFramebuffer object.
9953 </note>
9954 <note>
9955 The IFramebuffer implementation must make a copy of the provided
9956 array of rectangles.
9957 </note>
9958 <note>
9959 Method not yet implemented.
9960 </note>
9961 </desc>
9962 <param name="rectangles" type="octet" mod="ptr" dir="in">
9963 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9964 </param>
9965 <param name="count" type="unsigned long" dir="in">
9966 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9967 </param>
9968 </method>
9969
9970 </interface>
9971
9972 <interface
9973 name="IFramebufferOverlay" extends="IFramebuffer"
9974 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9975 wsmap="suppress"
9976 >
9977 <desc>
9978 The IFramebufferOverlay interface represents an alpha blended overlay
9979 for displaying status icons above an IFramebuffer. It is always created
9980 not visible, so that it must be explicitly shown. It only covers a
9981 portion of the IFramebuffer, determined by its width, height and
9982 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9983 that order) format, and may be written to directly. Do re-read the
9984 width though, after setting it, as it may be adjusted (increased) to
9985 make it more suitable for the front end.
9986 </desc>
9987 <attribute name="x" type="unsigned long" readonly="yes">
9988 <desc>X position of the overlay, relative to the frame buffer.</desc>
9989 </attribute>
9990
9991 <attribute name="y" type="unsigned long" readonly="yes">
9992 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9993 </attribute>
9994
9995 <attribute name="visible" type="boolean" readonly="no">
9996 <desc>
9997 Whether the overlay is currently visible.
9998 </desc>
9999 </attribute>
10000
10001 <attribute name="alpha" type="unsigned long" readonly="no">
10002 <desc>
10003 The global alpha value for the overlay. This may or may not be
10004 supported by a given front end.
10005 </desc>
10006 </attribute>
10007
10008 <method name="move">
10009 <desc>
10010 Changes the overlay's position relative to the IFramebuffer.
10011 </desc>
10012 <param name="x" type="unsigned long" dir="in"/>
10013 <param name="y" type="unsigned long" dir="in"/>
10014 </method>
10015
10016 </interface>
10017
10018 <interface
10019 name="IDisplay" extends="$unknown"
10020 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10021 wsmap="suppress"
10022 >
10023 <desc>
10024 The IDisplay interface represents the virtual machine's display.
10025
10026 The object implementing this interface is contained in each
10027 <link to="IConsole::display"/> attribute and represents the visual
10028 output of the virtual machine.
10029
10030 The virtual display supports pluggable output targets represented by the
10031 IFramebuffer interface. Examples of the output target are a window on
10032 the host computer or an RDP session's display on a remote computer.
10033 </desc>
10034 <attribute name="width" type="unsigned long" readonly="yes">
10035 <desc>Current display width.</desc>
10036 </attribute>
10037
10038 <attribute name="height" type="unsigned long" readonly="yes">
10039 <desc>Current display height.</desc>
10040 </attribute>
10041
10042 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10043 <desc>
10044 Current guest display color depth. Note that this may differ
10045 from <link to="IFramebuffer::bitsPerPixel"/>.
10046 </desc>
10047 </attribute>
10048
10049 <method name="setupInternalFramebuffer">
10050 <desc>
10051 Prepares an internally managed frame buffer.
10052 </desc>
10053 <param name="depth" type="unsigned long" dir="in"/>
10054 </method>
10055
10056 <method name="lockFramebuffer">
10057 <desc>
10058 Requests access to the internal frame buffer.
10059
10060 <result name="VBOX_E_NOT_SUPPORTED">
10061 Attempt to lock a non-internal frame buffer.
10062 </result>
10063
10064 </desc>
10065 <param name="address" type="octet" mod="ptr" dir="return"/>
10066 </method>
10067
10068 <method name="unlockFramebuffer">
10069 <desc>
10070 Releases access to the internal frame buffer.
10071
10072 <result name="VBOX_E_NOT_SUPPORTED">
10073 Attempt to unlock a non-internal frame buffer.
10074 </result>
10075
10076 </desc>
10077 </method>
10078
10079 <method name="registerExternalFramebuffer">
10080 <desc>
10081 Registers an external frame buffer.
10082 </desc>
10083 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10084 </method>
10085
10086 <method name="setFramebuffer">
10087 <desc>
10088 Sets the framebuffer for given screen.
10089 </desc>
10090 <param name="screenId" type="unsigned long" dir="in"/>
10091 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10092 </method>
10093
10094 <method name="getFramebuffer">
10095 <desc>
10096 Queries the framebuffer for given screen.
10097 </desc>
10098 <param name="screenId" type="unsigned long" dir="in"/>
10099 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10100 <param name="xOrigin" type="long" dir="out"/>
10101 <param name="yOrigin" type="long" dir="out"/>
10102 </method>
10103
10104 <method name="setVideoModeHint">
10105 <desc>
10106 Asks VirtualBox to request the given video mode from
10107 the guest. This is just a hint and it cannot be guaranteed
10108 that the requested resolution will be used. Guest Additions
10109 are required for the request to be seen by guests. The caller
10110 should issue the request and wait for a resolution change and
10111 after a timeout retry.
10112
10113 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10114 parameters means that the corresponding values should be taken from the
10115 current video mode (i.e. left unchanged).
10116
10117 If the guest OS supports multi-monitor configuration then the @a display
10118 parameter specifies the number of the guest display to send the hint to:
10119 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10120 so on. If the multi-monitor configuration is not supported, @a display
10121 must be <tt>0</tt>.
10122
10123 <result name="E_INVALIDARG">
10124 The @a display is not associated with any monitor.
10125 </result>
10126
10127 </desc>
10128 <param name="width" type="unsigned long" dir="in"/>
10129 <param name="height" type="unsigned long" dir="in"/>
10130 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10131 <param name="display" type="unsigned long" dir="in"/>
10132 </method>
10133
10134 <method name="setSeamlessMode">
10135 <desc>
10136 Enables or disables seamless guest display rendering (seamless desktop
10137 integration) mode.
10138 <note>
10139 Calling this method has no effect if <link
10140 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10141 </note>
10142 </desc>
10143 <param name="enabled" type="boolean" dir="in"/>
10144 </method>
10145
10146 <method name="takeScreenShot">
10147 <desc>
10148 Takes a screen shot of the requested size and copies it to the
10149 32-bpp buffer allocated by the caller.
10150
10151 <result name="E_NOTIMPL">
10152 Feature not implemented.
10153 </result>
10154 <result name="VBOX_E_IPRT_ERROR">
10155 Could not take a screenshot.
10156 </result>
10157
10158 </desc>
10159 <param name="address" type="octet" mod="ptr" dir="in"/>
10160 <param name="width" type="unsigned long" dir="in"/>
10161 <param name="height" type="unsigned long" dir="in"/>
10162 </method>
10163
10164 <method name="drawToScreen">
10165 <desc>
10166 Draws a 32-bpp image of the specified size from the given buffer
10167 to the given point on the VM display.
10168
10169 <result name="E_NOTIMPL">
10170 Feature not implemented.
10171 </result>
10172 <result name="VBOX_E_IPRT_ERROR">
10173 Could not draw to screen.
10174 </result>
10175
10176 </desc>
10177 <param name="address" type="octet" mod="ptr" dir="in"/>
10178 <param name="x" type="unsigned long" dir="in"/>
10179 <param name="y" type="unsigned long" dir="in"/>
10180 <param name="width" type="unsigned long" dir="in"/>
10181 <param name="height" type="unsigned long" dir="in"/>
10182 </method>
10183
10184 <method name="invalidateAndUpdate">
10185 <desc>
10186 Does a full invalidation of the VM display and instructs the VM
10187 to update it.
10188
10189 <result name="VBOX_E_IPRT_ERROR">
10190 Could not invalidate and update screen.
10191 </result>
10192
10193 </desc>
10194 </method>
10195
10196 <method name="resizeCompleted">
10197 <desc>
10198 Signals that a framebuffer has completed the resize operation.
10199
10200 <result name="VBOX_E_NOT_SUPPORTED">
10201 Operation only valid for external frame buffers.
10202 </result>
10203
10204 </desc>
10205 <param name="screenId" type="unsigned long" dir="in"/>
10206 </method>
10207
10208 <method name="updateCompleted">
10209 <desc>
10210 Signals that a framebuffer has completed the update operation.
10211
10212 <result name="VBOX_E_NOT_SUPPORTED">
10213 Operation only valid for external frame buffers.
10214 </result>
10215
10216 </desc>
10217 </method>
10218
10219 </interface>
10220
10221 <!--
10222 // INetworkAdapter
10223 /////////////////////////////////////////////////////////////////////////
10224 -->
10225
10226 <enum
10227 name="NetworkAttachmentType"
10228 uuid="64e770dc-dd1d-4879-9f12-5bd6bc879b78"
10229 >
10230 <desc>
10231 Network attachment type.
10232 </desc>
10233
10234 <const name="Null" value="0">
10235 <desc>Null value, also means "not attached".</desc>
10236 </const>
10237 <const name="NAT" value="1"/>
10238 <const name="HostInterface" value="2"/>
10239 <const name="Internal" value="3"/>
10240 <const name="HostOnly" value="4"/>
10241 </enum>
10242
10243 <enum
10244 name="NetworkAdapterType"
10245 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10246 >
10247 <desc>
10248 Network adapter type.
10249 </desc>
10250
10251 <const name="Null" value="0">
10252 <desc>Null value (never used by the API).</desc>
10253 </const>
10254 <const name="Am79C970A" value="1"/>
10255 <const name="Am79C973" value="2"/>
10256 <const name="I82540EM" value="3"/>
10257 <const name="I82543GC" value="4"/>
10258 </enum>
10259
10260 <interface
10261 name="INetworkAdapter" extends="$unknown"
10262 uuid="4a1ee64e-6c5f-47dd-acfa-f834d7cb74fb"
10263 wsmap="managed"
10264 >
10265 <attribute name="adapterType" type="NetworkAdapterType">
10266 <desc>
10267 Type of the virtual network adapter. Depending on this value,
10268 VirtualBox will provide a different virtual network hardware
10269 to the guest.
10270 </desc>
10271 </attribute>
10272
10273 <attribute name="slot" type="unsigned long" readonly="yes">
10274 <desc>
10275 Slot number this adapter is plugged into. Corresponds to
10276 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10277 to obtain this instance.
10278 </desc>
10279 </attribute>
10280
10281 <attribute name="enabled" type="boolean">
10282 <desc>
10283 Flag whether the network adapter is present in the
10284 guest system. If disabled, the virtual guest hardware will
10285 not contain this network adapter. Can only be changed when
10286 the VM is not running.
10287 </desc>
10288 </attribute>
10289
10290 <attribute name="MACAddress" type="wstring">
10291 <desc>
10292 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10293 it to NULL, VirtualBox will generate a unique MAC address.
10294 </desc>
10295 </attribute>
10296
10297 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10298
10299 <attribute name="hostInterface" type="wstring">
10300 <desc>
10301 Name of the host network interface the VM is attached to.
10302 </desc>
10303 </attribute>
10304
10305 <attribute name="internalNetwork" type="wstring">
10306 <desc>
10307 Name of the internal network the VM is attached to.
10308 </desc>
10309 </attribute>
10310
10311 <attribute name="NATNetwork" type="wstring">
10312 <desc>
10313 Name of the NAT network the VM is attached to.
10314 </desc>
10315 </attribute>
10316
10317 <attribute name="cableConnected" type="boolean">
10318 <desc>
10319 Flag whether the adapter reports the cable as connected or not.
10320 It can be used to report offline situations to a VM.
10321 </desc>
10322 </attribute>
10323
10324 <attribute name="lineSpeed" type="unsigned long">
10325 <desc>
10326 Line speed reported by custom drivers, in units of 1 kbps.
10327 </desc>
10328 </attribute>
10329
10330 <attribute name="traceEnabled" type="boolean">
10331 <desc>
10332 Flag whether network traffic from/to the network card should be traced.
10333 Can only be toggled when the VM is turned off.
10334 </desc>
10335 </attribute>
10336
10337 <attribute name="traceFile" type="wstring">
10338 <desc>
10339 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10340 will be used.
10341 </desc>
10342 </attribute>
10343
10344 <method name="attachToNAT">
10345 <desc>
10346 Attach the network adapter to the Network Address Translation (NAT) interface.
10347 </desc>
10348 </method>
10349
10350 <method name="attachToHostInterface">
10351 <desc>
10352 Attach the network adapter to a host interface.
10353 </desc>
10354 </method>
10355
10356 <method name="attachToInternalNetwork">
10357 <desc>
10358 Attach the network adapter to an internal network.
10359 </desc>
10360 </method>
10361
10362 <method name="attachToHostOnlyNetwork">
10363 <desc>
10364 Attach the network adapter to the host-only network.
10365 </desc>
10366 </method>
10367
10368 <method name="detach">
10369 <desc>
10370 Detach the network adapter
10371 </desc>
10372 </method>
10373 </interface>
10374
10375
10376 <!--
10377 // ISerialPort
10378 /////////////////////////////////////////////////////////////////////////
10379 -->
10380
10381 <enum
10382 name="PortMode"
10383 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10384 >
10385 <desc>
10386 The PortMode enumeration represents possible communication modes for
10387 the virtual serial port device.
10388 </desc>
10389
10390 <const name="Disconnected" value="0">
10391 <desc>Virtual device is not attached to any real host device.</desc>
10392 </const>
10393 <const name="HostPipe" value="1">
10394 <desc>Virtual device is attached to a host pipe.</desc>
10395 </const>
10396 <const name="HostDevice" value="2">
10397 <desc>Virtual device is attached to a host device.</desc>
10398 </const>
10399 </enum>
10400
10401 <interface
10402 name="ISerialPort" extends="$unknown"
10403 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10404 wsmap="managed"
10405 >
10406
10407 <desc>
10408 The ISerialPort interface represents the virtual serial port device.
10409
10410 The virtual serial port device acts like an ordinary serial port
10411 inside the virtual machine. This device communicates to the real
10412 serial port hardware in one of two modes: host pipe or host device.
10413
10414 In host pipe mode, the #path attribute specifies the path to the pipe on
10415 the host computer that represents a serial port. The #server attribute
10416 determines if this pipe is created by the virtual machine process at
10417 machine startup or it must already exist before starting machine
10418 execution.
10419
10420 In host device mode, the #path attribute specifies the name of the
10421 serial port device on the host computer.
10422
10423 There is also a third communication mode: the disconnected mode. In this
10424 mode, the guest OS running inside the virtual machine will be able to
10425 detect the serial port, but all port write operations will be discarded
10426 and all port read operations will return no data.
10427
10428 <see>IMachine::getSerialPort</see>
10429 </desc>
10430
10431 <attribute name="slot" type="unsigned long" readonly="yes">
10432 <desc>
10433 Slot number this serial port is plugged into. Corresponds to
10434 the value you pass to <link to="IMachine::getSerialPort"/>
10435 to obtain this instance.
10436 </desc>
10437 </attribute>
10438
10439 <attribute name="enabled" type="boolean">
10440 <desc>
10441 Flag whether the serial port is enabled. If disabled,
10442 the serial port will not be reported to the guest OS.
10443 </desc>
10444 </attribute>
10445
10446 <attribute name="IOBase" type="unsigned long">
10447 <desc>Base I/O address of the serial port.</desc>
10448 </attribute>
10449
10450 <attribute name="IRQ" type="unsigned long">
10451 <desc>IRQ number of the serial port.</desc>
10452 </attribute>
10453
10454 <attribute name="hostMode" type="PortMode">
10455 <desc>
10456 How is this port connected to the host.
10457 <note>
10458 Changing this attribute may fail if the conditions for
10459 <link to="#path"/> are not met.
10460 </note>
10461 </desc>
10462 </attribute>
10463
10464 <attribute name="server" type="boolean">
10465 <desc>
10466 Flag whether this serial port acts as a server (creates a new pipe on
10467 the host) or as a client (uses the existing pipe). This attribute is
10468 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10469 </desc>
10470 </attribute>
10471
10472 <attribute name="path" type="wstring">
10473 <desc>
10474 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10475 PortMode_HostPipe, or the host serial device name when
10476 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10477 cases, setting a @c null or an empty string as the attribute's value
10478 will result into an error. Otherwise, the value of this property is
10479 ignored.
10480 </desc>
10481 </attribute>
10482
10483 </interface>
10484
10485 <!--
10486 // IParallelPort
10487 /////////////////////////////////////////////////////////////////////////
10488 -->
10489
10490 <interface
10491 name="IParallelPort" extends="$unknown"
10492 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10493 wsmap="managed"
10494 >
10495
10496 <desc>
10497 The IParallelPort interface represents the virtual parallel port device.
10498
10499 The virtual parallel port device acts like an ordinary parallel port
10500 inside the virtual machine. This device communicates to the real
10501 parallel port hardware using the name of the parallel device on the host
10502 computer specified in the #path attribute.
10503
10504 Each virtual parallel port device is assigned a base I/O address and an
10505 IRQ number that will be reported to the guest operating system and used
10506 to operate the given parallel port from within the virtual machine.
10507
10508 <see>IMachine::getParallelPort</see>
10509 </desc>
10510
10511 <attribute name="slot" type="unsigned long" readonly="yes">
10512 <desc>
10513 Slot number this parallel port is plugged into. Corresponds to
10514 the value you pass to <link to="IMachine::getParallelPort"/>
10515 to obtain this instance.
10516 </desc>
10517 </attribute>
10518
10519 <attribute name="enabled" type="boolean">
10520 <desc>
10521 Flag whether the parallel port is enabled. If disabled,
10522 the parallel port will not be reported to the guest OS.
10523 </desc>
10524 </attribute>
10525
10526 <attribute name="IOBase" type="unsigned long">
10527 <desc>Base I/O address of the parallel port.</desc>
10528 </attribute>
10529
10530 <attribute name="IRQ" type="unsigned long">
10531 <desc>IRQ number of the parallel port.</desc>
10532 </attribute>
10533
10534 <attribute name="path" type="wstring">
10535 <desc>
10536 Host parallel device name. If this parallel port is enabled, setting a
10537 @c null or an empty string as this attribute's value will result into
10538 an error.
10539 </desc>
10540 </attribute>
10541
10542 </interface>
10543
10544
10545 <!--
10546 // IMachineDebugger
10547 /////////////////////////////////////////////////////////////////////////
10548 -->
10549
10550 <interface
10551 name="IMachineDebugger" extends="$unknown"
10552 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10553 wsmap="suppress"
10554 >
10555 <method name="resetStats">
10556 <desc>
10557 Reset VM statistics.
10558 </desc>
10559 <param name="pattern" type="wstring" dir="in">
10560 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10561 </param>
10562 </method>
10563
10564 <method name="dumpStats">
10565 <desc>
10566 Dumps VM statistics.
10567 </desc>
10568 <param name="pattern" type="wstring" dir="in">
10569 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10570 </param>
10571 </method>
10572
10573 <method name="getStats">
10574 <desc>
10575 Get the VM statistics in a XMLish format.
10576 </desc>
10577 <param name="pattern" type="wstring" dir="in">
10578 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10579 </param>
10580 <param name="withDescriptions" type="boolean" dir="in">
10581 <desc>Whether to include the descriptions.</desc>
10582 </param>
10583 <param name="stats" type="wstring" dir="out">
10584 <desc>The XML document containing the statistics.</desc>
10585 </param>
10586 </method>
10587
10588 <method name="injectNMI">
10589 <desc>
10590 Inject an NMI into a running VT-x/AMD-V VM.
10591 </desc>
10592 </method>
10593
10594 <attribute name="singlestep" type="boolean">
10595 <desc>Switch for enabling singlestepping.</desc>
10596 </attribute>
10597
10598 <attribute name="recompileUser" type="boolean">
10599 <desc>Switch for forcing code recompilation for user mode code.</desc>
10600 </attribute>
10601
10602 <attribute name="recompileSupervisor" type="boolean">
10603 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10604 </attribute>
10605
10606 <attribute name="PATMEnabled" type="boolean">
10607 <desc>Switch for enabling and disabling the PATM component.</desc>
10608 </attribute>
10609
10610 <attribute name="CSAMEnabled" type="boolean">
10611 <desc>Switch for enabling and disabling the CSAM component.</desc>
10612 </attribute>
10613
10614 <attribute name="logEnabled" type="boolean">
10615 <desc>Switch for enabling and disabling logging.</desc>
10616 </attribute>
10617
10618 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10619 <desc>
10620 Flag indicating whether the VM is currently making use of CPU hardware
10621 virtualization extensions.
10622 </desc>
10623 </attribute>
10624
10625 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10626 <desc>
10627 Flag indicating whether the VM is currently making use of the nested paging
10628 CPU hardware virtualization extension.
10629 </desc>
10630 </attribute>
10631
10632 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10633 <desc>
10634 Flag indicating whether the VM is currently making use of the VPID
10635 VT-x extension.
10636 </desc>
10637 </attribute>
10638
10639 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10640 <desc>
10641 Flag indicating whether the VM is currently making use of the Physical
10642 Address Extension CPU feature.
10643 </desc>
10644 </attribute>
10645
10646 <attribute name="virtualTimeRate" type="unsigned long">
10647 <desc>
10648 The rate at which the virtual time runs expressed as a percentage.
10649 The accepted range is 2% to 20000%.
10650 </desc>
10651 </attribute>
10652
10653 <!-- @todo method for setting log flags, groups and destination! -->
10654
10655 <attribute name="VM" type="unsigned long long" readonly="yes">
10656 <desc>
10657 Gets the VM handle. This is only for internal use while
10658 we carve the details of this interface.
10659 </desc>
10660 </attribute>
10661
10662 </interface>
10663
10664 <!--
10665 // IUSBController
10666 /////////////////////////////////////////////////////////////////////////
10667 -->
10668
10669 <interface
10670 name="IUSBController" extends="$unknown"
10671 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10672 wsmap="managed"
10673 >
10674 <attribute name="enabled" type="boolean">
10675 <desc>
10676 Flag whether the USB controller is present in the
10677 guest system. If disabled, the virtual guest hardware will
10678 not contain any USB controller. Can only be changed when
10679 the VM is powered off.
10680 </desc>
10681 </attribute>
10682
10683 <attribute name="enabledEhci" type="boolean">
10684 <desc>
10685 Flag whether the USB EHCI controller is present in the
10686 guest system. If disabled, the virtual guest hardware will
10687 not contain a USB EHCI controller. Can only be changed when
10688 the VM is powered off.
10689 </desc>
10690 </attribute>
10691
10692 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10693 <desc>
10694 USB standard version which the controller implements.
10695 This is a BCD which means that the major version is in the
10696 high byte and minor version is in the low byte.
10697 </desc>
10698 </attribute>
10699
10700 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10701 <desc>
10702 List of USB device filters associated with the machine.
10703
10704 If the machine is currently running, these filters are activated
10705 every time a new (supported) USB device is attached to the host
10706 computer that was not ignored by global filters
10707 (<link to="IHost::USBDeviceFilters"/>).
10708
10709 These filters are also activated when the machine is powered up.
10710 They are run against a list of all currently available USB
10711 devices (in states
10712 <link to="USBDeviceState_Available"/>,
10713 <link to="USBDeviceState_Busy"/>,
10714 <link to="USBDeviceState_Held"/>) that were not previously
10715 ignored by global filters.
10716
10717 If at least one filter matches the USB device in question, this
10718 device is automatically captured (attached to) the virtual USB
10719 controller of this machine.
10720
10721 <see>IUSBDeviceFilter, ::IUSBController</see>
10722 </desc>
10723 </attribute>
10724
10725 <method name="createDeviceFilter">
10726 <desc>
10727 Creates a new USB device filter. All attributes except
10728 the filter name are set to <tt>null</tt> (any match),
10729 <i>active</i> is <tt>false</tt> (the filter is not active).
10730
10731 The created filter can then be added to the list of filters using
10732 <link to="#insertDeviceFilter()"/>.
10733
10734 <result name="VBOX_E_INVALID_VM_STATE">
10735 The virtual machine is not mutable.
10736 </result>
10737
10738 <see>#deviceFilters</see>
10739 </desc>
10740 <param name="name" type="wstring" dir="in">
10741 <desc>
10742 Filter name. See <link to="IUSBDeviceFilter::name"/>
10743 for more info.
10744 </desc>
10745 </param>
10746 <param name="filter" type="IUSBDeviceFilter" dir="return">
10747 <desc>Created filter object.</desc>
10748 </param>
10749 </method>
10750
10751 <method name="insertDeviceFilter">
10752 <desc>
10753 Inserts the given USB device to the specified position
10754 in the list of filters.
10755
10756 Positions are numbered starting from <tt>0</tt>. If the specified
10757 position is equal to or greater than the number of elements in
10758 the list, the filter is added to the end of the collection.
10759
10760 <note>
10761 Duplicates are not allowed, so an attempt to insert a
10762 filter that is already in the collection, will return an
10763 error.
10764 </note>
10765
10766 <result name="VBOX_E_INVALID_VM_STATE">
10767 Virtual machine is not mutable.
10768 </result>
10769 <result name="E_INVALIDARG">
10770 USB device filter not created within this VirtualBox instance.
10771 </result>
10772 <result name="VBOX_E_INVALID_OBJECT_STATE">
10773 USB device filter already in list.
10774 </result>
10775
10776 <see>#deviceFilters</see>
10777 </desc>
10778 <param name="position" type="unsigned long" dir="in">
10779 <desc>Position to insert the filter to.</desc>
10780 </param>
10781 <param name="filter" type="IUSBDeviceFilter" dir="in">
10782 <desc>USB device filter to insert.</desc>
10783 </param>
10784 </method>
10785
10786 <method name="removeDeviceFilter">
10787 <desc>
10788 Removes a USB device filter from the specified position in the
10789 list of filters.
10790
10791 Positions are numbered starting from <tt>0</tt>. Specifying a
10792 position equal to or greater than the number of elements in
10793 the list will produce an error.
10794
10795 <see>#deviceFilters</see>
10796
10797 <result name="VBOX_E_INVALID_VM_STATE">
10798 Virtual machine is not mutable.
10799 </result>
10800 <result name="E_INVALIDARG">
10801 USB device filter list empty or invalid @a position.
10802 </result>
10803
10804 </desc>
10805 <param name="position" type="unsigned long" dir="in">
10806 <desc>Position to remove the filter from.</desc>
10807 </param>
10808 <param name="filter" type="IUSBDeviceFilter" dir="return">
10809 <desc>Removed USB device filter.</desc>
10810 </param>
10811 </method>
10812
10813 </interface>
10814
10815
10816 <!--
10817 // IUSBDevice
10818 /////////////////////////////////////////////////////////////////////////
10819 -->
10820
10821 <enumerator
10822 name="IUSBDeviceEnumerator" type="IUSBDevice"
10823 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10824 />
10825
10826 <collection
10827 name="IUSBDeviceCollection" type="IUSBDevice"
10828 enumerator="IUSBDeviceEnumerator"
10829 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10830 readonly="yes"
10831 >
10832 <method name="findById">
10833 <desc>
10834 Searches this collection for a USB device with the given UUID.
10835 <note>
10836 The method returns an error if the given UUID does not
10837 correspond to any USB device in the collection.
10838 </note>
10839 <see>IUSBDevice::id</see>
10840 </desc>
10841 <param name="id" type="uuid" dir="in">
10842 <desc>UUID of the USB device to search for.</desc>
10843 </param>
10844 <param name="device" type="IUSBDevice" dir="return">
10845 <desc>Found USB device object.</desc>
10846 </param>
10847 </method>
10848
10849 <method name="findByAddress">
10850 <desc>
10851 Searches this collection for a USB device with the given
10852 host address.
10853 <note>
10854 The method returns an error if the given address does not
10855 correspond to any USB device in the collection.
10856 </note>
10857 <see>IUSBDevice::address</see>
10858 </desc>
10859 <param name="name" type="wstring" dir="in">
10860 <desc>
10861 Address of the USB device (as assigned by the host) to
10862 search for.
10863 </desc>
10864 </param>
10865 <param name="device" type="IUSBDevice" dir="return">
10866 <desc>Found USB device object.</desc>
10867 </param>
10868 </method>
10869
10870 </collection>
10871
10872 <interface
10873 name="IUSBDevice" extends="$unknown"
10874 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10875 wsmap="managed"
10876 >
10877 <desc>
10878 The IUSBDevice interface represents a virtual USB device attached to the
10879 virtual machine.
10880
10881 A collection of objects implementing this interface is stored in the
10882 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10883 attached to a running virtual machine's USB controller.
10884 </desc>
10885
10886 <attribute name="id" type="uuid" readonly="yes">
10887 <desc>
10888 Unique USB device ID. This ID is built from #vendorId,
10889 #productId, #revision and #serialNumber.
10890 </desc>
10891 </attribute>
10892
10893 <attribute name="vendorId" type="unsigned short" readonly="yes">
10894 <desc>Vendor ID.</desc>
10895 </attribute>
10896
10897 <attribute name="productId" type="unsigned short" readonly="yes">
10898 <desc>Product ID.</desc>
10899 </attribute>
10900
10901 <attribute name="revision" type="unsigned short" readonly="yes">
10902 <desc>
10903 Product revision number. This is a packed BCD represented as
10904 unsigned short. The high byte is the integer part and the low
10905 byte is the decimal.
10906 </desc>
10907 </attribute>
10908
10909 <attribute name="manufacturer" type="wstring" readonly="yes">
10910 <desc>Manufacturer string.</desc>
10911 </attribute>
10912
10913 <attribute name="product" type="wstring" readonly="yes">
10914 <desc>Product string.</desc>
10915 </attribute>
10916
10917 <attribute name="serialNumber" type="wstring" readonly="yes">
10918 <desc>Serial number string.</desc>
10919 </attribute>
10920
10921 <attribute name="address" type="wstring" readonly="yes">
10922 <desc>Host specific address of the device.</desc>
10923 </attribute>
10924
10925 <attribute name="port" type="unsigned short" readonly="yes">
10926 <desc>
10927 Host USB port number the device is physically
10928 connected to.
10929 </desc>
10930 </attribute>
10931
10932 <attribute name="version" type="unsigned short" readonly="yes">
10933 <desc>
10934 The major USB version of the device - 1 or 2.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="portVersion" type="unsigned short" readonly="yes">
10939 <desc>
10940 The major USB version of the host USB port the device is
10941 physically connected to - 1 or 2. For devices not connected to
10942 anything this will have the same value as the version attribute.
10943 </desc>
10944 </attribute>
10945
10946 <attribute name="remote" type="boolean" readonly="yes">
10947 <desc>
10948 Whether the device is physically connected to a remote VRDP
10949 client or to a local host machine.
10950 </desc>
10951 </attribute>
10952
10953 </interface>
10954
10955
10956 <!--
10957 // IUSBDeviceFilter
10958 /////////////////////////////////////////////////////////////////////////
10959 -->
10960
10961 <enumerator
10962 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10963 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10964 />
10965
10966 <collection
10967 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10968 enumerator="IUSBDeviceFilterEnumerator"
10969 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10970 readonly="yes"
10971 />
10972
10973 <interface
10974 name="IUSBDeviceFilter" extends="$unknown"
10975 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10976 wsmap="managed"
10977 >
10978 <desc>
10979 The IUSBDeviceFilter interface represents an USB device filter used
10980 to perform actions on a group of USB devices.
10981
10982 This type of filters is used by running virtual machines to
10983 automatically capture selected USB devices once they are physically
10984 attached to the host computer.
10985
10986 A USB device is matched to the given device filter if and only if all
10987 attributes of the device match the corresponding attributes of the
10988 filter (that is, attributes are joined together using the logical AND
10989 operation). On the other hand, all together, filters in the list of
10990 filters carry the semantics of the logical OR operation. So if it is
10991 desirable to create a match like "this vendor id OR this product id",
10992 one needs to create two filters and specify "any match" (see below)
10993 for unused attributes.
10994
10995 All filter attributes used for matching are strings. Each string
10996 is an expression representing a set of values of the corresponding
10997 device attribute, that will match the given filter. Currently, the
10998 following filtering expressions are supported:
10999
11000 <ul>
11001 <li><i>Interval filters</i>. Used to specify valid intervals for
11002 integer device attributes (Vendor ID, Product ID and Revision).
11003 The format of the string is:
11004
11005 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11006
11007 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11008 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11009 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11010 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11011 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11012 possible integer is assumed.
11013 </li>
11014 <li><i>Boolean filters</i>. Used to specify acceptable values for
11015 boolean device attributes. The format of the string is:
11016
11017 <tt>true|false|yes|no|0|1</tt>
11018
11019 </li>
11020 <li><i>Exact match</i>. Used to specify a single value for the given
11021 device attribute. Any string that doesn't start with <tt>int:</tt>
11022 represents the exact match. String device attributes are compared to
11023 this string including case of symbols. Integer attributes are first
11024 converted to a string (see individual filter attributes) and then
11025 compared ignoring case.
11026
11027 </li>
11028 <li><i>Any match</i>. Any value of the corresponding device attribute
11029 will match the given filter. An empty or <tt>null</tt> string is
11030 used to construct this type of filtering expressions.
11031
11032 </li>
11033 </ul>
11034
11035 <note>
11036 On the Windows host platform, interval filters are not currently
11037 available. Also all string filter attributes
11038 (<link to="#manufacturer"/>, <link to="#product"/>,
11039 <link to="#serialNumber"/>) are ignored, so they behave as
11040 <i>any match</i> no matter what string expression is specified.
11041 </note>
11042
11043 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11044 </desc>
11045
11046 <attribute name="name" type="wstring">
11047 <desc>
11048 Visible name for this filter.
11049 This name is used to visually distinguish one filter from another,
11050 so it can neither be <tt>null</tt> nor an empty string.
11051 </desc>
11052 </attribute>
11053
11054 <attribute name="active" type="boolean">
11055 <desc>Whether this filter active or has been temporarily disabled.</desc>
11056 </attribute>
11057
11058 <attribute name="vendorId" type="wstring">
11059 <desc>
11060 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11061 The string representation for the <i>exact matching</i>
11062 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11063 (including leading zeroes).
11064 </desc>
11065 </attribute>
11066
11067 <attribute name="productId" type="wstring">
11068 <desc>
11069 <link to="IUSBDevice::productId">Product ID</link> filter.
11070 The string representation for the <i>exact matching</i>
11071 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11072 (including leading zeroes).
11073 </desc>
11074 </attribute>
11075
11076 <attribute name="revision" type="wstring">
11077 <desc>
11078 <link to="IUSBDevice::productId">Product revision number</link>
11079 filter. The string representation for the <i>exact matching</i>
11080 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11081 of the integer part of the revision, and <tt>F</tt> is the
11082 decimal digit of its fractional part (including leading and
11083 trailing zeros).
11084 Note that for interval filters, it's best to use the hexadecimal
11085 form, because the revision is stored as a 16 bit packed BCD value;
11086 so the expression <tt>int:0x0100-0x0199</tt> will match any
11087 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11088 </desc>
11089 </attribute>
11090
11091 <attribute name="manufacturer" type="wstring">
11092 <desc>
11093 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11094 </desc>
11095 </attribute>
11096
11097 <attribute name="product" type="wstring">
11098 <desc>
11099 <link to="IUSBDevice::product">Product</link> filter.
11100 </desc>
11101 </attribute>
11102
11103 <attribute name="serialNumber" type="wstring">
11104 <desc>
11105 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11106 </desc>
11107 </attribute>
11108
11109 <attribute name="port" type="wstring">
11110 <desc>
11111 <link to="IUSBDevice::port">Host USB port</link> filter.
11112 </desc>
11113 </attribute>
11114
11115 <attribute name="remote" type="wstring">
11116 <desc>
11117 <link to="IUSBDevice::remote">Remote state</link> filter.
11118 <note>
11119 This filter makes sense only for machine USB filters,
11120 i.e. it is ignored by IHostUSBDeviceFilter objects.
11121 </note>
11122 </desc>
11123 </attribute>
11124
11125 <attribute name="maskedInterfaces" type="unsigned long">
11126 <desc>
11127 This is an advanced option for hiding one or more USB interfaces
11128 from the guest. The value is a bit mask where the bits that are set
11129 means the corresponding USB interface should be hidden, masked off
11130 if you like.
11131 This feature only works on Linux hosts.
11132 </desc>
11133 </attribute>
11134
11135 </interface>
11136
11137
11138 <!--
11139 // IHostUSBDevice
11140 /////////////////////////////////////////////////////////////////////////
11141 -->
11142
11143 <enum
11144 name="USBDeviceState"
11145 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11146 >
11147 <desc>
11148 USB device state. This enumeration represents all possible states
11149 of the USB device physically attached to the host computer regarding
11150 its state on the host computer and availability to guest computers
11151 (all currently running virtual machines).
11152
11153 Once a supported USB device is attached to the host, global USB
11154 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11155 either ignore the device, or put it to USBDeviceState_Held state, or do
11156 nothing. Unless the device is ignored by global filters, filters of all
11157 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11158 activated that can put it to USBDeviceState_Captured state.
11159
11160 If the device was ignored by global filters, or didn't match
11161 any filters at all (including guest ones), it is handled by the host
11162 in a normal way. In this case, the device state is determined by
11163 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11164 or USBDeviceState_Available, depending on the current device usage.
11165
11166 Besides auto-capturing based on filters, the device can be manually
11167 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11168 state is USBDeviceState_Busy, USBDeviceState_Available or
11169 USBDeviceState_Held.
11170
11171 <note>
11172 Due to differences in USB stack implementations in Linux and Win32,
11173 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11174 only to the Linux version of the product. This also means that (<link
11175 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11176 device state is USBDeviceState_Held.
11177 </note>
11178
11179 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11180 </desc>
11181
11182 <const name="NotSupported" value="0">
11183 <desc>
11184 Not supported by the VirtualBox server, not available to guests.
11185 </desc>
11186 </const>
11187 <const name="Unavailable" value="1">
11188 <desc>
11189 Being used by the host computer exclusively,
11190 not available to guests.
11191 </desc>
11192 </const>
11193 <const name="Busy" value="2">
11194 <desc>
11195 Being used by the host computer, potentially available to guests.
11196 </desc>
11197 </const>
11198 <const name="Available" value="3">
11199 <desc>
11200 Not used by the host computer, available to guests (the host computer
11201 can also start using the device at any time).
11202 </desc>
11203 </const>
11204 <const name="Held" value="4">
11205 <desc>
11206 Held by the VirtualBox server (ignored by the host computer),
11207 available to guests.
11208 </desc>
11209 </const>
11210 <const name="Captured" value="5">
11211 <desc>
11212 Captured by one of the guest computers, not available
11213 to anybody else.
11214 </desc>
11215 </const>
11216 </enum>
11217
11218 <enumerator
11219 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11220 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11221 />
11222
11223 <collection
11224 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11225 enumerator="IHostUSBDeviceEnumerator"
11226 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11227 readonly="yes"
11228 >
11229 <method name="findById">
11230 <desc>
11231 Searches this collection for a USB device with the given UUID.
11232 <note>
11233 The method returns an error if the given UUID does not
11234 correspond to any USB device in the collection.
11235 </note>
11236 <see>IHostUSBDevice::id</see>
11237 </desc>
11238 <param name="id" type="uuid" dir="in">
11239 <desc>UUID of the USB device to search for.</desc>
11240 </param>
11241 <param name="device" type="IHostUSBDevice" dir="return">
11242 <desc>Found USB device object.</desc>
11243 </param>
11244 </method>
11245
11246 <method name="findByAddress">
11247 <desc>
11248 Searches this collection for a USB device with the given
11249 host address.
11250 <note>
11251 The method returns an error if the given address does not
11252 correspond to any USB device in the collection.
11253 </note>
11254 <see>IHostUSBDevice::address</see>
11255 </desc>
11256 <param name="name" type="wstring" dir="in">
11257 <desc>
11258 Address of the USB device (as assigned by the host) to
11259 search for.
11260 </desc>
11261 </param>
11262 <param name="device" type="IHostUSBDevice" dir="return">
11263 <desc>Found USB device object.</desc>
11264 </param>
11265 </method>
11266
11267 </collection>
11268
11269 <interface
11270 name="IHostUSBDevice" extends="IUSBDevice"
11271 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11272 wsmap="managed"
11273 >
11274 <desc>
11275 The IHostUSBDevice interface represents a physical USB device attached
11276 to the host computer.
11277
11278 Besides properties inherited from IUSBDevice, this interface adds the
11279 <link to="#state"/> property that holds the current state of the USB
11280 device.
11281
11282 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11283 </desc>
11284
11285 <attribute name="state" type="USBDeviceState" readonly="yes">
11286 <desc>
11287 Current state of the device.
11288 </desc>
11289 </attribute>
11290
11291 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11292
11293 </interface>
11294
11295
11296 <!--
11297 // IHostUSBDeviceFilter
11298 /////////////////////////////////////////////////////////////////////////
11299 -->
11300
11301 <enum
11302 name="USBDeviceFilterAction"
11303 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11304 >
11305 <desc>
11306 Actions for host USB device filters.
11307 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11308 </desc>
11309
11310 <const name="Null" value="0">
11311 <desc>Null value (never used by the API).</desc>
11312 </const>
11313 <const name="Ignore" value="1">
11314 <desc>Ignore the matched USB device.</desc>
11315 </const>
11316 <const name="Hold" value="2">
11317 <desc>Hold the matched USB device.</desc>
11318 </const>
11319 </enum>
11320
11321 <enumerator
11322 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11323 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11324 />
11325
11326 <collection
11327 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11328 enumerator="IHostUSBDeviceFilterEnumerator"
11329 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11330 readonly="yes"
11331 />
11332
11333 <interface
11334 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11335 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11336 wsmap="managed"
11337 >
11338 <desc>
11339 The IHostUSBDeviceFilter interface represents a global filter for a
11340 physical USB device used by the host computer. Used indirectly in
11341 <link to="IHost::USBDeviceFilters"/>.
11342
11343 Using filters of this type, the host computer determines the initial
11344 state of the USB device after it is physically attached to the
11345 host's USB controller.
11346
11347 <note>
11348 The <link to="#remote"/> attribute is ignored by this type of
11349 filters, because it makes sense only for
11350 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11351 </note>
11352
11353 <see>IHost::USBDeviceFilters</see>
11354 </desc>
11355
11356 <attribute name="action" type="USBDeviceFilterAction">
11357 <desc>
11358 Action performed by the host when an attached USB device
11359 matches this filter.
11360 </desc>
11361 </attribute>
11362
11363 </interface>
11364
11365 <!--
11366 // IAudioAdapter
11367 /////////////////////////////////////////////////////////////////////////
11368 -->
11369
11370 <enum
11371 name="AudioDriverType"
11372 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11373 >
11374 <desc>
11375 Host audio driver type.
11376 </desc>
11377
11378 <const name="Null" value="0">
11379 <desc>Null value, also means "dummy audio driver".</desc>
11380 </const>
11381 <const name="WinMM" value="1"/>
11382 <const name="OSS" value="2"/>
11383 <const name="ALSA" value="3"/>
11384 <const name="DirectSound" value="4"/>
11385 <const name="CoreAudio" value="5"/>
11386 <const name="MMPM" value="6"/>
11387 <const name="Pulse" value="7"/>
11388 <const name="SolAudio" value="8"/>
11389 </enum>
11390
11391 <enum
11392 name="AudioControllerType"
11393 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11394 >
11395 <desc>
11396 Virtual audio controller type.
11397 </desc>
11398
11399 <const name="AC97" value="0"/>
11400 <const name="SB16" value="1"/>
11401 </enum>
11402
11403 <interface
11404 name="IAudioAdapter" extends="$unknown"
11405 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11406 wsmap="managed"
11407 >
11408 <desc>
11409 The IAudioAdapter interface represents the virtual audio adapter of
11410 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11411 </desc>
11412 <attribute name="enabled" type="boolean">
11413 <desc>
11414 Flag whether the audio adapter is present in the
11415 guest system. If disabled, the virtual guest hardware will
11416 not contain any audio adapter. Can only be changed when
11417 the VM is not running.
11418 </desc>
11419 </attribute>
11420 <attribute name="audioController" type="AudioControllerType">
11421 <desc>
11422 The audio hardware we emulate.
11423 </desc>
11424 </attribute>
11425 <attribute name="audioDriver" type="AudioDriverType">
11426 <desc>
11427 Audio driver the adapter is connected to. This setting
11428 can only be changed when the VM is not running.
11429 </desc>
11430 </attribute>
11431 </interface>
11432
11433 <!--
11434 // IVRDPServer
11435 /////////////////////////////////////////////////////////////////////////
11436 -->
11437
11438 <enum
11439 name="VRDPAuthType"
11440 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11441 >
11442 <desc>
11443 VRDP authentication type.
11444 </desc>
11445
11446 <const name="Null" value="0">
11447 <desc>Null value, also means "no authentication".</desc>
11448 </const>
11449 <const name="External" value="1"/>
11450 <const name="Guest" value="2"/>
11451 </enum>
11452
11453 <interface
11454 name="IVRDPServer" extends="$unknown"
11455 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11456 wsmap="managed"
11457 >
11458 <attribute name="enabled" type="boolean">
11459 <desc>VRDP server status.</desc>
11460 </attribute>
11461
11462 <attribute name="port" type="unsigned long">
11463 <desc>
11464 VRDP server port number.
11465 <note>
11466 Setting the value of this property to <tt>0</tt> will reset the port
11467 number to the default value which is
11468 currently <tt>3389</tt>. Reading this property will always return a
11469 real port number, even after it has been set to <tt>0</tt> (in which
11470 case the default port is returned).
11471 </note>
11472 </desc>
11473 </attribute>
11474
11475 <attribute name="netAddress" type="wstring">
11476 <desc>VRDP server address.</desc>
11477 </attribute>
11478
11479 <attribute name="authType" type="VRDPAuthType">
11480 <desc>VRDP authentication method.</desc>
11481 </attribute>
11482
11483 <attribute name="authTimeout" type="unsigned long">
11484 <desc>Timeout for guest authentication. Milliseconds.</desc>
11485 </attribute>
11486
11487 <attribute name="allowMultiConnection" type="boolean">
11488 <desc>
11489 Flag whether multiple simultaneous connections to the VM are permitted.
11490 Note that this will be replaced by a more powerful mechanism in the future.
11491 </desc>
11492 </attribute>
11493
11494 <attribute name="reuseSingleConnection" type="boolean">
11495 <desc>
11496 Flag whether the existing connection must be dropped and a new connection
11497 must be established by the VRDP server, when a new client connects in single
11498 connection mode.
11499 </desc>
11500 </attribute>
11501
11502 </interface>
11503
11504
11505 <!--
11506 // ISharedFolder
11507 /////////////////////////////////////////////////////////////////////////
11508 -->
11509
11510 <enumerator
11511 name="ISharedFolderEnumerator" type="ISharedFolder"
11512 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11513 />
11514
11515 <collection
11516 name="ISharedFolderCollection" type="ISharedFolder"
11517 enumerator="ISharedFolderEnumerator"
11518 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11519 readonly="yes">
11520
11521 <method name="findByName">
11522 <desc>
11523 Searches this collection for a shared folder with the given logical
11524 name.
11525 <note>
11526 The method returns an error if the given name does not correspond to
11527 any shared folder in the collection.
11528 </note>
11529 </desc>
11530 <param name="name" type="wstring" dir="in">
11531 <desc>Logical name of the shared folder to search for</desc>
11532 </param>
11533 <param name="sharedFolder" type="ISharedFolder" dir="return">
11534 <desc>Found shared folder object</desc>
11535 </param>
11536 </method>
11537
11538 </collection>
11539
11540 <interface
11541 name="ISharedFolder" extends="$unknown"
11542 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11543 wsmap="struct"
11544 >
11545 <desc>
11546 The ISharedFolder interface represents a folder in the host computer's
11547 file system accessible from the guest OS running inside a virtual
11548 machine using an associated logical name.
11549
11550 There are three types of shared folders:
11551 <ul>
11552 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11553 folders available to all virtual machines.</li>
11554 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11555 VM-specific shared folders available to the given virtual machine at
11556 startup.</li>
11557 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11558 VM-specific shared folders created in the session context (for
11559 example, when the virtual machine is running) and automatically
11560 discarded when the session is closed (the VM is powered off).</li>
11561 </ul>
11562
11563 Logical names of shared folders must be unique within the given scope
11564 (global, permanent or transient). However, they do not need to be unique
11565 across scopes. In this case, the definition of the shared folder in a
11566 more specific scope takes precedence over definitions in all other
11567 scopes. The order of precedence is (more specific to more general):
11568 <ol>
11569 <li>Transient definitions</li>
11570 <li>Permanent definitions</li>
11571 <li>Global definitions</li>
11572 </ol>
11573
11574 For example, if MyMachine has a shared folder named
11575 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11576 transient shared folder named <tt>C_DRIVE</tt> (that points
11577 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11578 of <tt>C_DRIVE</tt> in the guest OS so
11579 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11580 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11581 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11582 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11583 to <tt>C:\\</tt> if it still exists.
11584
11585 Note that permanent and transient shared folders of different machines
11586 are in different name spaces, so they don't overlap and don't need to
11587 have unique logical names.
11588
11589 <note>
11590 Global shared folders are not implemented in the current version of the
11591 product.
11592 </note>
11593 </desc>
11594
11595 <attribute name="name" type="wstring" readonly="yes">
11596 <desc>Logical name of the shared folder.</desc>
11597 </attribute>
11598
11599 <attribute name="hostPath" type="wstring" readonly="yes">
11600 <desc>Full path to the shared folder in the host file system.</desc>
11601 </attribute>
11602
11603 <attribute name="accessible" type="boolean" readonly="yes">
11604 <desc>
11605 Whether the folder defined by the host path is currently
11606 accessible or not.
11607 For example, the folder can be unaccessible if it is placed
11608 on the network share that is not available by the time
11609 this property is read.
11610 </desc>
11611 </attribute>
11612
11613 <attribute name="writable" type="boolean" readonly="yes">
11614 <desc>
11615 Whether the folder defined by the host path is writable or
11616 not.
11617 </desc>
11618 </attribute>
11619
11620 <attribute name="lastAccessError" type="wstring" readonly="yes">
11621 <desc>
11622 Text message that represents the result of the last accessibility
11623 check.
11624
11625 Accessibility checks are performed each time the <link to="#accessible"/>
11626 attribute is read. A @c null string is returned if the last
11627 accessibility check was successful. A non-null string indicates a
11628 failure and should normally describe a reason of the failure (for
11629 example, a file read error).
11630 </desc>
11631 </attribute>
11632
11633 </interface>
11634
11635 <!--
11636 // ISession
11637 /////////////////////////////////////////////////////////////////////////
11638 -->
11639
11640 <interface
11641 name="IInternalSessionControl" extends="$unknown"
11642 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11643 internal="yes"
11644 wsmap="suppress"
11645 >
11646 <method name="getPID">
11647 <desc>PID of the process that has created this Session object.
11648 </desc>
11649 <param name="pid" type="unsigned long" dir="return"/>
11650 </method>
11651
11652 <method name="getRemoteConsole">
11653 <desc>
11654 Returns the console object suitable for remote control.
11655
11656 <result name="VBOX_E_INVALID_VM_STATE">
11657 Session state prevents operation.
11658 </result>
11659 <result name="VBOX_E_INVALID_OBJECT_STATE">
11660 Session type prevents operation.
11661 </result>
11662
11663 </desc>
11664 <param name="console" type="IConsole" dir="return"/>
11665 </method>
11666
11667 <method name="assignMachine">
11668 <desc>
11669 Assigns the machine object associated with this direct-type
11670 session or informs the session that it will be a remote one
11671 (if @a machine == NULL).
11672
11673 <result name="VBOX_E_INVALID_VM_STATE">
11674 Session state prevents operation.
11675 </result>
11676 <result name="VBOX_E_INVALID_OBJECT_STATE">
11677 Session type prevents operation.
11678 </result>
11679
11680 </desc>
11681 <param name="machine" type="IMachine" dir="in"/>
11682 </method>
11683
11684 <method name="assignRemoteMachine">
11685 <desc>
11686 Assigns the machine and the (remote) console object associated with
11687 this remote-type session.
11688
11689 <result name="VBOX_E_INVALID_VM_STATE">
11690 Session state prevents operation.
11691 </result>
11692
11693 </desc>
11694 <param name="machine" type="IMachine" dir="in"/>
11695 <param name="console" type="IConsole" dir="in"/>
11696 </method>
11697
11698 <method name="updateMachineState">
11699 <desc>
11700 Updates the machine state in the VM process.
11701 Must be called only in certain cases
11702 (see the method implementation).
11703
11704 <result name="VBOX_E_INVALID_VM_STATE">
11705 Session state prevents operation.
11706 </result>
11707 <result name="VBOX_E_INVALID_OBJECT_STATE">
11708 Session type prevents operation.
11709 </result>
11710
11711 </desc>
11712 <param name="aMachineState" type="MachineState" dir="in"/>
11713 </method>
11714
11715 <method name="uninitialize">
11716 <desc>
11717 Uninitializes (closes) this session. Used by VirtualBox to close
11718 the corresponding remote session when the direct session dies
11719 or gets closed.
11720
11721 <result name="VBOX_E_INVALID_VM_STATE">
11722 Session state prevents operation.
11723 </result>
11724
11725 </desc>
11726 </method>
11727
11728 <method name="onDVDDriveChange">
11729 <desc>
11730 Triggered when settings of the DVD drive object of the
11731 associated virtual machine have changed.
11732
11733 <result name="VBOX_E_INVALID_VM_STATE">
11734 Session state prevents operation.
11735 </result>
11736 <result name="VBOX_E_INVALID_OBJECT_STATE">
11737 Session type prevents operation.
11738 </result>
11739
11740 </desc>
11741 </method>
11742
11743 <method name="onFloppyDriveChange">
11744 <desc>
11745 Triggered when settings of the floppy drive object of the
11746 associated virtual machine have changed.
11747
11748 <result name="VBOX_E_INVALID_VM_STATE">
11749 Session state prevents operation.
11750 </result>
11751 <result name="VBOX_E_INVALID_OBJECT_STATE">
11752 Session type prevents operation.
11753 </result>
11754
11755 </desc>
11756 </method>
11757
11758 <method name="onNetworkAdapterChange">
11759 <desc>
11760 Triggered when settings of a network adapter of the
11761 associated virtual machine have changed.
11762
11763 <result name="VBOX_E_INVALID_VM_STATE">
11764 Session state prevents operation.
11765 </result>
11766 <result name="VBOX_E_INVALID_OBJECT_STATE">
11767 Session type prevents operation.
11768 </result>
11769
11770 </desc>
11771 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11772 </method>
11773
11774 <method name="onSerialPortChange">
11775 <desc>
11776 Triggered when settings of a serial port of the
11777 associated virtual machine have changed.
11778
11779 <result name="VBOX_E_INVALID_VM_STATE">
11780 Session state prevents operation.
11781 </result>
11782 <result name="VBOX_E_INVALID_OBJECT_STATE">
11783 Session type prevents operation.
11784 </result>
11785
11786 </desc>
11787 <param name="serialPort" type="ISerialPort" dir="in"/>
11788 </method>
11789
11790 <method name="onParallelPortChange">
11791 <desc>
11792 Triggered when settings of a parallel port of the
11793 associated virtual machine have changed.
11794
11795 <result name="VBOX_E_INVALID_VM_STATE">
11796 Session state prevents operation.
11797 </result>
11798 <result name="VBOX_E_INVALID_OBJECT_STATE">
11799 Session type prevents operation.
11800 </result>
11801
11802 </desc>
11803 <param name="parallelPort" type="IParallelPort" dir="in"/>
11804 </method>
11805
11806 <method name="onVRDPServerChange">
11807 <desc>
11808 Triggered when settings of the VRDP server object of the
11809 associated virtual machine have changed.
11810
11811 <result name="VBOX_E_INVALID_VM_STATE">
11812 Session state prevents operation.
11813 </result>
11814 <result name="VBOX_E_INVALID_OBJECT_STATE">
11815 Session type prevents operation.
11816 </result>
11817
11818 </desc>
11819 </method>
11820
11821 <method name="onUSBControllerChange">
11822 <desc>
11823 Triggered when settings of the USB controller object of the
11824 associated virtual machine have changed.
11825
11826 <result name="VBOX_E_INVALID_VM_STATE">
11827 Session state prevents operation.
11828 </result>
11829 <result name="VBOX_E_INVALID_OBJECT_STATE">
11830 Session type prevents operation.
11831 </result>
11832
11833 </desc>
11834 </method>
11835
11836 <method name="onSharedFolderChange">
11837 <desc>
11838 Triggered when a permanent (global or machine) shared folder has been
11839 created or removed.
11840 <note>
11841 We don't pass shared folder parameters in this notification because
11842 the order in which parallel notifications are delivered is not defined,
11843 therefore it could happen that these parameters were outdated by the
11844 time of processing this notification.
11845 </note>
11846
11847 <result name="VBOX_E_INVALID_VM_STATE">
11848 Session state prevents operation.
11849 </result>
11850 <result name="VBOX_E_INVALID_OBJECT_STATE">
11851 Session type prevents operation.
11852 </result>
11853
11854 </desc>
11855 <param name="global" type="boolean" dir="in"/>
11856 </method>
11857
11858 <method name="onUSBDeviceAttach">
11859 <desc>
11860 Triggered when a request to capture a USB device (as a result
11861 of matched USB filters or direct call to
11862 <link to="IConsole::attachUSBDevice"/>) has completed.
11863 A @c null @a error object means success, otherwise it
11864 describes a failure.
11865
11866 <result name="VBOX_E_INVALID_VM_STATE">
11867 Session state prevents operation.
11868 </result>
11869 <result name="VBOX_E_INVALID_OBJECT_STATE">
11870 Session type prevents operation.
11871 </result>
11872
11873 </desc>
11874 <param name="device" type="IUSBDevice" dir="in"/>
11875 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11876 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11877 </method>
11878
11879 <method name="onUSBDeviceDetach">
11880 <desc>
11881 Triggered when a request to release the USB device (as a result
11882 of machine termination or direct call to
11883 <link to="IConsole::detachUSBDevice"/>) has completed.
11884 A @c null @a error object means success, otherwise it
11885
11886 <result name="VBOX_E_INVALID_VM_STATE">
11887 Session state prevents operation.
11888 </result>
11889 <result name="VBOX_E_INVALID_OBJECT_STATE">
11890 Session type prevents operation.
11891 </result>
11892
11893 </desc>
11894 <param name="id" type="uuid" dir="in"/>
11895 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11896 </method>
11897
11898 <method name="onShowWindow">
11899 <desc>
11900 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11901 <link to="IMachine::showConsoleWindow()"/> in order to notify
11902 console callbacks
11903 <link to="IConsoleCallback::onCanShowWindow()"/>
11904 and <link to="IConsoleCallback::onShowWindow()"/>.
11905
11906 <result name="VBOX_E_INVALID_OBJECT_STATE">
11907 Session type prevents operation.
11908 </result>
11909
11910 </desc>
11911 <param name="check" type="boolean" dir="in"/>
11912 <param name="canShow" type="boolean" dir="out"/>
11913 <param name="winId" type="unsigned long long" dir="out"/>
11914 </method>
11915
11916 <method name="accessGuestProperty">
11917 <desc>
11918 Called by <link to="IMachine::getGuestProperty()"/> and by
11919 <link to="IMachine::setGuestProperty()"/> in order to read and
11920 modify guest properties.
11921
11922 <result name="VBOX_E_INVALID_VM_STATE">
11923 Machine session is not open.
11924 </result>
11925 <result name="VBOX_E_INVALID_OBJECT_STATE">
11926 Session type is not direct.
11927 </result>
11928
11929 </desc>
11930 <param name="name" type="wstring" dir="in"/>
11931 <param name="value" type="wstring" dir="in"/>
11932 <param name="flags" type="wstring" dir="in"/>
11933 <param name="isSetter" type="boolean" dir="in"/>
11934 <param name="retValue" type="wstring" dir="out"/>
11935 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11936 <param name="retFlags" type="wstring" dir="out"/>
11937 </method>
11938
11939 <method name="enumerateGuestProperties">
11940 <desc>
11941 Return a list of the guest properties matching a set of patterns along
11942 with their values, time stamps and flags.
11943
11944 <result name="VBOX_E_INVALID_VM_STATE">
11945 Machine session is not open.
11946 </result>
11947 <result name="VBOX_E_INVALID_OBJECT_STATE">
11948 Session type is not direct.
11949 </result>
11950
11951 </desc>
11952 <param name="patterns" type="wstring" dir="in">
11953 <desc>
11954 The patterns to match the properties against as a comma-separated
11955 string. If this is empty, all properties currently set will be
11956 returned.
11957 </desc>
11958 </param>
11959 <param name="key" type="wstring" dir="out" safearray="yes">
11960 <desc>
11961 The key names of the properties returned.
11962 </desc>
11963 </param>
11964 <param name="value" type="wstring" dir="out" safearray="yes">
11965 <desc>
11966 The values of the properties returned. The array entries match the
11967 corresponding entries in the @a key array.
11968 </desc>
11969 </param>
11970 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11971 <desc>
11972 The time stamps of the properties returned. The array entries match
11973 the corresponding entries in the @a key array.
11974 </desc>
11975 </param>
11976 <param name="flags" type="wstring" dir="out" safearray="yes">
11977 <desc>
11978 The flags of the properties returned. The array entries match the
11979 corresponding entries in the @a key array.
11980 </desc>
11981 </param>
11982 </method>
11983
11984 </interface>
11985
11986 <interface
11987 name="ISession" extends="$dispatched"
11988 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11989 wsmap="managed"
11990 >
11991 <desc>
11992 The ISession interface represents a serialization primitive for virtual
11993 machines.
11994
11995 With VirtualBox, every time one wishes to manipulate a virtual machine
11996 (e.g. change its settings or start execution), a session object is
11997 required. Such an object must be passed to one of the session methods
11998 that open the given session, which then initiates the machine manipulation.
11999
12000 A session serves several purposes: it identifies to the inter-process VirtualBox
12001 code which process is currently working with the virtual machine, and it ensures
12002 that there are no incompatible requests from several processes for the
12003 same virtual machine. Session objects can therefore be thought of as mutex
12004 semaphores that lock virtual machines to prevent conflicting accesses from
12005 several processes.
12006
12007 How sessions objects are used depends on whether you use the Main API
12008 via COM or via the webservice:
12009
12010 <ul>
12011 <li>When using the COM API directly, an object of the Session class from the
12012 VirtualBox type library needs to be created. In regular COM C++ client code,
12013 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12014 This object will then act as a local session object in further calls to open
12015 a session.
12016 </li>
12017
12018 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12019 one session object automatically when <link to="IWebsessionManager::logon" />
12020 is called. A managed object reference to that session object can be retrieved by
12021 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12022 reference can then be used to open sessions.
12023 </li>
12024 </ul>
12025
12026 Sessions are mainly used in two variations:
12027
12028 <ul>
12029 <li>
12030 To start a virtual machine in a separate process, one would call
12031 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12032 object as its first parameter. This session then identifies the caller
12033 and lets him control the started machine (for example, pause machine
12034 execution or power it down) as well as be notified about machine
12035 execution state changes.
12036 </li>
12037
12038 <li>To alter machine settings, or to start machine execution within the
12039 current process, one needs to open a direct session for the machine first by
12040 calling <link to="IVirtualBox::openSession"/>. While a direct session
12041 is open within one process, no any other process may open another direct
12042 session for the same machine. This prevents the machine from being changed
12043 by other processes while it is running or while the machine is being configured.
12044 </li>
12045 </ul>
12046
12047 One also can attach to an existing direct session already opened by
12048 another process (for example, in order to send a control request to the
12049 virtual machine such as the pause or the reset request). This is done by
12050 calling <link to="IVirtualBox::openExistingSession"/>.
12051
12052 <note>
12053 Unless you are trying to write a new VirtualBox front-end that
12054 performs direct machine execution (like the VirtualBox or VBoxSDL
12055 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12056 session opened by <link to="IVirtualBox::openSession"/> and use this
12057 session only to change virtual machine settings. If you simply want to
12058 start virtual machine execution using one of the existing front-ends
12059 (for example the VirtualBox GUI or headless server), simply use
12060 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12061 will power up the machine automatically for you.
12062 </note>
12063 </desc>
12064
12065 <attribute name="state" type="SessionState" readonly="yes">
12066 <desc>Current state of this session.</desc>
12067 </attribute>
12068
12069 <attribute name="type" type="SessionType" readonly="yes">
12070 <desc>
12071 Type of this session. The value of this attribute is valid only
12072 if the session is currently open (i.e. its #state is
12073 SessionType_SessionOpen), otherwise an error will be returned.
12074 </desc>
12075 </attribute>
12076
12077 <attribute name="machine" type="IMachine" readonly="yes">
12078 <desc>Machine object associated with this session.</desc>
12079 </attribute>
12080
12081 <attribute name="console" type="IConsole" readonly="yes">
12082 <desc>Console object associated with this session.</desc>
12083 </attribute>
12084
12085 <method name="close">
12086 <desc>
12087 Closes a session that was previously opened.
12088
12089 It is recommended that every time an "open session" method (such as
12090 <link to="IVirtualBox::openRemoteSession" /> or
12091 <link to="IVirtualBox::openSession" />) has been called to
12092 manipulate a virtual machine, the caller invoke
12093 ISession::close() when it's done doing so. Since sessions are
12094 serialization primitives much like ordinary mutexes, they are
12095 best used the same way: for each "open" call, there should be
12096 a matching "close" call, even when errors occur.
12097
12098 Otherwise, if a direct session for a machine opened with
12099 <link to="IVirtualBox::openSession()"/> is not explicitly closed
12100 when the application terminates, the state of the machine will
12101 be set to <link to="MachineState_Aborted" /> on the server.
12102
12103 Generally, it is recommended to close all open sessions explicitly
12104 before terminating the application (regardless of the reason for
12105 the termination).
12106
12107 <note>
12108 Do not expect the session state (<link to="ISession::state" />
12109 to return to "Closed" immediately after you invoke
12110 ISession::close(), particularly if you have started a remote
12111 session to execute the VM in a new process. The session state will
12112 automatically return to "Closed" once the VM is no longer executing,
12113 which can of course take a very long time.
12114 </note>
12115
12116 <result name="E_UNEXPECTED">
12117 Session is not open.
12118 </result>
12119
12120 </desc>
12121 </method>
12122
12123 </interface>
12124
12125 <!--
12126 // ISATAController
12127 /////////////////////////////////////////////////////////////////////////
12128 -->
12129
12130 <interface
12131 name="ISATAController" extends="$unknown"
12132 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12133 wsmap="managed"
12134 >
12135 <attribute name="enabled" type="boolean">
12136 <desc>
12137 Flag whether the SATA controller is present in the
12138 guest system. If disabled, the virtual guest hardware will
12139 not contain any SATA controller. Can only be changed when
12140 the VM is powered off.
12141 </desc>
12142 </attribute>
12143
12144 <attribute name="portCount" type="unsigned long">
12145 <desc>
12146 The number of usable ports on the SATA controller.
12147 It ranges from 1 to 30.
12148 </desc>
12149 </attribute>
12150
12151 <method name="GetIDEEmulationPort">
12152 <desc>
12153 Gets the corresponding port number which is emulated as an IDE device.
12154
12155 <result name="E_INVALIDARG">
12156 The @a devicePosition is not in the range 0 to 3.
12157 </result>
12158
12159 </desc>
12160 <param name="devicePosition" type="long" dir="in"/>
12161 <param name="portNumber" type="long" dir="return"/>
12162 </method>
12163
12164 <method name="SetIDEEmulationPort">
12165 <desc>
12166 Sets the port number which is emulated as an IDE device.
12167
12168 <result name="E_INVALIDARG">
12169 The @a devicePosition is not in the range 0 to 3 or the
12170 @a portNumber is not in the range 0 to 29.
12171 </result>
12172
12173 </desc>
12174 <param name="devicePosition" type="long" dir="in"/>
12175 <param name="portNumber" type="long" dir="in"/>
12176 </method>
12177
12178 </interface>
12179
12180<if target="wsdl">
12181
12182 <!--
12183 // IManagedObjectRef
12184 /////////////////////////////////////////////////////////////////////////
12185 -->
12186
12187 <interface
12188 name="IManagedObjectRef" extends="$unknown"
12189 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12190 internal="yes"
12191 wsmap="managed"
12192 wscpp="hardcoded"
12193 >
12194 <desc>
12195 Managed object reference.
12196
12197 Only within the webservice, a managed object reference (which is really
12198 an opaque number) allows a webservice client to address an object
12199 that lives in the address space of the webservice server.
12200
12201 Behind each managed object reference, there is a COM object that lives
12202 in the webservice server's address space. The COM object is not freed
12203 until the managed object reference is released, either by an explicit
12204 call to <link to="IManagedObjectRef::release" /> or by logging off from
12205 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12206 all objects created during the webservice session.
12207
12208 Whenever a method call of the VirtualBox API returns a COM object, the
12209 webservice representation of that method will instead return a
12210 managed object reference, which can then be used to invoke methods
12211 on that object.
12212 </desc>
12213
12214 <method name="getInterfaceName">
12215 <desc>
12216 Returns the name of the interface that this managed object represents,
12217 for example, "IMachine", as a string.
12218 </desc>
12219 <param name="return" type="wstring" dir="return"/>
12220 </method>
12221
12222 <method name="release">
12223 <desc>
12224 Releases this managed object reference and frees the resources that
12225 were allocated for it in the webservice server process. After calling
12226 this method, the identifier of the reference can no longer be used.
12227 </desc>
12228 </method>
12229
12230 </interface>
12231
12232 <!--
12233 // IWebsessionManager
12234 /////////////////////////////////////////////////////////////////////////
12235 -->
12236
12237 <interface
12238 name="IWebsessionManager" extends="$unknown"
12239 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12240 internal="yes"
12241 wsmap="global"
12242 wscpp="hardcoded"
12243 >
12244 <desc>
12245 Websession manager. This provides essential services
12246 to webservice clients.
12247 </desc>
12248 <method name="logon">
12249 <desc>
12250 Logs a new client onto the webservice and returns a managed object reference to
12251 the IVirtualBox instance, which the client can then use as a basis to further
12252 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12253 interface, in one way or the other.
12254 </desc>
12255 <param name="username" type="wstring" dir="in"/>
12256 <param name="password" type="wstring" dir="in"/>
12257 <param name="return" type="IVirtualBox" dir="return"/>
12258 </method>
12259
12260 <method name="getSessionObject">
12261 <desc>
12262 Returns a managed object reference to the internal ISession object that was created
12263 for this web service session when the client logged on.
12264
12265 <see>ISession</see>
12266 </desc>
12267 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12268 <param name="return" type="ISession" dir="return"/>
12269 </method>
12270
12271 <method name="logoff">
12272 <desc>
12273 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12274 and destroys all resources associated with the session (most importantly, all
12275 managed objects created in the server while the session was active).
12276 </desc>
12277 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12278 </method>
12279
12280 </interface>
12281
12282</if>
12283
12284 <!--
12285 // IPerformanceCollector & friends
12286 /////////////////////////////////////////////////////////////////////////
12287 -->
12288
12289 <interface
12290 name="IPerformanceMetric" extends="$unknown"
12291 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12292 >
12293 <desc>
12294 The IPerformanceMetric interface represents parameters of the given
12295 performance metric.
12296 </desc>
12297
12298 <attribute name="metricName" type="wstring" readonly="yes">
12299 <desc>
12300 Name of the metric.
12301 </desc>
12302 </attribute>
12303
12304 <attribute name="object" type="$unknown" readonly="yes">
12305 <desc>
12306 Object this metric belongs to.
12307 </desc>
12308 </attribute>
12309
12310 <attribute name="description" type="wstring" readonly="yes">
12311 <desc>
12312 Textual description of the metric.
12313 </desc>
12314 </attribute>
12315
12316 <attribute name="period" type="unsigned long" readonly="yes">
12317 <desc>
12318 Time interval between samples, measured in seconds.
12319 </desc>
12320 </attribute>
12321
12322 <attribute name="count" type="unsigned long" readonly="yes">
12323 <desc>
12324 Number of recent samples retained by the performance collector for this
12325 metric.
12326
12327 When the collected sample count exceeds this number, older samples
12328 are discarded.
12329 </desc>
12330 </attribute>
12331
12332 <attribute name="unit" type="wstring" readonly="yes">
12333 <desc>
12334 Unit of measurement.
12335 </desc>
12336 </attribute>
12337
12338 <attribute name="minimumValue" type="long" readonly="yes">
12339 <desc>
12340 Minimum possible value of this metric.
12341 </desc>
12342 </attribute>
12343
12344 <attribute name="maximumValue" type="long" readonly="yes">
12345 <desc>
12346 Maximum possible value of this metric.
12347 </desc>
12348 </attribute>
12349 </interface>
12350
12351 <interface
12352 name="IPerformanceCollector" extends="$unknown"
12353 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12354 wsmap="managed"
12355 >
12356 <desc>
12357 The IPerformanceCollector interface represents a service that collects and
12358 stores performance metrics data.
12359
12360 Performance metrics are associated with objects like IHost and
12361 IMachine. Each object has a distinct set of performance metrics.
12362 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12363
12364 Metric data are collected at the specified intervals and are retained
12365 internally. The interval and the number of samples retained can be set
12366 with <link to="IPerformanceCollector::setupMetrics" />.
12367
12368 Metrics are organized hierarchically, each level separated by slash (/).
12369 General scheme for metric name is
12370 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12371 metric name stands for: CPU category, Load metric, User submetric, average
12372 aggregate. An aggregate function is computed over all retained data. Valid
12373 aggregate functions are:
12374
12375 <ul>
12376 <li>avg -- average</li>
12377 <li>min -- minimum</li>
12378 <li>max -- maximum</li>
12379 </ul>
12380
12381 "Category/Metric" together form base metric name. A base metric is the
12382 smallest unit for which a sampling interval and the number of retained
12383 samples can be set. Only base metrics can be enabled and disabled. All
12384 sub-metrics are collected when their base metric is collected.
12385 Collected values for any set of sub-metrics can be queried with
12386 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12387 metric parameters, querying metric data, enabling or disabling metrics
12388 wildcards can be used in metric names to specify a subset of metrics. For
12389 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12390 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12391 values without aggregates <tt>*:</tt> can be used.
12392
12393 The valid names for base metrics are:
12394
12395 <ul>
12396 <li>CPU/Load</li>
12397 <li>CPU/MHz</li>
12398 <li>RAM/Usage</li>
12399 </ul>
12400
12401 The general sequence for collecting and retrieving the metrics is:
12402 <ul>
12403 <li>
12404 Obtain an instance of IPerformanceCollector with
12405 <link to="IVirtualBox::performanceCollector" />
12406 </li>
12407 <li>
12408 Allocate and populate an array with references to objects the metrics
12409 will be collected for. Use references to IHost and IMachine objects.
12410 </li>
12411 <li>
12412 Allocate and populate an array with base metric names the data will be
12413 collected for.
12414 </li>
12415 <li>
12416 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12417 metric data will be collected and stored.
12418 </li>
12419 <li>
12420 Wait for the data to get collected.
12421 </li>
12422 <li>
12423 Allocate and populate an array with references to objects the metric
12424 values will be queried for. You can re-use the object array used for
12425 setting base metrics.
12426 </li>
12427 <li>
12428 Allocate and populate an array with metric names the data will be
12429 collected for. Note that metric names differ from base metric names.
12430 </li>
12431 <li>
12432 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12433 have been collected so far are returned. Note that the values are still
12434 retained internally and data collection continues.
12435 </li>
12436 </ul>
12437
12438 For an example of usage refer to the following files in VirtualBox SDK:
12439 <ul>
12440 <li>
12441 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12442 </li>
12443 <li>
12444 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12445 </li>
12446 </ul>
12447 </desc>
12448
12449 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12450 <desc>
12451 Array of unique names of metrics.
12452
12453 This array represents all metrics supported by the performance
12454 collector. Individual objects do not necessarily support all of them.
12455 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12456 list of supported metrics for a particular object.
12457 </desc>
12458 </attribute>
12459
12460 <method name="getMetrics">
12461 <desc>
12462 Returns parameters of specified metrics for a set of objects.
12463 <note>
12464 @c Null metrics array means all metrics. @c Null object array means
12465 all existing objects.
12466 </note>
12467 </desc>
12468 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12469 <desc>
12470 Metric name filter. Currently, only a comma-separated list of metrics
12471 is supported.
12472 </desc>
12473 </param>
12474 <param name="objects" type="$unknown" dir="in" safearray="yes">
12475 <desc>
12476 Set of objects to return metric parameters for.
12477 </desc>
12478 </param>
12479 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12480 <desc>
12481 Array of returned metric parameters.
12482 </desc>
12483 </param>
12484 </method>
12485
12486 <method name="setupMetrics">
12487 <desc>
12488 Sets parameters of specified base metrics for a set of objects. Returns
12489 an array of <link to="IPerformanceMetric" /> describing the metrics have
12490 been affected.
12491 <note>
12492 @c Null or empty metric name array means all metrics. @c Null or empty
12493 object array means all existing objects. If metric name array contains
12494 a single element and object array contains many, the single metric
12495 name array element is applied to each object array element to form
12496 metric/object pairs.
12497 </note>
12498 </desc>
12499 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12500 <desc>
12501 Metric name filter. Comma-separated list of metrics with wildcard
12502 support.
12503 </desc>
12504 </param>
12505 <param name="objects" type="$unknown" dir="in" safearray="yes">
12506 <desc>
12507 Set of objects to setup metric parameters for.
12508 </desc>
12509 </param>
12510 <param name="period" type="unsigned long" dir="in">
12511 <desc>
12512 Time interval in seconds between two consecutive samples of performance
12513 data.
12514 </desc>
12515 </param>
12516 <param name="count" type="unsigned long" dir="in">
12517 <desc>
12518 Number of samples to retain in performance data history. Older samples
12519 get discarded.
12520 </desc>
12521 </param>
12522 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12523 <desc>
12524 Array of metrics that have been modified by the call to this method.
12525 </desc>
12526 </param>
12527 </method>
12528
12529 <method name="enableMetrics">
12530 <desc>
12531 Turns on collecting specified base metrics. Returns an array of
12532 <link to="IPerformanceMetric" /> describing the metrics have been
12533 affected.
12534 <note>
12535 @c Null or empty metric name array means all metrics. @c Null or empty
12536 object array means all existing objects. If metric name array contains
12537 a single element and object array contains many, the single metric
12538 name array element is applied to each object array element to form
12539 metric/object pairs.
12540 </note>
12541 </desc>
12542 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12543 <desc>
12544 Metric name filter. Comma-separated list of metrics with wildcard
12545 support.
12546 </desc>
12547 </param>
12548 <param name="objects" type="$unknown" dir="in" safearray="yes">
12549 <desc>
12550 Set of objects to enable metrics for.
12551 </desc>
12552 </param>
12553 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12554 <desc>
12555 Array of metrics that have been modified by the call to this method.
12556 </desc>
12557 </param>
12558 </method>
12559
12560 <method name="disableMetrics">
12561 <desc>
12562 Turns off collecting specified base metrics. Returns an array of
12563 <link to="IPerformanceMetric" /> describing the metrics have been
12564 affected.
12565 <note>
12566 @c Null or empty metric name array means all metrics. @c Null or empty
12567 object array means all existing objects. If metric name array contains
12568 a single element and object array contains many, the single metric
12569 name array element is applied to each object array element to form
12570 metric/object pairs.
12571 </note>
12572 </desc>
12573 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12574 <desc>
12575 Metric name filter. Comma-separated list of metrics with wildcard
12576 support.
12577 </desc>
12578 </param>
12579 <param name="objects" type="$unknown" dir="in" safearray="yes">
12580 <desc>
12581 Set of objects to disable metrics for.
12582 </desc>
12583 </param>
12584 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12585 <desc>
12586 Array of metrics that have been modified by the call to this method.
12587 </desc>
12588 </param>
12589 </method>
12590
12591 <method name="queryMetricsData">
12592 <desc>
12593 Queries collected metrics data for a set of objects.
12594
12595 The data itself and related metric information are returned in seven
12596 parallel and one flattened array of arrays. Elements of
12597 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12598 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12599 the same index describe one set of values corresponding to a single
12600 metric.
12601
12602 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12603 start and length of a sub-array is indicated by
12604 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12605 value for metric <tt>metricNames[i]</tt> is at
12606 <tt>returnData[returnIndices[i]]</tt>.
12607
12608 <note>
12609 @c Null or empty metric name array means all metrics. @c Null or empty
12610 object array means all existing objects. If metric name array contains
12611 a single element and object array contains many, the single metric
12612 name array element is applied to each object array element to form
12613 metric/object pairs.
12614 </note>
12615 <note>
12616 Data collection continues behind the scenes after call to @c
12617 queryMetricsData. The return data can be seen as the snapshot of
12618 the current state at the time of @c queryMetricsData call. The
12619 internally kept metric values are not cleared by the call. This makes
12620 possible querying different subsets of metrics or aggregates with
12621 subsequent calls. If periodic querying is needed it is highly
12622 suggested to query the values with @c interval*count period to avoid
12623 confusion. This way a completely new set of data values will be
12624 provided by each query.
12625 </note>
12626 </desc>
12627 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12628 <desc>
12629 Metric name filter. Comma-separated list of metrics with wildcard
12630 support.
12631 </desc>
12632 </param>
12633 <param name="objects" type="$unknown" dir="in" safearray="yes">
12634 <desc>
12635 Set of objects to query metrics for.
12636 </desc>
12637 </param>
12638 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12639 <desc>
12640 Names of metrics returned in @c returnData.
12641 </desc>
12642 </param>
12643 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12644 <desc>
12645 Objects associated with metrics returned in @c returnData.
12646 </desc>
12647 </param>
12648 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12649 <desc>
12650 Units of measurement for each returned metric.
12651 </desc>
12652 </param>
12653 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12654 <desc>
12655 Divisor that should be applied to return values in order to get
12656 floating point values. For example:
12657 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12658 will retrieve the floating point value of i-th sample of the first
12659 metric.
12660 </desc>
12661 </param>
12662 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12663 <desc>
12664 Sequence numbers of the first elements of value sequences of particular metrics
12665 returned in @c returnData. For aggregate metrics it is the sequence number of
12666 the sample the aggregate started calculation from.
12667 </desc>
12668 </param>
12669 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12670 <desc>
12671 Indices of the first elements of value sequences of particular metrics
12672 returned in @c returnData.
12673 </desc>
12674 </param>
12675 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12676 <desc>
12677 Lengths of value sequences of particular metrics.
12678 </desc>
12679 </param>
12680 <param name="returnData" type="long" dir="return" safearray="yes">
12681 <desc>
12682 Flattened array of all metric data containing sequences of values for
12683 each metric.
12684 </desc>
12685 </param>
12686 </method>
12687
12688 </interface>
12689
12690 <module name="VBoxSVC" context="LocalServer">
12691 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12692 namespace="virtualbox.org">
12693 <interface name="IVirtualBox" default="yes"/>
12694 </class>
12695 </module>
12696
12697 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12698 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12699 namespace="virtualbox.org">
12700 <interface name="ISession" default="yes"/>
12701 </class>
12702 </module>
12703
12704</library>
12705
12706</idl>
12707
12708<!-- 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