VirtualBox

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

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

OVF: add warnings support; RAM is MB now

  • Property svn:eol-style set to native
File size: 468.5 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
2981 Since importing the appliance may imply copying disk images, which can take a long
2982 time, this method operates asynchronously and returns an IProgress object to allow
2983 the caller to monitor the progress.
2984 </desc>
2985
2986 <param name="aProgress" type="IProgress" dir="return">
2987 <desc></desc>
2988 </param>
2989 </method>
2990
2991 </interface>
2992
2993 <enum
2994 name="VirtualSystemDescriptionType"
2995 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
2996 >
2997 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2998 a configuration value.</desc>
2999
3000 <const name="Ignore" value="1" />
3001 <const name="Name" value="2" />
3002 <const name="OS" value="3" />
3003 <const name="CPU" value="4" />
3004 <const name="Memory" value="5" />
3005 <const name="HardDiskControllerIDE" value="6" />
3006 <const name="HardDiskControllerSATA" value="7" />
3007 <const name="HardDiskControllerSCSI" value="8" />
3008 <const name="HardDiskImage" value="9" />
3009 <const name="CDROM" value="10" />
3010 <const name="Floppy" value="11" />
3011 <const name="NetworkAdapter" value="12" />
3012 <const name="USBController" value="13" />
3013 <const name="SoundCard" value="14" />
3014
3015 </enum>
3016
3017 <interface
3018 name="IVirtualSystemDescription" extends="$unknown"
3019 uuid="09b85139-0923-4f0e-9ba4-f1aa98d156e4"
3020 wsmap="managed"
3021 >
3022
3023 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3024 After <link to="IAppliance::interpret" /> has been called, that array contains
3025 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3026 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3027 into VirtualBox.
3028 </desc>
3029
3030 <method name="getDescription">
3031 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3032 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3033
3034 The list below identifies the value sets that are possible depending on the
3035 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3036 the array item with the same index in aOrigValue[] will contain the original value as contained
3037 in the OVF file (just for informational purposes), and the corresponding item in aConfigValues[]
3038 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3039 the aExtraConfigValues[] array item may also be used.
3040
3041 <ul>
3042 <li>
3043 "OS": the guest operating system type. There must be exactly one such array item on import. The
3044 corresponding item in aConfigValues[] contains the suggested guest operating system for VirtualBox.
3045 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3046 item in aOrigValues[] will contain a numerical value that described the operating system in the OVF
3047 (see <link to="CIMOSType" />).
3048 </li>
3049 <li>
3050 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3051 if none is present on import, then an automatic name will be created from the operating system
3052 type. The correponding item im aOrigValues[] will contain the suggested virtual machine name
3053 from the OVF file, and aConfigValues[] will contain a suggestion for a unique VirtualBox
3054 <link to="IMachine" /> name that does not exist yet.
3055 </li>
3056 <li>
3057 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3058 </li>
3059 <li>
3060 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3061 is present on import, then VirtualBox will set a meaningful default based on the operating system
3062 type.
3063 </li>
3064 <li>
3065 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3066 The items in aOrigValues[] and aConfigValues[] will either be "LsiLogic" or "BusLogic". The
3067 matching item in the aRefs[] array will contain an integer that other items of the "Harddisk"
3068 type can use to specify which hard disk controller a virtual disk should be connected to.
3069 </li>
3070 <li>
3071 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3072 has no value in aOrigValues[] or aAutoValues[]. The matching item in the aRefs[] array will be
3073 used as with SCSI controllers (see above).
3074 </li>
3075 <li>
3076 "Harddisk": a virtual hard disk, most probably as a reference to an image file. There can be an
3077 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. The
3078 array item in aOrigValues[] will contain the file specification from the OVF file, whereas the item
3079 in aConfigValues[] will contain a qualified path specification where the hard disk image should
3080 be copied to; this target image will then be registered with VirtualBox.
3081 The matching item in the aRefs[] array must contain a integer specifying the hard disk controller
3082 to connect the image to. This number must be the same as the integer used by one of the hard disk
3083 controller items (SCSI, SATA or IDE; see above).
3084 </li>
3085 <li>
3086 "NetworkAdapter": a network adapter. (todo document)
3087 </li>
3088 <li>
3089 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3090 present, sound support will be enabled for the new virtual machine. Note that the virtual
3091 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3092 may be different from the virtual soundcard expected by the appliance.
3093 </li>
3094 </ul>
3095
3096 </desc>
3097
3098 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3099 <desc></desc>
3100 </param>
3101
3102 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3103 <desc></desc>
3104 </param>
3105
3106 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
3107 <desc></desc>
3108 </param>
3109
3110 <param name="aConfigValues" type="wstring" dir="out" safearray="yes">
3111 <desc></desc>
3112 </param>
3113
3114 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3115 <desc></desc>
3116 </param>
3117
3118 </method>
3119
3120 <method name="disableItem">
3121 <desc>
3122 Disables part of the configuration, as represented by the array items returned by
3123 <link to="getDescription" />. For example, to disable USB support for a given
3124 virtual system, pass in the array item index of the USB controller; its type will
3125 then be changed by this method from "USBController" to "Ignore".
3126
3127 This works only for items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3128 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3129 and SoundCard.
3130 </desc>
3131
3132 <param name="index" type="unsigned long" dir="in">
3133 </param>
3134 </method>
3135
3136 <method name="SetFinalValues">
3137 <desc></desc>
3138
3139 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3140 <desc></desc>
3141 </param>
3142
3143 </method>
3144
3145 <method name="getWarnings">
3146 <desc>Returns textual warnings which occurs on the virtual system
3147 interpretion.</desc>
3148
3149 <param name="aWarnings" type="wstring" dir="out" safearray="yes">
3150 <desc></desc>
3151 </param>
3152 </method>
3153
3154 </interface>
3155
3156
3157 <!--
3158 // IMachine
3159 /////////////////////////////////////////////////////////////////////////
3160 -->
3161
3162 <enumerator
3163 name="IMachineEnumerator" type="IMachine"
3164 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3165 />
3166
3167 <collection
3168 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3169 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3170 readonly="yes"
3171 />
3172
3173 <interface
3174 name="IInternalMachineControl" extends="$unknown"
3175 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3176 internal="yes"
3177 wsmap="suppress"
3178 >
3179 <method name="updateState">
3180 <desc>
3181 Updates the VM state.
3182 <note>
3183 This operation will also update the settings file with
3184 the correct information about the saved state file
3185 and delete this file from disk when appropriate.
3186 </note>
3187 </desc>
3188 <param name="state" type="MachineState" dir="in"/>
3189 </method>
3190
3191 <method name="getIPCId">
3192 <param name="id" type="wstring" dir="return"/>
3193 </method>
3194
3195 <method name="runUSBDeviceFilters">
3196 <desc>
3197 Asks the server to run USB devices filters of the associated
3198 machine against the given USB device and tell if there is
3199 a match.
3200 <note>
3201 Intended to be used only for remote USB devices. Local
3202 ones don't require to call this method (this is done
3203 implicitly by the Host and USBProxyService).
3204 </note>
3205 </desc>
3206 <param name="device" type="IUSBDevice" dir="in"/>
3207 <param name="matched" type="boolean" dir="out"/>
3208 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3209 </method>
3210
3211 <method name="captureUSBDevice">
3212 <desc>
3213 Requests a capture of the given host USB device.
3214 When the request is completed, the VM process will
3215 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3216 notification.
3217 </desc>
3218 <param name="id" type="uuid" dir="in"/>
3219 </method>
3220
3221 <method name="detachUSBDevice">
3222 <desc>
3223 Notification that a VM is going to detach (done = false) or has
3224 already detached (done = true) the given USB device.
3225 When the done = true request is completed, the VM process will
3226 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3227 notification.
3228 <note>
3229 In the done = true case, the server must run its own filters
3230 and filters of all VMs but this one on the detached device
3231 as if it were just attached to the host computer.
3232 </note>
3233 </desc>
3234 <param name="id" type="uuid" dir="in"/>
3235 <param name="done" type="boolean" dir="in"/>
3236 </method>
3237
3238 <method name="autoCaptureUSBDevices">
3239 <desc>
3240 Requests a capture all matching USB devices attached to the host.
3241 When the request is completed, the VM process will
3242 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3243 notification per every captured device.
3244 </desc>
3245 </method>
3246
3247 <method name="detachAllUSBDevices">
3248 <desc>
3249 Notification that a VM that is being powered down. The done
3250 parameter indicates whether which stage of the power down
3251 we're at. When done = false the VM is announcing its
3252 intentions, while when done = true the VM is reporting
3253 what it has done.
3254 <note>
3255 In the done = true case, the server must run its own filters
3256 and filters of all VMs but this one on all detach devices as
3257 if they were just attached to the host computer.
3258 </note>
3259 </desc>
3260 <param name="done" type="boolean" dir="in"/>
3261 </method>
3262
3263 <method name="onSessionEnd">
3264 <desc>
3265 Triggered by the given session object when the session is about
3266 to close normally.
3267 </desc>
3268 <param name="session" type="ISession" dir="in">
3269 <desc>Session that is being closed</desc>
3270 </param>
3271 <param name="progress" type="IProgress" dir="return">
3272 <desc>
3273 Used to wait until the corresponding machine is actually
3274 dissociated from the given session on the server.
3275 Returned only when this session is a direct one.
3276 </desc>
3277 </param>
3278 </method>
3279
3280 <method name="beginSavingState">
3281 <desc>
3282 Called by the VM process to inform the server it wants to
3283 save the current state and stop the VM execution.
3284 </desc>
3285 <param name="progress" type="IProgress" dir="in">
3286 <desc>
3287 Progress object created by the VM process to wait until
3288 the state is saved.
3289 </desc>
3290 </param>
3291 <param name="stateFilePath" type="wstring" dir="out">
3292 <desc>
3293 File path the VM process must save the execution state to.
3294 </desc>
3295 </param>
3296 </method>
3297
3298 <method name="endSavingState">
3299 <desc>
3300 Called by the VM process to inform the server that saving
3301 the state previously requested by #beginSavingState is either
3302 successfully finished or there was a failure.
3303
3304 <result name="VBOX_E_FILE_ERROR">
3305 Settings file not accessible.
3306 </result>
3307 <result name="VBOX_E_XML_ERROR">
3308 Could not parse the settings file.
3309 </result>
3310
3311 </desc>
3312
3313 <param name="success" type="boolean" dir="in">
3314 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3315 otherwise.
3316 </desc>
3317 </param>
3318 </method>
3319
3320 <method name="adoptSavedState">
3321 <desc>
3322 Gets called by IConsole::adoptSavedState.
3323 <result name="VBOX_E_FILE_ERROR">
3324 Invalid saved state file path.
3325 </result>
3326 </desc>
3327 <param name="savedStateFile" type="wstring" dir="in">
3328 <desc>Path to the saved state file to adopt.</desc>
3329 </param>
3330 </method>
3331
3332 <method name="beginTakingSnapshot">
3333 <desc>
3334 Called by the VM process to inform the server it wants to
3335 take a snapshot.
3336
3337 <result name="VBOX_E_FILE_ERROR">
3338 Settings file not accessible.
3339 </result>
3340 <result name="VBOX_E_XML_ERROR">
3341 Could not parse the settings file.
3342 </result>
3343 </desc>
3344 <param name="initiator" type="IConsole" dir="in">
3345 <desc>The console object that initiated this call.</desc>
3346 </param>
3347 <param name="name" type="wstring" dir="in">
3348 <desc>Snapshot name.</desc>
3349 </param>
3350 <param name="description" type="wstring" dir="in">
3351 <desc>Snapshot description.</desc>
3352 </param>
3353 <param name="progress" type="IProgress" dir="in">
3354 <desc>
3355 Progress object created by the VM process to wait until
3356 the state is saved (only for online snapshots).
3357 </desc>
3358 </param>
3359 <param name="stateFilePath" type="wstring" dir="out">
3360 <desc>
3361 File path the VM process must save the execution state to.
3362 </desc>
3363 </param>
3364 <param name="serverProgress" type="IProgress" dir="out">
3365 <desc>
3366 Progress object created by the server process to wait until
3367 the snapshot is taken (VDI diff creation, etc.).
3368 </desc>
3369 </param>
3370 </method>
3371
3372 <method name="endTakingSnapshot">
3373 <desc>
3374 Called by the VM process to inform the server that the snapshot
3375 previously requested by #beginTakingSnapshot is either
3376 successfully taken or there was a failure.
3377 </desc>
3378
3379 <param name="success" type="boolean" dir="in">
3380 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3381 </param>
3382 </method>
3383
3384 <method name="discardSnapshot">
3385 <desc>
3386 Gets called by IConsole::discardSnapshot.
3387 <result name="VBOX_E_INVALID_OBJECT_STATE">
3388 Snapshot has more than one child snapshot.
3389 </result>
3390 </desc>
3391 <param name="initiator" type="IConsole" dir="in">
3392 <desc>The console object that initiated this call.</desc>
3393 </param>
3394 <param name="id" type="uuid" dir="in">
3395 <desc>UUID of the snapshot to discard.</desc>
3396 </param>
3397 <param name="machineState" type="MachineState" dir="out">
3398 <desc>New machine state after this operation is started.</desc>
3399 </param>
3400 <param name="progress" type="IProgress" dir="return">
3401 <desc>Progress object to track the operation completion.</desc>
3402 </param>
3403 </method>
3404
3405 <method name="discardCurrentState">
3406 <desc>
3407 Gets called by IConsole::discardCurrentState.
3408 <result name="VBOX_E_INVALID_OBJECT_STATE">
3409 Virtual machine does not have any snapshot.
3410 </result>
3411 </desc>
3412 <param name="initiator" type="IConsole" dir="in">
3413 <desc>The console object that initiated this call.</desc>
3414 </param>
3415 <param name="machineState" type="MachineState" dir="out">
3416 <desc>New machine state after this operation is started.</desc>
3417 </param>
3418 <param name="progress" type="IProgress" dir="return">
3419 <desc>Progress object to track the operation completion.</desc>
3420 </param>
3421 </method>
3422
3423 <method name="discardCurrentSnapshotAndState">
3424 <desc>
3425 Gets called by IConsole::discardCurrentSnapshotAndState.
3426 <result name="VBOX_E_INVALID_OBJECT_STATE">
3427 Virtual machine does not have any snapshot.
3428 </result>
3429 </desc>
3430 <param name="initiator" type="IConsole" dir="in">
3431 <desc>The console object that initiated this call.</desc>
3432 </param>
3433 <param name="machineState" type="MachineState" dir="out">
3434 <desc>New machine state after this operation is started.</desc>
3435 </param>
3436 <param name="progress" type="IProgress" dir="return">
3437 <desc>Progress object to track the operation completion.</desc>
3438 </param>
3439 </method>
3440
3441 <method name="pullGuestProperties">
3442 <desc>
3443 Get the list of the guest properties matching a set of patterns along
3444 with their values, time stamps and flags and give responsibility for
3445 managing properties to the console.
3446 </desc>
3447 <param name="name" type="wstring" dir="out" safearray="yes">
3448 <desc>
3449 The names of the properties returned.
3450 </desc>
3451 </param>
3452 <param name="value" type="wstring" dir="out" safearray="yes">
3453 <desc>
3454 The values of the properties returned. The array entries match the
3455 corresponding entries in the @a name array.
3456 </desc>
3457 </param>
3458 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3459 <desc>
3460 The time stamps of the properties returned. The array entries match
3461 the corresponding entries in the @a name array.
3462 </desc>
3463 </param>
3464 <param name="flags" type="wstring" dir="out" safearray="yes">
3465 <desc>
3466 The flags of the properties returned. The array entries match the
3467 corresponding entries in the @a name array.
3468 </desc>
3469 </param>
3470 </method>
3471
3472 <method name="pushGuestProperties">
3473 <desc>
3474 Set the list of the guest properties matching a set of patterns along
3475 with their values, time stamps and flags and return responsibility for
3476 managing properties to IMachine.
3477 </desc>
3478 <param name="name" type="wstring" dir="in" safearray="yes">
3479 <desc>
3480 The names of the properties.
3481 </desc>
3482 </param>
3483 <param name="value" type="wstring" dir="in" safearray="yes">
3484 <desc>
3485 The values of the properties. The array entries match the
3486 corresponding entries in the @a name array.
3487 </desc>
3488 </param>
3489 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3490 <desc>
3491 The time stamps of the properties. The array entries match
3492 the corresponding entries in the @a name array.
3493 </desc>
3494 </param>
3495 <param name="flags" type="wstring" dir="in" safearray="yes">
3496 <desc>
3497 The flags of the properties. The array entries match the
3498 corresponding entries in the @a name array.
3499 </desc>
3500 </param>
3501 </method>
3502 <method name="pushGuestProperty">
3503 <desc>
3504 Update a single guest property in IMachine.
3505 </desc>
3506 <param name="name" type="wstring" dir="in">
3507 <desc>
3508 The name of the property to be updated.
3509 </desc>
3510 </param>
3511 <param name="value" type="wstring" dir="in">
3512 <desc>
3513 The value of the property.
3514 </desc>
3515 </param>
3516 <param name="timestamp" type="unsigned long long" dir="in">
3517 <desc>
3518 The timestamp of the property.
3519 </desc>
3520 </param>
3521 <param name="flags" type="wstring" dir="in">
3522 <desc>
3523 The flags of the property.
3524 </desc>
3525 </param>
3526 </method>
3527 </interface>
3528
3529 <interface
3530 name="IBIOSSettings" extends="$unknown"
3531 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3532 wsmap="managed"
3533 >
3534 <desc>
3535 The IBIOSSettings interface represents BIOS settings of the virtual
3536 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3537 </desc>
3538 <attribute name="logoFadeIn" type="boolean">
3539 <desc>Fade in flag for BIOS logo animation.</desc>
3540 </attribute>
3541
3542 <attribute name="logoFadeOut" type="boolean">
3543 <desc>Fade out flag for BIOS logo animation.</desc>
3544 </attribute>
3545
3546 <attribute name="logoDisplayTime" type="unsigned long">
3547 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3548 </attribute>
3549
3550 <attribute name="logoImagePath" type="wstring">
3551 <desc>Local file system path for external BIOS image.</desc>
3552 </attribute>
3553
3554 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3555 <desc>Mode of the BIOS boot device menu.</desc>
3556 </attribute>
3557
3558 <attribute name="ACPIEnabled" type="boolean">
3559 <desc>ACPI support flag.</desc>
3560 </attribute>
3561
3562 <attribute name="IOAPICEnabled" type="boolean">
3563 <desc>
3564 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3565 and support IRQs above 15.
3566 </desc>
3567 </attribute>
3568
3569 <attribute name="timeOffset" type="long long">
3570 <desc>
3571 Offset in milliseconds from the host system time. This allows for
3572 guests running with a different system date/time than the host.
3573 It is equivalent to setting the system date/time in the BIOS except
3574 it is not an absolute value but a relative one. Guest Additions
3575 time synchronization honors this offset.
3576 </desc>
3577 </attribute>
3578
3579 <attribute name="PXEDebugEnabled" type="boolean">
3580 <desc>
3581 PXE debug logging flag. If set, VirtualBox will write extensive
3582 PXE trace information to the release log.
3583 </desc>
3584 </attribute>
3585
3586 <attribute name="IDEControllerType" type="IDEControllerType">
3587 <desc>
3588 Type of the virtual IDE controller. Depending on this value,
3589 VirtualBox will provide different virtual IDE hardware
3590 devices to the guest.
3591 </desc>
3592 </attribute>
3593
3594 </interface>
3595
3596 <interface
3597 name="IMachine" extends="$unknown"
3598 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3599 wsmap="managed"
3600 >
3601 <desc>
3602 The IMachine interface represents a virtual machine, or guest, created
3603 in VirtualBox.
3604
3605 This interface is used in two contexts. First of all, a collection of
3606 objects implementing this interface is stored in the
3607 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3608 machines that are currently registered with this VirtualBox
3609 installation. Also, once a session has been opened for the given virtual
3610 machine (e.g. the virtual machine is running), the machine object
3611 associated with the open session can be queried from the session object;
3612 see <link to="ISession"/> for details.
3613
3614 The main role of this interface is to expose the settings of the virtual
3615 machine and provide methods to change various aspects of the virtual
3616 machine's configuration. For machine objects stored in the
3617 <link to="IVirtualBox::machines2"/> collection, all attributes are
3618 read-only unless explicitly stated otherwise in individual attribute
3619 and method descriptions. In order to change a machine setting, a session
3620 for this machine must be opened using one of
3621 <link to="IVirtualBox::openSession"/>,
3622 <link to="IVirtualBox::openRemoteSession"/> or
3623 <link to="IVirtualBox::openExistingSession"/> methods. After the
3624 session has been successfully opened, a mutable machine object needs to
3625 be queried from the session object and then the desired settings changes
3626 can be applied to the returned object using IMachine attributes and
3627 methods. See the ISession interface description for more information
3628 about sessions.
3629
3630 Note that the IMachine interface does not provide methods to control
3631 virtual machine execution (such as start the machine, or power it
3632 down) -- these methods are grouped in a separate IConsole
3633 interface. Refer to the IConsole interface description to get more
3634 information about this topic.
3635
3636 <see>ISession, IConsole</see>
3637 </desc>
3638
3639 <attribute name="parent" type="IVirtualBox" readonly="yes">
3640 <desc>Associated parent object.</desc>
3641 </attribute>
3642
3643 <attribute name="accessible" type="boolean" readonly="yes">
3644 <desc>
3645 Whether this virtual machine is currently accessible or not.
3646
3647 The machine is considered to be inaccessible when:
3648 <ul>
3649 <li>It is a registered virtual machine, and
3650 </li>
3651 <li>Its settings file is inaccessible (for example, it is
3652 located on a network share that is not accessible during
3653 VirtualBox startup, or becomes inaccessible later, or if
3654 the settings file can be read but is invalid).
3655 </li>
3656 </ul>
3657
3658 Otherwise, the value of this property is always <tt>true</tt>.
3659
3660 Every time this property is read, the accessibility state of
3661 this machine is re-evaluated. If the returned value is |false|,
3662 the <link to="#accessError"/> property may be used to get the
3663 detailed error information describing the reason of
3664 inaccessibility.
3665
3666 When the machine is inaccessible, only the following properties
3667 can be used on it:
3668 <ul>
3669 <li><link to="#parent"/></li>
3670 <li><link to="#id"/></li>
3671 <li><link to="#settingsFilePath"/></li>
3672 <li><link to="#accessible"/></li>
3673 <li><link to="#accessError"/></li>
3674 </ul>
3675
3676 An attempt to access any other property or method will return
3677 an error.
3678
3679 The only possible action you can perform on an inaccessible
3680 machine is to unregister it using the
3681 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3682 for the accessibility state once more by querying this
3683 property).
3684
3685 <note>
3686 In the current implementation, once this property returns
3687 <tt>true</tt>, the machine will never become inaccessible
3688 later, even if its settings file cannot be successfully
3689 read/written any more (at least, until the VirtualBox
3690 server is restarted). This limitation may be removed in
3691 future releases.
3692 </note>
3693 </desc>
3694 </attribute>
3695
3696 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3697 <desc>
3698 Error information describing the reason of machine
3699 inaccessibility.
3700
3701 Reading this property is only valid after the last call to
3702 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3703 machine is currently unaccessible). Otherwise, a null
3704 IVirtualBoxErrorInfo object will be returned.
3705 </desc>
3706 </attribute>
3707
3708 <attribute name="name" type="wstring">
3709 <desc>
3710 Name of the virtual machine.
3711
3712 Besides being used for human-readable identification purposes
3713 everywhere in VirtualBox, the virtual machine name is also used
3714 as a name of the machine's settings file and as a name of the
3715 subdirectory this settings file resides in. Thus, every time you
3716 change the value of this property, the settings file will be
3717 renamed once you call <link to="#saveSettings()"/> to confirm the
3718 change. The containing subdirectory will be also renamed, but
3719 only if it has exactly the same name as the settings file
3720 itself prior to changing this property (for backward compatibility
3721 with previous API releases). The above implies the following
3722 limitations:
3723 <ul>
3724 <li>The machine name cannot be empty.</li>
3725 <li>The machine name can contain only characters that are valid
3726 file name characters according to the rules of the file
3727 system used to store VirtualBox configuration.</li>
3728 <li>You cannot have two or more machines with the same name
3729 if they use the same subdirectory for storing the machine
3730 settings files.</li>
3731 <li>You cannot change the name of the machine if it is running,
3732 or if any file in the directory containing the settings file
3733 is being used by another running machine or by any other
3734 process in the host operating system at a time when
3735 <link to="#saveSettings()"/> is called.
3736 </li>
3737 </ul>
3738 If any of the above limitations are hit, <link to="#saveSettings()"/>
3739 will return an appropriate error message explaining the exact
3740 reason and the changes you made to this machine will not be
3741 saved.
3742 <note>
3743 For "legacy" machines created using the
3744 <link to="IVirtualBox::createLegacyMachine()"/> call,
3745 the above naming limitations do not apply because the
3746 machine name does not affect the settings file name.
3747 The settings file name remains the same as it was specified
3748 during machine creation and never changes.
3749 </note>
3750 </desc>
3751 </attribute>
3752
3753 <attribute name="description" type="wstring">
3754 <desc>
3755 Description of the virtual machine.
3756
3757 The description attribute can contain any text and is
3758 typically used to describe the hardware and software
3759 configuration of the virtual machine in detail (i.e. network
3760 settings, versions of the installed software and so on).
3761 </desc>
3762 </attribute>
3763
3764 <attribute name="id" type="uuid" readonly="yes">
3765 <desc>UUID of the virtual machine.</desc>
3766 </attribute>
3767
3768 <attribute name="OSTypeId" type="wstring">
3769 <desc>
3770 User-defined identifier of the Guest OS type.
3771 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3772 an IGuestOSType object representing details about the given
3773 Guest OS type.
3774 <note>
3775 This value may differ from the value returned by
3776 <link to="IGuest::OSTypeId"/> if Guest Additions are
3777 installed to the guest OS.
3778 </note>
3779 </desc>
3780 </attribute>
3781
3782 <attribute name="HardwareVersion" type="wstring">
3783 <desc>Hardware version identifier. Internal use only for now.</desc>
3784 </attribute>
3785
3786 <attribute name="CPUCount" type="unsigned long">
3787 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3788 </attribute>
3789
3790 <attribute name="memorySize" type="unsigned long">
3791 <desc>System memory size in megabytes.</desc>
3792 </attribute>
3793
3794 <attribute name="memoryBalloonSize" type="unsigned long">
3795 <desc>Initial memory balloon size in megabytes.</desc>
3796 </attribute>
3797
3798 <attribute name="statisticsUpdateInterval" type="unsigned long">
3799 <desc>Initial interval to update guest statistics in seconds.</desc>
3800 </attribute>
3801
3802 <attribute name="VRAMSize" type="unsigned long">
3803 <desc>Video memory size in megabytes.</desc>
3804 </attribute>
3805
3806 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3807 <desc>
3808 This setting determines whether VirtualBox allows guests to make use
3809 of the 3D graphics support available on the host. Currently limited
3810 to OpenGL only. </desc>
3811 </attribute>
3812
3813 <attribute name="monitorCount" type="unsigned long">
3814 <desc>
3815 Number of virtual monitors.
3816 <note>
3817 Only effective on Windows XP and later guests with
3818 Guest Additions installed.
3819 </note>
3820 </desc>
3821 </attribute>
3822
3823 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3824 <desc>Object containing all BIOS settings.</desc>
3825 </attribute>
3826
3827 <attribute name="HWVirtExEnabled" type="TSBool">
3828 <desc>
3829 This setting determines whether VirtualBox will try to make use of
3830 the host CPU's hardware virtualization extensions such as Intel VT-x
3831 and AMD-V. Note that in case such extensions are not available,
3832 they will not be used.
3833 </desc>
3834 </attribute>
3835
3836 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3837 <desc>
3838 This setting determines whether VirtualBox will try to make use of
3839 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3840 such extensions are not available, they will not be used.
3841 </desc>
3842 </attribute>
3843
3844 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3845 <desc>
3846 This setting determines whether VirtualBox will try to make use of
3847 the VPID extension of Intel VT-x. Note that in case such extensions are
3848 not available, they will not be used.
3849 </desc>
3850 </attribute>
3851
3852 <attribute name="PAEEnabled" type="boolean" default="false">
3853 <desc>
3854 This setting determines whether VirtualBox will expose the Physical Address
3855 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3856 is not available, it will not be reported.
3857 </desc>
3858 </attribute>
3859
3860 <attribute name="snapshotFolder" type="wstring">
3861 <desc>
3862 Full path to the directory used to store snapshot data
3863 (differencing hard disks and saved state files) of this machine.
3864
3865 The initial value of this property is
3866 <tt>&lt;</tt><link to="#settingsFilePath">
3867 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3868 <link to="#id">machine_uuid</link>
3869 <tt>&gt;</tt>.
3870
3871 Currently, it is an error to try to change this property on
3872 a machine that has snapshots (because this would require to
3873 move possibly large files to a different location).
3874 A separate method will be available for this purpose later.
3875
3876 <note>
3877 Setting this property to <tt>null</tt> will restore the
3878 initial value.
3879 </note>
3880 <note>
3881 When setting this property, the specified path can be
3882 absolute (full path) or relative to the directory where the
3883 <link to="#settingsFilePath">machine settings file</link>
3884 is located. When reading this property, a full path is
3885 always returned.
3886 </note>
3887 <note>
3888 The specified path may not exist, it will be created
3889 when necessary.
3890 </note>
3891 </desc>
3892 </attribute>
3893
3894 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3895 <desc>VRDP server object.</desc>
3896 </attribute>
3897
3898 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3899 <desc>Array of hard disks attached to this machine.</desc>
3900 </attribute>
3901
3902 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3903 <desc>Associated DVD drive object.</desc>
3904 </attribute>
3905
3906 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3907 <desc>Associated floppy drive object.</desc>
3908 </attribute>
3909
3910 <attribute name="USBController" type="IUSBController" readonly="yes">
3911 <desc>
3912 Associated USB controller object.
3913
3914 <note>
3915 This method may set a @ref com_warnings "warning result code".
3916 </note>
3917 <note>
3918 If USB functionality is not available in the given edition of
3919 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3920 </note>
3921 </desc>
3922 </attribute>
3923
3924 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3925 <desc>Associated audio adapter, always present.</desc>
3926 </attribute>
3927
3928 <attribute name="SATAController" type="ISATAController" readonly="yes">
3929 <desc>
3930 Associated SATA controller object.
3931 </desc>
3932 </attribute>
3933
3934 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3935 <desc>
3936 Full name of the file containing machine settings data.
3937 </desc>
3938 </attribute>
3939
3940 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3941 <desc>
3942 Current version of the format of the settings file of this machine
3943 (<link to="#settingsFilePath"/>).
3944
3945 The version string has the following format:
3946 <pre>
3947 x.y-platform
3948 </pre>
3949 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3950 versions, and <tt>platform</tt> is the platform identifier.
3951
3952 The current version usually matches the value of the
3953 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3954 settings file was created by an older version of VirtualBox and there
3955 was a change of the settings file format since then.
3956
3957 Note that VirtualBox automatically converts settings files from older
3958 versions to the most recent version when reading them (usually at
3959 VirtualBox startup) but it doesn't save the changes back until
3960 you call a method that implicitly saves settings (such as
3961 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3962 explicitly. Therefore, if the value of this attribute differs from the
3963 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3964 means that the settings file was converted but the result of the
3965 conversion is not yet saved to disk.
3966
3967 The above feature may be used by interactive front-ends to inform users
3968 about the settings file format change and offer them to explicitly save
3969 all converted settings files (the global and VM-specific ones),
3970 optionally create backup copies of the old settings files before saving,
3971 etc.
3972
3973 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3974 </desc>
3975 </attribute>
3976
3977 <attribute name="settingsModified" type="boolean" readonly="yes">
3978 <desc>
3979 Whether the settings of this machine have been modified
3980 (but neither yet saved nor discarded).
3981 <note>
3982 Reading this property is only valid on instances returned
3983 by <link to="ISession::machine"/> and on new machines
3984 created by <link to="IVirtualBox::createMachine"/> or opened
3985 by <link to="IVirtualBox::openMachine"/> but not
3986 yet registered, or on unregistered machines after calling
3987 <link to="IVirtualBox::unregisterMachine"/>. For all other
3988 cases, the settings can never be modified.
3989 </note>
3990 <note>
3991 For newly created unregistered machines, the value of this
3992 property is always TRUE until <link to="#saveSettings()"/>
3993 is called (no matter if any machine settings have been
3994 changed after the creation or not). For opened machines
3995 the value is set to FALSE (and then follows to normal rules).
3996 </note>
3997 </desc>
3998 </attribute>
3999
4000 <attribute name="sessionState" type="SessionState" readonly="yes">
4001 <desc>Current session state for this machine.</desc>
4002 </attribute>
4003
4004 <attribute name="sessionType" type="wstring" readonly="yes">
4005 <desc>
4006 Type of the session. If <link to="#sessionState"/> is
4007 SessionSpawning or SessionOpen, this attribute contains the
4008 same value as passed to the
4009 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
4010 type parameter. If the session was opened directly using
4011 <link to="IVirtualBox::openSession()"/>, or if
4012 <link to="#sessionState"/> is SessionClosed, the value of this
4013 attribute is @c null.
4014 </desc>
4015 </attribute>
4016
4017 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4018 <desc>
4019 Identifier of the session process. This attribute contains the
4020 platform-dependent identifier of the process that has opened a
4021 direct session for this machine using the
4022 <link to="IVirtualBox::openSession()"/> call. The returned value
4023 is only valid if <link to="#sessionState"/> is SessionOpen or
4024 SessionClosing (i.e. a session is currently open or being
4025 closed) by the time this property is read.
4026 </desc>
4027 </attribute>
4028
4029 <attribute name="state" type="MachineState" readonly="yes">
4030 <desc>Current execution state of this machine.</desc>
4031 </attribute>
4032
4033 <attribute name="lastStateChange" type="long long" readonly="yes">
4034 <desc>
4035 Time stamp of the last execution state change,
4036 in milliseconds since 1970-01-01 UTC.
4037 </desc>
4038 </attribute>
4039
4040 <attribute name="stateFilePath" type="wstring" readonly="yes">
4041 <desc>
4042 Full path to the file that stores the execution state of
4043 the machine when it is in the <link to="MachineState_Saved"/> state.
4044 <note>
4045 When the machine is not in the Saved state, this attribute
4046 <tt>null</tt>.
4047 </note>
4048 </desc>
4049 </attribute>
4050
4051 <attribute name="logFolder" type="wstring" readonly="yes">
4052 <desc>
4053 Full path to the folder that stores a set of rotated log files
4054 recorded during machine execution. The most recent log file is
4055 named <tt>VBox.log</tt>, the previous log file is
4056 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4057 in the current version).
4058 </desc>
4059 </attribute>
4060
4061 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4062 <desc>
4063 Current snapshot of this machine.
4064 <note>
4065 A <tt>null</tt> object is returned if the machine doesn't
4066 have snapshots.
4067 </note>
4068 <see><link to="ISnapshot"/></see>
4069 </desc>
4070 </attribute>
4071
4072 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4073 <desc>
4074 Number of snapshots taken on this machine. Zero means the
4075 machine doesn't have any snapshots.
4076 </desc>
4077 </attribute>
4078
4079 <attribute name="currentStateModified" type="boolean" readonly="yes">
4080 <desc>
4081 Returns <tt>true</tt> if the current state of the machine is not
4082 identical to the state stored in the current snapshot.
4083
4084 The current state is identical to the current snapshot right
4085 after one of the following calls are made:
4086 <ul>
4087 <li><link to="IConsole::discardCurrentState"/> or
4088 <link to="IConsole::discardCurrentSnapshotAndState"/>
4089 </li>
4090 <li><link to="IConsole::takeSnapshot"/> (issued on a
4091 powered off or saved machine, for which
4092 <link to="#settingsModified"/> returns <tt>false</tt>)
4093 </li>
4094 <li><link to="IMachine::setCurrentSnapshot"/>
4095 </li>
4096 </ul>
4097
4098 The current state remains identical until one of the following
4099 happens:
4100 <ul>
4101 <li>settings of the machine are changed</li>
4102 <li>the saved state is discarded</li>
4103 <li>the current snapshot is discarded</li>
4104 <li>an attempt to execute the machine is made</li>
4105 </ul>
4106
4107 <note>
4108 For machines that don't have snapshots, this property is
4109 always <tt>false</tt>.
4110 </note>
4111 </desc>
4112 </attribute>
4113
4114 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4115 <desc>
4116 Collection of shared folders for this machine (permanent shared
4117 folders). These folders are shared automatically at machine startup
4118 and available only to the guest OS installed within this machine.
4119
4120 New shared folders are added to the collection using
4121 <link to="#createSharedFolder"/>. Existing shared folders can be
4122 removed using <link to="#removeSharedFolder"/>.
4123 </desc>
4124 </attribute>
4125
4126 <attribute name="clipboardMode" type="ClipboardMode">
4127 <desc>
4128 Synchronization mode between the host OS clipboard
4129 and the guest OS clipboard.
4130 </desc>
4131 </attribute>
4132
4133 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4134 <desc>
4135 A comma-separated list of simple glob patterns. Changes to guest
4136 properties whose name matches one of the patterns will generate an
4137 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4138 </desc>
4139 </attribute>
4140
4141 <method name="setBootOrder">
4142 <desc>
4143 Puts the given device to the specified position in
4144 the boot order.
4145
4146 To indicate that no device is associated with the given position,
4147 <link to="DeviceType_Null"/> should be used.
4148
4149 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4150
4151 <result name="E_INVALIDARG">
4152 Boot @a position out of range.
4153 </result>
4154 <result name="E_NOTIMPL">
4155 Booting from USB @a device currently not supported.
4156 </result>
4157
4158 </desc>
4159 <param name="position" type="unsigned long" dir="in">
4160 <desc>
4161 Position in the boot order (<tt>1</tt> to the total number of
4162 devices the machine can boot from, as returned by
4163 <link to="ISystemProperties::maxBootPosition"/>).
4164 </desc>
4165 </param>
4166 <param name="device" type="DeviceType" dir="in">
4167 <desc>
4168 The type of the device used to boot at the given position.
4169 </desc>
4170 </param>
4171 </method>
4172
4173 <method name="getBootOrder" const="yes">
4174 <desc>
4175 Returns the device type that occupies the specified
4176 position in the boot order.
4177
4178 @todo [remove?]
4179 If the machine can have more than one device of the returned type
4180 (such as hard disks), then a separate method should be used to
4181 retrieve the individual device that occupies the given position.
4182
4183 If here are no devices at the given position, then
4184 <link to="DeviceType_Null"/> is returned.
4185
4186 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4187
4188 <result name="E_INVALIDARG">
4189 Boot @a position out of range.
4190 </result>
4191
4192 </desc>
4193 <param name="position" type="unsigned long" dir="in">
4194 <desc>
4195 Position in the boot order (<tt>1</tt> to the total number of
4196 devices the machine can boot from, as returned by
4197 <link to="ISystemProperties::maxBootPosition"/>).
4198 </desc>
4199 </param>
4200 <param name="device" type="DeviceType" dir="return">
4201 <desc>
4202 Device at the given position.
4203 </desc>
4204 </param>
4205 </method>
4206
4207 <method name="attachHardDisk2">
4208 <desc>
4209 Attaches a virtual hard disk identified by the given UUID @a id
4210 to a device slot of the specified bus.
4211
4212 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4213 specify the primary or secondary IDE controller, respectively. The
4214 SATA bus supports 30 channels, so this parameter can be a number
4215 ranging from @c 0 to @c 29.
4216
4217 For the primary controller of the IDE bus, the @a device number can be
4218 either @c 0 or @c 1, to specify the master or the slave device,
4219 respectively. For the secondary IDE controller, the device number is
4220 always @c 1 because the master device is reserved for the CD-ROM drive.
4221
4222 For the SATA bus, the @a device parameter is currently unused and
4223 must be @c 0.
4224
4225 The specified device slot must not have another disk attached to it, or
4226 this method will fail.
4227
4228 See <link to="IHardDisk2"/> for more detailed information about
4229 attaching hard disks.
4230
4231 <note>
4232 You cannot attach a hard disk to a running machine. Also, you cannot
4233 attach a hard disk to a newly created machine until this machine's
4234 settings are saved to disk using <link to="#saveSettings()"/>.
4235 </note>
4236 <note>
4237 If the hard disk is being attached indirectly, a new differencing hard
4238 disk will implicitly be created for it and attached instead. If the
4239 changes made to the machine settings (including this indirect
4240 attachment) are later cancelled using <link to="#discardSettings()"/>,
4241 this implicitly created differencing hard disk will implicitly
4242 be deleted.
4243 </note>
4244
4245 <result name="E_INVALIDARG">
4246 SATA device, SATA channel, IDE channel or IDE slot out of range.
4247 </result>
4248 <result name="VBOX_E_INVALID_OBJECT_STATE">
4249 Attempt to attach hard disk to an unregistered virtual machine.
4250 </result>
4251 <result name="VBOX_E_INVALID_VM_STATE">
4252 Invalid machine state.
4253 </result>
4254 <result name="VBOX_E_OBJECT_IN_USE">
4255 Hard disk already attached to this or another virtual machine.
4256 </result>
4257
4258 </desc>
4259 <param name="id" type="uuid" dir="in">
4260 <desc>UUID of the hard disk to attach.</desc>
4261 </param>
4262 <param name="bus" type="StorageBus" dir="in">
4263 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4264 </param>
4265 <param name="channel" type="long" dir="in">
4266 <desc>Channel to attach the hard disk to.</desc>
4267 </param>
4268 <param name="device" type="long" dir="in">
4269 <desc>
4270 Device slot in the given channel to attach the hard disk to.
4271 </desc>
4272 </param>
4273 </method>
4274
4275 <method name="getHardDisk2" const="yes">
4276 <desc>
4277 Returns the virtual hard disk attached to a device slot of the specified
4278 bus.
4279
4280 Note that if the hard disk was indirectly attached by
4281 <link to="#attachHardDisk2()"/> to the given device slot then this
4282 method will return not the same object as passed to the
4283 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4284 more detailed information about attaching hard disks.
4285
4286 <result name="VBOX_E_OBJECT_NOT_FOUND">
4287 No hard disk attached to given slot/bus.
4288 </result>
4289
4290 </desc>
4291 <param name="bus" type="StorageBus" dir="in">
4292 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4293 </param>
4294 <param name="channel" type="long" dir="in">
4295 <desc>Channel to query.</desc>
4296 </param>
4297 <param name="device" type="long" dir="in">
4298 <desc>Device slot in the given channel to query.</desc>
4299 </param>
4300 <param name="hardDisk" type="IHardDisk2" dir="return">
4301 <desc>Attached hard disk object.</desc>
4302 </param>
4303 </method>
4304
4305 <method name="detachHardDisk2">
4306 <desc>
4307 Detaches the virtual hard disk attached to a device slot of the
4308 specified bus.
4309
4310 Detaching the hard disk from the virtual machine is deferred. This means
4311 that the hard disk remains associated with the machine when this method
4312 returns and gets actually de-associated only after a successful
4313 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4314 for more detailed information about attaching hard disks.
4315
4316 <note>
4317 You cannot detach the hard disk from a running machine.
4318 </note>
4319 <note>
4320 Detaching differencing hard disks implicitly created by <link
4321 to="#attachHardDisk2()"/> for the indirect attachment using this
4322 method will <b>not</b> implicitly delete them. The
4323 <link to="IHardDisk2::deleteStorage()"/> operation should be
4324 explicitly performed by the caller after the hard disk is successfully
4325 detached and the settings are saved with
4326 <link to="#saveSettings()"/>, if it is the desired action.
4327 </note>
4328
4329 <result name="VBOX_E_INVALID_VM_STATE">
4330 Attempt to detach hard disk from a running virtual machine.
4331 </result>
4332 <result name="VBOX_E_OBJECT_NOT_FOUND">
4333 No hard disk attached to given slot/bus.
4334 </result>
4335 <result name="VBOX_E_NOT_SUPPORTED">
4336 Hard disk format does not support storage deletion.
4337 </result>
4338
4339 </desc>
4340 <param name="bus" type="StorageBus" dir="in">
4341 <desc>Bus to detach the hard disk from.</desc>
4342 </param>
4343 <param name="channel" type="long" dir="in">
4344 <desc>Channel number to detach the hard disk from.</desc>
4345 </param>
4346 <param name="device" type="long" dir="in">
4347 <desc>Device slot number to detach the hard disk from.</desc>
4348 </param>
4349 </method>
4350
4351 <method name="getNetworkAdapter" const="yes">
4352 <desc>
4353 Returns the network adapter associated with the given slot.
4354 Slots are numbered sequentially, starting with zero. The total
4355 number of adapters per machine is defined by the
4356 <link to="ISystemProperties::networkAdapterCount"/> property,
4357 so the maximum slot number is one less than that property's value.
4358
4359 <result name="E_INVALIDARG">
4360 Invalid @a slot number.
4361 </result>
4362
4363 </desc>
4364 <param name="slot" type="unsigned long" dir="in"/>
4365 <param name="adapter" type="INetworkAdapter" dir="return"/>
4366 </method>
4367
4368 <method name="getSerialPort" const="yes">
4369 <desc>
4370 Returns the serial port associated with the given slot.
4371 Slots are numbered sequentially, starting with zero. The total
4372 number of serial ports per machine is defined by the
4373 <link to="ISystemProperties::serialPortCount"/> property,
4374 so the maximum slot number is one less than that property's value.
4375
4376 <result name="E_INVALIDARG">
4377 Invalid @a slot number.
4378 </result>
4379
4380 </desc>
4381 <param name="slot" type="unsigned long" dir="in"/>
4382 <param name="port" type="ISerialPort" dir="return"/>
4383 </method>
4384
4385 <method name="getParallelPort" const="yes">
4386 <desc>
4387 Returns the parallel port associated with the given slot.
4388 Slots are numbered sequentially, starting with zero. The total
4389 number of parallel ports per machine is defined by the
4390 <link to="ISystemProperties::parallelPortCount"/> property,
4391 so the maximum slot number is one less than that property's value.
4392
4393 <result name="E_INVALIDARG">
4394 Invalid @a slot number.
4395 </result>
4396
4397 </desc>
4398 <param name="slot" type="unsigned long" dir="in"/>
4399 <param name="port" type="IParallelPort" dir="return"/>
4400 </method>
4401
4402 <method name="getNextExtraDataKey">
4403 <desc>
4404 Returns the machine-specific extra data key name following the
4405 supplied key.
4406
4407 An error is returned if the supplied @a key does not exist. @c NULL is
4408 returned in @a nextKey if the supplied key is the last key. When
4409 supplying @c NULL for the @a key, the first key item is returned in @a
4410 nextKey (if there is any). @a nextValue is an optional parameter and
4411 if supplied, the next key's value is returned in it.
4412
4413 <result name="VBOX_E_OBJECT_NOT_FOUND">
4414 Extra data @a key not found.
4415 </result>
4416
4417 </desc>
4418 <param name="key" type="wstring" dir="in">
4419 <desc>Name of the data key to follow.</desc>
4420 </param>
4421 <param name="nextKey" type="wstring" dir="out">
4422 <desc>Name of the next data key.</desc>
4423 </param>
4424 <param name="nextValue" type="wstring" dir="out">
4425 <desc>Value of the next data key.</desc>
4426 </param>
4427 </method>
4428
4429 <method name="getExtraData">
4430 <desc>
4431 Returns associated machine-specific extra data.
4432
4433 If the requested data @a key does not exist, this function will
4434 succeed and return @c NULL in the @a value argument.
4435
4436 <result name="VBOX_E_FILE_ERROR">
4437 Settings file not accessible.
4438 </result>
4439 <result name="VBOX_E_XML_ERROR">
4440 Could not parse the settings file.
4441 </result>
4442
4443 </desc>
4444 <param name="key" type="wstring" dir="in">
4445 <desc>Name of the data key to get.</desc>
4446 </param>
4447 <param name="value" type="wstring" dir="return">
4448 <desc>Value of the requested data key.</desc>
4449 </param>
4450 </method>
4451
4452 <method name="setExtraData">
4453 <desc>
4454 Sets associated machine-specific extra data.
4455
4456 If you pass @c NULL as a key @a value, the given @a key will be
4457 deleted.
4458
4459 <note>
4460 Before performing the actual data change, this method will ask all
4461 registered callbacks using the
4462 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4463 notification for a permission. If one of the callbacks refuses the
4464 new value, the change will not be performed.
4465 </note>
4466 <note>
4467 On success, the
4468 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4469 is called to inform all registered callbacks about a successful data
4470 change.
4471 </note>
4472 <note>
4473 This method can be called outside the machine session and therefore
4474 it's a caller's responsibility to handle possible race conditions
4475 when several clients change the same key at the same time.
4476 </note>
4477
4478 <result name="VBOX_E_FILE_ERROR">
4479 Settings file not accessible.
4480 </result>
4481 <result name="VBOX_E_XML_ERROR">
4482 Could not parse the settings file.
4483 </result>
4484
4485 </desc>
4486 <param name="key" type="wstring" dir="in">
4487 <desc>Name of the data key to set.</desc>
4488 </param>
4489 <param name="value" type="wstring" dir="in">
4490 <desc>Value to assign to the key.</desc>
4491 </param>
4492 </method>
4493
4494 <method name="saveSettings">
4495 <desc>
4496 Saves any changes to machine settings made since the session
4497 has been opened or a new machine has been created, or since the
4498 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4499 For registered machines, new settings become visible to all
4500 other VirtualBox clients after successful invocation of this
4501 method.
4502 <note>
4503 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4504 notification event after the configuration has been successfully
4505 saved (only for registered machines).
4506 </note>
4507 <note>
4508 Calling this method is only valid on instances returned
4509 by <link to="ISession::machine"/> and on new machines
4510 created by <link to="IVirtualBox::createMachine"/> but not
4511 yet registered, or on unregistered machines after calling
4512 <link to="IVirtualBox::unregisterMachine"/>.
4513 </note>
4514
4515 <result name="VBOX_E_FILE_ERROR">
4516 Settings file not accessible.
4517 </result>
4518 <result name="VBOX_E_XML_ERROR">
4519 Could not parse the settings file.
4520 </result>
4521 <result name="E_ACCESSDENIED">
4522 Modification request refused.
4523 </result>
4524
4525 </desc>
4526 </method>
4527
4528 <method name="saveSettingsWithBackup">
4529 <desc>
4530 Creates a backup copy of the machine settings file (<link
4531 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4532 <link to="#saveSettings()"/>.
4533
4534 Note that the backup copy is created <b>only</b> if the settings file
4535 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4536 details). Otherwise, this call is fully equivalent to
4537 <link to="#saveSettings()"/> and no backup copying is done.
4538
4539 The backup copy is created in the same directory where the original
4540 settings file is located. It is given the following file name:
4541 <pre>
4542 original.xml.x.y-platform.bak
4543 </pre>
4544 where <tt>original.xml</tt> is the original settings file name
4545 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4546 format of the settings file (before auto-conversion).
4547
4548 If the given backup file already exists, this method will try to add the
4549 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4550 0 to 9) and copy it again until it succeeds. If all suffixes are
4551 occupied, or if any other copy error occurs, this method will return a
4552 failure.
4553
4554 If the copy operation succeeds, the @a bakFileName return argument will
4555 receive a full path to the created backup file (for informational
4556 purposes). Note that this will happen even if the subsequent
4557 <link to="#saveSettings()"/> call performed by this method after the
4558 copy operation, fails.
4559
4560 <note>
4561 The VirtualBox API never calls this method. It is intended purely for
4562 the purposes of creating backup copies of the settings files by
4563 front-ends before saving the results of the automatically performed
4564 settings conversion to disk.
4565 </note>
4566
4567 <see>settingsFileVersion</see>
4568
4569 <result name="VBOX_E_FILE_ERROR">
4570 Settings file not accessible.
4571 </result>
4572 <result name="VBOX_E_XML_ERROR">
4573 Could not parse the settings file.
4574 </result>
4575 <result name="VBOX_E_INVALID_VM_STATE">
4576 Virtual machine is not mutable.
4577 </result>
4578 <result name="E_ACCESSDENIED">
4579 Modification request refused.
4580 </result>
4581
4582 </desc>
4583 <param name="bakFileName" type="wstring" dir="return">
4584 <desc>Full path to the created backup copy.</desc>
4585 </param>
4586 </method>
4587
4588 <method name="discardSettings">
4589 <desc>
4590 Discards any changes to the machine settings made since the session
4591 has been opened or since the last call to <link to="#saveSettings()"/>
4592 or <link to="#discardSettings"/>.
4593 <note>
4594 Calling this method is only valid on instances returned
4595 by <link to="ISession::machine"/> and on new machines
4596 created by <link to="IVirtualBox::createMachine"/> or
4597 opened by <link to="IVirtualBox::openMachine"/> but not
4598 yet registered, or on unregistered machines after calling
4599 <link to="IVirtualBox::unregisterMachine"/>.
4600 </note>
4601
4602 <result name="VBOX_E_INVALID_VM_STATE">
4603 Virtual machine is not mutable.
4604 </result>
4605
4606 </desc>
4607 </method>
4608
4609 <method name="deleteSettings">
4610 <desc>
4611 Deletes the settings file of this machine from disk.
4612 The machine must not be registered in order for this operation
4613 to succeed.
4614 <note>
4615 <link to="#settingsModified"/> will return TRUE after this
4616 method successfully returns.
4617 </note>
4618 <note>
4619 Calling this method is only valid on instances returned
4620 by <link to="ISession::machine"/> and on new machines
4621 created by <link to="IVirtualBox::createMachine"/> or
4622 opened by <link to="IVirtualBox::openMachine"/> but not
4623 yet registered, or on unregistered machines after calling
4624 <link to="IVirtualBox::unregisterMachine"/>.
4625 </note>
4626 <note>
4627 The deleted machine settings file can be restored (saved again)
4628 by calling <link to="#saveSettings()"/>.
4629 </note>
4630
4631 <result name="VBOX_E_INVALID_VM_STATE">
4632 Cannot delete settings of a registered machine or
4633 machine not mutable.
4634 </result>
4635 <result name="VBOX_E_IPRT_ERROR">
4636 Could not delete the settings file.
4637 </result>
4638
4639 </desc>
4640 </method>
4641
4642 <method name="getSnapshot">
4643 <desc>
4644 Returns a snapshot of this machine with the given UUID.
4645 A <tt>null</tt> UUID can be used to obtain the first snapshot
4646 taken on this machine. This is useful if you want to traverse
4647 the whole tree of snapshots starting from the root.
4648
4649 <result name="VBOX_E_OBJECT_NOT_FOUND">
4650 Virtual machine has no snapshots or snapshot not found.
4651 </result>
4652
4653 </desc>
4654 <param name="id" type="uuid" dir="in">
4655 <desc>UUID of the snapshot to get</desc>
4656 </param>
4657 <param name="snapshot" type="ISnapshot" dir="return">
4658 <desc>Snapshot object with the given UUID.</desc>
4659 </param>
4660 </method>
4661
4662 <method name="findSnapshot">
4663 <desc>
4664 Returns a snapshot of this machine with the given name.
4665
4666 <result name="VBOX_E_OBJECT_NOT_FOUND">
4667 Virtual machine has no snapshots or snapshot not found.
4668 </result>
4669
4670 </desc>
4671 <param name="name" type="wstring" dir="in">
4672 <desc>Name of the snapshot to find</desc>
4673 </param>
4674 <param name="snapshot" type="ISnapshot" dir="return">
4675 <desc>Snapshot object with the given name.</desc>
4676 </param>
4677 </method>
4678
4679 <method name="setCurrentSnapshot">
4680 <desc>
4681 Sets the current snapshot of this machine.
4682 <note>
4683 In the current implementation, this operation is not
4684 implemented.
4685 </note>
4686 </desc>
4687 <param name="id" type="uuid" dir="in">
4688 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4689 </param>
4690 </method>
4691
4692 <method name="createSharedFolder">
4693 <desc>
4694 Creates a new permanent shared folder by associating the given logical
4695 name with the given host path, adds it to the collection of shared
4696 folders and starts sharing it. Refer to the description of
4697 <link to="ISharedFolder"/> to read more about logical names.
4698
4699 <result name="VBOX_E_OBJECT_IN_USE">
4700 Shared folder already exists.
4701 </result>
4702 <result name="VBOX_E_FILE_ERROR">
4703 Shared folder @a hostPath not accessible.
4704 </result>
4705
4706 </desc>
4707 <param name="name" type="wstring" dir="in">
4708 <desc>Unique logical name of the shared folder.</desc>
4709 </param>
4710 <param name="hostPath" type="wstring" dir="in">
4711 <desc>Full path to the shared folder in the host file system.</desc>
4712 </param>
4713 <param name="writable" type="boolean" dir="in">
4714 <desc>Whether the share is writable or readonly</desc>
4715 </param>
4716 </method>
4717
4718 <method name="removeSharedFolder">
4719 <desc>
4720 Removes the permanent shared folder with the given name previously
4721 created by <link to="#createSharedFolder"/> from the collection of
4722 shared folders and stops sharing it.
4723
4724 <result name="VBOX_E_INVALID_VM_STATE">
4725 Virtual machine is not mutable.
4726 </result>
4727 <result name="VBOX_E_OBJECT_NOT_FOUND">
4728 Shared folder @a name does not exist.
4729 </result>
4730
4731 </desc>
4732 <param name="name" type="wstring" dir="in">
4733 <desc>Logical name of the shared folder to remove.</desc>
4734 </param>
4735 </method>
4736
4737 <method name="canShowConsoleWindow">
4738 <desc>
4739 Returns @c true if the VM console process can activate the
4740 console window and bring it to foreground on the desktop of
4741 the host PC.
4742 <note>
4743 This method will fail if a session for this machine is not
4744 currently open.
4745 </note>
4746
4747 <result name="VBOX_E_INVALID_VM_STATE">
4748 Machine session is not open.
4749 </result>
4750
4751 </desc>
4752 <param name="canShow" type="boolean" dir="return">
4753 <desc>
4754 @c true if the console window can be shown and @c
4755 false otherwise.
4756 </desc>
4757 </param>
4758 </method>
4759
4760 <method name="showConsoleWindow">
4761 <desc>
4762 Activates the console window and brings it to foreground on
4763 the desktop of the host PC. Many modern window managers on
4764 many platforms implement some sort of focus stealing
4765 prevention logic, so that it may be impossible to activate
4766 a window without the help of the currently active
4767 application. In this case, this method will return a non-zero
4768 identifier that represents the top-level window of the VM
4769 console process. The caller, if it represents a currently
4770 active process, is responsible to use this identifier (in a
4771 platform-dependent manner) to perform actual window
4772 activation.
4773 <note>
4774 This method will fail if a session for this machine is not
4775 currently open.
4776 </note>
4777
4778 <result name="VBOX_E_INVALID_VM_STATE">
4779 Machine session is not open.
4780 </result>
4781
4782 </desc>
4783 <param name="winId" type="unsigned long long" dir="return">
4784 <desc>
4785 Platform-dependent identifier of the top-level VM console
4786 window, or zero if this method has performed all actions
4787 necessary to implement the <i>show window</i> semantics for
4788 the given platform and/or VirtualBox front-end.
4789 </desc>
4790 </param>
4791 </method>
4792
4793 <method name="getGuestProperty">
4794 <desc>
4795 Reads an entry from the machine's guest property store.
4796
4797 <result name="VBOX_E_INVALID_VM_STATE">
4798 Machine session is not open.
4799 </result>
4800
4801 </desc>
4802 <param name="name" type="wstring" dir="in">
4803 <desc>
4804 The name of the property to read.
4805 </desc>
4806 </param>
4807 <param name="value" type="wstring" dir="out">
4808 <desc>
4809 The value of the property. If the property does not exist then this
4810 will be empty.
4811 </desc>
4812 </param>
4813 <param name="timestamp" type="unsigned long long" dir="out">
4814 <desc>
4815 The time at which the property was last modified, as seen by the
4816 server process.
4817 </desc>
4818 </param>
4819 <param name="flags" type="wstring" dir="out">
4820 <desc>
4821 Additional property parameters, passed as a comma-separated list of
4822 "name=value" type entries.
4823 </desc>
4824 </param>
4825 </method>
4826
4827 <method name="getGuestPropertyValue">
4828 <desc>
4829 Reads a value from the machine's guest property store.
4830
4831 <result name="VBOX_E_INVALID_VM_STATE">
4832 Machine session is not open.
4833 </result>
4834
4835 </desc>
4836 <param name="property" type="wstring" dir="in">
4837 <desc>
4838 The name of the property to read.
4839 </desc>
4840 </param>
4841 <param name="value" type="wstring" dir="return">
4842 <desc>
4843 The value of the property. If the property does not exist then this
4844 will be empty.
4845 </desc>
4846 </param>
4847 </method>
4848
4849 <method name="getGuestPropertyTimestamp">
4850 <desc>
4851 Reads a property timestamp from the machine's guest property store.
4852
4853 <result name="VBOX_E_INVALID_VM_STATE">
4854 Machine session is not open.
4855 </result>
4856
4857 </desc>
4858 <param name="property" type="wstring" dir="in">
4859 <desc>
4860 The name of the property to read.
4861 </desc>
4862 </param>
4863 <param name="value" type="unsigned long long" dir="return">
4864 <desc>
4865 The timestamp. If the property does not exist then this will be
4866 empty.
4867 </desc>
4868 </param>
4869 </method>
4870
4871 <method name="setGuestProperty">
4872 <desc>
4873 Sets, changes or deletes an entry in the machine's guest property
4874 store.
4875
4876 <result name="E_ACCESSDENIED">
4877 Property cannot be changed.
4878 </result>
4879 <result name="E_INVALIDARG">
4880 Invalid @a flags.
4881 </result>
4882 <result name="VBOX_E_INVALID_VM_STATE">
4883 Virtual machine is not mutable or session not open.
4884 </result>
4885 <result name="VBOX_E_INVALID_OBJECT_STATE">
4886 Cannot set transient property when machine not running.
4887 </result>
4888
4889 </desc>
4890 <param name="property" type="wstring" dir="in">
4891 <desc>
4892 The name of the property to set, change or delete.
4893 </desc>
4894 </param>
4895 <param name="value" type="wstring" dir="in">
4896 <desc>
4897 The new value of the property to set, change or delete. If the
4898 property does not yet exist and value is non-empty, it will be
4899 created. If the value is empty, the key will be deleted if it
4900 exists.
4901 </desc>
4902 </param>
4903 <param name="flags" type="wstring" dir="in">
4904 <desc>
4905 Additional property parameters, passed as a comma-separated list of
4906 "name=value" type entries.
4907 </desc>
4908 </param>
4909 </method>
4910
4911 <method name="setGuestPropertyValue">
4912 <desc>
4913 Sets, changes or deletes a value in the machine's guest property
4914 store. The flags field will be left unchanged or created empty for a
4915 new property.
4916
4917 <result name="E_ACCESSDENIED">
4918 Property cannot be changed.
4919 </result>
4920 <result name="VBOX_E_INVALID_VM_STATE">
4921 Virtual machine is not mutable or session not open.
4922 </result>
4923 <result name="VBOX_E_INVALID_OBJECT_STATE">
4924 Cannot set transient property when machine not running.
4925 </result>
4926 </desc>
4927
4928 <param name="property" type="wstring" dir="in">
4929 <desc>
4930 The name of the property to set, change or delete.
4931 </desc>
4932 </param>
4933 <param name="value" type="wstring" dir="in">
4934 <desc>
4935 The new value of the property to set, change or delete. If the
4936 property does not yet exist and value is non-empty, it will be
4937 created. If value is empty, the property will be deleted if it
4938 exists.
4939 </desc>
4940 </param>
4941 </method>
4942
4943 <method name="enumerateGuestProperties">
4944 <desc>
4945 Return a list of the guest properties matching a set of patterns along
4946 with their values, time stamps and flags.
4947 </desc>
4948 <param name="patterns" type="wstring" dir="in">
4949 <desc>
4950 The patterns to match the properties against, separated by '|'
4951 characters. If this is empty or NULL, all properties will match.
4952 </desc>
4953 </param>
4954 <param name="name" type="wstring" dir="out" safearray="yes">
4955 <desc>
4956 The names of the properties returned.
4957 </desc>
4958 </param>
4959 <param name="value" type="wstring" dir="out" safearray="yes">
4960 <desc>
4961 The values of the properties returned. The array entries match the
4962 corresponding entries in the @a name array.
4963 </desc>
4964 </param>
4965 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4966 <desc>
4967 The time stamps of the properties returned. The array entries match
4968 the corresponding entries in the @a name array.
4969 </desc>
4970 </param>
4971 <param name="flags" type="wstring" dir="out" safearray="yes">
4972 <desc>
4973 The flags of the properties returned. The array entries match the
4974 corresponding entries in the @a name array.
4975 </desc>
4976 </param>
4977 </method>
4978</interface>
4979
4980 <!--
4981 // IConsole
4982 /////////////////////////////////////////////////////////////////////////
4983 -->
4984
4985 <interface
4986 name="IConsoleCallback" extends="$unknown"
4987 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4988 wsmap="suppress"
4989 >
4990
4991 <method name="onMousePointerShapeChange">
4992 <desc>
4993 Notification when the guest mouse pointer shape has
4994 changed. The new shape data is given.
4995 </desc>
4996 <param name="visible" type="boolean" dir="in">
4997 <desc>
4998 Flag whether the pointer is visible.
4999 </desc>
5000 </param>
5001 <param name="alpha" type="boolean" dir="in">
5002 <desc>
5003 Flag whether the pointer has an alpha channel.
5004 </desc>
5005 </param>
5006 <param name="xHot" type="unsigned long" dir="in">
5007 <desc>
5008 The pointer hot spot x coordinate.
5009 </desc>
5010 </param>
5011 <param name="yHot" type="unsigned long" dir="in">
5012 <desc>
5013 The pointer hot spot y coordinate.
5014 </desc>
5015 </param>
5016 <param name="width" type="unsigned long" dir="in">
5017 <desc>
5018 Width of the pointer shape in pixels.
5019 </desc>
5020 </param>
5021 <param name="height" type="unsigned long" dir="in">
5022 <desc>
5023 Height of the pointer shape in pixels.
5024 </desc>
5025 </param>
5026 <param name="shape" type="octet" mod="ptr" dir="in">
5027 <desc>
5028 Address of the shape buffer.
5029
5030 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5031 followed by a 32-bpp XOR (color) mask.
5032
5033 For pointers without alpha channel the XOR mask pixels are 32
5034 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5035 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5036
5037 An AND mask is used for pointers with alpha channel, so if the
5038 callback does not support alpha, the pointer could be
5039 displayed as a normal color pointer.
5040
5041 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5042 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5043 height</tt>. The padding bits at the end of each scanline are
5044 undefined.
5045
5046 The XOR mask follows the AND mask on the next 4-byte aligned
5047 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5048 Bytes in the gap between the AND and the XOR mask are undefined.
5049 The XOR mask scanlines have no gap between them and the size of
5050 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5051
5052 <note>
5053 If @a shape is 0, only the pointer visibility is changed.
5054 </note>
5055 </desc>
5056 </param>
5057 </method>
5058
5059 <method name="onMouseCapabilityChange">
5060 <desc>
5061 Notification when the mouse capabilities reported by the
5062 guest have changed. The new capabilities are passed.
5063 </desc>
5064 <param name="supportsAbsolute" type="boolean" dir="in"/>
5065 <param name="needsHostCursor" type="boolean" dir="in"/>
5066 </method>
5067
5068 <method name="onKeyboardLedsChange">
5069 <desc>
5070 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5071 to alter the state of the keyboard LEDs.
5072 </desc>
5073 <param name="numLock" type="boolean" dir="in"/>
5074 <param name="capsLock" type="boolean" dir="in"/>
5075 <param name="scrollLock" type="boolean" dir="in"/>
5076 </method>
5077
5078 <method name="onStateChange">
5079 <desc>
5080 Notification when the execution state of the machine has changed.
5081 The new state will be given.
5082 </desc>
5083 <param name="state" type="MachineState" dir="in"/>
5084 </method>
5085
5086 <method name="onAdditionsStateChange">
5087 <desc>
5088 Notification when a Guest Additions property changes.
5089 Interested callees should query IGuest attributes to
5090 find out what has changed.
5091 </desc>
5092 </method>
5093
5094 <method name="onDVDDriveChange">
5095 <desc>
5096 Notification when a property of the
5097 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5098 Interested callees should use IDVDDrive methods to find out what has
5099 changed.
5100 </desc>
5101 </method>
5102
5103 <method name="onFloppyDriveChange">
5104 <desc>
5105 Notification when a property of the
5106 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5107 Interested callees should use IFloppyDrive methods to find out what
5108 has changed.
5109 </desc>
5110 </method>
5111
5112 <method name="onNetworkAdapterChange">
5113 <desc>
5114 Notification when a property of one of the
5115 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5116 changes. Interested callees should use INetworkAdapter methods and
5117 attributes to find out what has changed.
5118 </desc>
5119 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5120 <desc>Network adapter that is subject to change.</desc>
5121 </param>
5122 </method>
5123
5124 <method name="onSerialPortChange">
5125 <desc>
5126 Notification when a property of one of the
5127 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5128 Interested callees should use ISerialPort methods and attributes
5129 to find out what has changed.
5130 </desc>
5131 <param name="serialPort" type="ISerialPort" dir="in">
5132 <desc>Serial port that is subject to change.</desc>
5133 </param>
5134 </method>
5135
5136 <method name="onParallelPortChange">
5137 <desc>
5138 Notification when a property of one of the
5139 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5140 changes. Interested callees should use ISerialPort methods and
5141 attributes to find out what has changed.
5142 </desc>
5143 <param name="parallelPort" type="IParallelPort" dir="in">
5144 <desc>Parallel port that is subject to change.</desc>
5145 </param>
5146 </method>
5147
5148 <method name="onVRDPServerChange">
5149 <desc>
5150 Notification when a property of the
5151 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5152 Interested callees should use IVRDPServer methods and attributes to
5153 find out what has changed.
5154 </desc>
5155 </method>
5156
5157 <method name="onUSBControllerChange">
5158 <desc>
5159 Notification when a property of the virtual
5160 <link to="IMachine::USBController">USB controller</link> changes.
5161 Interested callees should use IUSBController methods and attributes to
5162 find out what has changed.
5163 </desc>
5164 </method>
5165
5166 <method name="onUSBDeviceStateChange">
5167 <desc>
5168 Notification when a USB device is attached to or detached from
5169 the virtual USB controller.
5170
5171 This notification is sent as a result of the indirect
5172 request to attach the device because it matches one of the
5173 machine USB filters, or as a result of the direct request
5174 issued by <link to="IConsole::attachUSBDevice"/> or
5175 <link to="IConsole::detachUSBDevice"/>.
5176
5177 This notification is sent in case of both a succeeded and a
5178 failed request completion. When the request succeeds, the @a
5179 error parameter is @c null, and the given device has been
5180 already added to (when @a attached is @c true) or removed from
5181 (when @a attached is @c false) the collection represented by
5182 <link to="IConsole::USBDevices"/>. On failure, the collection
5183 doesn't change and the @a error parameter represents the error
5184 message describing the failure.
5185
5186 </desc>
5187 <param name="device" type="IUSBDevice" dir="in">
5188 <desc>Device that is subject to state change.</desc>
5189 </param>
5190 <param name="attached" type="boolean" dir="in">
5191 <desc>
5192 <tt>true</tt> if the device was attached
5193 and <tt>false</tt> otherwise.
5194 </desc>
5195 </param>
5196 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5197 <desc>
5198 <tt>null</tt> on success or an error message object on
5199 failure.
5200 </desc>
5201 </param>
5202 </method>
5203
5204 <method name="onSharedFolderChange">
5205 <desc>
5206 Notification when a shared folder is added or removed.
5207 The @a scope argument defines one of three scopes:
5208 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5209 (<link to="Scope_Global">Global</link>),
5210 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5211 the machine (<link to="Scope_Machine">Machine</link>) or <link
5212 to="IConsole::sharedFolders">transient shared folders</link> of the
5213 machine (<link to="Scope_Session">Session</link>). Interested callees
5214 should use query the corresponding collections to find out what has
5215 changed.
5216 </desc>
5217 <param name="scope" type="Scope" dir="in">
5218 <desc>Scope of the notification.</desc>
5219 </param>
5220 </method>
5221
5222 <method name="onRuntimeError">
5223 <desc>
5224 Notification when an error happens during the virtual
5225 machine execution.
5226
5227 There are three kinds of runtime errors:
5228 <ul>
5229 <li><i>fatal</i></li>
5230 <li><i>non-fatal with retry</i></li>
5231 <li><i>non-fatal warnings</i></li>
5232 </ul>
5233
5234 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5235 to <tt>true</tt>. In case of fatal errors, the virtual machine
5236 execution is always paused before calling this notification, and
5237 the notification handler is supposed either to immediately save
5238 the virtual machine state using <link to="IConsole::saveState()"/>
5239 or power it off using <link to="IConsole::powerDown()"/>.
5240 Resuming the execution can lead to unpredictable results.
5241
5242 <b>Non-fatal</b> errors and warnings are indicated by the
5243 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5244 is in the Paused state by the time the error notification is
5245 received, it means that the user can <i>try to resume</i> the machine
5246 execution after attempting to solve the problem that caused the
5247 error. In this case, the notification handler is supposed
5248 to show an appropriate message to the user (depending on the
5249 value of the @a id parameter) that offers several actions such
5250 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5251 wants to retry, the notification handler should continue
5252 the machine execution using the <link to="IConsole::resume()"/>
5253 call. If the machine execution is not Paused during this
5254 notification, then it means this notification is a <i>warning</i>
5255 (for example, about a fatal condition that can happen very soon);
5256 no immediate action is required from the user, the machine
5257 continues its normal execution.
5258
5259 Note that in either case the notification handler
5260 <b>must not</b> perform any action directly on a thread
5261 where this notification is called. Everything it is allowed to
5262 do is to post a message to another thread that will then talk
5263 to the user and take the corresponding action.
5264
5265 Currently, the following error identifiers are known:
5266 <ul>
5267 <li><tt>"HostMemoryLow"</tt></li>
5268 <li><tt>"HostAudioNotResponding"</tt></li>
5269 <li><tt>"VDIStorageFull"</tt></li>
5270 </ul>
5271
5272 <note>
5273 This notification is not designed to be implemented by
5274 more than one callback at a time. If you have multiple
5275 IConsoleCallback instances registered on the given
5276 IConsole object, make sure you simply do nothing but
5277 return @c S_OK from all but one of them that does actual
5278 user notification and performs necessary actions.
5279 </note>
5280
5281 </desc>
5282 <param name="fatal" type="boolean" dir="in">
5283 <desc>Whether the error is fatal or not</desc>
5284 </param>
5285 <param name="id" type="wstring" dir="in">
5286 <desc>Error identifier</desc>
5287 </param>
5288 <param name="message" type="wstring" dir="in">
5289 <desc>Optional error message</desc>
5290 </param>
5291 </method>
5292
5293 <method name="onCanShowWindow">
5294 <desc>
5295 Notification when a call to
5296 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5297 front-end to check if a subsequent call to
5298 <link to="IMachine::showConsoleWindow()"/> can succeed.
5299
5300 The callee should give an answer appropriate to the current
5301 machine state in the @a canShow argument. This answer must
5302 remain valid at least until the next
5303 <link to="IConsole::state">machine state</link> change.
5304
5305 <note>
5306 This notification is not designed to be implemented by
5307 more than one callback at a time. If you have multiple
5308 IConsoleCallback instances registered on the given
5309 IConsole object, make sure you simply do nothing but
5310 return @c true and @c S_OK from all but one of them that
5311 actually manages console window activation.
5312 </note>
5313 </desc>
5314 <param name="canShow" type="boolean" dir="return">
5315 <desc>
5316 @c true if the console window can be shown and @c
5317 false otherwise.
5318 </desc>
5319 </param>
5320 </method>
5321
5322 <method name="onShowWindow">
5323 <desc>
5324 Notification when a call to
5325 <link to="IMachine::showConsoleWindow()"/>
5326 requests the console window to be activated and brought to
5327 foreground on the desktop of the host PC.
5328
5329 This notification should cause the VM console process to
5330 perform the requested action as described above. If it is
5331 impossible to do it at a time of this notification, this
5332 method should return a failure.
5333
5334 Note that many modern window managers on many platforms
5335 implement some sort of focus stealing prevention logic, so
5336 that it may be impossible to activate a window without the
5337 help of the currently active application (which is supposedly
5338 an initiator of this notification). In this case, this method
5339 must return a non-zero identifier that represents the
5340 top-level window of the VM console process. The caller, if it
5341 represents a currently active process, is responsible to use
5342 this identifier (in a platform-dependent manner) to perform
5343 actual window activation.
5344
5345 This method must set @a winId to zero if it has performed all
5346 actions necessary to complete the request and the console
5347 window is now active and in foreground, to indicate that no
5348 further action is required on the caller's side.
5349
5350 <note>
5351 This notification is not designed to be implemented by
5352 more than one callback at a time. If you have multiple
5353 IConsoleCallback instances registered on the given
5354 IConsole object, make sure you simply do nothing but
5355 return @c S_OK from all but one of them that actually
5356 manages console window activation.
5357 </note>
5358 </desc>
5359 <param name="winId" type="unsigned long long" dir="return">
5360 <desc>
5361 Platform-dependent identifier of the top-level VM console
5362 window, or zero if this method has performed all actions
5363 necessary to implement the <i>show window</i> semantics for
5364 the given platform and/or this VirtualBox front-end.
5365 </desc>
5366 </param>
5367 </method>
5368
5369 </interface>
5370
5371 <interface
5372 name="IRemoteDisplayInfo" extends="$unknown"
5373 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5374 wsmap="struct"
5375 >
5376 <desc>
5377 Contains information about the remote display (VRDP) capabilities and status.
5378 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5379 </desc>
5380
5381 <attribute name="active" type="boolean" readonly="yes">
5382 <desc>
5383 Whether the remote display connection is active.
5384 </desc>
5385 </attribute>
5386
5387 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5388 <desc>
5389 How many times a client connected.
5390 </desc>
5391 </attribute>
5392
5393 <attribute name="beginTime" type="long long" readonly="yes">
5394 <desc>
5395 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5396 </desc>
5397 </attribute>
5398
5399 <attribute name="endTime" type="long long" readonly="yes">
5400 <desc>
5401 When the last connection was terminated or the current time, if
5402 connection is still active, in milliseconds since 1970-01-01 UTC.
5403 </desc>
5404 </attribute>
5405
5406 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5407 <desc>
5408 How many bytes were sent in last or current, if still active, connection.
5409 </desc>
5410 </attribute>
5411
5412 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5413 <desc>
5414 How many bytes were sent in all connections.
5415 </desc>
5416 </attribute>
5417
5418 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5419 <desc>
5420 How many bytes were received in last or current, if still active, connection.
5421 </desc>
5422 </attribute>
5423
5424 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5425 <desc>
5426 How many bytes were received in all connections.
5427 </desc>
5428 </attribute>
5429
5430 <attribute name="user" type="wstring" readonly="yes">
5431 <desc>
5432 Login user name supplied by the client.
5433 </desc>
5434 </attribute>
5435
5436 <attribute name="domain" type="wstring" readonly="yes">
5437 <desc>
5438 Login domain name supplied by the client.
5439 </desc>
5440 </attribute>
5441
5442 <attribute name="clientName" type="wstring" readonly="yes">
5443 <desc>
5444 The client name supplied by the client.
5445 </desc>
5446 </attribute>
5447
5448 <attribute name="clientIP" type="wstring" readonly="yes">
5449 <desc>
5450 The IP address of the client.
5451 </desc>
5452 </attribute>
5453
5454 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5455 <desc>
5456 The client software version number.
5457 </desc>
5458 </attribute>
5459
5460 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5461 <desc>
5462 Public key exchange method used when connection was established.
5463 Values: 0 - RDP4 public key exchange scheme.
5464 1 - X509 certificates were sent to client.
5465 </desc>
5466 </attribute>
5467
5468 </interface>
5469
5470 <interface
5471 name="IConsole" extends="$unknown"
5472 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5473 wsmap="managed"
5474 >
5475 <desc>
5476 The IConsole interface represents an interface to control virtual
5477 machine execution.
5478
5479 The console object that implements the IConsole interface is obtained
5480 from a session object after the session for the given machine has been
5481 opened using one of <link to="IVirtualBox::openSession"/>,
5482 <link to="IVirtualBox::openRemoteSession"/> or
5483 <link to="IVirtualBox::openExistingSession"/> methods.
5484
5485 Methods of the IConsole interface allow the caller to query the current
5486 virtual machine execution state, pause the machine or power it down, save
5487 the machine state or take a snapshot, attach and detach removable media
5488 and so on.
5489
5490 <see>ISession</see>
5491 </desc>
5492
5493 <attribute name="machine" type="IMachine" readonly="yes">
5494 <desc>
5495 Machine object this console is sessioned with.
5496 <note>
5497 This is a convenience property, it has the same value as
5498 <link to="ISession::machine"/> of the corresponding session
5499 object.
5500 </note>
5501 </desc>
5502 </attribute>
5503
5504 <attribute name="state" type="MachineState" readonly="yes">
5505 <desc>
5506 Current execution state of the machine.
5507 <note>
5508 This property always returns the same value as the corresponding
5509 property of the IMachine object this console is sessioned with.
5510 For the process that owns (executes) the VM, this is the
5511 preferable way of querying the VM state, because no IPC
5512 calls are made.
5513 </note>
5514 </desc>
5515 </attribute>
5516
5517 <attribute name="guest" type="IGuest" readonly="yes">
5518 <desc>Guest object.</desc>
5519 </attribute>
5520
5521 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5522 <desc>
5523 Virtual keyboard object.
5524 <note>
5525 If the machine is not running, any attempt to use
5526 the returned object will result in an error.
5527 </note>
5528 </desc>
5529 </attribute>
5530
5531 <attribute name="mouse" type="IMouse" readonly="yes">
5532 <desc>
5533 Virtual mouse object.
5534 <note>
5535 If the machine is not running, any attempt to use
5536 the returned object will result in an error.
5537 </note>
5538 </desc>
5539 </attribute>
5540
5541 <attribute name="display" type="IDisplay" readonly="yes">
5542 <desc>Virtual display object.
5543 <note>
5544 If the machine is not running, any attempt to use
5545 the returned object will result in an error.
5546 </note>
5547 </desc>
5548 </attribute>
5549
5550 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5551 <desc>Debugging interface.</desc>
5552 </attribute>
5553
5554 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5555 <desc>
5556 Collection of USB devices currently attached to the virtual
5557 USB controller.
5558 <note>
5559 The collection is empty if the machine is not running.
5560 </note>
5561 </desc>
5562 </attribute>
5563
5564 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5565 <desc>
5566 List of USB devices currently attached to the remote VRDP client.
5567 Once a new device is physically attached to the remote host computer,
5568 it appears in this list and remains there until detached.
5569 </desc>
5570 </attribute>
5571
5572 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5573 <desc>
5574 Collection of shared folders for the current session. These folders
5575 are called transient shared folders because they are available to the
5576 guest OS running inside the associated virtual machine only for the
5577 duration of the session (as opposed to
5578 <link to="IMachine::sharedFolders"/> which represent permanent shared
5579 folders). When the session is closed (e.g. the machine is powered down),
5580 these folders are automatically discarded.
5581
5582 New shared folders are added to the collection using
5583 <link to="#createSharedFolder"/>. Existing shared folders can be
5584 removed using <link to="#removeSharedFolder"/>.
5585 </desc>
5586 </attribute>
5587
5588 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5589 <desc>
5590 Interface that provides information on Remote Display (VRDP) connection.
5591 </desc>
5592 </attribute>
5593
5594 <method name="powerUp">
5595 <desc>
5596 Starts the virtual machine execution using the current machine
5597 state (that is, its current execution state, current settings and
5598 current hard disks).
5599
5600 If the machine is powered off or aborted, the execution will
5601 start from the beginning (as if the real hardware were just
5602 powered on).
5603
5604 If the machine is in the <link to="MachineState_Saved"/> state,
5605 it will continue its execution the point where the state has
5606 been saved.
5607
5608 <note>
5609 Unless you are trying to write a new VirtualBox front-end that
5610 performs direct machine execution (like the VirtualBox or VBoxSDL
5611 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5612 session opened by <link to="IVirtualBox::openSession"/> and use this
5613 session only to change virtual machine settings. If you simply want to
5614 start virtual machine execution using one of the existing front-ends
5615 (for example the VirtualBox GUI or headless server), simply use
5616 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5617 power up the machine automatically for you.
5618 </note>
5619
5620 <see>#saveState</see>
5621 <result name="VBOX_E_INVALID_VM_STATE">
5622 Virtual machine already running.
5623 </result>
5624 <result name="VBOX_E_HOST_ERROR">
5625 Host interface does not exist or name not set.
5626 </result>
5627 <result name="VBOX_E_FILE_ERROR">
5628 Invalid saved state file.
5629 </result>
5630 </desc>
5631 <param name="progress" type="IProgress" dir="return">
5632 <desc>Progress object to track the operation completion.</desc>
5633 </param>
5634 </method>
5635
5636 <method name="powerUpPaused">
5637 <desc>
5638 Identical to powerUp except that the VM will enter the
5639 <link to="MachineState_Paused"/> state, instead of
5640 <link to="MachineState_Running"/>.
5641
5642 <see>#powerUp</see>
5643 <result name="VBOX_E_INVALID_VM_STATE">
5644 Virtual machine already running.
5645 </result>
5646 <result name="VBOX_E_HOST_ERROR">
5647 Host interface does not exist or name not set.
5648 </result>
5649 <result name="VBOX_E_FILE_ERROR">
5650 Invalid saved state file.
5651 </result>
5652 </desc>
5653 <param name="progress" type="IProgress" dir="return">
5654 <desc>Progress object to track the operation completion.</desc>
5655 </param>
5656 </method>
5657
5658 <method name="powerDown">
5659 <desc>
5660 Stops the virtual machine execution.
5661 After this operation completes, the machine will go to the
5662 PoweredOff state.
5663
5664 @deprecated This method will be removed in VirtualBox 2.1 where the
5665 powerDownAsync() method will take its name. Do not use this method in
5666 the code.
5667 <result name="VBOX_E_INVALID_VM_STATE">
5668 Virtual machine must be Running, Paused or Stuck to be powered down.
5669 </result>
5670 <result name="VBOX_E_VM_ERROR">
5671 Unable to power off or destroy virtual machine.
5672 </result>
5673 </desc>
5674 </method>
5675
5676 <method name="powerDownAsync">
5677 <desc>
5678 Initiates the power down procedure to stop the virtual machine
5679 execution.
5680
5681 The completion of the power down procedure is tracked using the returned
5682 IProgress object. After the operation is complete, the machine will go
5683 to the PoweredOff state.
5684
5685 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5686 where the original powerDown() method will be removed. You will need to
5687 rename "powerDownAsync" to "powerDown" in your sources to make them
5688 build with version 2.1.
5689 <result name="VBOX_E_INVALID_VM_STATE">
5690 Virtual machine must be Running, Paused or Stuck to be powered down.
5691 </result>
5692 </desc>
5693 <param name="progress" type="IProgress" dir="return">
5694 <desc>Progress object to track the operation completion.</desc>
5695 </param>
5696 </method>
5697
5698 <method name="reset">
5699 <desc>Resets the virtual machine.
5700 <result name="VBOX_E_INVALID_VM_STATE">
5701 Virtual machine not in Running state.
5702 </result>
5703 <result name="VBOX_E_VM_ERROR">
5704 Virtual machine error in reset operation.
5705 </result>
5706 </desc>
5707 </method>
5708
5709 <method name="pause">
5710 <desc>Pauses the virtual machine execution.
5711 <result name="VBOX_E_INVALID_VM_STATE">
5712 Virtual machine not in Running state.
5713 </result>
5714 <result name="VBOX_E_VM_ERROR">
5715 Virtual machine error in suspend operation.
5716 </result>
5717 </desc>
5718 </method>
5719
5720 <method name="resume">
5721 <desc>Resumes the virtual machine execution.
5722 <result name="VBOX_E_INVALID_VM_STATE">
5723 Virtual machine not in Paused state.
5724 </result>
5725 <result name="VBOX_E_VM_ERROR">
5726 Virtual machine error in resume operation.
5727 </result>
5728 </desc>
5729 </method>
5730
5731 <method name="powerButton">
5732 <desc>Sends the ACPI power button event to the guest.
5733 <result name="VBOX_E_INVALID_VM_STATE">
5734 Virtual machine not in Running state.
5735 </result>
5736 <result name="VBOX_E_PDM_ERROR">
5737 Controlled power off failed.
5738 </result>
5739 </desc>
5740 </method>
5741
5742 <method name="sleepButton">
5743 <desc>Sends the ACPI sleep button event to the guest.
5744 <result name="VBOX_E_INVALID_VM_STATE">
5745 Virtual machine not in Running state.
5746 </result>
5747 <result name="VBOX_E_PDM_ERROR">
5748 Sending sleep button event failed.
5749 </result>
5750 </desc>
5751 </method>
5752
5753 <method name="getPowerButtonHandled">
5754 <desc>Checks if the last power button event was handled by guest.
5755 <result name="VBOX_E_PDM_ERROR">
5756 Checking if the event was handled by the guest OS failed.
5757 </result>
5758 </desc>
5759 <param name="handled" type="boolean" dir="return"/>
5760 </method>
5761
5762 <method name="getGuestEnteredACPIMode">
5763 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5764 G1 (sleeping). If this method returns false, the guest will
5765 most likely not respond to external ACPI events.
5766 <result name="VBOX_E_INVALID_VM_STATE">
5767 Virtual machine not in Running state.
5768 </result>
5769 </desc>
5770 <param name="entered" type="boolean" dir="return"/>
5771 </method>
5772
5773 <method name="saveState">
5774 <desc>
5775 Saves the current execution state of a running virtual machine
5776 and stops its execution.
5777
5778 After this operation completes, the machine will go to the
5779 Saved state. Next time it is powered up, this state will
5780 be restored and the machine will continue its execution from
5781 the place where it was saved.
5782
5783 This operation differs from taking a snapshot to the effect
5784 that it doesn't create new differencing hard disks. Also, once
5785 the machine is powered up from the state saved using this method,
5786 the saved state is deleted, so it will be impossible to return
5787 to this state later.
5788
5789 <note>
5790 On success, this method implicitly calls
5791 <link to="IMachine::saveSettings()"/> to save all current machine
5792 settings (including runtime changes to the DVD drive, etc.).
5793 Together with the impossibility to change any VM settings when it is
5794 in the Saved state, this guarantees adequate hardware
5795 configuration of the machine when it is restored from the saved
5796 state file.
5797 </note>
5798
5799 <note>
5800 The machine must be in the Running or Paused state, otherwise
5801 the operation will fail.
5802 </note>
5803 <result name="VBOX_E_INVALID_VM_STATE">
5804 Virtual machine state neither Running nor Paused.
5805 </result>
5806 <result name="VBOX_E_FILE_ERROR">
5807 Failed to create directory for saved state file.
5808 </result>
5809
5810 <see><link to="#takeSnapshot"/></see>
5811 </desc>
5812 <param name="progress" type="IProgress" dir="return">
5813 <desc>Progress object to track the operation completion.</desc>
5814 </param>
5815 </method>
5816
5817 <method name="adoptSavedState">
5818 <desc>
5819 Associates the given saved state file to the virtual machine.
5820
5821 On success, the machine will go to the Saved state. Next time it is
5822 powered up, it will be restored from the adopted saved state and
5823 continue execution from the place where the saved state file was
5824 created.
5825
5826 The specified saved state file path may be absolute or relative to the
5827 folder the VM normally saves the state to (usually,
5828 <link to="IMachine::snapshotFolder"/>).
5829
5830 <note>
5831 It's a caller's responsibility to make sure the given saved state
5832 file is compatible with the settings of this virtual machine that
5833 represent its virtual hardware (memory size, hard disk configuration
5834 etc.). If there is a mismatch, the behavior of the virtual machine
5835 is undefined.
5836 </note>
5837 <result name="VBOX_E_INVALID_VM_STATE">
5838 Virtual machine state neither PoweredOff nor Aborted.
5839 </result>
5840 </desc>
5841 <param name="savedStateFile" type="wstring" dir="in">
5842 <desc>Path to the saved state file to adopt.</desc>
5843 </param>
5844 </method>
5845
5846 <method name="discardSavedState">
5847 <desc>
5848 Discards (deletes) the saved state of the virtual machine
5849 previously created by <link to="#saveState"/>. Next time the
5850 machine is powered up, a clean boot will occur.
5851 <note>
5852 This operation is equivalent to resetting or powering off
5853 the machine without doing a proper shutdown in the guest OS.
5854 </note>
5855 <result name="VBOX_E_INVALID_VM_STATE">
5856 Virtual machine not in state Saved.
5857 </result>
5858 </desc>
5859 </method>
5860
5861 <method name="getDeviceActivity">
5862 <desc>
5863 Gets the current activity type of a given device or device group.
5864 <result name="E_INVALIDARG">
5865 Invalid device type.
5866 </result>
5867 </desc>
5868 <param name="type" type="DeviceType" dir="in"/>
5869 <param name="activity" type="DeviceActivity" dir="return"/>
5870 </method>
5871
5872 <method name="attachUSBDevice">
5873 <desc>
5874 Attaches a host USB device with the given UUID to the
5875 USB controller of the virtual machine.
5876
5877 The device needs to be in one of the following states:
5878 <link to="USBDeviceState_Busy"/>,
5879 <link to="USBDeviceState_Available"/> or
5880 <link to="USBDeviceState_Held"/>,
5881 otherwise an error is immediately returned.
5882
5883 When the device state is
5884 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5885 be returned if the host computer refuses to release it for some reason.
5886
5887 <see>IUSBController::deviceFilters, USBDeviceState</see>
5888 <result name="VBOX_E_INVALID_VM_STATE">
5889 Virtual machine state neither Running nor Paused.
5890 </result>
5891 <result name="VBOX_E_PDM_ERROR">
5892 Virtual machine does not have a USB controller.
5893 </result>
5894 </desc>
5895 <param name="id" type="uuid" dir="in">
5896 <desc>UUID of the host USB device to attach.</desc>
5897 </param>
5898 </method>
5899
5900 <method name="detachUSBDevice">
5901 <desc>
5902 Detaches an USB device with the given UUID from the USB controller
5903 of the virtual machine.
5904
5905 After this method succeeds, the VirtualBox server re-initiates
5906 all USB filters as if the device were just physically attached
5907 to the host, but filters of this machine are ignored to avoid
5908 a possible automatic re-attachment.
5909
5910 <see>IUSBController::deviceFilters, USBDeviceState</see>
5911
5912 <result name="VBOX_E_PDM_ERROR">
5913 Virtual machine does not have a USB controller.
5914 </result>
5915 <result name="E_INVALIDARG">
5916 USB device not attached to this virtual machine.
5917 </result>
5918 </desc>
5919 <param name="id" type="uuid" dir="in">
5920 <desc>UUID of the USB device to detach.</desc>
5921 </param>
5922 <param name="device" type="IUSBDevice" dir="return">
5923 <desc>Detached USB device.</desc>
5924 </param>
5925 </method>
5926
5927 <method name="createSharedFolder">
5928 <desc>
5929 Creates a transient new shared folder by associating the given logical
5930 name with the given host path, adds it to the collection of shared
5931 folders and starts sharing it. Refer to the description of
5932 <link to="ISharedFolder"/> to read more about logical names.
5933
5934 <result name="VBOX_E_INVALID_VM_STATE">
5935 Virtual machine in Saved state or currently changing state.
5936 </result>
5937 <result name="VBOX_E_FILE_ERROR">
5938 Shared folder already exists or not accessible.
5939 </result>
5940 </desc>
5941 <param name="name" type="wstring" dir="in">
5942 <desc>Unique logical name of the shared folder.</desc>
5943 </param>
5944 <param name="hostPath" type="wstring" dir="in">
5945 <desc>Full path to the shared folder in the host file system.</desc>
5946 </param>
5947 <param name="writable" type="boolean" dir="in">
5948 <desc>Whether the share is writable or readonly</desc>
5949 </param>
5950 </method>
5951
5952 <method name="removeSharedFolder">
5953 <desc>
5954 Removes a transient shared folder with the given name previously
5955 created by <link to="#createSharedFolder"/> from the collection of
5956 shared folders and stops sharing it.
5957 <result name="VBOX_E_INVALID_VM_STATE">
5958 Virtual machine in Saved state or currently changing state.
5959 </result>
5960 <result name="VBOX_E_FILE_ERROR">
5961 Shared folder does not exists.
5962 </result>
5963 </desc>
5964 <param name="name" type="wstring" dir="in">
5965 <desc>Logical name of the shared folder to remove.</desc>
5966 </param>
5967 </method>
5968
5969 <method name="takeSnapshot">
5970 <desc>
5971 Saves the current execution state and all settings of the
5972 machine and creates differencing images for all
5973 normal (non-independent) hard disks.
5974
5975 This method can be called for a PoweredOff, Saved, Running or
5976 Paused virtual machine. When the machine is PoweredOff, an
5977 offline <link to="ISnapshot">snapshot</link> is created,
5978 in all other cases -- an online snapshot.
5979
5980 The taken snapshot is always based on the
5981 <link to="IMachine::currentSnapshot">current
5982 snapshot</link> of the associated virtual machine and becomes
5983 a new current snapshot.
5984
5985 <note>
5986 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5987 save all current machine settings before taking an offline snapshot.
5988 </note>
5989
5990 <see>ISnapshot, <link to="#saveState"/></see>
5991 <result name="VBOX_E_INVALID_VM_STATE">
5992 Virtual machine currently changing state.
5993 </result>
5994 </desc>
5995 <param name="name" type="wstring" dir="in">
5996 <desc>Short name for the snapshot.</desc>
5997 </param>
5998 <param name="description" type="wstring" dir="in">
5999 <desc>Optional description of the snapshot.</desc>
6000 </param>
6001 <param name="progress" type="IProgress" dir="return">
6002 <desc>Progress object to track the operation completion.</desc>
6003 </param>
6004 </method>
6005
6006 <method name="discardSnapshot">
6007 <desc>
6008
6009 Starts discarding the specified snapshot. The execution state
6010 and settings of the associated machine stored in the snapshot
6011 will be deleted. The contents of all differencing hard disks of
6012 this snapshot will be merged with the contents of their
6013 dependent child hard disks to keep the, disks valid (in other
6014 words, all changes represented by hard disks being discarded
6015 will be propagated to their child hard disks). After that, this
6016 snapshot's differencing hard disks will be deleted. The parent
6017 of this snapshot will become a new parent for all its child
6018 snapshots.
6019
6020 If the discarded snapshot is the current one, its parent
6021 snapshot will become a new current snapshot. The current machine
6022 state is not directly affected in this case, except that
6023 currently attached differencing hard disks based on hard disks
6024 of the discarded snapshot will be also merged as described
6025 above.
6026
6027 If the discarded snapshot is the first one (the root snapshot)
6028 and it has exactly one child snapshot, this child snapshot will
6029 become the first snapshot after discarding. If there are no
6030 children at all (i.e. the first snapshot is the only snapshot of
6031 the machine), both the current and the first snapshot of the
6032 machine will be set to null. In all other cases, the first
6033 snapshot cannot be discarded.
6034
6035 You cannot discard the snapshot if it
6036 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6037 hard disks that have differencing hard disks based on them. Snapshots of
6038 such kind can be discarded only when every normal hard disk has either
6039 no children at all or exactly one child. In the former case, the normal
6040 hard disk simply becomes unused (i.e. not attached to any VM). In the
6041 latter case, it receives all the changes stored in the child hard disk,
6042 and then it replaces the child hard disk in the configuration of the
6043 corresponding snapshot or machine.
6044
6045 Also, you cannot discard the snapshot if it stores hard disks
6046 (of any type) having differencing child hard disks that belong
6047 to other machines. Such snapshots can be only discarded after
6048 you discard all snapshots of other machines containing "foreign"
6049 child disks, or detach these "foreign" child disks from machines
6050 they are attached to.
6051
6052 One particular example of the snapshot storing normal hard disks
6053 is the first snapshot of a virtual machine that had normal hard
6054 disks attached when taking the snapshot. Be careful when
6055 discarding such snapshots because this implicitly commits
6056 changes (made since the snapshot being discarded has been taken)
6057 to normal hard disks (as described above), which may be not what
6058 you want.
6059
6060 The virtual machine is put to
6061 the <link to="MachineState_Discarding">Discarding</link> state until
6062 the discard operation is completed.
6063
6064 <note>
6065 The machine must not be running, otherwise the operation
6066 will fail.
6067 </note>
6068
6069 <note>
6070 Child hard disks of all normal hard disks of the discarded snapshot
6071 must be accessible (see <link to="IMedium::state"/>) for this
6072 operation to succeed. In particular, this means that all virtual
6073 machines, whose hard disks are directly or indirectly based on the
6074 hard disks of discarded snapshot, must be powered off.
6075 </note>
6076 <note>
6077 Merging hard disk contents can be very time and disk space
6078 consuming, if these disks are big in size and have many
6079 children. However, if the snapshot being discarded is the last
6080 (head) snapshot on the branch, the operation will be rather
6081 quick.
6082 </note>
6083 <note>
6084 Note that discarding the current snapshot
6085 will implicitly call <link to="IMachine::saveSettings()"/> to
6086 make all current machine settings permanent.
6087 </note>
6088 <result name="VBOX_E_INVALID_VM_STATE">
6089 Virtual machine is running.
6090 </result>
6091 </desc>
6092 <param name="id" type="uuid" dir="in">
6093 <desc>UUID of the snapshot to discard.</desc>
6094 </param>
6095 <param name="progress" type="IProgress" dir="return">
6096 <desc>Progress object to track the operation completion.</desc>
6097 </param>
6098 </method>
6099
6100 <method name="discardCurrentState">
6101 <desc>
6102 This operation is similar to <link to="#discardSnapshot()"/> but
6103 affects the current machine state. This means that the state stored in
6104 the current snapshot will become a new current state, and all current
6105 settings of the machine and changes stored in differencing hard disks
6106 will be lost.
6107
6108 After this operation is successfully completed, new empty differencing
6109 hard disks are created for all normal hard disks of the machine.
6110
6111 If the current snapshot of the machine is an online snapshot, the
6112 machine will go to the <link to="MachineState_Saved"> saved
6113 state</link>, so that the next time it is powered on, the execution
6114 state will be restored from the current snapshot.
6115
6116 <note>
6117 The machine must not be running, otherwise the operation will fail.
6118 </note>
6119
6120 <note>
6121 If the machine state is <link to="MachineState_Saved">Saved</link>
6122 prior to this operation, the saved state file will be implicitly
6123 discarded (as if <link to="IConsole::discardSavedState()"/> were
6124 called).
6125 </note>
6126
6127 <result name="VBOX_E_INVALID_VM_STATE">
6128 Virtual machine is running.
6129 </result>
6130 </desc>
6131 <param name="progress" type="IProgress" dir="return">
6132 <desc>Progress object to track the operation completion.</desc>
6133 </param>
6134 </method>
6135
6136 <method name="discardCurrentSnapshotAndState">
6137 <desc>
6138
6139 This method is equivalent to
6140 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6141 (currentSnapshot.id(), progress) followed by
6142 <link to="#discardCurrentState()"/>.
6143
6144 As a result, the machine will be fully restored from the
6145 snapshot preceding the current snapshot, while both the current
6146 snapshot and the current machine state will be discarded.
6147
6148 If the current snapshot is the first snapshot of the machine (i.e. it
6149 has the only snapshot), the current machine state will be
6150 discarded <b>before</b> discarding the snapshot. In other words, the
6151 machine will be restored from its last snapshot, before discarding
6152 it. This differs from performing a single
6153 <link to="#discardSnapshot()"/> call (note that no
6154 <link to="#discardCurrentState()"/> will be possible after it)
6155 to the effect that the latter will preserve the current state instead of
6156 discarding it.
6157
6158 Unless explicitly mentioned otherwise, all remarks and
6159 limitations of the above two methods also apply to this method.
6160
6161 <note>
6162 The machine must not be running, otherwise the operation
6163 will fail.
6164 </note>
6165
6166 <note>
6167 If the machine state is <link to="MachineState_Saved">Saved</link>
6168 prior to this operation, the saved state file will be implicitly
6169 discarded (as if <link to="#discardSavedState()"/> were
6170 called).
6171 </note>
6172
6173 <note>
6174 This method is more efficient than calling both of the above
6175 methods separately: it requires less IPC calls and provides
6176 a single progress object.
6177 </note>
6178
6179 <result name="VBOX_E_INVALID_VM_STATE">
6180 Virtual machine is running.
6181 </result>
6182 </desc>
6183 <param name="progress" type="IProgress" dir="return">
6184 <desc>Progress object to track the operation completion.</desc>
6185 </param>
6186 </method>
6187
6188 <method name="registerCallback">
6189 <desc>
6190 Registers a new console callback on this instance. The methods of the
6191 callback interface will be called by this instance when the appropriate
6192 event occurs.
6193 </desc>
6194 <param name="callback" type="IConsoleCallback" dir="in"/>
6195 </method>
6196
6197 <method name="unregisterCallback">
6198 <desc>
6199 Unregisters the console callback previously registered using
6200 <link to="#registerCallback"/>.
6201 <result name="E_INVALIDARG">
6202 Given @a callback handler is not registered.
6203 </result>
6204 </desc>
6205 <param name="callback" type="IConsoleCallback" dir="in"/>
6206 </method>
6207 </interface>
6208
6209 <!--
6210 // IHost
6211 /////////////////////////////////////////////////////////////////////////
6212 -->
6213
6214 <interface
6215 name="IHostDVDDrive" extends="$unknown"
6216 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6217 wsmap="managed"
6218 >
6219 <desc>
6220 The IHostDVDDrive interface represents the physical CD/DVD drive
6221 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6222 </desc>
6223
6224 <attribute name="name" type="wstring" readonly="yes">
6225 <desc>
6226 Returns the platform-specific device identifier.
6227 On DOS-like platforms, it is a drive name (e.g. R:).
6228 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6229 </desc>
6230 </attribute>
6231 <attribute name="description" type="wstring" readonly="yes">
6232 <desc>
6233 Returns a human readable description for the drive. This
6234 description usually contains the product and vendor name. A
6235 @c null string is returned if the description is not available.
6236 </desc>
6237 </attribute>
6238 <attribute name="udi" type="wstring" readonly="yes">
6239 <desc>
6240 Returns the unique device identifier for the drive. This
6241 attribute is reserved for future use instead of
6242 <link to="#name"/>. Currently it is not used and may return
6243 @c null on some platforms.
6244 </desc>
6245 </attribute>
6246
6247 </interface>
6248
6249 <enumerator
6250 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6251 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6252 />
6253
6254 <collection
6255 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6256 enumerator="IHostDVDDriveEnumerator"
6257 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6258 readonly="yes"
6259 >
6260 <method name="findByName">
6261 <desc>
6262 Searches this collection for a host drive with the given name.
6263 <note>
6264 The method returns an error if the given name does not
6265 correspond to any host drive in the collection.
6266 </note>
6267 </desc>
6268 <param name="name" type="wstring" dir="in">
6269 <desc>Name of the host drive to search for</desc>
6270 </param>
6271 <param name="drive" type="IHostDVDDrive" dir="return">
6272 <desc>Found host drive object</desc>
6273 </param>
6274 </method>
6275 </collection>
6276
6277 <interface
6278 name="IHostFloppyDrive" extends="$unknown"
6279 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6280 wsmap="managed"
6281 >
6282 <desc>
6283 The IHostFloppyDrive interface represents the physical floppy drive
6284 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6285 </desc>
6286 <attribute name="name" type="wstring" readonly="yes">
6287 <desc>
6288 Returns the platform-specific device identifier.
6289 On DOS-like platforms, it is a drive name (e.g. A:).
6290 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6291 </desc>
6292 </attribute>
6293 <attribute name="description" type="wstring" readonly="yes">
6294 <desc>
6295 Returns a human readable description for the drive. This
6296 description usually contains the product and vendor name. A
6297 @c null string is returned if the description is not available.
6298 </desc>
6299 </attribute>
6300 <attribute name="udi" type="wstring" readonly="yes">
6301 <desc>
6302 Returns the unique device identifier for the drive. This
6303 attribute is reserved for future use instead of
6304 <link to="#name"/>. Currently it is not used and may return
6305 @c null on some platforms.
6306 </desc>
6307 </attribute>
6308 </interface>
6309
6310 <enumerator
6311 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6312 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6313 />
6314
6315 <collection
6316 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6317 enumerator="IHostFloppyDriveEnumerator"
6318 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6319 readonly="yes"
6320 >
6321 <method name="findByName">
6322 <desc>
6323 Searches this collection for a host drive with the given name.
6324 <note>
6325 The method returns an error if the given name does not
6326 correspond to any host drive in the collection.
6327 </note>
6328 </desc>
6329 <param name="name" type="wstring" dir="in">
6330 <desc>Name of the host drive to search for</desc>
6331 </param>
6332 <param name="drive" type="IHostFloppyDrive" dir="return">
6333 <desc>Found host drive object</desc>
6334 </param>
6335 </method>
6336 </collection>
6337
6338 <enum
6339 name="HostNetworkInterfaceType"
6340 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6341 >
6342 <desc>
6343 Type of encapsulation. Ethernet encapsulation includes both wired and
6344 wireless Ethernet connections.
6345 <see>IHostNetworkInterface</see>
6346 </desc>
6347
6348 <const name="Unknown" value="0">
6349 <desc>
6350 The type of interface cannot be determined.
6351 </desc>
6352 </const>
6353 <const name="Ethernet" value="1">
6354 <desc>
6355 Ethernet frame encapsulation.
6356 </desc>
6357 </const>
6358 <const name="PPP" value="2">
6359 <desc>
6360 Point-to-point protocol encapsulation.
6361 </desc>
6362 </const>
6363 <const name="SLIP" value="3">
6364 <desc>
6365 Serial line IP encapsulation.
6366 </desc>
6367 </const>
6368 </enum>
6369
6370 <enum
6371 name="HostNetworkInterfaceStatus"
6372 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6373 >
6374 <desc>
6375 Current status of the interface.
6376 <see>IHostNetworkInterface</see>
6377 </desc>
6378
6379 <const name="Unknown" value="0">
6380 <desc>
6381 The state of interface cannot be determined.
6382 </desc>
6383 </const>
6384 <const name="Up" value="1">
6385 <desc>
6386 The interface is fully operational.
6387 </desc>
6388 </const>
6389 <const name="Down" value="2">
6390 <desc>
6391 The interface is not functioning.
6392 </desc>
6393 </const>
6394 </enum>
6395
6396 <interface
6397 name="IHostNetworkInterface" extends="$unknown"
6398 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6399 wsmap="managed"
6400 >
6401 <desc>
6402 Reprents one of host's network interfaces. IP V6 address and network
6403 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6404 separated by colons.
6405 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6406 </desc>
6407 <attribute name="name" type="wstring" readonly="yes">
6408 <desc>Returns the host network interface name.</desc>
6409 </attribute>
6410
6411 <attribute name="id" type="uuid" readonly="yes">
6412 <desc>Returns the interface UUID.</desc>
6413 </attribute>
6414
6415 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6416 <desc>Returns the IP V4 address of the interface.</desc>
6417 </attribute>
6418
6419 <attribute name="networkMask" type="unsigned long" readonly="yes">
6420 <desc>Returns the network mask of the interface.</desc>
6421 </attribute>
6422
6423 <attribute name="IPV6Address" type="wstring" readonly="yes">
6424 <desc>Returns the IP V6 address of the interface.</desc>
6425 </attribute>
6426
6427 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6428 <desc>Returns the IP V6 network mask of the interface.</desc>
6429 </attribute>
6430
6431 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6432 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6433 </attribute>
6434
6435 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6436 <desc>Type of protocol encapsulation used.</desc>
6437 </attribute>
6438
6439 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6440 <desc>Status of the interface.</desc>
6441 </attribute>
6442 </interface>
6443
6444 <interface
6445 name="IHost" extends="$unknown"
6446 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6447 wsmap="managed"
6448 >
6449 <desc>
6450 The IHost interface represents the physical machine that this VirtualBox
6451 installation runs on.
6452
6453 An object implementing this interface is returned by the
6454 <link to="IVirtualBox::host" /> attribute. This interface contains
6455 read-only information about the host's physical hardware (such as what
6456 processors and disks are available, what the host operating system is,
6457 and so on) and also allows for manipulating some of the host's hardware,
6458 such as global USB device filters and host interface networking.
6459
6460 </desc>
6461 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6462 <desc>List of DVD drives available on the host.</desc>
6463 </attribute>
6464
6465 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6466 <desc>List of floppy drives available on the host.</desc>
6467 </attribute>
6468
6469 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6470 <desc>
6471 List of USB devices currently attached to the host.
6472 Once a new device is physically attached to the host computer,
6473 it appears in this list and remains there until detached.
6474
6475 <note>
6476 This method may set a @ref com_warnings "warning result code".
6477 </note>
6478 <note>
6479 If USB functionality is not available in the given edition of
6480 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6481 </note>
6482 </desc>
6483 </attribute>
6484
6485 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6486 <desc>
6487 List of USB device filters in action.
6488 When a new device is physically attached to the host computer,
6489 filters from this list are applied to it (in order they are stored
6490 in the list). The first matched filter will determine the
6491 <link to="IHostUSBDeviceFilter::action">action</link>
6492 performed on the device.
6493
6494 Unless the device is ignored by these filters, filters of all
6495 currently running virtual machines
6496 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6497
6498 <note>
6499 This method may set a @ref com_warnings "warning result code".
6500 </note>
6501 <note>
6502 If USB functionality is not available in the given edition of
6503 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6504 </note>
6505
6506 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6507 </desc>
6508 </attribute>
6509
6510 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6511 <desc>List of host network interfaces currently defined on the host.</desc>
6512 </attribute>
6513
6514 <attribute name="processorCount" type="unsigned long" readonly="yes">
6515 <desc>Number of (logical) CPUs installed in the host system.</desc>
6516 </attribute>
6517
6518 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6519 <desc>Number of (logical) CPUs online in the host system.</desc>
6520 </attribute>
6521
6522 <method name="getProcessorSpeed">
6523 <desc>Query the (approximate) maximum speed of a specified host CPU in
6524 Megahertz.
6525 </desc>
6526 <param name="cpuId" type="unsigned long" dir="in">
6527 <desc>
6528 Identifier of the CPU.
6529 </desc>
6530 </param>
6531 <param name="speed" type="unsigned long" dir="return">
6532 <desc>
6533 Speed value. 0 is returned if value is not known or @a cpuId is
6534 invalid.
6535 </desc>
6536 </param>
6537 </method>
6538
6539 <method name="getProcessorFeature">
6540 <desc>Query whether a CPU feature is supported or not.</desc>
6541 <param name="feature" type="ProcessorFeature" dir="in">
6542 <desc>
6543 CPU Feature identifier.
6544 </desc>
6545 </param>
6546 <param name="supported" type="boolean" dir="return">
6547 <desc>
6548 Feature is supported or not.
6549 </desc>
6550 </param>
6551 </method>
6552
6553 <method name="getProcessorDescription">
6554 <desc>Query the model string of a specified host CPU.
6555 <note>
6556 This function is not implemented in the current version of the
6557 product.
6558 </note>
6559 </desc>
6560 <param name="cpuId" type="unsigned long" dir="in">
6561 <desc>
6562 Identifier of the CPU.
6563 </desc>
6564 </param>
6565 <param name="description" type="wstring" dir="return">
6566 <desc>
6567 Model string. A NULL string is returned if value is not known or
6568 @a cpuId is invalid.
6569 </desc>
6570 </param>
6571 </method>
6572
6573 <attribute name="memorySize" type="unsigned long" readonly="yes">
6574 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6575 </attribute>
6576
6577 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6578 <desc>Available system memory in the host system.</desc>
6579 </attribute>
6580
6581 <attribute name="operatingSystem" type="wstring" readonly="yes">
6582 <desc>Name of the host system's operating system.</desc>
6583 </attribute>
6584
6585 <attribute name="OSVersion" type="wstring" readonly="yes">
6586 <desc>Host operating system's version string.</desc>
6587 </attribute>
6588
6589 <attribute name="UTCTime" type="long long" readonly="yes">
6590 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6591 </attribute>
6592
6593<if target="midl">
6594 <method name="createHostNetworkInterface">
6595 <desc>
6596 Creates a new adapter for Host Interface Networking.
6597 <result name="E_INVALIDARG">
6598 Host network interface @a name already exists.
6599 </result>
6600 </desc>
6601 <param name="name" type="wstring" dir="in">
6602 <desc>
6603 Adapter name.
6604 </desc>
6605 </param>
6606 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6607 <desc>
6608 Created host interface object.
6609 </desc>
6610 </param>
6611 <param name="progress" type="IProgress" dir="return">
6612 <desc>
6613 Progress object to track the operation completion.
6614 </desc>
6615 </param>
6616 </method>
6617 <method name="removeHostNetworkInterface">
6618 <desc>
6619 Removes the given host network interface.
6620 <result name="VBOX_E_OBJECT_NOT_FOUND">
6621 No host network interface matching @a id found.
6622 </result>
6623 </desc>
6624 <param name="id" type="uuid" dir="in">
6625 <desc>
6626 Adapter GUID.
6627 </desc>
6628 </param>
6629 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6630 <desc>
6631 Removed host interface object.
6632 </desc>
6633 </param>
6634 <param name="progress" type="IProgress" dir="return">
6635 <desc>
6636 Progress object to track the operation completion.
6637 </desc>
6638 </param>
6639 </method>
6640</if>
6641
6642 <method name="createUSBDeviceFilter">
6643 <desc>
6644 Creates a new USB device filter. All attributes except
6645 the filter name are set to <tt>null</tt> (any match),
6646 <i>active</i> is <tt>false</tt> (the filter is not active).
6647
6648 The created filter can be added to the list of filters using
6649 <link to="#insertUSBDeviceFilter()"/>.
6650
6651 <see>#USBDeviceFilters</see>
6652 </desc>
6653 <param name="name" type="wstring" dir="in">
6654 <desc>
6655 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6656 for more info.
6657 </desc>
6658 </param>
6659 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6660 <desc>Created filter object.</desc>
6661 </param>
6662 </method>
6663
6664 <method name="insertUSBDeviceFilter">
6665 <desc>
6666 Inserts the given USB device to the specified position
6667 in the list of filters.
6668
6669 Positions are numbered starting from <tt>0</tt>. If the specified
6670 position is equal to or greater than the number of elements in
6671 the list, the filter is added at the end of the collection.
6672
6673 <note>
6674 Duplicates are not allowed, so an attempt to insert a
6675 filter that is already in the list, will return an
6676 error.
6677 </note>
6678 <note>
6679 This method may set a @ref com_warnings "warning result code".
6680 </note>
6681 <note>
6682 If USB functionality is not available in the given edition of
6683 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6684 </note>
6685
6686 <see>#USBDeviceFilters</see>
6687
6688 <result name="VBOX_E_INVALID_OBJECT_STATE">
6689 USB device filter is not created within this VirtualBox instance.
6690 </result>
6691 <result name="E_INVALIDARG">
6692 USB device filter already in list.
6693 </result>
6694
6695 </desc>
6696 <param name="position" type="unsigned long" dir="in">
6697 <desc>Position to insert the filter to.</desc>
6698 </param>
6699 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6700 <desc>USB device filter to insert.</desc>
6701 </param>
6702 </method>
6703
6704 <method name="removeUSBDeviceFilter">
6705 <desc>
6706 Removes a USB device filter from the specified position in the
6707 list of filters.
6708
6709 Positions are numbered starting from <tt>0</tt>. Specifying a
6710 position equal to or greater than the number of elements in
6711 the list will produce an error.
6712
6713 <note>
6714 This method may set a @ref com_warnings "warning result code".
6715 </note>
6716 <note>
6717 If USB functionality is not available in the given edition of
6718 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6719 </note>
6720
6721 <see>#USBDeviceFilters</see>
6722
6723 <result name="E_INVALIDARG">
6724 USB device filter list empty or invalid @a position.
6725 </result>
6726
6727 </desc>
6728 <param name="position" type="unsigned long" dir="in">
6729 <desc>Position to remove the filter from.</desc>
6730 </param>
6731 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6732 <desc>Removed USB device filter.</desc>
6733 </param>
6734 </method>
6735
6736 <method name="findHostNetworkInterfaceByName">
6737 <desc>
6738 Searches through all host network interfaces for an interface with
6739 the given name.
6740 <note>
6741 The method returns an error if the given name does not
6742 correspond to any host network interface.
6743 </note>
6744 </desc>
6745 <param name="name" type="wstring" dir="in">
6746 <desc>Name of the host network interface to search for.</desc>
6747 </param>
6748 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6749 <desc>Found host network interface object.</desc>
6750 </param>
6751 </method>
6752 <method name="findHostNetworkInterfaceById">
6753 <desc>
6754 Searches through all host network interfaces for an interface with
6755 the given GUID.
6756 <note>
6757 The method returns an error if the given GUID does not
6758 correspond to any host network interface.
6759 </note>
6760 </desc>
6761 <param name="id" type="uuid" dir="in">
6762 <desc>GUID of the host network interface to search for.</desc>
6763 </param>
6764 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6765 <desc>Found host network interface object.</desc>
6766 </param>
6767 </method>
6768 </interface>
6769
6770 <!--
6771 // ISystemProperties
6772 /////////////////////////////////////////////////////////////////////////
6773 -->
6774
6775 <interface
6776 name="ISystemProperties"
6777 extends="$unknown"
6778 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6779 wsmap="managed"
6780 >
6781 <desc>
6782 The ISystemProperties interface represents global properties of the given
6783 VirtualBox installation.
6784
6785 These properties define limits and default values for various attributes
6786 and parameters. Most of the properties are read-only, but some can be
6787 changed by a user.
6788 </desc>
6789
6790 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6791 <desc>Minimum guest system memory in Megabytes.</desc>
6792 </attribute>
6793
6794 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6795 <desc>Maximum guest system memory in Megabytes.</desc>
6796 </attribute>
6797
6798 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6799 <desc>Minimum guest video memory in Megabytes.</desc>
6800 </attribute>
6801
6802 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6803 <desc>Maximum guest video memory in Megabytes.</desc>
6804 </attribute>
6805
6806 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6807 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6808 </attribute>
6809
6810 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6811 <desc>
6812 Number of network adapters associated with every
6813 <link to="IMachine"/> instance.
6814 </desc>
6815 </attribute>
6816
6817 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6818 <desc>
6819 Number of serial ports associated with every
6820 <link to="IMachine"/> instance.
6821 </desc>
6822 </attribute>
6823
6824 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6825 <desc>
6826 Number of parallel ports associated with every
6827 <link to="IMachine"/> instance.
6828 </desc>
6829 </attribute>
6830
6831 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6832 <desc>
6833 Maximum device position in the boot order. This value corresponds
6834 to the total number of devices a machine can boot from, to make it
6835 possible to include all possible devices to the boot list.
6836 <see><link to="IMachine::setBootOrder()"/></see>
6837 </desc>
6838 </attribute>
6839
6840 <attribute name="defaultMachineFolder" type="wstring">
6841 <desc>
6842 Full path to the default directory used to create new or open
6843 existing machines when a settings file name contains no
6844 path.
6845
6846 The initial value of this property is
6847 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6848 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6849
6850 <note>
6851 Setting this property to <tt>null</tt> will restore the
6852 initial value.
6853 </note>
6854 <note>
6855 When settings this property, the specified path can be
6856 absolute (full path) or relative
6857 to the <link to="IVirtualBox::homeFolder">
6858 VirtualBox home directory</link>.
6859 When reading this property, a full path is
6860 always returned.
6861 </note>
6862 <note>
6863 The specified path may not exist, it will be created
6864 when necessary.
6865 </note>
6866
6867 <see>
6868 <link to="IVirtualBox::createMachine()"/>,
6869 <link to="IVirtualBox::openMachine()"/>
6870 </see>
6871 </desc>
6872 </attribute>
6873
6874 <attribute name="defaultHardDiskFolder" type="wstring">
6875 <desc>
6876 Full path to the default directory used to create new or open existing
6877 virtual disks.
6878
6879 This path is used when the storage unit of a hard disk is a regular file
6880 in the host's file system and only a file name that contains no path is
6881 given.
6882
6883 The initial value of this property is
6884 <tt>&lt;</tt>
6885 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6886 <tt>&gt;/HardDisks</tt>.
6887
6888 <note>
6889 Setting this property to <tt>null</tt> will restore the
6890 initial value.
6891 </note>
6892 <note>
6893 When settings this property, the specified path can be relative
6894 to the
6895 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6896 absolute. When reading this property, a full path is
6897 always returned.
6898 </note>
6899 <note>
6900 The specified path may not exist, it will be created
6901 when necessary.
6902 </note>
6903
6904 <see>
6905 IHardDisk2,
6906 <link to="IVirtualBox::createHardDisk2()"/>,
6907 <link to="IVirtualBox::openHardDisk2()"/>,
6908 <link to="IMedium::location"/>
6909 </see>
6910 </desc>
6911 </attribute>
6912
6913 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6914 <desc>
6915 List of all hard disk storage formats supported by this VirtualBox
6916 installation.
6917
6918 Keep in mind that the hard disk format identifier
6919 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6920 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6921 hard disk format is a case-insensitive string. This means that, for
6922 example, all of the following strings:
6923 <pre>
6924 "VDI"
6925 "vdi"
6926 "VdI"</pre>
6927 refer to the same hard disk format.
6928
6929 Note that the virtual hard disk framework is backend-based, therefore
6930 the list of supported formats depends on what backends are currently
6931 installed.
6932
6933 <see>
6934 <link to="IHardDiskFormat"/>,
6935 </see>
6936 </desc>
6937 </attribute>
6938
6939 <attribute name="defaultHardDiskFormat" type="wstring">
6940 <desc>
6941 Identifier of the default hard disk format used by VirtualBox.
6942
6943 The hard disk format set by this attribute is used by VirtualBox
6944 when the hard disk format was not specified explicitly. One example is
6945 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6946 format argument. A more complex example is implicit creation of
6947 differencing hard disks when taking a snapshot of a virtual machine:
6948 this operation will try to use a format of the parent hard disk first
6949 and if this format does not support differencing hard disks the default
6950 format specified by this argument will be used.
6951
6952 The list of supported hard disk formats may be obtained by the
6953 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6954 format must have a capability to create differencing hard disks;
6955 otherwise opeartions that create hard disks implicitly may fail
6956 unexpectedly.
6957
6958 The initial value of this property is <tt>VDI</tt> in the current
6959 version of the VirtualBox product, but may change in the future.
6960
6961 <note>
6962 Setting this property to <tt>null</tt> will restore the
6963 initial value.
6964 </note>
6965
6966 <see>
6967 <link to="#hardDiskFormats"/>,
6968 <link to="IHardDiskFormat::id"/>,
6969 <link to="IVirtualBox::createHardDisk2()"/>
6970 </see>
6971 </desc>
6972 </attribute>
6973
6974 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6975 <desc>
6976 Library that provides authentication for VRDP clients. The library
6977 is used if a virtual machine's authentication type is set to "external"
6978 in the VM RemoteDisplay configuration.
6979
6980 The system library extension (".DLL" or ".so") must be omitted.
6981 A full path can be specified; if not, then the library must reside on the
6982 system's default library path.
6983
6984 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6985 of that name in one of the default VirtualBox library directories.
6986
6987 For details about VirtualBox authentication libraries and how to implement
6988 them, please refer to the VirtualBox manual.
6989
6990 <note>
6991 Setting this property to <tt>null</tt> will restore the
6992 initial value.
6993 </note>
6994 </desc>
6995 </attribute>
6996
6997 <attribute name="webServiceAuthLibrary" type="wstring">
6998 <desc>
6999 Library that provides authentication for webservice clients. The library
7000 is used if a virtual machine's authentication type is set to "external"
7001 in the VM RemoteDisplay configuration and will be called from
7002 within the <link to="IWebsessionManager::logon" /> implementation.
7003
7004 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7005 there is no per-VM setting for this, as the webservice is a global
7006 resource (if it is running). Only for this setting (for the webservice),
7007 setting this value to a literal "null" string disables authentication,
7008 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7009 no matter what user name and password are supplied.
7010
7011 The initial value of this property is <tt>VRDPAuth</tt>,
7012 meaning that the webservice will use the same authentication
7013 library that is used by default for VBoxVRDP (again, see
7014 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7015 The format and calling convention of authentication libraries
7016 is the same for the webservice as it is for VBoxVRDP.
7017
7018 </desc>
7019 </attribute>
7020
7021 <attribute name="HWVirtExEnabled" type="boolean">
7022 <desc>
7023 This specifies the default value for hardware virtualization
7024 extensions. If enabled, virtual machines will make use of
7025 hardware virtualization extensions such as Intel VT-x and
7026 AMD-V by default. This value can be overridden by each VM
7027 using their <link to="IMachine::HWVirtExEnabled" /> property.
7028 </desc>
7029 </attribute>
7030
7031 <attribute name="LogHistoryCount" type="unsigned long">
7032 <desc>
7033 This value specifies how many old release log files are kept.
7034 </desc>
7035 </attribute>
7036 </interface>
7037
7038 <!--
7039 // IGuest
7040 /////////////////////////////////////////////////////////////////////////
7041 -->
7042
7043 <interface
7044 name="IGuestOSType" extends="$unknown"
7045 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
7046 wsmap="struct"
7047 >
7048 <desc>
7049 </desc>
7050
7051 <attribute name="familyId" type="wstring" readonly="yes">
7052 <desc>Guest OS family identifier string.</desc>
7053 </attribute>
7054
7055 <attribute name="familyDescription" type="wstring" readonly="yes">
7056 <desc>Human readable description of the guest OS family.</desc>
7057 </attribute>
7058
7059 <attribute name="id" type="wstring" readonly="yes">
7060 <desc>Guest OS identifier string.</desc>
7061 </attribute>
7062
7063 <attribute name="description" type="wstring" readonly="yes">
7064 <desc>Human readable description of the guest OS.</desc>
7065 </attribute>
7066
7067 <attribute name="is64Bit" type="boolean" readonly="yes">
7068 <desc>Returns @c true if the given OS is 64-bit</desc>
7069 </attribute>
7070
7071 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7072 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7073 </attribute>
7074
7075 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7076 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7077 </attribute>
7078
7079 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7080 <desc>Recommended RAM size in Megabytes.</desc>
7081 </attribute>
7082
7083 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7084 <desc>Recommended video RAM size in Megabytes.</desc>
7085 </attribute>
7086
7087 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7088 <desc>Recommended hard disk size in Megabytes.</desc>
7089 </attribute>
7090
7091 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7092 <desc>Returns recommended network adapter for this OS type.</desc>
7093 </attribute>
7094 </interface>
7095
7096
7097 <enumerator
7098 name="IGuestOSTypeEnumerator" type="IGuestOSType"
7099 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
7100 />
7101
7102 <collection
7103 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
7104 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
7105 readonly="yes"
7106 />
7107
7108 <interface
7109 name="IGuest" extends="$unknown"
7110 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7111
7112 wsmap="suppress"
7113 >
7114 <desc>
7115 The IGuest interface represents information about the operating system
7116 running inside the virtual machine. Used in
7117 <link to="IConsole::guest"/>.
7118
7119 IGuest provides information about the guest operating system, whether
7120 Guest Additions are installed and other OS-specific virtual machine
7121 properties.
7122 </desc>
7123
7124 <attribute name="OSTypeId" type="wstring" readonly="yes">
7125 <desc>
7126 Identifier of the Guest OS type as reported by the Guest
7127 Additions.
7128 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7129 an IGuestOSType object representing details about the given
7130 Guest OS type.
7131 <note>
7132 If Guest Additions are not installed, this value will be
7133 the same as <link to="IMachine::OSTypeId"/>.
7134 </note>
7135 </desc>
7136 </attribute>
7137
7138 <attribute name="additionsActive" type="boolean" readonly="yes">
7139 <desc>
7140 Flag whether the Guest Additions are installed and active
7141 in which case their version will be returned by the
7142 <link to="#additionsVersion"/> property.
7143 </desc>
7144 </attribute>
7145
7146 <attribute name="additionsVersion" type="wstring" readonly="yes">
7147 <desc>
7148 Version of the Guest Additions (3 decimal numbers separated
7149 by dots) or empty when the Additions are not installed. The
7150 Additions may also report a version but yet not be active as
7151 the version might be refused by VirtualBox (incompatible) or
7152 other failures occurred.
7153 </desc>
7154 </attribute>
7155
7156 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7157 <desc>
7158 Flag whether seamless guest display rendering (seamless desktop
7159 integration) is supported.
7160 </desc>
7161 </attribute>
7162
7163 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7164 <desc>
7165 Flag whether the guest is in graphics mode. If it is not, then
7166 seamless rendering will not work, resize hints are not immediately
7167 acted on and guest display resizes are probably not initiated by
7168 the guest additions.
7169 </desc>
7170 </attribute>
7171
7172 <attribute name="memoryBalloonSize" type="unsigned long">
7173 <desc>Guest system memory balloon size in megabytes.</desc>
7174 </attribute>
7175
7176 <attribute name="statisticsUpdateInterval" type="unsigned long">
7177 <desc>Interval to update guest statistics in seconds.</desc>
7178 </attribute>
7179
7180 <method name="setCredentials">
7181 <desc>
7182 Store login credentials that can be queried by guest operating
7183 systems with Additions installed. The credentials are transient
7184 to the session and the guest may also choose to erase them. Note
7185 that the caller cannot determine whether the guest operating system
7186 has queried or made use of the credentials.
7187
7188 <result name="VBOX_E_VM_ERROR">
7189 VMM device is not available.
7190 </result>
7191
7192 </desc>
7193 <param name="userName" type="wstring" dir="in">
7194 <desc>User name string, can be empty</desc>
7195 </param>
7196 <param name="password" type="wstring" dir="in">
7197 <desc>Password string, can be empty</desc>
7198 </param>
7199 <param name="domain" type="wstring" dir="in">
7200 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7201 </param>
7202 <param name="allowInteractiveLogon" type="boolean" dir="in">
7203 <desc>
7204 Flag whether the guest should alternatively allow the user to
7205 interactively specify different credentials. This flag might
7206 not be supported by all versions of the Additions.
7207 </desc>
7208 </param>
7209 </method>
7210
7211 <method name="getStatistic">
7212 <desc>
7213 Query specified guest statistics as reported by the VirtualBox Additions.
7214 </desc>
7215 <param name="cpuId" type="unsigned long" dir="in">
7216 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7217 </param>
7218 <param name="statistic" type="GuestStatisticType" dir="in">
7219 <desc>Statistic type.</desc>
7220 </param>
7221 <param name="statVal" type="unsigned long" dir="out">
7222 <desc>Statistics value</desc>
7223 </param>
7224 </method>
7225
7226 </interface>
7227
7228
7229 <!--
7230 // IProgress
7231 /////////////////////////////////////////////////////////////////////////
7232 -->
7233
7234 <enumerator
7235 name="IProgressEnumerator" type="IProgress"
7236 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7237 />
7238
7239 <collection
7240 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7241 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7242 readonly="yes"
7243 />
7244
7245 <interface
7246 name="IProgress" extends="$unknown"
7247 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7248 wsmap="managed"
7249 >
7250 <desc>
7251 The IProgress interface represents a task progress object that allows
7252 to wait for the completion of some asynchronous task.
7253
7254 The task consists of one or more operations that run sequentially,
7255 one after one. There is an individual percent of completion of the
7256 current operation and the percent of completion of the task as a
7257 whole. Similarly, you can wait for the completion of a particular
7258 operation or for the completion of the whole task.
7259
7260 Every operation is identified by a number (starting from 0)
7261 and has a separate description.
7262 </desc>
7263
7264 <attribute name="id" type="uuid" readonly="yes">
7265 <desc>ID of the task.</desc>
7266 </attribute>
7267
7268 <attribute name="description" type="wstring" readonly="yes">
7269 <desc>Description of the task.</desc>
7270 </attribute>
7271
7272 <attribute name="initiator" type="$unknown" readonly="yes">
7273 <desc>Initiator of the task.</desc>
7274 </attribute>
7275
7276 <attribute name="cancelable" type="boolean" readonly="yes">
7277 <desc>Whether the task can be interrupted.</desc>
7278 </attribute>
7279
7280 <attribute name="percent" type="long" readonly="yes">
7281 <desc>
7282 Current task progress value in percent.
7283 This value depends on how many operations are already complete.
7284 </desc>
7285 </attribute>
7286
7287 <attribute name="completed" type="boolean" readonly="yes">
7288 <desc>Whether the task has been completed.</desc>
7289 </attribute>
7290
7291 <attribute name="canceled" type="boolean" readonly="yes">
7292 <desc>Whether the task has been canceled.</desc>
7293 </attribute>
7294
7295 <attribute name="resultCode" type="result" readonly="yes">
7296 <desc>
7297 Result code of the progress task.
7298 Valid only if <link to="#completed"/> is true.
7299 </desc>
7300 </attribute>
7301
7302 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7303 <desc>
7304 Extended information about the unsuccessful result of the
7305 progress operation. May be NULL when no extended information
7306 is available.
7307 Valid only if <link to="#completed"/> is true and
7308 <link to="#resultCode"/> indicates a failure.
7309 </desc>
7310 </attribute>
7311
7312 <attribute name="operationCount" type="unsigned long" readonly="yes">
7313 <desc>
7314 Number of operations this task is divided into.
7315 Every task consists of at least one operation.
7316 </desc>
7317 </attribute>
7318
7319 <attribute name="operation" type="unsigned long" readonly="yes">
7320 <desc>Number of the operation being currently executed.</desc>
7321 </attribute>
7322
7323 <attribute name="operationDescription" type="wstring" readonly="yes">
7324 <desc>
7325 Description of the operation being currently executed.
7326 </desc>
7327 </attribute>
7328
7329 <attribute name="operationPercent" type="long" readonly="yes">
7330 <desc>Current operation progress value in percent.</desc>
7331 </attribute>
7332
7333 <method name="waitForCompletion">
7334 <desc>
7335 Waits until the task is done (including all operations) with a
7336 given timeout.
7337
7338 <result name="VBOX_E_IPRT_ERROR">
7339 Failed to wait for task completion.
7340 </result>
7341
7342 </desc>
7343 <param name="timeout" type="long" dir="in">
7344 <desc>
7345 Timeout value in milliseconds.
7346 Specify -1 for an indefinite wait.
7347 </desc>
7348 </param>
7349 </method>
7350
7351 <method name="waitForOperationCompletion">
7352 <desc>
7353 Waits until the given operation is done with a given timeout.
7354
7355 <result name="VBOX_E_IPRT_ERROR">
7356 Failed to wait for operation completion.
7357 </result>
7358
7359 </desc>
7360 <param name="operation" type="unsigned long" dir="in">
7361 <desc>
7362 Number of the operation to wait for.
7363 Must be less than <link to="#operationCount"/>.
7364 </desc>
7365 </param>
7366 <param name="timeout" type="long" dir="in">
7367 <desc>
7368 Timeout value in milliseconds.
7369 Specify -1 for an indefinite wait.
7370 </desc>
7371 </param>
7372 </method>
7373
7374 <method name="cancel">
7375 <desc>
7376 Cancels the task.
7377 <note>
7378 If <link to="#cancelable"/> is <tt>false</tt>, then
7379 this method will fail.
7380 </note>
7381
7382 <result name="VBOX_E_INVALID_OBJECT_STATE">
7383 Operation cannot be canceled.
7384 </result>
7385
7386 </desc>
7387 </method>
7388
7389 </interface>
7390
7391
7392 <!--
7393 // ISnapshot
7394 /////////////////////////////////////////////////////////////////////////
7395 -->
7396
7397 <enumerator
7398 name="ISnapshotEnumerator" type="ISnapshot"
7399 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7400 />
7401
7402 <collection
7403 name="ISnapshotCollection" type="ISnapshot"
7404 enumerator="ISnapshotEnumerator"
7405 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7406 readonly="yes"
7407 />
7408
7409 <interface
7410 name="ISnapshot" extends="$unknown"
7411 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7412 wsmap="managed"
7413 >
7414 <desc>
7415 The ISnapshot interface represents a snapshot of the virtual
7416 machine.
7417
7418 The <i>snapshot</i> stores all the information about a virtual
7419 machine necessary to bring it to exactly the same state as it was at
7420 the time of taking the snapshot. The snapshot includes:
7421
7422 <ul>
7423 <li>all settings of the virtual machine (i.e. its hardware
7424 configuration: RAM size, attached hard disks, etc.)
7425 </li>
7426 <li>the execution state of the virtual machine (memory contents,
7427 CPU state, etc.).
7428 </li>
7429 </ul>
7430
7431 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7432 or <i>online</i> (taken when the VM is running). The execution
7433 state of the offline snapshot is called a <i>zero execution state</i>
7434 (it doesn't actually contain any information about memory contents
7435 or the CPU state, assuming that all hardware is just powered off).
7436
7437 <h3>Snapshot branches</h3>
7438
7439 Snapshots can be chained. Chained snapshots form a branch where
7440 every next snapshot is based on the previous one. This chaining is
7441 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7442 description). This means that every time a new snapshot is created,
7443 a new differencing hard disk is implicitly created for all normal
7444 hard disks attached to the given virtual machine. This allows to
7445 fully restore hard disk contents when the machine is later reverted
7446 to a particular snapshot.
7447
7448 In the current implementation, multiple snapshot branches within one
7449 virtual machine are not allowed. Every machine has a single branch,
7450 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7451 snapshot to the top of that branch.
7452
7453 Existing snapshots can be discarded using
7454 <link to="IConsole::discardSnapshot()"/>.
7455
7456 <h3>Current snapshot</h3>
7457
7458 Every virtual machine has a current snapshot, identified by
7459 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7460 a base for the <i>current machine state</i> (see below), to the effect
7461 that all normal hard disks of the machine and its execution
7462 state are based on this snapshot.
7463
7464 In the current implementation, the current snapshot is always the
7465 last taken snapshot (i.e. the head snapshot on the branch) and it
7466 cannot be changed.
7467
7468 The current snapshot is <tt>null</tt> if the machine doesn't have
7469 snapshots at all; in this case the current machine state is just
7470 current settings of this machine plus its current execution state.
7471
7472 <h3>Current machine state</h3>
7473
7474 The current machine state is what represented by IMachine instances got
7475 directly from IVirtualBox
7476 using <link
7477 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7478 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7479 to instances returned by <link to="ISnapshot::machine"/>). This state
7480 is always used when the machine is <link to="IConsole::powerUp"> powered
7481 on</link>.
7482
7483 The current machine state also includes the current execution state.
7484 If the machine is being currently executed
7485 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7486 and above), its execution state is just what's happening now.
7487 If it is powered off (<link to="MachineState_PoweredOff"/> or
7488 <link to="MachineState_Aborted"/>), it has a zero execution state.
7489 If the machine is saved (<link to="MachineState_Saved"/>), its
7490 execution state is what saved in the execution state file
7491 (<link to="IMachine::stateFilePath"/>).
7492
7493 If the machine is in the saved state, then, next time it is powered
7494 on, its execution state will be fully restored from the saved state
7495 file and the execution will continue from the point where the state
7496 was saved.
7497
7498 Similarly to snapshots, the current machine state can be discarded
7499 using <link to="IConsole::discardCurrentState()"/>.
7500
7501 <h3>Taking and discarding snapshots</h3>
7502
7503 The table below briefly explains the meaning of every snapshot
7504 operation:
7505
7506 <table>
7507 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7508
7509 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7510
7511 <td>Save the current state of the virtual machine, including all
7512 settings, contents of normal hard disks and the current modifications
7513 to immutable hard disks (for online snapshots)</td>
7514
7515 <td>The current state is not changed (the machine will continue
7516 execution if it is being executed when the snapshot is
7517 taken)</td></tr>
7518
7519 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7520
7521 <td>Forget the state of the virtual machine stored in the snapshot:
7522 dismiss all saved settings and delete the saved execution state (for
7523 online snapshots)</td>
7524
7525 <td>Other snapshots (including child snapshots, if any) and the
7526 current state are not directly affected</td></tr>
7527
7528 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7529
7530 <td>Restore the current state of the virtual machine from the state
7531 stored in the current snapshot, including all settings and hard disk
7532 contents</td>
7533
7534 <td>The current state of the machine existed prior to this operation
7535 is lost</td></tr>
7536
7537 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7538
7539 <td>Completely revert the virtual machine to the state it was in
7540 before the current snapshot has been taken</td>
7541
7542 <td>The current state, as well as the current snapshot, are
7543 lost</td></tr>
7544
7545 </table>
7546
7547 </desc>
7548
7549 <attribute name="id" type="uuid" readonly="yes">
7550 <desc>UUID of the snapshot.</desc>
7551 </attribute>
7552
7553 <attribute name="name" type="wstring">
7554 <desc>Short name of the snapshot.</desc>
7555 </attribute>
7556
7557 <attribute name="description" type="wstring">
7558 <desc>Optional description of the snapshot.</desc>
7559 </attribute>
7560
7561 <attribute name="timeStamp" type="long long" readonly="yes">
7562 <desc>
7563 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7564 </desc>
7565 </attribute>
7566
7567 <attribute name="online" type="boolean" readonly="yes">
7568 <desc>
7569 <tt>true</tt> if this snapshot is an online snapshot and
7570 <tt>false</tt> otherwise.
7571
7572 <note>
7573 When this attribute is <tt>true</tt>, the
7574 <link to="IMachine::stateFilePath"/> attribute of the
7575 <link to="#machine"/> object associated with this snapshot
7576 will point to the saved state file. Otherwise, it will be
7577 <tt>null</tt>.
7578 </note>
7579 </desc>
7580 </attribute>
7581
7582 <attribute name="machine" type="IMachine" readonly="yes">
7583 <desc>
7584 Virtual machine this snapshot is taken on. This object
7585 stores all settings the machine had when taking this snapshot.
7586 <note>
7587 The returned machine object is immutable, i.e. no
7588 any settings can be changed.
7589 </note>
7590 </desc>
7591 </attribute>
7592
7593 <attribute name="parent" type="ISnapshot" readonly="yes">
7594 <desc>
7595 Parent snapshot (a snapshot this one is based on).
7596 <note>
7597 It's not an error to read this attribute on a snapshot
7598 that doesn't have a parent -- a null object will be
7599 returned to indicate this.
7600 </note>
7601 </desc>
7602 </attribute>
7603
7604 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7605 <desc>
7606 Child snapshots (all snapshots having this one as a parent).
7607 <note>
7608 In the current implementation, there can be only one
7609 child snapshot, or no children at all, meaning this is the
7610 last (head) snapshot.
7611 </note>
7612 </desc>
7613 </attribute>
7614
7615 </interface>
7616
7617
7618 <!--
7619 // IMedia
7620 /////////////////////////////////////////////////////////////////////////
7621 -->
7622
7623 <enum
7624 name="MediaState"
7625 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7626 >
7627 <desc>
7628 Virtual media state.
7629 <see>IMedia</see>
7630 </desc>
7631
7632 <const name="NotCreated" value="0">
7633 <desc>
7634 Associated media storage does not exist (either was not created yet or
7635 was deleted).
7636 </desc>
7637 </const>
7638 <const name="Created" value="1">
7639 <desc>
7640 Associated storage exists and accessible.
7641 </desc>
7642 </const>
7643 <const name="LockedRead" value="2">
7644 <desc>
7645 Media is locked for reading, no data modification is possible.
7646 </desc>
7647 </const>
7648 <const name="LockedWrite" value="3">
7649 <desc>
7650 Media is locked for writing, no concurrent data reading or modification
7651 is possible.
7652 </desc>
7653 </const>
7654 <const name="Inaccessible" value="4">
7655 <desc>
7656 Associated media storage is not accessible.
7657 </desc>
7658 </const>
7659 <const name="Creating" value="5">
7660 <desc>
7661 Associated media storage is being created.
7662 </desc>
7663 </const>
7664 <const name="Deleting" value="6">
7665 <desc>
7666 Associated media storage is being deleted.
7667 </desc>
7668 </const>
7669 </enum>
7670
7671 <interface
7672 name="IMedium" extends="$unknown"
7673 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7674 wsmap="managed"
7675 >
7676 <desc>
7677 The IMedium interface is a common interface for all objects representing
7678 virtual media such as hard disks, DVD images.
7679
7680 Each medium is associated with a storage unit (such as a file on the host
7681 computer or a network resource) that holds actual data. The location of
7682 the storage unit is represented by the #location attribute. The value of
7683 this attribute is media type dependent.
7684
7685 The exact media type may be determined by querying the appropriate
7686 interface such as:
7687 <ul>
7688 <li>IHardDisk2 (virtual hard disks)</li>
7689 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7690 <li>IFloppyImage2 (raw floppy image files)</li>
7691 </ul>
7692
7693 Existing media are opened using the following methods, depending on the
7694 media type:
7695 <ul>
7696 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7697 <li><link to="IVirtualBox::openDVDImage()"/></li>
7698 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7699 </ul>
7700
7701 New hard disk media are created using the
7702 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7703 images are created outside VirtualBox, usually by storing a copy
7704 of the real medium of the corresponding type in a regular file.
7705
7706 <h3>Known Media</h3>
7707
7708 When an existing medium gets opened for the first time, it gets
7709 automatically remembered by the given VirtualBox installation or, in other
7710 words, becomes a <i>known medium</i>. Known media are stored in the media
7711 registry transparently maintained by VirtualBox and stored in settings
7712 files so that this registry is preserved when VirtualBox is not running.
7713
7714 Newly created virtual hard disks get remembered only when the associated
7715 storage unit is actually created (see IHardDisk2 for more details).
7716
7717 All known media can be enumerated using
7718 <link to="IVirtualBox::hardDisks2"/>,
7719 <link to="IVirtualBox::DVDImages"/> and
7720 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7721 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7722 and similar methods or by location using
7723 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7724
7725 Only known media can be attached to virtual machines.
7726
7727 Removing known media from the media registry is performed when the given
7728 medium is closed using the <link to="#close()"/> method or when its
7729 associated storage unit is deleted (only for hard disks).
7730
7731 <h3>Accessibility Checks</h3>
7732
7733 The given medium (with the created storage unit) is considered to be
7734 <i>accessible</i> when its storage unit can be successfully read from.
7735 Accessible media are indicated by the <link to="MediaState_Created"/>
7736 value of the <link to="#state"/> attribute. When the storage unit cannot
7737 be read (for example, because it is located on a disconnected network
7738 resource, or was accidentally deleted outside VirtualBox), the medium is
7739 considered to be <i>inaccessible</i> which is indicated by the
7740 <link to="MediaState_Inaccessible"/> state. The details about the reason
7741 of being inaccessible can be obtained using the
7742 <link to="#lastAccessError"/> attribute.
7743
7744 A new accessibility check is performed each time the <link to="#state"/>
7745 attribute is read. Please note that this check may take long time (several
7746 seconds or even minutes, depending on the storage unit location and
7747 format), and will block the calling thread until finished. For this
7748 reason, it is recommended to never read this attribute on the main UI
7749 thread to avoid making the UI unresponsive.
7750
7751 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7752 created for the first time), all known media are in the
7753 <link to="MediaState_Inaccessible"/> state but the value of the <link
7754 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7755 accessibility check is made on startup. This is done to make the
7756 VirtualBox object ready for serving requests as
7757 fast as possible and let the end-user application decide if it needs to
7758 check media accessibility right away or not.
7759 </desc>
7760
7761 <attribute name="id" type="uuid" readonly="yes">
7762 <desc>
7763 UUID of the medium. For a newly created medium, this value is a randomly
7764 generated UUID.
7765
7766 <note>
7767 For media in one of MediaState_NotCreated, MediaState_Creating or
7768 MediaState_Deleting states, the value of this property is undefined
7769 and will most likely be an empty UUID.
7770 </note>
7771 </desc>
7772 </attribute>
7773
7774 <attribute name="description" type="wstring">
7775 <desc>
7776 Optional description of the medium. For newly created media, the value
7777 of this attribute value is <tt>null</tt>.
7778
7779 Media types that don't support this attribute will return E_NOTIMPL in
7780 attempt to get or set this attribute's value.
7781
7782 <note>
7783 For some storage types, reading this attribute may return an outdated
7784 (last known) value when <link to="#state"/> is <link
7785 to="MediaState_Inaccessible"/> or <link
7786 to="MediaState_LockedWrite"/> because the value of this attribute is
7787 stored within the storage unit itself. Also note that changing the
7788 attribute value is not possible in such case, as well as when the
7789 medium is the <link to="MediaState_LockedRead"/> state.
7790 </note>
7791 </desc>
7792 </attribute>
7793
7794 <attribute name="state" type="MediaState" readonly="yes">
7795 <desc>
7796 Current media state. Inspect <link to="MediaState"/> values for details.
7797
7798 Reading this attribute may take long time because a new accessibility
7799 check of the storage unit is performed every time the attribute is read.
7800 This check may cause a significant delay if the storage unit of the
7801 given medium is, for example, a file located on a network share which is
7802 not currently accessible due to connectivity problems -- the call will
7803 not return until a timeout interval defined by the host OS for this
7804 operation expires.
7805
7806 If the last known state of the medium is <link to="MediaState_Created"/>
7807 and the accessibility check fails then the state would be set to
7808 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7809 may be used to get more details about the failure. If the state of the
7810 medium is <link to="MediaState_LockedRead"/> or
7811 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7812 non-null value of <link to="#lastAccessError"/> will indicate a failed
7813 accessibility check in this case.
7814
7815 Note that not all media states are applicable to certain media types.
7816 For example, states <link to="MediaState_NotCreated"/>,
7817 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7818 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7819 IFloppyImage2 media.
7820 </desc>
7821 </attribute>
7822
7823 <attribute name="location" type="wstring">
7824 <desc>
7825 Location of the storage unit holding media data.
7826
7827 The format of the location string is media type specific. For media
7828 types that use regular files in a host's file system, the location
7829 string is just a full file name.
7830
7831 Some media types may support changing the storage unit location by
7832 simply changing the value of this property. If this operation is not
7833 supported, the implementation will return E_NOTIMPL in attempt to set
7834 this attribute's value.
7835
7836 When setting a value of the location attribute which is a regular file
7837 in the host's file system, the given file name may be either relative to
7838 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7839 absolute. Note that if the given location specification does not contain
7840 the file extension part then a proper default extension will be
7841 automatically appended by the implementation depending on the media type.
7842 </desc>
7843 </attribute>
7844
7845 <attribute name="name" type="wstring" readonly="yes">
7846 <desc>
7847 Name of the storage unit holding media data.
7848
7849 The returned string is a short version of the <link to="#location"/>
7850 attribute that is suitable for representing the medium in situations
7851 where the full location specification is too long (such as lists
7852 and comboboxes in GUI frontends). This string is also used by frontends
7853 to sort the media list alphabetically when needed.
7854
7855 For example, for locations that are regular files in the host's file
7856 system, the value of this attribute is just a file name (+ extension),
7857 without the path specification.
7858
7859 Note that as opposed to the <link to="#location"/> attribute, the name
7860 attribute will not necessary be unique for a list of media of the
7861 given type and format.
7862 </desc>
7863 </attribute>
7864
7865 <attribute name="size" type="unsigned long long" readonly="yes">
7866 <desc>
7867 Physical size of the storage unit used to hold media data (in bytes).
7868
7869 <note>
7870 For media whose <link to="#state"/> is <link
7871 to="MediaState_Inaccessible"/>, the value of this property is the
7872 last known size. For <link to="MediaState_NotCreated"/> media,
7873 the returned value is zero.
7874 </note>
7875 </desc>
7876 </attribute>
7877
7878 <attribute name="lastAccessError" type="wstring" readonly="yes">
7879 <desc>
7880 Text message that represents the result of the last accessibility
7881 check.
7882
7883 Accessibility checks are performed each time the <link to="#state"/>
7884 attribute is read. A @c null string is returned if the last
7885 accessibility check was successful. A non-null string indicates a
7886 failure and should normally describe a reason of the failure (for
7887 example, a file read error).
7888 </desc>
7889 </attribute>
7890
7891 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7892 <desc>
7893 Array of UUIDs of all machines this medium is attached to.
7894
7895 A <tt>null</tt> array is returned if this medium is not attached to any
7896 machine or to any machine's snapshot.
7897
7898 <note>
7899 The returned array will include a machine even if this medium is not
7900 attached to that machine in the current state but attached to it in
7901 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7902 details.
7903 </note>
7904 </desc>
7905 </attribute>
7906
7907 <method name="getSnapshotIds">
7908 <desc>
7909 Returns an array of UUIDs of all snapshots of the given machine where
7910 this medium is attached to it.
7911
7912 If the medium is attached to the machine in the current state, then the
7913 first element in the array will always be the ID of the queried machine
7914 (i.e. the value equal to the @c machineId argument), followed by
7915 snapshot IDs (if any).
7916
7917 If the medium is not attached to the machine in the current state, then
7918 the array will contain only snapshot IDs.
7919
7920 The returned array may be <tt>null</tt> if this medium is not attached
7921 to the given machine at all, neither in the current state nor in one of
7922 snapshots.
7923 </desc>
7924 <param name="machineId" type="uuid" dir="in">
7925 <desc>
7926 UUID of the machine to query.
7927 </desc>
7928 </param>
7929 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7930 <desc>
7931 Array of snapshot UUIDs of the given machine using this medium.
7932 </desc>
7933 </param>
7934 </method>
7935
7936 <method name="lockRead">
7937 <desc>
7938 Locks this medium for reading.
7939
7940 The read lock is shared: many clients can simultaneously lock the
7941 same media for reading unless it is already locked for writing (see
7942 <link to="#lockWrite()"/>) in which case an error is returned.
7943
7944 When the medium is locked for reading, it cannot be modified
7945 from within VirtualBox. This means that any method that changes
7946 the properties of this medium or contents of the storage unit
7947 will return an error (unless explicitly stated otherwise) and
7948 that an attempt to start a virtual machine that wants to modify
7949 the medium will also fail.
7950
7951 When the virtual machine is started up, it locks for reading all
7952 media it uses in read-only mode. If some media cannot be locked
7953 for reading, the startup procedure will fail.
7954
7955 The medium locked for reading must be unlocked using the <link
7956 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7957 can be nested and must be followed by the same number of paired
7958 <link to="#unlockRead()"/> calls.
7959
7960 This method sets the media state to <link
7961 to="MediaState_LockedRead"/> on success. The state prior to
7962 this call must be <link to="MediaState_Created"/>, <link
7963 to="MediaState_Inaccessible"/> or <link
7964 to="MediaState_LockedRead"/>. As you can see, inaccessible
7965 media can be locked too. This is not an error; this method
7966 performs a logical lock that prevents modifications of this
7967 media through the VirtualBox API, not a physical lock of the
7968 underlying storage unit.
7969
7970 This method returns the current state of the medium
7971 <b>before</b> the operation.
7972
7973 <result name="VBOX_E_INVALID_OBJECT_STATE">
7974 Invalid media state (e.g. not created, locked, inaccessible,
7975 creating, deleting).
7976 </result>
7977
7978 </desc>
7979 <param name="state" type="MediaState" dir="return">
7980 <desc>
7981 State of the medium after the operation.
7982 </desc>
7983 </param>
7984 </method>
7985
7986 <method name="unlockRead">
7987 <desc>
7988 Cancels the read lock previously set by <link to="#lockRead()"/>.
7989
7990 Either on success or on failure, this method returns the current state
7991 of the medium <b>after</b> the operation.
7992
7993 See <link to="#lockRead()"/> for more details.
7994
7995 <result name="VBOX_E_INVALID_OBJECT_STATE">
7996 Medium not locked for reading.
7997 </result>
7998
7999 </desc>
8000 <param name="state" type="MediaState" dir="return">
8001 <desc>
8002 State of the medium after the operation.
8003 </desc>
8004 </param>
8005 </method>
8006
8007 <method name="lockWrite">
8008 <desc>
8009 Locks this medium for writing.
8010
8011 The write lock, as opposed to <link to="#lockRead()"/>, is
8012 exclusive: there may be only one client that holds a write lock
8013 and there may be no read locks while the write lock is held.
8014
8015 When the medium is locked for writing, it cannot be modified
8016 from within VirtualBox and it is not guaranteed that the values
8017 of its properties are up-to-date. Any method that changes the
8018 properties of this medium or contents of the storage unit will
8019 return an error ((unless explicitly stated otherwise) and an
8020 attempt to start a virtual machine that wants to modify or to
8021 read the medium will also fail.
8022
8023 When the virtual machine is started up, it locks for writing all
8024 media it uses to write data to. If some media cannot be locked
8025 for writing, the startup procedure will fail.
8026
8027 The medium locked for writing must be unlocked using the <link
8028 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
8029 can <b>not</b> be nested and must be followed by a paired <link
8030 to="#unlockWrite()"/> call.
8031
8032 This method sets the media state to <link
8033 to="MediaState_LockedWrite"/> on success. The state prior to
8034 this call must be <link to="MediaState_Created"/> or <link
8035 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8036 media can be locked too. This is not an error; this method
8037 performs a logical lock that prevents modifications of this
8038 media through the VirtualBox API, not a physical lock of the
8039 underlying storage unit.
8040
8041 Either on success or on failure, this method returns the current
8042 state of the medium <b>before</b> the operation.
8043
8044 <result name="VBOX_E_INVALID_OBJECT_STATE">
8045 Invalid media state (e.g. not created, locked, inaccessible,
8046 creating, deleting).
8047 </result>
8048
8049 </desc>
8050 <param name="state" type="MediaState" dir="return">
8051 <desc>
8052 State of the medium after the operation.
8053 </desc>
8054 </param>
8055 </method>
8056
8057 <method name="unlockWrite">
8058 <desc>
8059 Cancels the write lock previously set by <link to="#lockWrite()"/>.
8060
8061 Either on success or on failure, this method returns the current
8062 state of the medium <b>after</b> the operation.
8063
8064 See <link to="#lockWrite()"/> for more details.
8065
8066 <result name="VBOX_E_INVALID_OBJECT_STATE">
8067 Medium not locked for writing.
8068 </result>
8069
8070 </desc>
8071 <param name="state" type="MediaState" dir="return">
8072 <desc>
8073 State of the medium after the operation.
8074 </desc>
8075 </param>
8076 </method>
8077
8078 <method name="close">
8079 <desc>
8080 Closes this medium.
8081
8082 The hard disk must not be attached to any known virtual machine
8083 and must not have any known child hard disks, otherwise the
8084 operation will fail.
8085
8086 When the hard disk is successfully closed, it gets removed from
8087 the list of remembered hard disks, but its storage unit is not
8088 deleted. In particular, this means that this hard disk can be
8089 later opened again using the <link
8090 to="IVirtualBox::openHardDisk2"/> call.
8091
8092 Note that after this method successfully returns, the given hard
8093 disk object becomes uninitialized. This means that any attempt
8094 to call any of its methods or attributes will fail with the
8095 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8096
8097 <result name="VBOX_E_INVALID_OBJECT_STATE">
8098 Invalid media state (other than not created, created or
8099 inaccessible).
8100 </result>
8101 <result name="VBOX_E_OBJECT_IN_USE">
8102 Medium attached to virtual machine.
8103 </result>
8104 <result name="VBOX_E_FILE_ERROR">
8105 Settings file not accessible.
8106 </result>
8107 <result name="VBOX_E_XML_ERROR">
8108 Could not parse the settings file.
8109 </result>
8110
8111 </desc>
8112 </method>
8113
8114 </interface>
8115
8116
8117 <!--
8118 // IHardDisk2
8119 /////////////////////////////////////////////////////////////////////////
8120 -->
8121
8122 <enum
8123 name="HardDiskType"
8124 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8125 >
8126 <desc>
8127 Virtual hard disk type.
8128 <see>IHardDisk</see>
8129 </desc>
8130
8131 <const name="Normal" value="0">
8132 <desc>
8133 Normal hard disk (attached directly or indirectly, preserved
8134 when taking snapshots).
8135 </desc>
8136 </const>
8137 <const name="Immutable" value="1">
8138 <desc>
8139 Immutable hard disk (attached indirectly, changes are wiped out
8140 after powering off the virtual machine).
8141 </desc>
8142 </const>
8143 <const name="Writethrough" value="2">
8144 <desc>
8145 Write through hard disk (attached directly, ignored when
8146 taking snapshots).
8147 </desc>
8148 </const>
8149 </enum>
8150
8151 <interface
8152 name="IHardDisk2Attachment" extends="$unknown"
8153 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8154 wsmap="struct"
8155 >
8156 <desc>
8157 The IHardDisk2Attachment interface represents a hard disk attachment of a
8158 virtual machine.
8159
8160 Every hard disk attachment specifies a slot of the virtual hard disk
8161 controller and a virtual hard disk attached to this slot.
8162
8163 The array of hard disk attachments is returned by
8164 <link to="IMachine::hardDisk2Attachments"/>.
8165
8166 <note>
8167 With the COM API, this is an interface like all the others. With the
8168 webservice, this is mapped to a structure, so querying the attribute
8169 will not return an object, but a complete structure.
8170 </note>
8171 </desc>
8172 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8173 <desc>Hard disk object associated with this attachment.</desc>
8174 </attribute>
8175
8176 <attribute name="bus" type="StorageBus" readonly="yes">
8177 <desc>Interface bus of this attachment.</desc>
8178 </attribute>
8179
8180 <attribute name="channel" type="long" readonly="yes">
8181 <desc>Channel number of this attachment.</desc>
8182 </attribute>
8183
8184 <attribute name="device" type="long" readonly="yes">
8185 <desc>Device slot number of this attachment.</desc>
8186 </attribute>
8187
8188 </interface>
8189
8190 <interface
8191 name="IHardDisk2" extends="IMedium"
8192 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8193 wsmap="managed"
8194 >
8195 <desc>
8196 The IHardDisk2 interface represents a virtual hard disk drive
8197 used by a virtual machine.
8198
8199 Virtual hard disk objects virtualize the hard disk hardware and look like
8200 regular hard disks for the guest OS running inside the virtual machine.
8201
8202 <h3>Hard Disk Types</h3>
8203
8204 There are three types of hard disks:
8205 <link to="HardDiskType_Normal">Normal</link>,
8206 <link to="HardDiskType_Immutable">Immutable</link> and
8207 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8208 hard disk defines how the hard disk is attached to a virtual machine and
8209 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8210 machine with the attached hard disk is taken. The type of the hard disk is
8211 defined by the <link to="#type"/> attribute.
8212
8213 All hard disks can be also divided in two big groups: <i>base</i> hard
8214 disks and <i>differencing</i> hard disks. A base hard disk contains all
8215 sectors of the hard disk data in its storage unit and therefore can be
8216 used independently. On the contrary, a differencing hard disk contains
8217 only some part of the hard disk data (a subset of sectors) and needs
8218 another hard disk to get access to the missing sectors of data. This
8219 another hard disk is called a <i>parent</i> hard disk and defines a hard
8220 disk to which this differencing hard disk is known to be <i>linked to</i>.
8221 The parent hard disk may be itself a differencing hard disk. This
8222 way, differencing hard disks form a linked hard disk chain. This chain
8223 always ends with the base hard disk which is sometimes referred to as the
8224 root hard disk of this chain. Note that several differencing hard disks
8225 may be linked to the same parent hard disk. This way, all known hard disks
8226 form a hard disk tree which is based on their parent-child relationship.
8227
8228 Differencing hard disks can be distinguished from base hard disks by
8229 querying the <link to="#parent"/> attribute: base hard disks do not have
8230 parents they would depend on, so the value of this attribute is always
8231 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8232 the hard disk tree (from the child hard disk to its parent). It is also
8233 possible to walk down the tree using the <link to="#children"/>
8234 attribute.
8235
8236 Note that the type of all differencing hard disks is
8237 <link to="HardDiskType_Normal">Normal</link>; all other values are
8238 meaningless for them. Base hard disks may be of any type.
8239
8240 <h3>Creating Hard Disks</h3>
8241
8242 New base hard disks are created using
8243 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8244 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8245 disks are usually implicitly created by VirtualBox when needed but may
8246 also be created explicitly using <link to="#createDiffStorage()"/>.
8247
8248 After the hard disk is successfully created (including the storage unit)
8249 or opened, it becomes a known hard disk (remembered in the internal media
8250 registry). Known hard disks can be attached to a virtual machine, accessed
8251 through <link to="IVirtualBox::getHardDisk2()"/> and
8252 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8253 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8254
8255 The following methods, besides <link to="IMedium::close()"/>,
8256 automatically remove the hard disk from the media registry:
8257 <ul>
8258 <li><link to="#deleteStorage()"/></li>
8259 <li><link to="#mergeTo()"/></li>
8260 </ul>
8261
8262 If the storage unit of the hard disk is a regular file in the host's
8263 file system then the rules stated in the description of the
8264 <link to="IMedium::location"/> attribute apply when setting its value. In
8265 addition, a plain file name without any path may be given, in which case
8266 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8267 folder</link> will be prepended to it.
8268
8269 <h4>Automatic composition of the file name part</h4>
8270
8271 Another extension to the <link to="IMedium::location"/> attribute is that
8272 there is a possibility to cause VirtualBox to compose a unique value for
8273 the file name part of the location using the UUID of the hard disk. This
8274 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8275 e.g. before the storage unit is created, and works as follows. You set the
8276 value of the <link to="IMedium::location"/> attribute to a location
8277 specification which only contains the path specification but not the file
8278 name part and ends with either a forward slash or a backslash character.
8279 In response, VirtualBox will generate a new UUID for the hard disk and
8280 compose the file name using the following pattern:
8281 <pre>
8282 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8283 </pre>
8284 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8285 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8286 is the default extension for the storage format of this hard disk. After
8287 that, you may call any of the methods that create a new hard disk storage
8288 unit and they will use the generated UUID and file name.
8289
8290 <h3>Attaching Hard Disks</h3>
8291
8292 Hard disks are attached to virtual machines using the
8293 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8294 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8295 <link to="#type"/>, hard disks are attached either
8296 <i>directly</i> or <i>indirectly</i>.
8297
8298 When a hard disk is being attached directly, it is associated with the
8299 virtual machine and used for hard disk operations when the machine is
8300 running. When a hard disk is being attached indirectly, a new differencing
8301 hard disk linked to it is implicitly created and this differencing hard
8302 disk is associated with the machine and used for hard disk operations.
8303 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8304 a direct attachment then the same hard disk will be returned in response
8305 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8306 an indirect attachment is performed then
8307 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8308 differencing hard disk, not the original one passed to <link
8309 to="IMachine::attachHardDisk2()"/>. The following table shows the
8310 dependency of the attachment type on the hard disk type:
8311
8312 <table>
8313 <tr>
8314 <th>Hard Disk Type</th>
8315 <th>Direct or Indirect?</th>
8316 </tr>
8317 <tr>
8318 <td>Normal (Base)</td>
8319 <td>
8320 Normal base hard disks that do not have children (i.e. differencing
8321 hard disks linked to them) and that are not already attached to
8322 virtual machines in snapshots are attached <b>directly</b>.
8323 Otherwise, they are attached <b>indirectly</b> because having
8324 dependent children or being part of the snapshot makes it impossible
8325 to modify hard disk contents without breaking the integrity of the
8326 dependent party. The <link to="#readOnly"/> attribute allows to
8327 quickly determine the kind of the attachment for the given hard
8328 disk. Note that if a normal base hard disk is to be indirectly
8329 attached to a virtual machine with snapshots then a special
8330 procedure called <i>smart attachment</i> is performed (see below).
8331 </td>
8332 </tr>
8333 <tr>
8334 <td>Normal (Differencing)</td>
8335 <td>
8336 Differencing hard disks are like normal base hard disks: attached
8337 <b>directly</b> if they do not have children and are not attached to
8338 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8339 that the smart attachment procedure is never performed for
8340 differencing hard disks.
8341 </td>
8342 </tr>
8343 <tr>
8344 <td>Immutable</td>
8345 <td>
8346 Immutable hard disks are always attached <b>indirectly</b> because
8347 they are designed to be non-writable. If an immutable hard disk is
8348 attached to a virtual machine with snapshots then a special
8349 procedure called smart attachment is performed (see below).
8350 </td>
8351 </tr>
8352 <tr>
8353 <td>Writethrough</td>
8354 <td>
8355 Writethrough hard disks are always attached <b>directly</b>, also as
8356 designed. This also means that writethrough hard disks cannot have
8357 other hard disks linked to them at all.
8358 </td>
8359 </tr>
8360 </table>
8361
8362 Note that the same hard disk, regardless of its type, may be attached to
8363 more than one virtual machine at a time. In this case, the machine that is
8364 started first gains exclusive access to the hard disk and attempts to
8365 start other machines having this hard disk attached will fail until the
8366 first machine is powered down.
8367
8368 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8369 that the given hard disk remains associated with the given machine after a
8370 successful <link to="IMachine::detachHardDisk2()"/> call until
8371 <link to="IMachine::saveSettings()"/> is called to save all changes to
8372 machine settings to disk. This deferring is necessary to guarantee that
8373 the hard disk configuration may be restored at any time by a call to
8374 <link to="IMachine::discardSettings()"/> before the settings
8375 are saved (committed).
8376
8377 Note that if <link to="IMachine::discardSettings()"/> is called after
8378 indirectly attaching some hard disks to the machine but before a call to
8379 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8380 all differencing hard disks implicitly created by
8381 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8382 Such implicitly created hard disks will also be immediately deleted when
8383 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8384 call if it is made before <link to="IMachine::saveSettings()"/>. This
8385 implicit deletion is safe because newly created differencing hard
8386 disks do not contain any user data.
8387
8388 However, keep in mind that detaching differencing hard disks that were
8389 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8390 before the last <link to="IMachine::saveSettings()"/> call will
8391 <b>not</b> implicitly delete them as they may already contain some data
8392 (for example, as a result of virtual machine execution). If these hard
8393 disks are no more necessary, the caller can always delete them explicitly
8394 using <link to="#deleteStorage()"/> after they are actually de-associated
8395 from this machine by the <link to="IMachine::saveSettings()"/> call.
8396
8397 <h3>Smart Attachment</h3>
8398
8399 When normal base or immutable hard disks are indirectly attached to a
8400 virtual machine then some additional steps are performed to make sure the
8401 virtual machine will have the most recent "view" of the hard disk being
8402 attached. These steps include walking through the machine's snapshots
8403 starting from the current one and going through ancestors up to the first
8404 snapshot. Hard disks attached to the virtual machine in all
8405 of the encountered snapshots are checked whether they are descendants of
8406 the given normal base or immutable hard disk. The first found child (which
8407 is the differencing hard disk) will be used instead of the normal base or
8408 immutable hard disk as a parent for creating a new differencing hard disk
8409 that will be actually attached to the machine. And only if no descendants
8410 are found or if the virtual machine does not have any snapshots then the
8411 normal base or immutable hard disk will be used itself as a parent for
8412 this differencing hard disk.
8413
8414 It is easier to explain what smart attachment does using the
8415 following example:
8416 <pre>
8417BEFORE attaching B.vdi: AFTER attaching B.vdi:
8418
8419Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8420 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8421 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8422 Snapshot 4 (none) Snapshot 4 (none)
8423 CurState (none) CurState (D3->D2.vdi)
8424
8425 NOT
8426 ...
8427 CurState (D3->B.vdi)
8428 </pre>
8429 The first column is the virtual machine configuration before the base hard
8430 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8431 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8432 mean that the hard disk that is actually attached to the machine is a
8433 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8434 another hard disk, <tt>B.vdi</tt>.
8435
8436 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8437 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8438 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8439 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8440 it cannot be attached directly and needs an indirect attachment (i.e.
8441 implicit creation of a new differencing hard disk). Due to the smart
8442 attachment procedure, the new differencing hard disk
8443 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8444 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8445 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8446 machine.
8447
8448 Note that if there is more than one descendant hard disk of the given base
8449 hard disk found in a snapshot, and there is an exact device, channel and
8450 bus match, then this exact match will be used. Otherwise, the youngest
8451 descendant will be picked up.
8452
8453 There is one more important aspect of the smart attachment procedure which
8454 is not related to snapshots at all. Before walking through the snapshots
8455 as described above, the backup copy of the current list of hard disk
8456 attachment is searched for descendants. This backup copy is created when
8457 the hard disk configuration is changed for the first time after the last
8458 <link to="IMachine::saveSettings()"/> call and used by
8459 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8460 changes. When such a descendant is found in this backup copy, it will be
8461 simply re-attached back, without creating a new differencing hard disk for
8462 it. This optimization is necessary to make it possible to re-attach the
8463 base or immutable hard disk to a different bus, channel or device slot
8464 without losing the contents of the differencing hard disk actually
8465 attached to the machine in place of it.
8466 </desc>
8467
8468 <attribute name="format" type="wstring" readonly="yes">
8469 <desc>
8470 Storage format of this hard disk.
8471
8472 The value of this attribute is a string that specifies a backend used to
8473 store hard disk data. The storage format is defined when you create a
8474 new hard disk or automatically detected when you open an existing hard
8475 disk medium, and cannot be changed later.
8476
8477 The list of all storage formats supported by this VirtualBox
8478 installation can be obtained using
8479 <link to="ISystemProperties::hardDiskFormats"/>.
8480 </desc>
8481 </attribute>
8482
8483 <attribute name="type" type="HardDiskType">
8484 <desc>
8485 Type (role) of this hard disk.
8486
8487 The following constraints apply when changing the value of this
8488 attribute:
8489 <ul>
8490 <li>If a hard disk is attached to a virtual machine (either in the
8491 current state or in one of the snapshots), its type cannot be
8492 changed.
8493 </li>
8494 <li>As long as the hard disk has children, its type cannot be set
8495 to <link to="HardDiskType_Writethrough"/>.
8496 </li>
8497 <li>The type of all differencing hard disks is
8498 <link to="HardDiskType_Normal"/> and cannot be changed.
8499 </li>
8500 </ul>
8501
8502 The type of a newly created or opened hard disk is set to
8503 <link to="HardDiskType_Normal"/>.
8504 </desc>
8505 </attribute>
8506
8507 <attribute name="parent" type="IHardDisk2" readonly="yes">
8508 <desc>
8509 Parent of this hard disk (a hard disk this hard disk is directly based
8510 on).
8511
8512 Only differencing hard disks have parents. For base (non-differencing)
8513 hard disks, <tt>null</tt> is returned.
8514 </desc>
8515 </attribute>
8516
8517 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8518 <desc>
8519 Children of this hard disk (all differencing hard disks directly based
8520 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8521 does not have any children.
8522 </desc>
8523 </attribute>
8524
8525 <attribute name="root" type="IHardDisk2" readonly="yes">
8526 <desc>
8527 Root hard disk of this hard disk.
8528
8529 If this is a differencing hard disk, its root hard disk is the base hard
8530 disk the given hard disk branch starts from. For all other types of hard
8531 disks, this property returns the hard disk object itself (i.e. the same
8532 object this property is read on).
8533 </desc>
8534 </attribute>
8535
8536 <attribute name="readOnly" type="boolean" readonly="yes">
8537 <desc>
8538 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8539 otherwise.
8540
8541 A hard disk is considered to be read-only when its contents cannot be
8542 modified without breaking the integrity of other parties that depend on
8543 this hard disk such as its child hard disks or snapshots of virtual
8544 machines where this hard disk is attached to these machines. If there
8545 are no children and no such snapshots then there is no dependency and
8546 the hard disk is not read-only.
8547
8548 The value of this attribute can be used to determine the kind of the
8549 attachment that will take place when attaching this hard disk to a
8550 virtual machine. If the value is <tt>false</tt> then the hard disk will
8551 be attached directly. If the value is <tt>true</tt> then the hard disk
8552 will be attached indirectly by creating a new differencing child hard
8553 disk for that. See the interface description for more information.
8554
8555 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8556 disks are always read-only while all
8557 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8558 always not.
8559
8560 <note>
8561 The read-only condition represented by this attribute is related to
8562 the hard disk type and usage, not to the current
8563 <link to="IMedium::state">media state</link> and not to the read-only
8564 state of the storage unit.
8565 </note>
8566 </desc>
8567 </attribute>
8568
8569 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8570 <desc>
8571 Logical size of this hard disk (in megabytes), as reported to the
8572 guest OS running inside the virtual machine this disk is
8573 attached to. The logical size is defined when the hard disk is created
8574 and cannot be changed later.
8575
8576 <note>
8577 Reading this property on a differencing hard disk will return the size
8578 of its <link to="#root"/> hard disk.
8579 </note>
8580 <note>
8581 For hard disks whose state is <link to="#state"/> is <link
8582 to="MediaState_Inaccessible"/>, the value of this property is the
8583 last known logical size. For <link to="MediaState_NotCreated"/> hard
8584 disks, the returned value is zero.
8585 </note>
8586 </desc>
8587 </attribute>
8588
8589 <!-- storage methods -->
8590
8591 <method name="getProperty">
8592 <desc>
8593 Returns the value of the custom hard disk property with the given name.
8594
8595 The list of all properties supported by the given hard disk format can
8596 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8597
8598 Note that if this method returns a <tt>null</tt> @a value, the requested
8599 property is supported but currently not assigned any value.
8600
8601 <result name="VBOX_E_OBJECT_NOT_FOUND">
8602 Requested property does not exist (not supported by the format).
8603 </result>
8604 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8605 </desc>
8606 <param name="name" type="wstring" dir="in">
8607 <desc>Name of the property to get.</desc>
8608 </param>
8609 <param name="value" type="wstring" dir="return">
8610 <desc>Current property value.</desc>
8611 </param>
8612 </method>
8613
8614 <method name="setProperty">
8615 <desc>
8616 Sets the value of the custom hard disk property with the given name.
8617
8618 The list of all properties supported by the given hard disk format can
8619 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8620
8621 Note that setting the property value to <tt>null</tt> is equivalent to
8622 deleting the existing value. A default value (if it is defined for this
8623 property) will be used by the format backend in this case.
8624
8625 <result name="VBOX_E_OBJECT_NOT_FOUND">
8626 Requested property does not exist (not supported by the format).
8627 </result>
8628 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8629 </desc>
8630 <param name="name" type="wstring" dir="in">
8631 <desc>Name of the property to set.</desc>
8632 </param>
8633 <param name="value" type="wstring" dir="in">
8634 <desc>Property value to set.</desc>
8635 </param>
8636 </method>
8637
8638 <method name="getProperties">
8639 <desc>
8640 Returns values for a group of properties in one call.
8641
8642 The names of the properties to get are specified using the @a names
8643 argument which is a list of comma-separated property names or
8644 <tt>null</tt> if all properties are to be returned. Note that currently
8645 the value of this argument is ignored and the method always returns all
8646 existing properties.
8647
8648 The list of all properties supported by the given hard disk format can
8649 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8650
8651 The method returns two arrays, the array of property names corresponding
8652 to the @a names argument and the current values of these properties.
8653 Both arrays have the same number of elements with each elemend at the
8654 given index in the first array corresponds to an element at the same
8655 index in the second array.
8656
8657 Note that for properties that do not have assigned values,
8658 <tt>null</tt> is returned at the appropriate index in the @a
8659 returnValues array.
8660
8661 </desc>
8662 <param name="names" type="wstring" dir="in">
8663 <desc>
8664 Names of properties to get.
8665 </desc>
8666 </param>
8667 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8668 <desc>Names of returned properties.</desc>
8669 </param>
8670 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8671 <desc>Values of returned properties.</desc>
8672 </param>
8673 </method>
8674
8675 <method name="setProperties">
8676 <desc>
8677 Sets values for a group of properties in one call.
8678
8679 The names of the properties to set are passed in the @a names
8680 array along with the new values for them in the @a values array. Both
8681 arrays have the same number of elements with each elemend at the given
8682 index in the first array corresponding to an element at the same index
8683 in the second array.
8684
8685 If there is at least one property name in @a names that is not valid,
8686 the method will fail before changing the values of any other properties
8687 from the @a names array.
8688
8689 Using this method over <link to="#setProperty()"/> is preferred if you
8690 need to set several properties at once since it will result into less
8691 IPC calls.
8692
8693 The list of all properties supported by the given hard disk format can
8694 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8695
8696 Note that setting the property value to <tt>null</tt> is equivalent to
8697 deleting the existing value. A default value (if it is defined for this
8698 property) will be used by the format backend in this case.
8699 </desc>
8700 <param name="names" type="wstring" safearray="yes" dir="in">
8701 <desc>Names of properties to set.</desc>
8702 </param>
8703 <param name="values" type="wstring" safearray="yes" dir="in">
8704 <desc>Values of properties to set.</desc>
8705 </param>
8706 </method>
8707
8708 <!-- storage methods -->
8709
8710 <method name="createDynamicStorage">
8711 <desc>
8712 Starts creating a dynamically expanding hard disk storage unit in the
8713 background. The previous storage unit created for this object, if
8714 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8715 the operation will fail.
8716
8717 Before the operation starts, the hard disk is placed in
8718 <link to="MediaState_Creating"/> state. If the create operation
8719 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8720 state.
8721
8722 After the returned progress object reports that the operation has
8723 successfully completed, the media state will be set to <link
8724 to="MediaState_Created"/>, the hard disk will be remembered by this
8725 VirtualBox installation and may be attached to virtual machines.
8726
8727 <result name="VBOX_E_NOT_SUPPORTED">
8728 Dynamic storage creation operation is not supported. See <link
8729 to="IHardDiskFormat::capabilities"/>.
8730 </result>
8731 </desc>
8732 <param name="logicalSize" type="unsigned long long" dir="in">
8733 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8734 </param>
8735 <param name="progress" type="IProgress" dir="return">
8736 <desc>Progress object to track the operation completion.</desc>
8737 </param>
8738 </method>
8739
8740 <method name="createFixedStorage">
8741 <desc>
8742 Starts creating a fixed-size hard disk storage unit in the background.
8743 The previous storage unit created for this object, if
8744 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8745 the operation will fail.
8746
8747 Before the operation starts, the hard disk is placed to
8748 <link to="MediaState_Creating"/> state. If the create operation
8749 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8750 state.
8751
8752 After the returned progress object reports that the operation is
8753 successfully complete, the media state will be set to <link
8754 to="MediaState_Created"/>, the hard disk will be remembered by this
8755 VirtualBox installation and may be attached to virtual machines.
8756
8757 <result name="VBOX_E_NOT_SUPPORTED">
8758 Fixed storage creation operation is not supported. See
8759 <link to="IHardDiskFormat::capabilities"/>.
8760 </result>
8761 </desc>
8762 <param name="logicalSize" type="unsigned long long" dir="in">
8763 <desc>Logical size of the hard disk in megabytes.</desc>
8764 </param>
8765 <param name="progress" type="IProgress" dir="return">
8766 <desc>Progress object to track the operation completion.</desc>
8767 </param>
8768 </method>
8769
8770 <method name="deleteStorage">
8771 <desc>
8772 Starts deleting the storage unit of this hard disk.
8773
8774 The hard disk must not be attached to any known virtual machine and must
8775 not have any known child hard disks, otherwise the operation will fail.
8776 It will also fail if there is no storage unit to delete or if deletion
8777 is already in progress, or if the hard disk is being in use (locked for
8778 read or for write) or inaccessible. Therefore, the only valid state for
8779 this operation to succeed is <link to="MediaState_Created"/>.
8780
8781 Before the operation starts, the hard disk is placed to
8782 <link to="MediaState_Deleting"/> state and gets removed from the list
8783 of remembered hard disks (media registry). If the delete operation
8784 fails, the media will be remembered again and placed back to
8785 <link to="MediaState_Created"/> state.
8786
8787 After the returned progress object reports that the operation is
8788 complete, the media state will be set to
8789 <link to="MediaState_NotCreated"/> and you will be able to use one of
8790 the storage creation methods to create it again.
8791
8792 <see>#close()</see>
8793
8794 <result name="VBOX_E_OBJECT_IN_USE">
8795 Hard disk is attached to a virtual machine.
8796 </result>
8797 <result name="VBOX_E_NOT_SUPPORTED">
8798 Storage deletion is not allowed because neither of storage creation
8799 operations are supported. See
8800 <link to="IHardDiskFormat::capabilities"/>.
8801 </result>
8802
8803 <note>
8804 If the deletion operation fails, it is not guaranteed that the storage
8805 unit still exists. You may check the <link to="IMedium::state"/> value
8806 to answer this question.
8807 </note>
8808 </desc>
8809 <param name="progress" type="IProgress" dir="return">
8810 <desc>Progress object to track the operation completion.</desc>
8811 </param>
8812 </method>
8813
8814 <!-- diff methods -->
8815
8816 <method name="createDiffStorage">
8817 <desc>
8818 Starts creating an empty differencing storage unit based on this hard
8819 disk in the format and at the location defined by the @a target
8820 argument.
8821
8822 The target hard disk must be in <link to="MediaState_NotCreated"/>
8823 state (i.e. must not have an existing storage unit). Upon successful
8824 completion, this operation will set the type of the target hard disk to
8825 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8826 represent the differencing hard disk data in the given format (according
8827 to the storage format of the target object).
8828
8829 After the returned progress object reports that the operation is
8830 successfully complete, the target hard disk gets remembered by this
8831 VirtualBox installation and may be attached to virtual machines.
8832
8833 <note>
8834 The hard disk will be set to <link to="MediaState_LockedRead"/>
8835 state for the duration of this operation.
8836 </note>
8837 <result name="VBOX_E_OBJECT_IN_USE">
8838 Hard disk not in NotCreated state.
8839 </result>
8840 </desc>
8841 <param name="target" type="IHardDisk2" dir="in">
8842 <desc>Target hard disk.</desc>
8843 </param>
8844 <param name="progress" type="IProgress" dir="return">
8845 <desc>Progress object to track the operation completion.</desc>
8846 </param>
8847 </method>
8848
8849 <method name="mergeTo">
8850 <desc>
8851 Starts merging the contents of this hard disk and all intermediate
8852 differencing hard disks in the chain to the given target hard disk.
8853
8854 The target hard disk must be either a descendant of this hard disk or
8855 its ancestor (otherwise this method will immediately return a failure).
8856 It follows that there are two logical directions of the merge operation:
8857 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8858 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8859 chain:
8860
8861 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8862
8863 Here, calling this method on the <tt>Base</tt> hard disk object with
8864 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8865 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8866 merge. Note that in both cases the contents of the resulting hard disk
8867 will be the same, the only difference is the hard disk object that takes
8868 the result of the merge operation. In case of the forward merge in the
8869 above example, the result will be written to <tt>Diff_2</tt>; in case of
8870 the backward merge, the result will be written to <tt>Base</tt>. In
8871 other words, the result of the operation is always stored in the target
8872 hard disk.
8873
8874 Upon successful operation completion, the storage units of all hard
8875 disks in the chain between this (source) hard disk and the target hard
8876 disk, including the source hard disk itself, will be automatically
8877 deleted and the relevant hard disk objects (including this hard disk)
8878 will become uninitialized. This means that any attempt to call any of
8879 their methods or attributes will fail with the
8880 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8881 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8882 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8883 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8884 disk itself since it will no longer be based on any other hard disk.
8885
8886 Considering the above, all of the following conditions must be met in
8887 order for the merge operation to succeed:
8888 <ul>
8889 <li>
8890 Neither this (source) hard disk nor any intermediate
8891 differencing hard disk in the chain between it and the target
8892 hard disk is attached to any virtual machine.
8893 </li>
8894 <li>
8895 Neither the source hard disk nor the target hard disk is an
8896 <link to="HardDiskType_Immutable"/> hard disk.
8897 </li>
8898 <li>
8899 The part of the hard disk tree from the source hard disk to the
8900 target hard disk is a linear chain, i.e. all hard disks in this
8901 chain have exactly one child which is the next hard disk in this
8902 chain. The only exception from this rule is the target hard disk in
8903 the forward merge operation; it is allowed to have any number of
8904 child hard disks because the merge operation will hot change its
8905 logical contents (as it is seen by the guest OS or by children).
8906 </li>
8907 <li>
8908 None of the involved hard disks are in
8909 <link to="MediaState_LockedRead"/> or
8910 <link to="MediaState_LockedWrite"/> state.
8911 </li>
8912 </ul>
8913
8914 <note>
8915 This (source) hard disk and all intermediates will be placed to <link
8916 to="MediaState_Deleting"/> state and the target hard disk will be
8917 placed to <link to="MediaState_LockedWrite"/> state and for the
8918 duration of this operation.
8919 </note>
8920 </desc>
8921 <param name="targetId" type="uuid" dir="in">
8922 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8923 </param>
8924 <param name="progress" type="IProgress" dir="return">
8925 <desc>Progress object to track the operation completion.</desc>
8926 </param>
8927 </method>
8928
8929 <!-- clone methods -->
8930
8931 <method name="cloneTo">
8932 <desc>
8933 Starts creating a clone of this hard disk in the format and at the
8934 location defined by the @a target argument.
8935
8936 The target hard disk must be in <link to="MediaState_NotCreated"/>
8937 state (i.e. must not have an existing storage unit). Upon successful
8938 completion, the cloned hard disk will contain exactly the same sector
8939 data as the hard disk being cloned, except that a new UUID for the clone
8940 will be randomly generated.
8941
8942 After the returned progress object reports that the operation is
8943 successfully complete, the target hard disk gets remembered by this
8944 VirtualBox installation and may be attached to virtual machines.
8945
8946 <note>
8947 If the cloned hard disk is a differencing hard disk, it will inherit
8948 parent dependency of the original hard disk.
8949 </note>
8950 <note>
8951 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8952 state for the duration of this operation.
8953 </note>
8954 </desc>
8955 <param name="target" type="IHardDisk2" dir="in">
8956 <desc>Target hard disk.</desc>
8957 </param>
8958 <param name="progress" type="IProgress" dir="return">
8959 <desc>Progress object to track the operation completion.</desc>
8960 </param>
8961 </method>
8962
8963 <method name="flattenTo">
8964 <desc>
8965 Starts creating a deep (independent) clone of this hard disk in the
8966 format and at the location defined by the @a target argument.
8967
8968 This operation is similar to <link to="#cloneTo()"/> except that when
8969 applied to a differencing hard disk, it will also copy missing hard disk
8970 data from all parent hard disks it is linked to. This will make the
8971 created clone an independent base hard disk that contains all hard disk
8972 data and does not need any other hard disks to operate.
8973
8974 After the returned progress object reports that the operation is
8975 successfully complete, the target hard disk gets remembered by this
8976 VirtualBox installation and may be attached to virtual machines.
8977
8978 <note>
8979 For base hard disks, this operation is identical to
8980 <link to="#cloneTo()"/>.
8981 </note>
8982 <note>
8983 This hard disk and all its parent hard disks will be placed to <link
8984 to="MediaState_LockedRead"/> state for the duration of this
8985 operation.
8986 </note>
8987 </desc>
8988 <param name="target" type="IHardDisk2" dir="in">
8989 <desc>Target hard disk.</desc>
8990 </param>
8991 <param name="progress" type="IProgress" dir="return">
8992 <desc>Progress object to track the operation completion.</desc>
8993 </param>
8994 </method>
8995
8996 <method name="compact">
8997 <desc>
8998 Starts compacting of this hard disk. This means that the disk is
8999 transformed into a possibly more compact storage representation.
9000 This potentially creates temporary images, which can require a
9001 substantial amount of additional disk space.
9002
9003 After the returned progress object reports that the operation is
9004 successfully complete, the media state will be set back to the
9005 current state.
9006
9007 <note>
9008 This hard disk and all its parent hard disks will be placed to <link
9009 to="MediaState_LockedRead"/> state for the duration of this
9010 operation.
9011 </note>
9012 </desc>
9013 <param name="progress" type="IProgress" dir="return">
9014 <desc>Progress object to track the operation completion.</desc>
9015 </param>
9016 </method>
9017
9018 </interface>
9019
9020
9021 <!--
9022 // IHardDiskFormat
9023 /////////////////////////////////////////////////////////////////////////
9024 -->
9025
9026 <enum
9027 name="DataType"
9028 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9029 >
9030 <const name="Int32" value="0"/>
9031 <const name="Int8" value="1"/>
9032 <const name="String" value="2"/>
9033 </enum>
9034
9035 <enum
9036 name="DataFlags"
9037 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9038 >
9039 <const name="None" value="0x00"/>
9040 <const name="Mandatory" value="0x01"/>
9041 <const name="Expert" value="0x02"/>
9042 <const name="Array" value="0x04"/>
9043 <const name="FlagMask" value="0x07"/>
9044 </enum>
9045
9046 <enum
9047 name="HardDiskFormatCapabilities"
9048 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9049 >
9050 <desc>
9051 Hard disk format capability flags.
9052 </desc>
9053
9054 <const name="Uuid" value="0x01">
9055 <desc>
9056 Supports UUIDs as expected by VirtualBox code.
9057 </desc>
9058 </const>
9059
9060 <const name="CreateFixed" value="0x02">
9061 <desc>
9062 Supports creating fixed size images, allocating all space instantly.
9063 </desc>
9064 </const>
9065
9066 <const name="CreateDynamic" value="0x04">
9067 <desc>
9068 Supports creating dynamically growing images, allocating space on
9069 demand.
9070 </desc>
9071 </const>
9072
9073 <const name="CreateSplit2G" value="0x08">
9074 <desc>
9075 Supports creating images split in chunks of a bit less than 2 GBytes.
9076 </desc>
9077 </const>
9078
9079 <const name="Differencing" value="0x10">
9080 <desc>
9081 Supports being used as a format for differencing hard disks (see <link
9082 to="IHardDisk2::createDiffStorage"/>).
9083 </desc>
9084 </const>
9085
9086 <const name="Asynchronous" value="0x20">
9087 <desc>
9088 Supports asynchronous I/O operations for at least some configurations.
9089 </desc>
9090 </const>
9091
9092 <const name="File" value="0x40">
9093 <desc>
9094 The format backend operates on files (the <link to="IMedium::location"/>
9095 attribute of the hard disk specifies a file used to store hard disk
9096 data; for a list of supported file extensions see
9097 <link to="IHardDiskFormat::fileExtensions"/>).
9098 </desc>
9099 </const>
9100
9101 <const name="Properties" value="0x80">
9102 <desc>
9103 The format backend uses the property interface to configure the storage
9104 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9105 method is used to get access to properties supported by the given hard
9106 disk format).
9107 </desc>
9108 </const>
9109
9110 <const name="CapabilityMask" value="0xFF"/>
9111 </enum>
9112
9113 <interface
9114 name="IHardDiskFormat" extends="$unknown"
9115 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9116 wsmap="managed"
9117 >
9118 <desc>
9119 The IHardDiskFormat interface represents a virtual hard disk format.
9120
9121 Each hard disk format has an associated backend which is used to handle
9122 hard disks stored in this format. This interface provides information
9123 about the properties of the associated backend.
9124
9125 Each hard disk format is identified by a string represented by the
9126 <link to="#id"/> attribute. This string is used in calls like
9127 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
9128 format.
9129
9130 The list of all supported hard disk formats can be obtained using
9131 <link to="ISystemProperties::hardDiskFormats"/>.
9132
9133 <see>IHardDisk2</see>
9134 </desc>
9135
9136 <attribute name="id" type="wstring" readonly="yes">
9137 <desc>
9138 Identifier of this format.
9139
9140 The format identifier is a non-null non-empty ASCII string. Note that
9141 this string is case-insensitive. This means that, for example, all of
9142 the following strings:
9143 <pre>
9144 "VDI"
9145 "vdi"
9146 "VdI"</pre>
9147 refer to the same hard disk format.
9148
9149 This string is used in methods of other interfaces where it is necessary
9150 to specify a hard disk format, such as
9151 <link to="IVirtualBox::createHardDisk2()"/>.
9152 </desc>
9153 </attribute>
9154
9155 <attribute name="name" type="wstring" readonly="yes">
9156 <desc>
9157 Human readable description of this format.
9158
9159 Mainly for use in file open dialogs.
9160 </desc>
9161 </attribute>
9162
9163 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9164 <desc>
9165 Array of strings containing the supported file extensions.
9166
9167 The first extension in the array is the extension preferred by the
9168 backend. It is recommended to use this extension when specifying a
9169 location of the storage unit for a new hard disk.
9170
9171 Note that some backends do not work on files, so this array may be
9172 empty.
9173
9174 <see>IHardDiskFormat::capabilities</see>
9175 </desc>
9176 </attribute>
9177
9178 <attribute name="capabilities" type="unsigned long" readonly="yes">
9179 <desc>
9180 Capabilities of the format as a set of bit flags.
9181
9182 For the meaning of individual capability flags see
9183 <link to="HardDiskFormatCapabilities"/>.
9184 </desc>
9185 </attribute>
9186
9187 <method name="describeProperties">
9188 <desc>
9189 Returns several arrays describing the properties supported by this
9190 format.
9191
9192 An element with the given index in each array describes one
9193 property. Thus, the number of elements in each returned array is the
9194 same and corresponds to the number of supported properties.
9195
9196 The returned arrays are filled in only if the
9197 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9198 All arguments must be non-NULL.
9199
9200 <see>DataType</see>
9201 <see>DataFlags</see>
9202 </desc>
9203
9204 <param name="names" type="wstring" safearray="yes" dir="out">
9205 <desc>Array of property names.</desc>
9206 </param>
9207 <param name="description" type="wstring" safearray="yes" dir="out">
9208 <desc>Array of property descriptions.</desc>
9209 </param>
9210 <param name="types" type="DataType" safearray="yes" dir="out">
9211 <desc>Array of property types.</desc>
9212 </param>
9213 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9214 <desc>Array of property flags.</desc>
9215 </param>
9216 <param name="defaults" type="wstring" safearray="yes" dir="out">
9217 <desc>Array of default property values.</desc>
9218 </param>
9219 </method>
9220
9221 </interface>
9222
9223
9224 <!--
9225 // IFloppyImage2
9226 /////////////////////////////////////////////////////////////////////////
9227 -->
9228
9229 <interface
9230 name="IFloppyImage2" extends="IMedium"
9231 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9232 wsmap="managed"
9233 >
9234 <desc>
9235 The IFloppyImage2 interface represents a medium containing the image
9236 of a floppy disk.
9237 </desc>
9238
9239 </interface>
9240
9241
9242 <!--
9243 // IDVDImage2
9244 /////////////////////////////////////////////////////////////////////////
9245 -->
9246
9247 <interface
9248 name="IDVDImage2" extends="IMedium"
9249 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9250 wsmap="managed"
9251 >
9252 <desc>
9253 The IDVDImage2 interface represents a medium containing the image
9254 of a CD or DVD disk in the ISO format.
9255 </desc>
9256
9257 </interface>
9258
9259
9260 <!--
9261 // IDVDDrive
9262 /////////////////////////////////////////////////////////////////////////
9263 -->
9264
9265 <interface
9266 name="IDVDDrive" extends="$unknown"
9267 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9268 wsmap="managed"
9269 >
9270 <desc>
9271 The IDVDDrive interface represents the virtual CD/DVD drive of the
9272 virtual machine. An object of this type is returned by
9273 <link to="IMachine::DVDDrive"/>.
9274 </desc>
9275
9276 <attribute name="state" type="DriveState" readonly="yes">
9277 <desc>Current drive state.</desc>
9278 </attribute>
9279
9280 <attribute name="passthrough" type="boolean">
9281 <desc>
9282 When a host drive is mounted and passthrough is enabled
9283 the guest OS will be able to directly send SCSI commands to
9284 the host drive. This enables the guest OS to use CD/DVD writers
9285 but is potentially dangerous.
9286 </desc>
9287 </attribute>
9288
9289 <method name="mountImage">
9290 <desc>Mounts a CD/DVD image with the specified UUID.
9291
9292 <result name="VBOX_E_FILE_ERROR">
9293 Invalid image file location.
9294 </result>
9295 <result name="VBOX_E_OBJECT_NOT_FOUND">
9296 Could not find a CD/DVD image matching @a imageID.
9297 </result>
9298 <result name="VBOX_E_INVALID_OBJECT_STATE">
9299 Invalid media state.
9300 </result>
9301
9302 </desc>
9303 <param name="imageId" type="uuid" dir="in"/>
9304 </method>
9305
9306 <method name="captureHostDrive">
9307 <desc>Captures the specified host CD/DVD drive.</desc>
9308 <param name="drive" type="IHostDVDDrive" dir="in"/>
9309 </method>
9310
9311 <method name="unmount">
9312 <desc>Unmounts the currently mounted image or host drive.</desc>
9313 </method>
9314
9315 <method name="getImage">
9316 <desc>Returns the currently mounted CD/DVD image.</desc>
9317 <param name="image" type="IDVDImage2" dir="return"/>
9318 </method>
9319
9320 <method name="getHostDrive">
9321 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9322 <param name="drive" type="IHostDVDDrive" dir="return"/>
9323 </method>
9324
9325 </interface>
9326
9327
9328 <!--
9329 // IFloppyDrive
9330 /////////////////////////////////////////////////////////////////////////
9331 -->
9332
9333 <interface
9334 name="IFloppyDrive" extends="$unknown"
9335 uuid="159412cd-bab8-452e-8097-218a020825a6"
9336 wsmap="managed"
9337 >
9338 <desc>
9339 The IFloppyDrive interface represents the virtual floppy drive of the
9340 virtual machine. An object of this type is returned by
9341 <link to="IMachine::floppyDrive" />.
9342 </desc>
9343
9344 <attribute name="enabled" type="boolean">
9345 <desc>
9346 Flag whether the floppy drive is enabled. If it is disabled,
9347 the floppy drive will not be reported to the guest OS.
9348 </desc>
9349 </attribute>
9350
9351 <attribute name="state" type="DriveState" readonly="yes">
9352 <desc>Current drive state.</desc>
9353 </attribute>
9354
9355 <method name="mountImage">
9356 <desc>Mounts a floppy image with the specified UUID.
9357
9358 <result name="VBOX_E_FILE_ERROR">
9359 Invalid image file location.
9360 </result>
9361 <result name="VBOX_E_OBJECT_NOT_FOUND">
9362 Could not find a floppy image matching @a imageID.
9363 </result>
9364 <result name="VBOX_E_INVALID_OBJECT_STATE">
9365 Invalid media state.
9366 </result>
9367
9368 </desc>
9369 <param name="imageId" type="uuid" dir="in"/>
9370 </method>
9371
9372 <method name="captureHostDrive">
9373 <desc>Captures the specified host floppy drive.</desc>
9374 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9375 </method>
9376
9377 <method name="unmount">
9378 <desc>Unmounts the currently mounted image or host drive.</desc>
9379 </method>
9380
9381 <method name="getImage">
9382 <desc>Returns the currently mounted floppy image.</desc>
9383 <param name="image" type="IFloppyImage2" dir="return"/>
9384 </method>
9385
9386 <method name="getHostDrive">
9387 <desc>Returns the currently mounted host floppy drive.</desc>
9388 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9389 </method>
9390
9391 </interface>
9392
9393
9394 <!--
9395 // IKeyboard
9396 /////////////////////////////////////////////////////////////////////////
9397 -->
9398
9399 <interface
9400 name="IKeyboard" extends="$unknown"
9401 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9402 wsmap="managed"
9403 >
9404 <desc>
9405 The IKeyboard interface represents the virtual machine's keyboard. Used
9406 in <link to="IConsole::keyboard"/>.
9407
9408 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9409 to the virtual machine.
9410
9411 </desc>
9412 <method name="putScancode">
9413 <desc>Sends a scancode to the keyboard.
9414
9415 <result name="VBOX_E_IPRT_ERROR">
9416 Could not send scan code to virtual keyboard.
9417 </result>
9418
9419 </desc>
9420 <param name="scancode" type="long" dir="in"/>
9421 </method>
9422
9423 <method name="putScancodes">
9424 <desc>Sends an array of scancodes to the keyboard.
9425
9426 <result name="VBOX_E_IPRT_ERROR">
9427 Could not send all scan codes to virtual keyboard.
9428 </result>
9429
9430 </desc>
9431 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9432 <param name="codesStored" type="unsigned long" dir="return"/>
9433 </method>
9434
9435 <method name="putCAD">
9436 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9437 function is nothing special, it is just a convenience function
9438 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9439
9440 <result name="VBOX_E_IPRT_ERROR">
9441 Could not send all scan codes to virtual keyboard.
9442 </result>
9443
9444 </desc>
9445 </method>
9446
9447 </interface>
9448
9449
9450 <!--
9451 // IMouse
9452 /////////////////////////////////////////////////////////////////////////
9453 -->
9454
9455 <enum
9456 name="MouseButtonState"
9457 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9458 >
9459 <desc>
9460 Mouse button state.
9461 </desc>
9462
9463 <const name="LeftButton" value="0x01"/>
9464 <const name="RightButton" value="0x02"/>
9465 <const name="MiddleButton" value="0x04"/>
9466 <const name="WheelUp" value="0x08"/>
9467 <const name="WheelDown" value="0x10"/>
9468 <const name="MouseStateMask" value="0x1F"/>
9469 </enum>
9470
9471 <interface
9472 name="IMouse" extends="$unknown"
9473 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9474 wsmap="managed"
9475 >
9476 <desc>
9477 The IMouse interface represents the virtual machine's mouse. Used in
9478 <link to="IConsole::mouse"/>.
9479
9480 Through this interface, the virtual machine's virtual mouse can be
9481 controlled.
9482 </desc>
9483
9484 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9485 <desc>
9486 Whether the guest OS supports absolute mouse pointer positioning
9487 or not.
9488 <note>
9489 VirtualBox Guest Tools need to be installed to the guest OS
9490 in order to enable absolute mouse positioning support.
9491 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9492 callback to be instantly informed about changes of this attribute
9493 during virtual machine execution.
9494 </note>
9495 <see><link to="#putMouseEventAbsolute"/></see>
9496 </desc>
9497 </attribute>
9498
9499 <method name="putMouseEvent">
9500 <desc>
9501 Initiates a mouse event using relative pointer movements
9502 along x and y axis.
9503
9504 <result name="E_ACCESSDENIED">
9505 Console not powered up.
9506 </result>
9507 <result name="VBOX_E_IPRT_ERROR">
9508 Could not send mouse event to virtual mouse.
9509 </result>
9510
9511 </desc>
9512
9513 <param name="dx" type="long" dir="in">
9514 <desc>
9515 Amount of pixels the mouse should move to the right.
9516 Negative values move the mouse to the left.
9517 </desc>
9518 </param>
9519 <param name="dy" type="long" dir="in">
9520 <desc>
9521 Amount of pixels the mouse should move downwards.
9522 Negative values move the mouse upwards.
9523 </desc>
9524 </param>
9525 <param name="dz" type="long" dir="in">
9526 <desc>
9527 Amount of mouse wheel moves.
9528 Positive values describe clockwise wheel rotations,
9529 negative values describe counterclockwise rotations.
9530 </desc>
9531 </param>
9532 <param name="buttonState" type="long" dir="in">
9533 <desc>
9534 The current state of mouse buttons. Every bit represents
9535 a mouse button as follows:
9536 <table>
9537 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9538 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9539 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9540 </table>
9541 A value of <tt>1</tt> means the corresponding button is pressed.
9542 otherwise it is released.
9543 </desc>
9544 </param>
9545 </method>
9546
9547 <method name="putMouseEventAbsolute">
9548 <desc>
9549 Positions the mouse pointer using absolute x and y coordinates.
9550 These coordinates are expressed in pixels and
9551 start from <tt>[1,1]</tt> which corresponds to the top left
9552 corner of the virtual display.
9553
9554 <result name="E_ACCESSDENIED">
9555 Console not powered up.
9556 </result>
9557 <result name="VBOX_E_IPRT_ERROR">
9558 Could not send mouse event to virtual mouse.
9559 </result>
9560
9561 <note>
9562 This method will have effect only if absolute mouse
9563 positioning is supported by the guest OS.
9564 </note>
9565
9566 <see><link to="#absoluteSupported"/></see>
9567 </desc>
9568
9569 <param name="x" type="long" dir="in">
9570 <desc>
9571 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9572 </desc>
9573 </param>
9574 <param name="y" type="long" dir="in">
9575 <desc>
9576 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9577 </desc>
9578 </param>
9579 <param name="dz" type="long" dir="in">
9580 <desc>
9581 Amount of mouse wheel moves.
9582 Positive values describe clockwise wheel rotations,
9583 negative values describe counterclockwise rotations.
9584 </desc>
9585 </param>
9586 <param name="buttonState" type="long" dir="in">
9587 <desc>
9588 The current state of mouse buttons. Every bit represents
9589 a mouse button as follows:
9590 <table>
9591 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9592 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9593 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9594 </table>
9595 A value of <tt>1</tt> means the corresponding button is pressed.
9596 otherwise it is released.
9597 </desc>
9598 </param>
9599 </method>
9600
9601 </interface>
9602
9603 <!--
9604 // IDisplay
9605 /////////////////////////////////////////////////////////////////////////
9606 -->
9607
9608 <enum
9609 name="FramebufferAccelerationOperation"
9610 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9611 >
9612 <desc>
9613 Frame buffer acceleration operation.
9614 </desc>
9615
9616 <const name="SolidFillAcceleration" value="1"/>
9617 <const name="ScreenCopyAcceleration" value="2"/>
9618 </enum>
9619
9620 <enum
9621 name="FramebufferPixelFormat"
9622 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9623 >
9624 <desc>
9625 Format of the video memory buffer. Constants represented by this enum can
9626 be used to test for particular values of <link
9627 to="IFramebuffer::pixelFormat"/>. See also <link
9628 to="IFramebuffer::requestResize()"/>.
9629
9630 See also www.fourcc.org for more information about FOURCC pixel formats.
9631 </desc>
9632
9633 <const name="Opaque" value="0">
9634 <desc>
9635 Unknown buffer format (the user may not assume any particular format of
9636 the buffer).
9637 </desc>
9638 </const>
9639 <const name="FOURCC_RGB" value="0x32424752">
9640 <desc>
9641 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9642 bit layout).
9643 </desc>
9644 </const>
9645 </enum>
9646
9647 <interface
9648 name="IFramebuffer" extends="$unknown"
9649 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9650 wsmap="suppress"
9651 >
9652 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9653 <desc>Address of the start byte of the frame buffer.</desc>
9654 </attribute>
9655
9656 <attribute name="width" type="unsigned long" readonly="yes">
9657 <desc>Frame buffer width, in pixels.</desc>
9658 </attribute>
9659
9660 <attribute name="height" type="unsigned long" readonly="yes">
9661 <desc>Frame buffer height, in pixels.</desc>
9662 </attribute>
9663
9664 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9665 <desc>
9666 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9667 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9668 are: 8, 15, 16, 24 and 32.
9669 </desc>
9670 </attribute>
9671
9672 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9673 <desc>
9674 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9675 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9676 size of the scan line must be aligned to 32 bits.
9677 </desc>
9678 </attribute>
9679
9680 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9681 <desc>
9682 Frame buffer pixel format. It's either one of the values defined by <link
9683 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9684 <note>
9685 This attribute must never return <link
9686 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9687 <link to="#address"/> points to must be always known.
9688 </note>
9689 </desc>
9690 </attribute>
9691
9692 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9693 <desc>
9694 Defines whether this frame buffer uses the virtual video card's memory
9695 buffer (guest VRAM) directly or not. See <link
9696 to="IFramebuffer::requestResize()"/> for more information.
9697 </desc>
9698 </attribute>
9699
9700 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9701 <desc>
9702 Hint from the frame buffer about how much of the standard
9703 screen height it wants to use for itself. This information is
9704 exposed to the guest through the VESA BIOS and VMMDev interface
9705 so that it can use it for determining its video mode table. It
9706 is not guaranteed that the guest respects the value.
9707 </desc>
9708 </attribute>
9709
9710 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9711 <desc>
9712 An alpha-blended overlay which is superposed over the frame buffer.
9713 The initial purpose is to allow the display of icons providing
9714 information about the VM state, including disk activity, in front
9715 ends which do not have other means of doing that. The overlay is
9716 designed to controlled exclusively by IDisplay. It has no locking
9717 of its own, and any changes made to it are not guaranteed to be
9718 visible until the affected portion of IFramebuffer is updated. The
9719 overlay can be created lazily the first time it is requested. This
9720 attribute can also return NULL to signal that the overlay is not
9721 implemented.
9722 </desc>
9723 </attribute>
9724
9725 <attribute name="winId" type="unsigned long long" readonly="yes">
9726 <desc>
9727 Platform-dependent identifier of the window where context of this
9728 frame buffer is drawn, or zero if there's no such window.
9729 </desc>
9730 </attribute>
9731
9732 <method name="lock">
9733 <desc>
9734 Locks the frame buffer.
9735 Gets called by the IDisplay object where this frame buffer is
9736 bound to.
9737 </desc>
9738 </method>
9739
9740 <method name="unlock">
9741 <desc>
9742 Unlocks the frame buffer.
9743 Gets called by the IDisplay object where this frame buffer is
9744 bound to.
9745 </desc>
9746 </method>
9747
9748 <method name="notifyUpdate">
9749 <desc>
9750 Informs about an update.
9751 Gets called by the display object where this buffer is
9752 registered.
9753 </desc>
9754 <param name="x" type="unsigned long" dir="in"/>
9755 <param name="y" type="unsigned long" dir="in"/>
9756 <param name="width" type="unsigned long" dir="in"/>
9757 <param name="height" type="unsigned long" dir="in"/>
9758 <param name="finished" type="boolean" dir="return"/>
9759 </method>
9760
9761 <method name="requestResize">
9762 <desc>
9763 Requests a size and pixel format change.
9764
9765 There are two modes of working with the video buffer of the virtual
9766 machine. The <i>indirect</i> mode implies that the IFramebuffer
9767 implementation allocates a memory buffer for the requested display mode
9768 and provides it to the virtual machine. In <i>direct</i> mode, the
9769 IFramebuffer implementation uses the memory buffer allocated and owned
9770 by the virtual machine. This buffer represents the video memory of the
9771 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9772 usually faster because the implementation gets a raw pointer to the
9773 guest VRAM buffer which it can directly use for visualizing the contents
9774 of the virtual display, as opposed to the indirect mode where the
9775 contents of guest VRAM are copied to the memory buffer provided by
9776 the implementation every time a display update occurs.
9777
9778 It is important to note that the direct mode is really fast only when
9779 the implementation uses the given guest VRAM buffer directly, for
9780 example, by blitting it to the window representing the virtual machine's
9781 display, which saves at least one copy operation comparing to the
9782 indirect mode. However, using the guest VRAM buffer directly is not
9783 always possible: the format and the color depth of this buffer may be
9784 not supported by the target window, or it may be unknown (opaque) as in
9785 case of text or non-linear multi-plane VGA video modes. In this case,
9786 the indirect mode (that is always available) should be used as a
9787 fallback: when the guest VRAM contents are copied to the
9788 implementation-provided memory buffer, color and format conversion is
9789 done automatically by the underlying code.
9790
9791 The @a pixelFormat parameter defines whether the direct mode is
9792 available or not. If @a pixelFormat is <link
9793 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9794 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9795 bytesPerLine parameters must be ignored and the implementation must use
9796 the indirect mode (where it provides its own buffer in one of the
9797 supported formats). In all other cases, @a pixelFormat together with @a
9798 bitsPerPixel and @a bytesPerLine define the format of the video memory
9799 buffer pointed to by the @a VRAM parameter and the implementation is
9800 free to choose which mode to use. To indicate that this frame buffer uses
9801 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9802 attribute must return <tt>true</tt> and <link to="#address"/> must
9803 return exactly the same address that is passed in the @a VRAM parameter
9804 of this method; otherwise it is assumed that the indirect strategy is
9805 chosen.
9806
9807 The @a width and @a height parameters represent the size of the
9808 requested display mode in both modes. In case of indirect mode, the
9809 provided memory buffer should be big enough to store data of the given
9810 display mode. In case of direct mode, it is guaranteed that the given @a
9811 VRAM buffer contains enough space to represent the display mode of the
9812 given size. Note that this frame buffer's <link to="#width"/> and <link
9813 to="#height"/> attributes must return exactly the same values as
9814 passed to this method after the resize is completed (see below).
9815
9816 The @a finished output parameter determines if the implementation has
9817 finished resizing the frame buffer or not. If, for some reason, the
9818 resize cannot be finished immediately during this call, @a finished
9819 must be set to @c false, and the implementation must call
9820 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9821 this method as soon as possible. If @a finished is @c false, the
9822 machine will not call any frame buffer methods until
9823 <link to="IDisplay::resizeCompleted()"/> is called.
9824
9825 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9826 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9827 this frame buffer must return exactly the same values as specified in the
9828 parameters of this method, after the resize is completed. If the
9829 indirect mode is chosen, these attributes must return values describing
9830 the format of the implementation's own memory buffer <link
9831 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9832 value must always correlate with <link to="#pixelFormat"/>. Note that
9833 the <link to="#pixelFormat"/> attribute must never return <link
9834 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9835
9836 <note>
9837 This method is called by the IDisplay object under the
9838 <link to="#lock()"/> provided by this IFramebuffer
9839 implementation. If this method returns @c false in @a finished, then
9840 this lock is not released until
9841 <link to="IDisplay::resizeCompleted()"/> is called.
9842 </note>
9843 </desc>
9844 <param name="screenId" type="unsigned long" dir="in">
9845 <desc>
9846 Logical screen number. Must be used in the corresponding call to
9847 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9848 </desc>
9849 </param>
9850 <param name="pixelFormat" type="unsigned long" dir="in">
9851 <desc>
9852 Pixel format of the memory buffer pointed to by @a VRAM.
9853 See also <link to="FramebufferPixelFormat"/>.
9854 </desc>
9855 </param>
9856 <param name="VRAM" type="octet" mod="ptr" dir="in">
9857 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9858 </param>
9859 <param name="bitsPerPixel" type="unsigned long" dir="in">
9860 <desc>Color depth, bits per pixel.</desc>
9861 </param>
9862 <param name="bytesPerLine" type="unsigned long" dir="in">
9863 <desc>Size of one scan line, in bytes.</desc>
9864 </param>
9865 <param name="width" type="unsigned long" dir="in">
9866 <desc>Width of the guest display, in pixels.</desc>
9867 </param>
9868 <param name="height" type="unsigned long" dir="in">
9869 <desc>Height of the guest display, in pixels.</desc>
9870 </param>
9871 <param name="finished" type="boolean" dir="return">
9872 <desc>
9873 Can the VM start using the new frame buffer immediately
9874 after this method returns or it should wait for
9875 <link to="IDisplay::resizeCompleted()"/>.
9876 </desc>
9877 </param>
9878 </method>
9879
9880 <method name="operationSupported">
9881 <desc>
9882 Returns whether the given acceleration operation is supported
9883 by the IFramebuffer implementation. If not, the display object
9884 will not attempt to call the corresponding IFramebuffer entry
9885 point. Even if an operation is indicated as supported, the
9886 IFramebuffer implementation always has the option to return non
9887 supported from the corresponding acceleration method in which
9888 case the operation will be performed by the display engine. This
9889 allows for reduced IFramebuffer implementation complexity where
9890 only common cases are handled.
9891 </desc>
9892 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9893 <param name="supported" type="boolean" dir="return"/>
9894 </method>
9895
9896 <method name="videoModeSupported">
9897 <desc>
9898 Returns whether the frame buffer implementation is willing to
9899 support a given video mode. In case it is not able to render
9900 the video mode (or for some reason not willing), it should
9901 return false. Usually this method is called when the guest
9902 asks the VMM device whether a given video mode is supported
9903 so the information returned is directly exposed to the guest.
9904 It is important that this method returns very quickly.
9905 </desc>
9906 <param name="width" type="unsigned long" dir="in"/>
9907 <param name="height" type="unsigned long" dir="in"/>
9908 <param name="bpp" type="unsigned long" dir="in"/>
9909 <param name="supported" type="boolean" dir="return"/>
9910 </method>
9911
9912 <method name="solidFill">
9913 <desc>
9914 Fills the specified rectangle on screen with a solid color.
9915 </desc>
9916 <param name="x" type="unsigned long" dir="in"/>
9917 <param name="y" type="unsigned long" dir="in"/>
9918 <param name="width" type="unsigned long" dir="in"/>
9919 <param name="height" type="unsigned long" dir="in"/>
9920 <param name="color" type="unsigned long" dir="in"/>
9921 <param name="handled" type="boolean" dir="return"/>
9922 </method>
9923
9924 <method name="copyScreenBits">
9925 <desc>
9926 Copies specified rectangle on the screen.
9927 </desc>
9928 <param name="xDst" type="unsigned long" dir="in"/>
9929 <param name="yDst" type="unsigned long" dir="in"/>
9930 <param name="xSrc" type="unsigned long" dir="in"/>
9931 <param name="ySrc" type="unsigned long" dir="in"/>
9932 <param name="width" type="unsigned long" dir="in"/>
9933 <param name="height" type="unsigned long" dir="in"/>
9934 <param name="handled" type="boolean" dir="return"/>
9935 </method>
9936
9937 <method name="getVisibleRegion">
9938 <desc>
9939 Returns the visible region of this frame buffer.
9940
9941 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9942 @a count parameter is ignored and the number of elements necessary to
9943 describe the current visible region is returned in @a countCopied.
9944
9945 If @a rectangles is not <tt>NULL</tt> but @a count is less
9946 than the required number of elements to store region data, the method
9947 will report a failure. If @a count is equal or greater than the
9948 required number of elements, then the actual number of elements copied
9949 to the provided array will be returned in @a countCopied.
9950
9951 <note>
9952 The address of the provided array must be in the process space of
9953 this IFramebuffer object.
9954 </note>
9955 <note>
9956 Method not yet implemented.
9957 </note>
9958 </desc>
9959 <param name="rectangles" type="octet" mod="ptr" dir="in">
9960 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9961 </param>
9962 <param name="count" type="unsigned long" dir="in">
9963 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9964 </param>
9965 <param name="countCopied" type="unsigned long" dir="return">
9966 <desc>Number of elements copied to the @a rectangles array.</desc>
9967 </param>
9968 </method>
9969
9970 <method name="setVisibleRegion">
9971 <desc>
9972 Suggests a new visible region to this frame buffer. This region
9973 represents the area of the VM display which is a union of regions of
9974 all top-level windows of the guest operating system running inside the
9975 VM (if the Guest Additions for this system support this
9976 functionality). This information may be used by the frontends to
9977 implement the seamless desktop integration feature.
9978
9979 <note>
9980 The address of the provided array must be in the process space of
9981 this IFramebuffer object.
9982 </note>
9983 <note>
9984 The IFramebuffer implementation must make a copy of the provided
9985 array of rectangles.
9986 </note>
9987 <note>
9988 Method not yet implemented.
9989 </note>
9990 </desc>
9991 <param name="rectangles" type="octet" mod="ptr" dir="in">
9992 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9993 </param>
9994 <param name="count" type="unsigned long" dir="in">
9995 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9996 </param>
9997 </method>
9998
9999 </interface>
10000
10001 <interface
10002 name="IFramebufferOverlay" extends="IFramebuffer"
10003 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10004 wsmap="suppress"
10005 >
10006 <desc>
10007 The IFramebufferOverlay interface represents an alpha blended overlay
10008 for displaying status icons above an IFramebuffer. It is always created
10009 not visible, so that it must be explicitly shown. It only covers a
10010 portion of the IFramebuffer, determined by its width, height and
10011 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10012 that order) format, and may be written to directly. Do re-read the
10013 width though, after setting it, as it may be adjusted (increased) to
10014 make it more suitable for the front end.
10015 </desc>
10016 <attribute name="x" type="unsigned long" readonly="yes">
10017 <desc>X position of the overlay, relative to the frame buffer.</desc>
10018 </attribute>
10019
10020 <attribute name="y" type="unsigned long" readonly="yes">
10021 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10022 </attribute>
10023
10024 <attribute name="visible" type="boolean" readonly="no">
10025 <desc>
10026 Whether the overlay is currently visible.
10027 </desc>
10028 </attribute>
10029
10030 <attribute name="alpha" type="unsigned long" readonly="no">
10031 <desc>
10032 The global alpha value for the overlay. This may or may not be
10033 supported by a given front end.
10034 </desc>
10035 </attribute>
10036
10037 <method name="move">
10038 <desc>
10039 Changes the overlay's position relative to the IFramebuffer.
10040 </desc>
10041 <param name="x" type="unsigned long" dir="in"/>
10042 <param name="y" type="unsigned long" dir="in"/>
10043 </method>
10044
10045 </interface>
10046
10047 <interface
10048 name="IDisplay" extends="$unknown"
10049 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10050 wsmap="suppress"
10051 >
10052 <desc>
10053 The IDisplay interface represents the virtual machine's display.
10054
10055 The object implementing this interface is contained in each
10056 <link to="IConsole::display"/> attribute and represents the visual
10057 output of the virtual machine.
10058
10059 The virtual display supports pluggable output targets represented by the
10060 IFramebuffer interface. Examples of the output target are a window on
10061 the host computer or an RDP session's display on a remote computer.
10062 </desc>
10063 <attribute name="width" type="unsigned long" readonly="yes">
10064 <desc>Current display width.</desc>
10065 </attribute>
10066
10067 <attribute name="height" type="unsigned long" readonly="yes">
10068 <desc>Current display height.</desc>
10069 </attribute>
10070
10071 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10072 <desc>
10073 Current guest display color depth. Note that this may differ
10074 from <link to="IFramebuffer::bitsPerPixel"/>.
10075 </desc>
10076 </attribute>
10077
10078 <method name="setupInternalFramebuffer">
10079 <desc>
10080 Prepares an internally managed frame buffer.
10081 </desc>
10082 <param name="depth" type="unsigned long" dir="in"/>
10083 </method>
10084
10085 <method name="lockFramebuffer">
10086 <desc>
10087 Requests access to the internal frame buffer.
10088
10089 <result name="VBOX_E_NOT_SUPPORTED">
10090 Attempt to lock a non-internal frame buffer.
10091 </result>
10092
10093 </desc>
10094 <param name="address" type="octet" mod="ptr" dir="return"/>
10095 </method>
10096
10097 <method name="unlockFramebuffer">
10098 <desc>
10099 Releases access to the internal frame buffer.
10100
10101 <result name="VBOX_E_NOT_SUPPORTED">
10102 Attempt to unlock a non-internal frame buffer.
10103 </result>
10104
10105 </desc>
10106 </method>
10107
10108 <method name="registerExternalFramebuffer">
10109 <desc>
10110 Registers an external frame buffer.
10111 </desc>
10112 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10113 </method>
10114
10115 <method name="setFramebuffer">
10116 <desc>
10117 Sets the framebuffer for given screen.
10118 </desc>
10119 <param name="screenId" type="unsigned long" dir="in"/>
10120 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10121 </method>
10122
10123 <method name="getFramebuffer">
10124 <desc>
10125 Queries the framebuffer for given screen.
10126 </desc>
10127 <param name="screenId" type="unsigned long" dir="in"/>
10128 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10129 <param name="xOrigin" type="long" dir="out"/>
10130 <param name="yOrigin" type="long" dir="out"/>
10131 </method>
10132
10133 <method name="setVideoModeHint">
10134 <desc>
10135 Asks VirtualBox to request the given video mode from
10136 the guest. This is just a hint and it cannot be guaranteed
10137 that the requested resolution will be used. Guest Additions
10138 are required for the request to be seen by guests. The caller
10139 should issue the request and wait for a resolution change and
10140 after a timeout retry.
10141
10142 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10143 parameters means that the corresponding values should be taken from the
10144 current video mode (i.e. left unchanged).
10145
10146 If the guest OS supports multi-monitor configuration then the @a display
10147 parameter specifies the number of the guest display to send the hint to:
10148 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10149 so on. If the multi-monitor configuration is not supported, @a display
10150 must be <tt>0</tt>.
10151
10152 <result name="E_INVALIDARG">
10153 The @a display is not associated with any monitor.
10154 </result>
10155
10156 </desc>
10157 <param name="width" type="unsigned long" dir="in"/>
10158 <param name="height" type="unsigned long" dir="in"/>
10159 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10160 <param name="display" type="unsigned long" dir="in"/>
10161 </method>
10162
10163 <method name="setSeamlessMode">
10164 <desc>
10165 Enables or disables seamless guest display rendering (seamless desktop
10166 integration) mode.
10167 <note>
10168 Calling this method has no effect if <link
10169 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10170 </note>
10171 </desc>
10172 <param name="enabled" type="boolean" dir="in"/>
10173 </method>
10174
10175 <method name="takeScreenShot">
10176 <desc>
10177 Takes a screen shot of the requested size and copies it to the
10178 32-bpp buffer allocated by the caller.
10179
10180 <result name="E_NOTIMPL">
10181 Feature not implemented.
10182 </result>
10183 <result name="VBOX_E_IPRT_ERROR">
10184 Could not take a screenshot.
10185 </result>
10186
10187 </desc>
10188 <param name="address" type="octet" mod="ptr" dir="in"/>
10189 <param name="width" type="unsigned long" dir="in"/>
10190 <param name="height" type="unsigned long" dir="in"/>
10191 </method>
10192
10193 <method name="drawToScreen">
10194 <desc>
10195 Draws a 32-bpp image of the specified size from the given buffer
10196 to the given point on the VM display.
10197
10198 <result name="E_NOTIMPL">
10199 Feature not implemented.
10200 </result>
10201 <result name="VBOX_E_IPRT_ERROR">
10202 Could not draw to screen.
10203 </result>
10204
10205 </desc>
10206 <param name="address" type="octet" mod="ptr" dir="in"/>
10207 <param name="x" type="unsigned long" dir="in"/>
10208 <param name="y" type="unsigned long" dir="in"/>
10209 <param name="width" type="unsigned long" dir="in"/>
10210 <param name="height" type="unsigned long" dir="in"/>
10211 </method>
10212
10213 <method name="invalidateAndUpdate">
10214 <desc>
10215 Does a full invalidation of the VM display and instructs the VM
10216 to update it.
10217
10218 <result name="VBOX_E_IPRT_ERROR">
10219 Could not invalidate and update screen.
10220 </result>
10221
10222 </desc>
10223 </method>
10224
10225 <method name="resizeCompleted">
10226 <desc>
10227 Signals that a framebuffer has completed the resize operation.
10228
10229 <result name="VBOX_E_NOT_SUPPORTED">
10230 Operation only valid for external frame buffers.
10231 </result>
10232
10233 </desc>
10234 <param name="screenId" type="unsigned long" dir="in"/>
10235 </method>
10236
10237 <method name="updateCompleted">
10238 <desc>
10239 Signals that a framebuffer has completed the update operation.
10240
10241 <result name="VBOX_E_NOT_SUPPORTED">
10242 Operation only valid for external frame buffers.
10243 </result>
10244
10245 </desc>
10246 </method>
10247
10248 </interface>
10249
10250 <!--
10251 // INetworkAdapter
10252 /////////////////////////////////////////////////////////////////////////
10253 -->
10254
10255 <enum
10256 name="NetworkAttachmentType"
10257 uuid="64e770dc-dd1d-4879-9f12-5bd6bc879b78"
10258 >
10259 <desc>
10260 Network attachment type.
10261 </desc>
10262
10263 <const name="Null" value="0">
10264 <desc>Null value, also means "not attached".</desc>
10265 </const>
10266 <const name="NAT" value="1"/>
10267 <const name="HostInterface" value="2"/>
10268 <const name="Internal" value="3"/>
10269 <const name="HostOnly" value="4"/>
10270 </enum>
10271
10272 <enum
10273 name="NetworkAdapterType"
10274 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10275 >
10276 <desc>
10277 Network adapter type.
10278 </desc>
10279
10280 <const name="Null" value="0">
10281 <desc>Null value (never used by the API).</desc>
10282 </const>
10283 <const name="Am79C970A" value="1"/>
10284 <const name="Am79C973" value="2"/>
10285 <const name="I82540EM" value="3"/>
10286 <const name="I82543GC" value="4"/>
10287 </enum>
10288
10289 <interface
10290 name="INetworkAdapter" extends="$unknown"
10291 uuid="4a1ee64e-6c5f-47dd-acfa-f834d7cb74fb"
10292 wsmap="managed"
10293 >
10294 <attribute name="adapterType" type="NetworkAdapterType">
10295 <desc>
10296 Type of the virtual network adapter. Depending on this value,
10297 VirtualBox will provide a different virtual network hardware
10298 to the guest.
10299 </desc>
10300 </attribute>
10301
10302 <attribute name="slot" type="unsigned long" readonly="yes">
10303 <desc>
10304 Slot number this adapter is plugged into. Corresponds to
10305 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10306 to obtain this instance.
10307 </desc>
10308 </attribute>
10309
10310 <attribute name="enabled" type="boolean">
10311 <desc>
10312 Flag whether the network adapter is present in the
10313 guest system. If disabled, the virtual guest hardware will
10314 not contain this network adapter. Can only be changed when
10315 the VM is not running.
10316 </desc>
10317 </attribute>
10318
10319 <attribute name="MACAddress" type="wstring">
10320 <desc>
10321 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10322 it to NULL, VirtualBox will generate a unique MAC address.
10323 </desc>
10324 </attribute>
10325
10326 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10327
10328 <attribute name="hostInterface" type="wstring">
10329 <desc>
10330 Name of the host network interface the VM is attached to.
10331 </desc>
10332 </attribute>
10333
10334 <attribute name="internalNetwork" type="wstring">
10335 <desc>
10336 Name of the internal network the VM is attached to.
10337 </desc>
10338 </attribute>
10339
10340 <attribute name="NATNetwork" type="wstring">
10341 <desc>
10342 Name of the NAT network the VM is attached to.
10343 </desc>
10344 </attribute>
10345
10346 <attribute name="cableConnected" type="boolean">
10347 <desc>
10348 Flag whether the adapter reports the cable as connected or not.
10349 It can be used to report offline situations to a VM.
10350 </desc>
10351 </attribute>
10352
10353 <attribute name="lineSpeed" type="unsigned long">
10354 <desc>
10355 Line speed reported by custom drivers, in units of 1 kbps.
10356 </desc>
10357 </attribute>
10358
10359 <attribute name="traceEnabled" type="boolean">
10360 <desc>
10361 Flag whether network traffic from/to the network card should be traced.
10362 Can only be toggled when the VM is turned off.
10363 </desc>
10364 </attribute>
10365
10366 <attribute name="traceFile" type="wstring">
10367 <desc>
10368 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10369 will be used.
10370 </desc>
10371 </attribute>
10372
10373 <method name="attachToNAT">
10374 <desc>
10375 Attach the network adapter to the Network Address Translation (NAT) interface.
10376 </desc>
10377 </method>
10378
10379 <method name="attachToHostInterface">
10380 <desc>
10381 Attach the network adapter to a host interface.
10382 </desc>
10383 </method>
10384
10385 <method name="attachToInternalNetwork">
10386 <desc>
10387 Attach the network adapter to an internal network.
10388 </desc>
10389 </method>
10390
10391 <method name="attachToHostOnlyNetwork">
10392 <desc>
10393 Attach the network adapter to the host-only network.
10394 </desc>
10395 </method>
10396
10397 <method name="detach">
10398 <desc>
10399 Detach the network adapter
10400 </desc>
10401 </method>
10402 </interface>
10403
10404
10405 <!--
10406 // ISerialPort
10407 /////////////////////////////////////////////////////////////////////////
10408 -->
10409
10410 <enum
10411 name="PortMode"
10412 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10413 >
10414 <desc>
10415 The PortMode enumeration represents possible communication modes for
10416 the virtual serial port device.
10417 </desc>
10418
10419 <const name="Disconnected" value="0">
10420 <desc>Virtual device is not attached to any real host device.</desc>
10421 </const>
10422 <const name="HostPipe" value="1">
10423 <desc>Virtual device is attached to a host pipe.</desc>
10424 </const>
10425 <const name="HostDevice" value="2">
10426 <desc>Virtual device is attached to a host device.</desc>
10427 </const>
10428 </enum>
10429
10430 <interface
10431 name="ISerialPort" extends="$unknown"
10432 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10433 wsmap="managed"
10434 >
10435
10436 <desc>
10437 The ISerialPort interface represents the virtual serial port device.
10438
10439 The virtual serial port device acts like an ordinary serial port
10440 inside the virtual machine. This device communicates to the real
10441 serial port hardware in one of two modes: host pipe or host device.
10442
10443 In host pipe mode, the #path attribute specifies the path to the pipe on
10444 the host computer that represents a serial port. The #server attribute
10445 determines if this pipe is created by the virtual machine process at
10446 machine startup or it must already exist before starting machine
10447 execution.
10448
10449 In host device mode, the #path attribute specifies the name of the
10450 serial port device on the host computer.
10451
10452 There is also a third communication mode: the disconnected mode. In this
10453 mode, the guest OS running inside the virtual machine will be able to
10454 detect the serial port, but all port write operations will be discarded
10455 and all port read operations will return no data.
10456
10457 <see>IMachine::getSerialPort</see>
10458 </desc>
10459
10460 <attribute name="slot" type="unsigned long" readonly="yes">
10461 <desc>
10462 Slot number this serial port is plugged into. Corresponds to
10463 the value you pass to <link to="IMachine::getSerialPort"/>
10464 to obtain this instance.
10465 </desc>
10466 </attribute>
10467
10468 <attribute name="enabled" type="boolean">
10469 <desc>
10470 Flag whether the serial port is enabled. If disabled,
10471 the serial port will not be reported to the guest OS.
10472 </desc>
10473 </attribute>
10474
10475 <attribute name="IOBase" type="unsigned long">
10476 <desc>Base I/O address of the serial port.</desc>
10477 </attribute>
10478
10479 <attribute name="IRQ" type="unsigned long">
10480 <desc>IRQ number of the serial port.</desc>
10481 </attribute>
10482
10483 <attribute name="hostMode" type="PortMode">
10484 <desc>
10485 How is this port connected to the host.
10486 <note>
10487 Changing this attribute may fail if the conditions for
10488 <link to="#path"/> are not met.
10489 </note>
10490 </desc>
10491 </attribute>
10492
10493 <attribute name="server" type="boolean">
10494 <desc>
10495 Flag whether this serial port acts as a server (creates a new pipe on
10496 the host) or as a client (uses the existing pipe). This attribute is
10497 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10498 </desc>
10499 </attribute>
10500
10501 <attribute name="path" type="wstring">
10502 <desc>
10503 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10504 PortMode_HostPipe, or the host serial device name when
10505 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10506 cases, setting a @c null or an empty string as the attribute's value
10507 will result into an error. Otherwise, the value of this property is
10508 ignored.
10509 </desc>
10510 </attribute>
10511
10512 </interface>
10513
10514 <!--
10515 // IParallelPort
10516 /////////////////////////////////////////////////////////////////////////
10517 -->
10518
10519 <interface
10520 name="IParallelPort" extends="$unknown"
10521 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10522 wsmap="managed"
10523 >
10524
10525 <desc>
10526 The IParallelPort interface represents the virtual parallel port device.
10527
10528 The virtual parallel port device acts like an ordinary parallel port
10529 inside the virtual machine. This device communicates to the real
10530 parallel port hardware using the name of the parallel device on the host
10531 computer specified in the #path attribute.
10532
10533 Each virtual parallel port device is assigned a base I/O address and an
10534 IRQ number that will be reported to the guest operating system and used
10535 to operate the given parallel port from within the virtual machine.
10536
10537 <see>IMachine::getParallelPort</see>
10538 </desc>
10539
10540 <attribute name="slot" type="unsigned long" readonly="yes">
10541 <desc>
10542 Slot number this parallel port is plugged into. Corresponds to
10543 the value you pass to <link to="IMachine::getParallelPort"/>
10544 to obtain this instance.
10545 </desc>
10546 </attribute>
10547
10548 <attribute name="enabled" type="boolean">
10549 <desc>
10550 Flag whether the parallel port is enabled. If disabled,
10551 the parallel port will not be reported to the guest OS.
10552 </desc>
10553 </attribute>
10554
10555 <attribute name="IOBase" type="unsigned long">
10556 <desc>Base I/O address of the parallel port.</desc>
10557 </attribute>
10558
10559 <attribute name="IRQ" type="unsigned long">
10560 <desc>IRQ number of the parallel port.</desc>
10561 </attribute>
10562
10563 <attribute name="path" type="wstring">
10564 <desc>
10565 Host parallel device name. If this parallel port is enabled, setting a
10566 @c null or an empty string as this attribute's value will result into
10567 an error.
10568 </desc>
10569 </attribute>
10570
10571 </interface>
10572
10573
10574 <!--
10575 // IMachineDebugger
10576 /////////////////////////////////////////////////////////////////////////
10577 -->
10578
10579 <interface
10580 name="IMachineDebugger" extends="$unknown"
10581 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10582 wsmap="suppress"
10583 >
10584 <method name="resetStats">
10585 <desc>
10586 Reset VM statistics.
10587 </desc>
10588 <param name="pattern" type="wstring" dir="in">
10589 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10590 </param>
10591 </method>
10592
10593 <method name="dumpStats">
10594 <desc>
10595 Dumps VM statistics.
10596 </desc>
10597 <param name="pattern" type="wstring" dir="in">
10598 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10599 </param>
10600 </method>
10601
10602 <method name="getStats">
10603 <desc>
10604 Get the VM statistics in a XMLish format.
10605 </desc>
10606 <param name="pattern" type="wstring" dir="in">
10607 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10608 </param>
10609 <param name="withDescriptions" type="boolean" dir="in">
10610 <desc>Whether to include the descriptions.</desc>
10611 </param>
10612 <param name="stats" type="wstring" dir="out">
10613 <desc>The XML document containing the statistics.</desc>
10614 </param>
10615 </method>
10616
10617 <method name="injectNMI">
10618 <desc>
10619 Inject an NMI into a running VT-x/AMD-V VM.
10620 </desc>
10621 </method>
10622
10623 <attribute name="singlestep" type="boolean">
10624 <desc>Switch for enabling singlestepping.</desc>
10625 </attribute>
10626
10627 <attribute name="recompileUser" type="boolean">
10628 <desc>Switch for forcing code recompilation for user mode code.</desc>
10629 </attribute>
10630
10631 <attribute name="recompileSupervisor" type="boolean">
10632 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10633 </attribute>
10634
10635 <attribute name="PATMEnabled" type="boolean">
10636 <desc>Switch for enabling and disabling the PATM component.</desc>
10637 </attribute>
10638
10639 <attribute name="CSAMEnabled" type="boolean">
10640 <desc>Switch for enabling and disabling the CSAM component.</desc>
10641 </attribute>
10642
10643 <attribute name="logEnabled" type="boolean">
10644 <desc>Switch for enabling and disabling logging.</desc>
10645 </attribute>
10646
10647 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10648 <desc>
10649 Flag indicating whether the VM is currently making use of CPU hardware
10650 virtualization extensions.
10651 </desc>
10652 </attribute>
10653
10654 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10655 <desc>
10656 Flag indicating whether the VM is currently making use of the nested paging
10657 CPU hardware virtualization extension.
10658 </desc>
10659 </attribute>
10660
10661 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10662 <desc>
10663 Flag indicating whether the VM is currently making use of the VPID
10664 VT-x extension.
10665 </desc>
10666 </attribute>
10667
10668 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10669 <desc>
10670 Flag indicating whether the VM is currently making use of the Physical
10671 Address Extension CPU feature.
10672 </desc>
10673 </attribute>
10674
10675 <attribute name="virtualTimeRate" type="unsigned long">
10676 <desc>
10677 The rate at which the virtual time runs expressed as a percentage.
10678 The accepted range is 2% to 20000%.
10679 </desc>
10680 </attribute>
10681
10682 <!-- @todo method for setting log flags, groups and destination! -->
10683
10684 <attribute name="VM" type="unsigned long long" readonly="yes">
10685 <desc>
10686 Gets the VM handle. This is only for internal use while
10687 we carve the details of this interface.
10688 </desc>
10689 </attribute>
10690
10691 </interface>
10692
10693 <!--
10694 // IUSBController
10695 /////////////////////////////////////////////////////////////////////////
10696 -->
10697
10698 <interface
10699 name="IUSBController" extends="$unknown"
10700 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10701 wsmap="managed"
10702 >
10703 <attribute name="enabled" type="boolean">
10704 <desc>
10705 Flag whether the USB controller is present in the
10706 guest system. If disabled, the virtual guest hardware will
10707 not contain any USB controller. Can only be changed when
10708 the VM is powered off.
10709 </desc>
10710 </attribute>
10711
10712 <attribute name="enabledEhci" type="boolean">
10713 <desc>
10714 Flag whether the USB EHCI controller is present in the
10715 guest system. If disabled, the virtual guest hardware will
10716 not contain a USB EHCI controller. Can only be changed when
10717 the VM is powered off.
10718 </desc>
10719 </attribute>
10720
10721 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10722 <desc>
10723 USB standard version which the controller implements.
10724 This is a BCD which means that the major version is in the
10725 high byte and minor version is in the low byte.
10726 </desc>
10727 </attribute>
10728
10729 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10730 <desc>
10731 List of USB device filters associated with the machine.
10732
10733 If the machine is currently running, these filters are activated
10734 every time a new (supported) USB device is attached to the host
10735 computer that was not ignored by global filters
10736 (<link to="IHost::USBDeviceFilters"/>).
10737
10738 These filters are also activated when the machine is powered up.
10739 They are run against a list of all currently available USB
10740 devices (in states
10741 <link to="USBDeviceState_Available"/>,
10742 <link to="USBDeviceState_Busy"/>,
10743 <link to="USBDeviceState_Held"/>) that were not previously
10744 ignored by global filters.
10745
10746 If at least one filter matches the USB device in question, this
10747 device is automatically captured (attached to) the virtual USB
10748 controller of this machine.
10749
10750 <see>IUSBDeviceFilter, ::IUSBController</see>
10751 </desc>
10752 </attribute>
10753
10754 <method name="createDeviceFilter">
10755 <desc>
10756 Creates a new USB device filter. All attributes except
10757 the filter name are set to <tt>null</tt> (any match),
10758 <i>active</i> is <tt>false</tt> (the filter is not active).
10759
10760 The created filter can then be added to the list of filters using
10761 <link to="#insertDeviceFilter()"/>.
10762
10763 <result name="VBOX_E_INVALID_VM_STATE">
10764 The virtual machine is not mutable.
10765 </result>
10766
10767 <see>#deviceFilters</see>
10768 </desc>
10769 <param name="name" type="wstring" dir="in">
10770 <desc>
10771 Filter name. See <link to="IUSBDeviceFilter::name"/>
10772 for more info.
10773 </desc>
10774 </param>
10775 <param name="filter" type="IUSBDeviceFilter" dir="return">
10776 <desc>Created filter object.</desc>
10777 </param>
10778 </method>
10779
10780 <method name="insertDeviceFilter">
10781 <desc>
10782 Inserts the given USB device to the specified position
10783 in the list of filters.
10784
10785 Positions are numbered starting from <tt>0</tt>. If the specified
10786 position is equal to or greater than the number of elements in
10787 the list, the filter is added to the end of the collection.
10788
10789 <note>
10790 Duplicates are not allowed, so an attempt to insert a
10791 filter that is already in the collection, will return an
10792 error.
10793 </note>
10794
10795 <result name="VBOX_E_INVALID_VM_STATE">
10796 Virtual machine is not mutable.
10797 </result>
10798 <result name="E_INVALIDARG">
10799 USB device filter not created within this VirtualBox instance.
10800 </result>
10801 <result name="VBOX_E_INVALID_OBJECT_STATE">
10802 USB device filter already in list.
10803 </result>
10804
10805 <see>#deviceFilters</see>
10806 </desc>
10807 <param name="position" type="unsigned long" dir="in">
10808 <desc>Position to insert the filter to.</desc>
10809 </param>
10810 <param name="filter" type="IUSBDeviceFilter" dir="in">
10811 <desc>USB device filter to insert.</desc>
10812 </param>
10813 </method>
10814
10815 <method name="removeDeviceFilter">
10816 <desc>
10817 Removes a USB device filter from the specified position in the
10818 list of filters.
10819
10820 Positions are numbered starting from <tt>0</tt>. Specifying a
10821 position equal to or greater than the number of elements in
10822 the list will produce an error.
10823
10824 <see>#deviceFilters</see>
10825
10826 <result name="VBOX_E_INVALID_VM_STATE">
10827 Virtual machine is not mutable.
10828 </result>
10829 <result name="E_INVALIDARG">
10830 USB device filter list empty or invalid @a position.
10831 </result>
10832
10833 </desc>
10834 <param name="position" type="unsigned long" dir="in">
10835 <desc>Position to remove the filter from.</desc>
10836 </param>
10837 <param name="filter" type="IUSBDeviceFilter" dir="return">
10838 <desc>Removed USB device filter.</desc>
10839 </param>
10840 </method>
10841
10842 </interface>
10843
10844
10845 <!--
10846 // IUSBDevice
10847 /////////////////////////////////////////////////////////////////////////
10848 -->
10849
10850 <enumerator
10851 name="IUSBDeviceEnumerator" type="IUSBDevice"
10852 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10853 />
10854
10855 <collection
10856 name="IUSBDeviceCollection" type="IUSBDevice"
10857 enumerator="IUSBDeviceEnumerator"
10858 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10859 readonly="yes"
10860 >
10861 <method name="findById">
10862 <desc>
10863 Searches this collection for a USB device with the given UUID.
10864 <note>
10865 The method returns an error if the given UUID does not
10866 correspond to any USB device in the collection.
10867 </note>
10868 <see>IUSBDevice::id</see>
10869 </desc>
10870 <param name="id" type="uuid" dir="in">
10871 <desc>UUID of the USB device to search for.</desc>
10872 </param>
10873 <param name="device" type="IUSBDevice" dir="return">
10874 <desc>Found USB device object.</desc>
10875 </param>
10876 </method>
10877
10878 <method name="findByAddress">
10879 <desc>
10880 Searches this collection for a USB device with the given
10881 host address.
10882 <note>
10883 The method returns an error if the given address does not
10884 correspond to any USB device in the collection.
10885 </note>
10886 <see>IUSBDevice::address</see>
10887 </desc>
10888 <param name="name" type="wstring" dir="in">
10889 <desc>
10890 Address of the USB device (as assigned by the host) to
10891 search for.
10892 </desc>
10893 </param>
10894 <param name="device" type="IUSBDevice" dir="return">
10895 <desc>Found USB device object.</desc>
10896 </param>
10897 </method>
10898
10899 </collection>
10900
10901 <interface
10902 name="IUSBDevice" extends="$unknown"
10903 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10904 wsmap="managed"
10905 >
10906 <desc>
10907 The IUSBDevice interface represents a virtual USB device attached to the
10908 virtual machine.
10909
10910 A collection of objects implementing this interface is stored in the
10911 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10912 attached to a running virtual machine's USB controller.
10913 </desc>
10914
10915 <attribute name="id" type="uuid" readonly="yes">
10916 <desc>
10917 Unique USB device ID. This ID is built from #vendorId,
10918 #productId, #revision and #serialNumber.
10919 </desc>
10920 </attribute>
10921
10922 <attribute name="vendorId" type="unsigned short" readonly="yes">
10923 <desc>Vendor ID.</desc>
10924 </attribute>
10925
10926 <attribute name="productId" type="unsigned short" readonly="yes">
10927 <desc>Product ID.</desc>
10928 </attribute>
10929
10930 <attribute name="revision" type="unsigned short" readonly="yes">
10931 <desc>
10932 Product revision number. This is a packed BCD represented as
10933 unsigned short. The high byte is the integer part and the low
10934 byte is the decimal.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="manufacturer" type="wstring" readonly="yes">
10939 <desc>Manufacturer string.</desc>
10940 </attribute>
10941
10942 <attribute name="product" type="wstring" readonly="yes">
10943 <desc>Product string.</desc>
10944 </attribute>
10945
10946 <attribute name="serialNumber" type="wstring" readonly="yes">
10947 <desc>Serial number string.</desc>
10948 </attribute>
10949
10950 <attribute name="address" type="wstring" readonly="yes">
10951 <desc>Host specific address of the device.</desc>
10952 </attribute>
10953
10954 <attribute name="port" type="unsigned short" readonly="yes">
10955 <desc>
10956 Host USB port number the device is physically
10957 connected to.
10958 </desc>
10959 </attribute>
10960
10961 <attribute name="version" type="unsigned short" readonly="yes">
10962 <desc>
10963 The major USB version of the device - 1 or 2.
10964 </desc>
10965 </attribute>
10966
10967 <attribute name="portVersion" type="unsigned short" readonly="yes">
10968 <desc>
10969 The major USB version of the host USB port the device is
10970 physically connected to - 1 or 2. For devices not connected to
10971 anything this will have the same value as the version attribute.
10972 </desc>
10973 </attribute>
10974
10975 <attribute name="remote" type="boolean" readonly="yes">
10976 <desc>
10977 Whether the device is physically connected to a remote VRDP
10978 client or to a local host machine.
10979 </desc>
10980 </attribute>
10981
10982 </interface>
10983
10984
10985 <!--
10986 // IUSBDeviceFilter
10987 /////////////////////////////////////////////////////////////////////////
10988 -->
10989
10990 <enumerator
10991 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10992 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10993 />
10994
10995 <collection
10996 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10997 enumerator="IUSBDeviceFilterEnumerator"
10998 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10999 readonly="yes"
11000 />
11001
11002 <interface
11003 name="IUSBDeviceFilter" extends="$unknown"
11004 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11005 wsmap="managed"
11006 >
11007 <desc>
11008 The IUSBDeviceFilter interface represents an USB device filter used
11009 to perform actions on a group of USB devices.
11010
11011 This type of filters is used by running virtual machines to
11012 automatically capture selected USB devices once they are physically
11013 attached to the host computer.
11014
11015 A USB device is matched to the given device filter if and only if all
11016 attributes of the device match the corresponding attributes of the
11017 filter (that is, attributes are joined together using the logical AND
11018 operation). On the other hand, all together, filters in the list of
11019 filters carry the semantics of the logical OR operation. So if it is
11020 desirable to create a match like "this vendor id OR this product id",
11021 one needs to create two filters and specify "any match" (see below)
11022 for unused attributes.
11023
11024 All filter attributes used for matching are strings. Each string
11025 is an expression representing a set of values of the corresponding
11026 device attribute, that will match the given filter. Currently, the
11027 following filtering expressions are supported:
11028
11029 <ul>
11030 <li><i>Interval filters</i>. Used to specify valid intervals for
11031 integer device attributes (Vendor ID, Product ID and Revision).
11032 The format of the string is:
11033
11034 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11035
11036 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11037 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11038 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11039 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11040 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11041 possible integer is assumed.
11042 </li>
11043 <li><i>Boolean filters</i>. Used to specify acceptable values for
11044 boolean device attributes. The format of the string is:
11045
11046 <tt>true|false|yes|no|0|1</tt>
11047
11048 </li>
11049 <li><i>Exact match</i>. Used to specify a single value for the given
11050 device attribute. Any string that doesn't start with <tt>int:</tt>
11051 represents the exact match. String device attributes are compared to
11052 this string including case of symbols. Integer attributes are first
11053 converted to a string (see individual filter attributes) and then
11054 compared ignoring case.
11055
11056 </li>
11057 <li><i>Any match</i>. Any value of the corresponding device attribute
11058 will match the given filter. An empty or <tt>null</tt> string is
11059 used to construct this type of filtering expressions.
11060
11061 </li>
11062 </ul>
11063
11064 <note>
11065 On the Windows host platform, interval filters are not currently
11066 available. Also all string filter attributes
11067 (<link to="#manufacturer"/>, <link to="#product"/>,
11068 <link to="#serialNumber"/>) are ignored, so they behave as
11069 <i>any match</i> no matter what string expression is specified.
11070 </note>
11071
11072 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11073 </desc>
11074
11075 <attribute name="name" type="wstring">
11076 <desc>
11077 Visible name for this filter.
11078 This name is used to visually distinguish one filter from another,
11079 so it can neither be <tt>null</tt> nor an empty string.
11080 </desc>
11081 </attribute>
11082
11083 <attribute name="active" type="boolean">
11084 <desc>Whether this filter active or has been temporarily disabled.</desc>
11085 </attribute>
11086
11087 <attribute name="vendorId" type="wstring">
11088 <desc>
11089 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11090 The string representation for the <i>exact matching</i>
11091 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11092 (including leading zeroes).
11093 </desc>
11094 </attribute>
11095
11096 <attribute name="productId" type="wstring">
11097 <desc>
11098 <link to="IUSBDevice::productId">Product ID</link> filter.
11099 The string representation for the <i>exact matching</i>
11100 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11101 (including leading zeroes).
11102 </desc>
11103 </attribute>
11104
11105 <attribute name="revision" type="wstring">
11106 <desc>
11107 <link to="IUSBDevice::productId">Product revision number</link>
11108 filter. The string representation for the <i>exact matching</i>
11109 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11110 of the integer part of the revision, and <tt>F</tt> is the
11111 decimal digit of its fractional part (including leading and
11112 trailing zeros).
11113 Note that for interval filters, it's best to use the hexadecimal
11114 form, because the revision is stored as a 16 bit packed BCD value;
11115 so the expression <tt>int:0x0100-0x0199</tt> will match any
11116 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11117 </desc>
11118 </attribute>
11119
11120 <attribute name="manufacturer" type="wstring">
11121 <desc>
11122 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11123 </desc>
11124 </attribute>
11125
11126 <attribute name="product" type="wstring">
11127 <desc>
11128 <link to="IUSBDevice::product">Product</link> filter.
11129 </desc>
11130 </attribute>
11131
11132 <attribute name="serialNumber" type="wstring">
11133 <desc>
11134 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11135 </desc>
11136 </attribute>
11137
11138 <attribute name="port" type="wstring">
11139 <desc>
11140 <link to="IUSBDevice::port">Host USB port</link> filter.
11141 </desc>
11142 </attribute>
11143
11144 <attribute name="remote" type="wstring">
11145 <desc>
11146 <link to="IUSBDevice::remote">Remote state</link> filter.
11147 <note>
11148 This filter makes sense only for machine USB filters,
11149 i.e. it is ignored by IHostUSBDeviceFilter objects.
11150 </note>
11151 </desc>
11152 </attribute>
11153
11154 <attribute name="maskedInterfaces" type="unsigned long">
11155 <desc>
11156 This is an advanced option for hiding one or more USB interfaces
11157 from the guest. The value is a bit mask where the bits that are set
11158 means the corresponding USB interface should be hidden, masked off
11159 if you like.
11160 This feature only works on Linux hosts.
11161 </desc>
11162 </attribute>
11163
11164 </interface>
11165
11166
11167 <!--
11168 // IHostUSBDevice
11169 /////////////////////////////////////////////////////////////////////////
11170 -->
11171
11172 <enum
11173 name="USBDeviceState"
11174 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11175 >
11176 <desc>
11177 USB device state. This enumeration represents all possible states
11178 of the USB device physically attached to the host computer regarding
11179 its state on the host computer and availability to guest computers
11180 (all currently running virtual machines).
11181
11182 Once a supported USB device is attached to the host, global USB
11183 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11184 either ignore the device, or put it to USBDeviceState_Held state, or do
11185 nothing. Unless the device is ignored by global filters, filters of all
11186 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11187 activated that can put it to USBDeviceState_Captured state.
11188
11189 If the device was ignored by global filters, or didn't match
11190 any filters at all (including guest ones), it is handled by the host
11191 in a normal way. In this case, the device state is determined by
11192 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11193 or USBDeviceState_Available, depending on the current device usage.
11194
11195 Besides auto-capturing based on filters, the device can be manually
11196 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11197 state is USBDeviceState_Busy, USBDeviceState_Available or
11198 USBDeviceState_Held.
11199
11200 <note>
11201 Due to differences in USB stack implementations in Linux and Win32,
11202 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11203 only to the Linux version of the product. This also means that (<link
11204 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11205 device state is USBDeviceState_Held.
11206 </note>
11207
11208 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11209 </desc>
11210
11211 <const name="NotSupported" value="0">
11212 <desc>
11213 Not supported by the VirtualBox server, not available to guests.
11214 </desc>
11215 </const>
11216 <const name="Unavailable" value="1">
11217 <desc>
11218 Being used by the host computer exclusively,
11219 not available to guests.
11220 </desc>
11221 </const>
11222 <const name="Busy" value="2">
11223 <desc>
11224 Being used by the host computer, potentially available to guests.
11225 </desc>
11226 </const>
11227 <const name="Available" value="3">
11228 <desc>
11229 Not used by the host computer, available to guests (the host computer
11230 can also start using the device at any time).
11231 </desc>
11232 </const>
11233 <const name="Held" value="4">
11234 <desc>
11235 Held by the VirtualBox server (ignored by the host computer),
11236 available to guests.
11237 </desc>
11238 </const>
11239 <const name="Captured" value="5">
11240 <desc>
11241 Captured by one of the guest computers, not available
11242 to anybody else.
11243 </desc>
11244 </const>
11245 </enum>
11246
11247 <enumerator
11248 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11249 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11250 />
11251
11252 <collection
11253 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11254 enumerator="IHostUSBDeviceEnumerator"
11255 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11256 readonly="yes"
11257 >
11258 <method name="findById">
11259 <desc>
11260 Searches this collection for a USB device with the given UUID.
11261 <note>
11262 The method returns an error if the given UUID does not
11263 correspond to any USB device in the collection.
11264 </note>
11265 <see>IHostUSBDevice::id</see>
11266 </desc>
11267 <param name="id" type="uuid" dir="in">
11268 <desc>UUID of the USB device to search for.</desc>
11269 </param>
11270 <param name="device" type="IHostUSBDevice" dir="return">
11271 <desc>Found USB device object.</desc>
11272 </param>
11273 </method>
11274
11275 <method name="findByAddress">
11276 <desc>
11277 Searches this collection for a USB device with the given
11278 host address.
11279 <note>
11280 The method returns an error if the given address does not
11281 correspond to any USB device in the collection.
11282 </note>
11283 <see>IHostUSBDevice::address</see>
11284 </desc>
11285 <param name="name" type="wstring" dir="in">
11286 <desc>
11287 Address of the USB device (as assigned by the host) to
11288 search for.
11289 </desc>
11290 </param>
11291 <param name="device" type="IHostUSBDevice" dir="return">
11292 <desc>Found USB device object.</desc>
11293 </param>
11294 </method>
11295
11296 </collection>
11297
11298 <interface
11299 name="IHostUSBDevice" extends="IUSBDevice"
11300 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11301 wsmap="managed"
11302 >
11303 <desc>
11304 The IHostUSBDevice interface represents a physical USB device attached
11305 to the host computer.
11306
11307 Besides properties inherited from IUSBDevice, this interface adds the
11308 <link to="#state"/> property that holds the current state of the USB
11309 device.
11310
11311 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11312 </desc>
11313
11314 <attribute name="state" type="USBDeviceState" readonly="yes">
11315 <desc>
11316 Current state of the device.
11317 </desc>
11318 </attribute>
11319
11320 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11321
11322 </interface>
11323
11324
11325 <!--
11326 // IHostUSBDeviceFilter
11327 /////////////////////////////////////////////////////////////////////////
11328 -->
11329
11330 <enum
11331 name="USBDeviceFilterAction"
11332 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11333 >
11334 <desc>
11335 Actions for host USB device filters.
11336 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11337 </desc>
11338
11339 <const name="Null" value="0">
11340 <desc>Null value (never used by the API).</desc>
11341 </const>
11342 <const name="Ignore" value="1">
11343 <desc>Ignore the matched USB device.</desc>
11344 </const>
11345 <const name="Hold" value="2">
11346 <desc>Hold the matched USB device.</desc>
11347 </const>
11348 </enum>
11349
11350 <enumerator
11351 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11352 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11353 />
11354
11355 <collection
11356 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11357 enumerator="IHostUSBDeviceFilterEnumerator"
11358 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11359 readonly="yes"
11360 />
11361
11362 <interface
11363 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11364 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11365 wsmap="managed"
11366 >
11367 <desc>
11368 The IHostUSBDeviceFilter interface represents a global filter for a
11369 physical USB device used by the host computer. Used indirectly in
11370 <link to="IHost::USBDeviceFilters"/>.
11371
11372 Using filters of this type, the host computer determines the initial
11373 state of the USB device after it is physically attached to the
11374 host's USB controller.
11375
11376 <note>
11377 The <link to="#remote"/> attribute is ignored by this type of
11378 filters, because it makes sense only for
11379 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11380 </note>
11381
11382 <see>IHost::USBDeviceFilters</see>
11383 </desc>
11384
11385 <attribute name="action" type="USBDeviceFilterAction">
11386 <desc>
11387 Action performed by the host when an attached USB device
11388 matches this filter.
11389 </desc>
11390 </attribute>
11391
11392 </interface>
11393
11394 <!--
11395 // IAudioAdapter
11396 /////////////////////////////////////////////////////////////////////////
11397 -->
11398
11399 <enum
11400 name="AudioDriverType"
11401 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11402 >
11403 <desc>
11404 Host audio driver type.
11405 </desc>
11406
11407 <const name="Null" value="0">
11408 <desc>Null value, also means "dummy audio driver".</desc>
11409 </const>
11410 <const name="WinMM" value="1"/>
11411 <const name="OSS" value="2"/>
11412 <const name="ALSA" value="3"/>
11413 <const name="DirectSound" value="4"/>
11414 <const name="CoreAudio" value="5"/>
11415 <const name="MMPM" value="6"/>
11416 <const name="Pulse" value="7"/>
11417 <const name="SolAudio" value="8"/>
11418 </enum>
11419
11420 <enum
11421 name="AudioControllerType"
11422 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11423 >
11424 <desc>
11425 Virtual audio controller type.
11426 </desc>
11427
11428 <const name="AC97" value="0"/>
11429 <const name="SB16" value="1"/>
11430 </enum>
11431
11432 <interface
11433 name="IAudioAdapter" extends="$unknown"
11434 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11435 wsmap="managed"
11436 >
11437 <desc>
11438 The IAudioAdapter interface represents the virtual audio adapter of
11439 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11440 </desc>
11441 <attribute name="enabled" type="boolean">
11442 <desc>
11443 Flag whether the audio adapter is present in the
11444 guest system. If disabled, the virtual guest hardware will
11445 not contain any audio adapter. Can only be changed when
11446 the VM is not running.
11447 </desc>
11448 </attribute>
11449 <attribute name="audioController" type="AudioControllerType">
11450 <desc>
11451 The audio hardware we emulate.
11452 </desc>
11453 </attribute>
11454 <attribute name="audioDriver" type="AudioDriverType">
11455 <desc>
11456 Audio driver the adapter is connected to. This setting
11457 can only be changed when the VM is not running.
11458 </desc>
11459 </attribute>
11460 </interface>
11461
11462 <!--
11463 // IVRDPServer
11464 /////////////////////////////////////////////////////////////////////////
11465 -->
11466
11467 <enum
11468 name="VRDPAuthType"
11469 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11470 >
11471 <desc>
11472 VRDP authentication type.
11473 </desc>
11474
11475 <const name="Null" value="0">
11476 <desc>Null value, also means "no authentication".</desc>
11477 </const>
11478 <const name="External" value="1"/>
11479 <const name="Guest" value="2"/>
11480 </enum>
11481
11482 <interface
11483 name="IVRDPServer" extends="$unknown"
11484 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11485 wsmap="managed"
11486 >
11487 <attribute name="enabled" type="boolean">
11488 <desc>VRDP server status.</desc>
11489 </attribute>
11490
11491 <attribute name="port" type="unsigned long">
11492 <desc>
11493 VRDP server port number.
11494 <note>
11495 Setting the value of this property to <tt>0</tt> will reset the port
11496 number to the default value which is
11497 currently <tt>3389</tt>. Reading this property will always return a
11498 real port number, even after it has been set to <tt>0</tt> (in which
11499 case the default port is returned).
11500 </note>
11501 </desc>
11502 </attribute>
11503
11504 <attribute name="netAddress" type="wstring">
11505 <desc>VRDP server address.</desc>
11506 </attribute>
11507
11508 <attribute name="authType" type="VRDPAuthType">
11509 <desc>VRDP authentication method.</desc>
11510 </attribute>
11511
11512 <attribute name="authTimeout" type="unsigned long">
11513 <desc>Timeout for guest authentication. Milliseconds.</desc>
11514 </attribute>
11515
11516 <attribute name="allowMultiConnection" type="boolean">
11517 <desc>
11518 Flag whether multiple simultaneous connections to the VM are permitted.
11519 Note that this will be replaced by a more powerful mechanism in the future.
11520 </desc>
11521 </attribute>
11522
11523 <attribute name="reuseSingleConnection" type="boolean">
11524 <desc>
11525 Flag whether the existing connection must be dropped and a new connection
11526 must be established by the VRDP server, when a new client connects in single
11527 connection mode.
11528 </desc>
11529 </attribute>
11530
11531 </interface>
11532
11533
11534 <!--
11535 // ISharedFolder
11536 /////////////////////////////////////////////////////////////////////////
11537 -->
11538
11539 <enumerator
11540 name="ISharedFolderEnumerator" type="ISharedFolder"
11541 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11542 />
11543
11544 <collection
11545 name="ISharedFolderCollection" type="ISharedFolder"
11546 enumerator="ISharedFolderEnumerator"
11547 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11548 readonly="yes">
11549
11550 <method name="findByName">
11551 <desc>
11552 Searches this collection for a shared folder with the given logical
11553 name.
11554 <note>
11555 The method returns an error if the given name does not correspond to
11556 any shared folder in the collection.
11557 </note>
11558 </desc>
11559 <param name="name" type="wstring" dir="in">
11560 <desc>Logical name of the shared folder to search for</desc>
11561 </param>
11562 <param name="sharedFolder" type="ISharedFolder" dir="return">
11563 <desc>Found shared folder object</desc>
11564 </param>
11565 </method>
11566
11567 </collection>
11568
11569 <interface
11570 name="ISharedFolder" extends="$unknown"
11571 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11572 wsmap="struct"
11573 >
11574 <desc>
11575 The ISharedFolder interface represents a folder in the host computer's
11576 file system accessible from the guest OS running inside a virtual
11577 machine using an associated logical name.
11578
11579 There are three types of shared folders:
11580 <ul>
11581 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11582 folders available to all virtual machines.</li>
11583 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11584 VM-specific shared folders available to the given virtual machine at
11585 startup.</li>
11586 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11587 VM-specific shared folders created in the session context (for
11588 example, when the virtual machine is running) and automatically
11589 discarded when the session is closed (the VM is powered off).</li>
11590 </ul>
11591
11592 Logical names of shared folders must be unique within the given scope
11593 (global, permanent or transient). However, they do not need to be unique
11594 across scopes. In this case, the definition of the shared folder in a
11595 more specific scope takes precedence over definitions in all other
11596 scopes. The order of precedence is (more specific to more general):
11597 <ol>
11598 <li>Transient definitions</li>
11599 <li>Permanent definitions</li>
11600 <li>Global definitions</li>
11601 </ol>
11602
11603 For example, if MyMachine has a shared folder named
11604 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11605 transient shared folder named <tt>C_DRIVE</tt> (that points
11606 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11607 of <tt>C_DRIVE</tt> in the guest OS so
11608 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11609 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11610 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11611 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11612 to <tt>C:\\</tt> if it still exists.
11613
11614 Note that permanent and transient shared folders of different machines
11615 are in different name spaces, so they don't overlap and don't need to
11616 have unique logical names.
11617
11618 <note>
11619 Global shared folders are not implemented in the current version of the
11620 product.
11621 </note>
11622 </desc>
11623
11624 <attribute name="name" type="wstring" readonly="yes">
11625 <desc>Logical name of the shared folder.</desc>
11626 </attribute>
11627
11628 <attribute name="hostPath" type="wstring" readonly="yes">
11629 <desc>Full path to the shared folder in the host file system.</desc>
11630 </attribute>
11631
11632 <attribute name="accessible" type="boolean" readonly="yes">
11633 <desc>
11634 Whether the folder defined by the host path is currently
11635 accessible or not.
11636 For example, the folder can be unaccessible if it is placed
11637 on the network share that is not available by the time
11638 this property is read.
11639 </desc>
11640 </attribute>
11641
11642 <attribute name="writable" type="boolean" readonly="yes">
11643 <desc>
11644 Whether the folder defined by the host path is writable or
11645 not.
11646 </desc>
11647 </attribute>
11648
11649 <attribute name="lastAccessError" type="wstring" readonly="yes">
11650 <desc>
11651 Text message that represents the result of the last accessibility
11652 check.
11653
11654 Accessibility checks are performed each time the <link to="#accessible"/>
11655 attribute is read. A @c null string is returned if the last
11656 accessibility check was successful. A non-null string indicates a
11657 failure and should normally describe a reason of the failure (for
11658 example, a file read error).
11659 </desc>
11660 </attribute>
11661
11662 </interface>
11663
11664 <!--
11665 // ISession
11666 /////////////////////////////////////////////////////////////////////////
11667 -->
11668
11669 <interface
11670 name="IInternalSessionControl" extends="$unknown"
11671 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11672 internal="yes"
11673 wsmap="suppress"
11674 >
11675 <method name="getPID">
11676 <desc>PID of the process that has created this Session object.
11677 </desc>
11678 <param name="pid" type="unsigned long" dir="return"/>
11679 </method>
11680
11681 <method name="getRemoteConsole">
11682 <desc>
11683 Returns the console object suitable for remote control.
11684
11685 <result name="VBOX_E_INVALID_VM_STATE">
11686 Session state prevents operation.
11687 </result>
11688 <result name="VBOX_E_INVALID_OBJECT_STATE">
11689 Session type prevents operation.
11690 </result>
11691
11692 </desc>
11693 <param name="console" type="IConsole" dir="return"/>
11694 </method>
11695
11696 <method name="assignMachine">
11697 <desc>
11698 Assigns the machine object associated with this direct-type
11699 session or informs the session that it will be a remote one
11700 (if @a machine == NULL).
11701
11702 <result name="VBOX_E_INVALID_VM_STATE">
11703 Session state prevents operation.
11704 </result>
11705 <result name="VBOX_E_INVALID_OBJECT_STATE">
11706 Session type prevents operation.
11707 </result>
11708
11709 </desc>
11710 <param name="machine" type="IMachine" dir="in"/>
11711 </method>
11712
11713 <method name="assignRemoteMachine">
11714 <desc>
11715 Assigns the machine and the (remote) console object associated with
11716 this remote-type session.
11717
11718 <result name="VBOX_E_INVALID_VM_STATE">
11719 Session state prevents operation.
11720 </result>
11721
11722 </desc>
11723 <param name="machine" type="IMachine" dir="in"/>
11724 <param name="console" type="IConsole" dir="in"/>
11725 </method>
11726
11727 <method name="updateMachineState">
11728 <desc>
11729 Updates the machine state in the VM process.
11730 Must be called only in certain cases
11731 (see the method implementation).
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 <param name="aMachineState" type="MachineState" dir="in"/>
11742 </method>
11743
11744 <method name="uninitialize">
11745 <desc>
11746 Uninitializes (closes) this session. Used by VirtualBox to close
11747 the corresponding remote session when the direct session dies
11748 or gets closed.
11749
11750 <result name="VBOX_E_INVALID_VM_STATE">
11751 Session state prevents operation.
11752 </result>
11753
11754 </desc>
11755 </method>
11756
11757 <method name="onDVDDriveChange">
11758 <desc>
11759 Triggered when settings of the DVD drive object of the
11760 associated virtual machine have changed.
11761
11762 <result name="VBOX_E_INVALID_VM_STATE">
11763 Session state prevents operation.
11764 </result>
11765 <result name="VBOX_E_INVALID_OBJECT_STATE">
11766 Session type prevents operation.
11767 </result>
11768
11769 </desc>
11770 </method>
11771
11772 <method name="onFloppyDriveChange">
11773 <desc>
11774 Triggered when settings of the floppy drive object of the
11775 associated virtual machine have changed.
11776
11777 <result name="VBOX_E_INVALID_VM_STATE">
11778 Session state prevents operation.
11779 </result>
11780 <result name="VBOX_E_INVALID_OBJECT_STATE">
11781 Session type prevents operation.
11782 </result>
11783
11784 </desc>
11785 </method>
11786
11787 <method name="onNetworkAdapterChange">
11788 <desc>
11789 Triggered when settings of a network adapter of the
11790 associated virtual machine have changed.
11791
11792 <result name="VBOX_E_INVALID_VM_STATE">
11793 Session state prevents operation.
11794 </result>
11795 <result name="VBOX_E_INVALID_OBJECT_STATE">
11796 Session type prevents operation.
11797 </result>
11798
11799 </desc>
11800 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11801 </method>
11802
11803 <method name="onSerialPortChange">
11804 <desc>
11805 Triggered when settings of a serial port of the
11806 associated virtual machine have changed.
11807
11808 <result name="VBOX_E_INVALID_VM_STATE">
11809 Session state prevents operation.
11810 </result>
11811 <result name="VBOX_E_INVALID_OBJECT_STATE">
11812 Session type prevents operation.
11813 </result>
11814
11815 </desc>
11816 <param name="serialPort" type="ISerialPort" dir="in"/>
11817 </method>
11818
11819 <method name="onParallelPortChange">
11820 <desc>
11821 Triggered when settings of a parallel port of the
11822 associated virtual machine have changed.
11823
11824 <result name="VBOX_E_INVALID_VM_STATE">
11825 Session state prevents operation.
11826 </result>
11827 <result name="VBOX_E_INVALID_OBJECT_STATE">
11828 Session type prevents operation.
11829 </result>
11830
11831 </desc>
11832 <param name="parallelPort" type="IParallelPort" dir="in"/>
11833 </method>
11834
11835 <method name="onVRDPServerChange">
11836 <desc>
11837 Triggered when settings of the VRDP server object of the
11838 associated virtual machine have changed.
11839
11840 <result name="VBOX_E_INVALID_VM_STATE">
11841 Session state prevents operation.
11842 </result>
11843 <result name="VBOX_E_INVALID_OBJECT_STATE">
11844 Session type prevents operation.
11845 </result>
11846
11847 </desc>
11848 </method>
11849
11850 <method name="onUSBControllerChange">
11851 <desc>
11852 Triggered when settings of the USB controller object of the
11853 associated virtual machine have changed.
11854
11855 <result name="VBOX_E_INVALID_VM_STATE">
11856 Session state prevents operation.
11857 </result>
11858 <result name="VBOX_E_INVALID_OBJECT_STATE">
11859 Session type prevents operation.
11860 </result>
11861
11862 </desc>
11863 </method>
11864
11865 <method name="onSharedFolderChange">
11866 <desc>
11867 Triggered when a permanent (global or machine) shared folder has been
11868 created or removed.
11869 <note>
11870 We don't pass shared folder parameters in this notification because
11871 the order in which parallel notifications are delivered is not defined,
11872 therefore it could happen that these parameters were outdated by the
11873 time of processing this notification.
11874 </note>
11875
11876 <result name="VBOX_E_INVALID_VM_STATE">
11877 Session state prevents operation.
11878 </result>
11879 <result name="VBOX_E_INVALID_OBJECT_STATE">
11880 Session type prevents operation.
11881 </result>
11882
11883 </desc>
11884 <param name="global" type="boolean" dir="in"/>
11885 </method>
11886
11887 <method name="onUSBDeviceAttach">
11888 <desc>
11889 Triggered when a request to capture a USB device (as a result
11890 of matched USB filters or direct call to
11891 <link to="IConsole::attachUSBDevice"/>) has completed.
11892 A @c null @a error object means success, otherwise it
11893 describes a failure.
11894
11895 <result name="VBOX_E_INVALID_VM_STATE">
11896 Session state prevents operation.
11897 </result>
11898 <result name="VBOX_E_INVALID_OBJECT_STATE">
11899 Session type prevents operation.
11900 </result>
11901
11902 </desc>
11903 <param name="device" type="IUSBDevice" dir="in"/>
11904 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11905 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11906 </method>
11907
11908 <method name="onUSBDeviceDetach">
11909 <desc>
11910 Triggered when a request to release the USB device (as a result
11911 of machine termination or direct call to
11912 <link to="IConsole::detachUSBDevice"/>) has completed.
11913 A @c null @a error object means success, otherwise it
11914
11915 <result name="VBOX_E_INVALID_VM_STATE">
11916 Session state prevents operation.
11917 </result>
11918 <result name="VBOX_E_INVALID_OBJECT_STATE">
11919 Session type prevents operation.
11920 </result>
11921
11922 </desc>
11923 <param name="id" type="uuid" dir="in"/>
11924 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11925 </method>
11926
11927 <method name="onShowWindow">
11928 <desc>
11929 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11930 <link to="IMachine::showConsoleWindow()"/> in order to notify
11931 console callbacks
11932 <link to="IConsoleCallback::onCanShowWindow()"/>
11933 and <link to="IConsoleCallback::onShowWindow()"/>.
11934
11935 <result name="VBOX_E_INVALID_OBJECT_STATE">
11936 Session type prevents operation.
11937 </result>
11938
11939 </desc>
11940 <param name="check" type="boolean" dir="in"/>
11941 <param name="canShow" type="boolean" dir="out"/>
11942 <param name="winId" type="unsigned long long" dir="out"/>
11943 </method>
11944
11945 <method name="accessGuestProperty">
11946 <desc>
11947 Called by <link to="IMachine::getGuestProperty()"/> and by
11948 <link to="IMachine::setGuestProperty()"/> in order to read and
11949 modify guest properties.
11950
11951 <result name="VBOX_E_INVALID_VM_STATE">
11952 Machine session is not open.
11953 </result>
11954 <result name="VBOX_E_INVALID_OBJECT_STATE">
11955 Session type is not direct.
11956 </result>
11957
11958 </desc>
11959 <param name="name" type="wstring" dir="in"/>
11960 <param name="value" type="wstring" dir="in"/>
11961 <param name="flags" type="wstring" dir="in"/>
11962 <param name="isSetter" type="boolean" dir="in"/>
11963 <param name="retValue" type="wstring" dir="out"/>
11964 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11965 <param name="retFlags" type="wstring" dir="out"/>
11966 </method>
11967
11968 <method name="enumerateGuestProperties">
11969 <desc>
11970 Return a list of the guest properties matching a set of patterns along
11971 with their values, time stamps and flags.
11972
11973 <result name="VBOX_E_INVALID_VM_STATE">
11974 Machine session is not open.
11975 </result>
11976 <result name="VBOX_E_INVALID_OBJECT_STATE">
11977 Session type is not direct.
11978 </result>
11979
11980 </desc>
11981 <param name="patterns" type="wstring" dir="in">
11982 <desc>
11983 The patterns to match the properties against as a comma-separated
11984 string. If this is empty, all properties currently set will be
11985 returned.
11986 </desc>
11987 </param>
11988 <param name="key" type="wstring" dir="out" safearray="yes">
11989 <desc>
11990 The key names of the properties returned.
11991 </desc>
11992 </param>
11993 <param name="value" type="wstring" dir="out" safearray="yes">
11994 <desc>
11995 The values of the properties returned. The array entries match the
11996 corresponding entries in the @a key array.
11997 </desc>
11998 </param>
11999 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12000 <desc>
12001 The time stamps of the properties returned. The array entries match
12002 the corresponding entries in the @a key array.
12003 </desc>
12004 </param>
12005 <param name="flags" type="wstring" dir="out" safearray="yes">
12006 <desc>
12007 The flags of the properties returned. The array entries match the
12008 corresponding entries in the @a key array.
12009 </desc>
12010 </param>
12011 </method>
12012
12013 </interface>
12014
12015 <interface
12016 name="ISession" extends="$dispatched"
12017 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12018 wsmap="managed"
12019 >
12020 <desc>
12021 The ISession interface represents a serialization primitive for virtual
12022 machines.
12023
12024 With VirtualBox, every time one wishes to manipulate a virtual machine
12025 (e.g. change its settings or start execution), a session object is
12026 required. Such an object must be passed to one of the session methods
12027 that open the given session, which then initiates the machine manipulation.
12028
12029 A session serves several purposes: it identifies to the inter-process VirtualBox
12030 code which process is currently working with the virtual machine, and it ensures
12031 that there are no incompatible requests from several processes for the
12032 same virtual machine. Session objects can therefore be thought of as mutex
12033 semaphores that lock virtual machines to prevent conflicting accesses from
12034 several processes.
12035
12036 How sessions objects are used depends on whether you use the Main API
12037 via COM or via the webservice:
12038
12039 <ul>
12040 <li>When using the COM API directly, an object of the Session class from the
12041 VirtualBox type library needs to be created. In regular COM C++ client code,
12042 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12043 This object will then act as a local session object in further calls to open
12044 a session.
12045 </li>
12046
12047 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12048 one session object automatically when <link to="IWebsessionManager::logon" />
12049 is called. A managed object reference to that session object can be retrieved by
12050 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12051 reference can then be used to open sessions.
12052 </li>
12053 </ul>
12054
12055 Sessions are mainly used in two variations:
12056
12057 <ul>
12058 <li>
12059 To start a virtual machine in a separate process, one would call
12060 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12061 object as its first parameter. This session then identifies the caller
12062 and lets him control the started machine (for example, pause machine
12063 execution or power it down) as well as be notified about machine
12064 execution state changes.
12065 </li>
12066
12067 <li>To alter machine settings, or to start machine execution within the
12068 current process, one needs to open a direct session for the machine first by
12069 calling <link to="IVirtualBox::openSession"/>. While a direct session
12070 is open within one process, no any other process may open another direct
12071 session for the same machine. This prevents the machine from being changed
12072 by other processes while it is running or while the machine is being configured.
12073 </li>
12074 </ul>
12075
12076 One also can attach to an existing direct session already opened by
12077 another process (for example, in order to send a control request to the
12078 virtual machine such as the pause or the reset request). This is done by
12079 calling <link to="IVirtualBox::openExistingSession"/>.
12080
12081 <note>
12082 Unless you are trying to write a new VirtualBox front-end that
12083 performs direct machine execution (like the VirtualBox or VBoxSDL
12084 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12085 session opened by <link to="IVirtualBox::openSession"/> and use this
12086 session only to change virtual machine settings. If you simply want to
12087 start virtual machine execution using one of the existing front-ends
12088 (for example the VirtualBox GUI or headless server), simply use
12089 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12090 will power up the machine automatically for you.
12091 </note>
12092 </desc>
12093
12094 <attribute name="state" type="SessionState" readonly="yes">
12095 <desc>Current state of this session.</desc>
12096 </attribute>
12097
12098 <attribute name="type" type="SessionType" readonly="yes">
12099 <desc>
12100 Type of this session. The value of this attribute is valid only
12101 if the session is currently open (i.e. its #state is
12102 SessionType_SessionOpen), otherwise an error will be returned.
12103 </desc>
12104 </attribute>
12105
12106 <attribute name="machine" type="IMachine" readonly="yes">
12107 <desc>Machine object associated with this session.</desc>
12108 </attribute>
12109
12110 <attribute name="console" type="IConsole" readonly="yes">
12111 <desc>Console object associated with this session.</desc>
12112 </attribute>
12113
12114 <method name="close">
12115 <desc>
12116 Closes a session that was previously opened.
12117
12118 It is recommended that every time an "open session" method (such as
12119 <link to="IVirtualBox::openRemoteSession" /> or
12120 <link to="IVirtualBox::openSession" />) has been called to
12121 manipulate a virtual machine, the caller invoke
12122 ISession::close() when it's done doing so. Since sessions are
12123 serialization primitives much like ordinary mutexes, they are
12124 best used the same way: for each "open" call, there should be
12125 a matching "close" call, even when errors occur.
12126
12127 Otherwise, if a direct session for a machine opened with
12128 <link to="IVirtualBox::openSession()"/> is not explicitly closed
12129 when the application terminates, the state of the machine will
12130 be set to <link to="MachineState_Aborted" /> on the server.
12131
12132 Generally, it is recommended to close all open sessions explicitly
12133 before terminating the application (regardless of the reason for
12134 the termination).
12135
12136 <note>
12137 Do not expect the session state (<link to="ISession::state" />
12138 to return to "Closed" immediately after you invoke
12139 ISession::close(), particularly if you have started a remote
12140 session to execute the VM in a new process. The session state will
12141 automatically return to "Closed" once the VM is no longer executing,
12142 which can of course take a very long time.
12143 </note>
12144
12145 <result name="E_UNEXPECTED">
12146 Session is not open.
12147 </result>
12148
12149 </desc>
12150 </method>
12151
12152 </interface>
12153
12154 <!--
12155 // ISATAController
12156 /////////////////////////////////////////////////////////////////////////
12157 -->
12158
12159 <interface
12160 name="ISATAController" extends="$unknown"
12161 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12162 wsmap="managed"
12163 >
12164 <attribute name="enabled" type="boolean">
12165 <desc>
12166 Flag whether the SATA controller is present in the
12167 guest system. If disabled, the virtual guest hardware will
12168 not contain any SATA controller. Can only be changed when
12169 the VM is powered off.
12170 </desc>
12171 </attribute>
12172
12173 <attribute name="portCount" type="unsigned long">
12174 <desc>
12175 The number of usable ports on the SATA controller.
12176 It ranges from 1 to 30.
12177 </desc>
12178 </attribute>
12179
12180 <method name="GetIDEEmulationPort">
12181 <desc>
12182 Gets the corresponding port number which is emulated as an IDE device.
12183
12184 <result name="E_INVALIDARG">
12185 The @a devicePosition is not in the range 0 to 3.
12186 </result>
12187
12188 </desc>
12189 <param name="devicePosition" type="long" dir="in"/>
12190 <param name="portNumber" type="long" dir="return"/>
12191 </method>
12192
12193 <method name="SetIDEEmulationPort">
12194 <desc>
12195 Sets the port number which is emulated as an IDE device.
12196
12197 <result name="E_INVALIDARG">
12198 The @a devicePosition is not in the range 0 to 3 or the
12199 @a portNumber is not in the range 0 to 29.
12200 </result>
12201
12202 </desc>
12203 <param name="devicePosition" type="long" dir="in"/>
12204 <param name="portNumber" type="long" dir="in"/>
12205 </method>
12206
12207 </interface>
12208
12209<if target="wsdl">
12210
12211 <!--
12212 // IManagedObjectRef
12213 /////////////////////////////////////////////////////////////////////////
12214 -->
12215
12216 <interface
12217 name="IManagedObjectRef" extends="$unknown"
12218 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12219 internal="yes"
12220 wsmap="managed"
12221 wscpp="hardcoded"
12222 >
12223 <desc>
12224 Managed object reference.
12225
12226 Only within the webservice, a managed object reference (which is really
12227 an opaque number) allows a webservice client to address an object
12228 that lives in the address space of the webservice server.
12229
12230 Behind each managed object reference, there is a COM object that lives
12231 in the webservice server's address space. The COM object is not freed
12232 until the managed object reference is released, either by an explicit
12233 call to <link to="IManagedObjectRef::release" /> or by logging off from
12234 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12235 all objects created during the webservice session.
12236
12237 Whenever a method call of the VirtualBox API returns a COM object, the
12238 webservice representation of that method will instead return a
12239 managed object reference, which can then be used to invoke methods
12240 on that object.
12241 </desc>
12242
12243 <method name="getInterfaceName">
12244 <desc>
12245 Returns the name of the interface that this managed object represents,
12246 for example, "IMachine", as a string.
12247 </desc>
12248 <param name="return" type="wstring" dir="return"/>
12249 </method>
12250
12251 <method name="release">
12252 <desc>
12253 Releases this managed object reference and frees the resources that
12254 were allocated for it in the webservice server process. After calling
12255 this method, the identifier of the reference can no longer be used.
12256 </desc>
12257 </method>
12258
12259 </interface>
12260
12261 <!--
12262 // IWebsessionManager
12263 /////////////////////////////////////////////////////////////////////////
12264 -->
12265
12266 <interface
12267 name="IWebsessionManager" extends="$unknown"
12268 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12269 internal="yes"
12270 wsmap="global"
12271 wscpp="hardcoded"
12272 >
12273 <desc>
12274 Websession manager. This provides essential services
12275 to webservice clients.
12276 </desc>
12277 <method name="logon">
12278 <desc>
12279 Logs a new client onto the webservice and returns a managed object reference to
12280 the IVirtualBox instance, which the client can then use as a basis to further
12281 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12282 interface, in one way or the other.
12283 </desc>
12284 <param name="username" type="wstring" dir="in"/>
12285 <param name="password" type="wstring" dir="in"/>
12286 <param name="return" type="IVirtualBox" dir="return"/>
12287 </method>
12288
12289 <method name="getSessionObject">
12290 <desc>
12291 Returns a managed object reference to the internal ISession object that was created
12292 for this web service session when the client logged on.
12293
12294 <see>ISession</see>
12295 </desc>
12296 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12297 <param name="return" type="ISession" dir="return"/>
12298 </method>
12299
12300 <method name="logoff">
12301 <desc>
12302 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12303 and destroys all resources associated with the session (most importantly, all
12304 managed objects created in the server while the session was active).
12305 </desc>
12306 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12307 </method>
12308
12309 </interface>
12310
12311</if>
12312
12313 <!--
12314 // IPerformanceCollector & friends
12315 /////////////////////////////////////////////////////////////////////////
12316 -->
12317
12318 <interface
12319 name="IPerformanceMetric" extends="$unknown"
12320 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12321 >
12322 <desc>
12323 The IPerformanceMetric interface represents parameters of the given
12324 performance metric.
12325 </desc>
12326
12327 <attribute name="metricName" type="wstring" readonly="yes">
12328 <desc>
12329 Name of the metric.
12330 </desc>
12331 </attribute>
12332
12333 <attribute name="object" type="$unknown" readonly="yes">
12334 <desc>
12335 Object this metric belongs to.
12336 </desc>
12337 </attribute>
12338
12339 <attribute name="description" type="wstring" readonly="yes">
12340 <desc>
12341 Textual description of the metric.
12342 </desc>
12343 </attribute>
12344
12345 <attribute name="period" type="unsigned long" readonly="yes">
12346 <desc>
12347 Time interval between samples, measured in seconds.
12348 </desc>
12349 </attribute>
12350
12351 <attribute name="count" type="unsigned long" readonly="yes">
12352 <desc>
12353 Number of recent samples retained by the performance collector for this
12354 metric.
12355
12356 When the collected sample count exceeds this number, older samples
12357 are discarded.
12358 </desc>
12359 </attribute>
12360
12361 <attribute name="unit" type="wstring" readonly="yes">
12362 <desc>
12363 Unit of measurement.
12364 </desc>
12365 </attribute>
12366
12367 <attribute name="minimumValue" type="long" readonly="yes">
12368 <desc>
12369 Minimum possible value of this metric.
12370 </desc>
12371 </attribute>
12372
12373 <attribute name="maximumValue" type="long" readonly="yes">
12374 <desc>
12375 Maximum possible value of this metric.
12376 </desc>
12377 </attribute>
12378 </interface>
12379
12380 <interface
12381 name="IPerformanceCollector" extends="$unknown"
12382 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12383 wsmap="managed"
12384 >
12385 <desc>
12386 The IPerformanceCollector interface represents a service that collects and
12387 stores performance metrics data.
12388
12389 Performance metrics are associated with objects like IHost and
12390 IMachine. Each object has a distinct set of performance metrics.
12391 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12392
12393 Metric data are collected at the specified intervals and are retained
12394 internally. The interval and the number of samples retained can be set
12395 with <link to="IPerformanceCollector::setupMetrics" />.
12396
12397 Metrics are organized hierarchically, each level separated by slash (/).
12398 General scheme for metric name is
12399 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12400 metric name stands for: CPU category, Load metric, User submetric, average
12401 aggregate. An aggregate function is computed over all retained data. Valid
12402 aggregate functions are:
12403
12404 <ul>
12405 <li>avg -- average</li>
12406 <li>min -- minimum</li>
12407 <li>max -- maximum</li>
12408 </ul>
12409
12410 "Category/Metric" together form base metric name. A base metric is the
12411 smallest unit for which a sampling interval and the number of retained
12412 samples can be set. Only base metrics can be enabled and disabled. All
12413 sub-metrics are collected when their base metric is collected.
12414 Collected values for any set of sub-metrics can be queried with
12415 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12416 metric parameters, querying metric data, enabling or disabling metrics
12417 wildcards can be used in metric names to specify a subset of metrics. For
12418 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12419 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12420 values without aggregates <tt>*:</tt> can be used.
12421
12422 The valid names for base metrics are:
12423
12424 <ul>
12425 <li>CPU/Load</li>
12426 <li>CPU/MHz</li>
12427 <li>RAM/Usage</li>
12428 </ul>
12429
12430 The general sequence for collecting and retrieving the metrics is:
12431 <ul>
12432 <li>
12433 Obtain an instance of IPerformanceCollector with
12434 <link to="IVirtualBox::performanceCollector" />
12435 </li>
12436 <li>
12437 Allocate and populate an array with references to objects the metrics
12438 will be collected for. Use references to IHost and IMachine objects.
12439 </li>
12440 <li>
12441 Allocate and populate an array with base metric names the data will be
12442 collected for.
12443 </li>
12444 <li>
12445 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12446 metric data will be collected and stored.
12447 </li>
12448 <li>
12449 Wait for the data to get collected.
12450 </li>
12451 <li>
12452 Allocate and populate an array with references to objects the metric
12453 values will be queried for. You can re-use the object array used for
12454 setting base metrics.
12455 </li>
12456 <li>
12457 Allocate and populate an array with metric names the data will be
12458 collected for. Note that metric names differ from base metric names.
12459 </li>
12460 <li>
12461 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12462 have been collected so far are returned. Note that the values are still
12463 retained internally and data collection continues.
12464 </li>
12465 </ul>
12466
12467 For an example of usage refer to the following files in VirtualBox SDK:
12468 <ul>
12469 <li>
12470 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12471 </li>
12472 <li>
12473 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12474 </li>
12475 </ul>
12476 </desc>
12477
12478 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12479 <desc>
12480 Array of unique names of metrics.
12481
12482 This array represents all metrics supported by the performance
12483 collector. Individual objects do not necessarily support all of them.
12484 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12485 list of supported metrics for a particular object.
12486 </desc>
12487 </attribute>
12488
12489 <method name="getMetrics">
12490 <desc>
12491 Returns parameters of specified metrics for a set of objects.
12492 <note>
12493 @c Null metrics array means all metrics. @c Null object array means
12494 all existing objects.
12495 </note>
12496 </desc>
12497 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12498 <desc>
12499 Metric name filter. Currently, only a comma-separated list of metrics
12500 is supported.
12501 </desc>
12502 </param>
12503 <param name="objects" type="$unknown" dir="in" safearray="yes">
12504 <desc>
12505 Set of objects to return metric parameters for.
12506 </desc>
12507 </param>
12508 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12509 <desc>
12510 Array of returned metric parameters.
12511 </desc>
12512 </param>
12513 </method>
12514
12515 <method name="setupMetrics">
12516 <desc>
12517 Sets parameters of specified base metrics for a set of objects. Returns
12518 an array of <link to="IPerformanceMetric" /> describing the metrics have
12519 been affected.
12520 <note>
12521 @c Null or empty metric name array means all metrics. @c Null or empty
12522 object array means all existing objects. If metric name array contains
12523 a single element and object array contains many, the single metric
12524 name array element is applied to each object array element to form
12525 metric/object pairs.
12526 </note>
12527 </desc>
12528 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12529 <desc>
12530 Metric name filter. Comma-separated list of metrics with wildcard
12531 support.
12532 </desc>
12533 </param>
12534 <param name="objects" type="$unknown" dir="in" safearray="yes">
12535 <desc>
12536 Set of objects to setup metric parameters for.
12537 </desc>
12538 </param>
12539 <param name="period" type="unsigned long" dir="in">
12540 <desc>
12541 Time interval in seconds between two consecutive samples of performance
12542 data.
12543 </desc>
12544 </param>
12545 <param name="count" type="unsigned long" dir="in">
12546 <desc>
12547 Number of samples to retain in performance data history. Older samples
12548 get discarded.
12549 </desc>
12550 </param>
12551 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12552 <desc>
12553 Array of metrics that have been modified by the call to this method.
12554 </desc>
12555 </param>
12556 </method>
12557
12558 <method name="enableMetrics">
12559 <desc>
12560 Turns on collecting specified base metrics. Returns an array of
12561 <link to="IPerformanceMetric" /> describing the metrics have been
12562 affected.
12563 <note>
12564 @c Null or empty metric name array means all metrics. @c Null or empty
12565 object array means all existing objects. If metric name array contains
12566 a single element and object array contains many, the single metric
12567 name array element is applied to each object array element to form
12568 metric/object pairs.
12569 </note>
12570 </desc>
12571 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12572 <desc>
12573 Metric name filter. Comma-separated list of metrics with wildcard
12574 support.
12575 </desc>
12576 </param>
12577 <param name="objects" type="$unknown" dir="in" safearray="yes">
12578 <desc>
12579 Set of objects to enable metrics for.
12580 </desc>
12581 </param>
12582 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12583 <desc>
12584 Array of metrics that have been modified by the call to this method.
12585 </desc>
12586 </param>
12587 </method>
12588
12589 <method name="disableMetrics">
12590 <desc>
12591 Turns off collecting specified base metrics. Returns an array of
12592 <link to="IPerformanceMetric" /> describing the metrics have been
12593 affected.
12594 <note>
12595 @c Null or empty metric name array means all metrics. @c Null or empty
12596 object array means all existing objects. If metric name array contains
12597 a single element and object array contains many, the single metric
12598 name array element is applied to each object array element to form
12599 metric/object pairs.
12600 </note>
12601 </desc>
12602 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12603 <desc>
12604 Metric name filter. Comma-separated list of metrics with wildcard
12605 support.
12606 </desc>
12607 </param>
12608 <param name="objects" type="$unknown" dir="in" safearray="yes">
12609 <desc>
12610 Set of objects to disable metrics for.
12611 </desc>
12612 </param>
12613 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12614 <desc>
12615 Array of metrics that have been modified by the call to this method.
12616 </desc>
12617 </param>
12618 </method>
12619
12620 <method name="queryMetricsData">
12621 <desc>
12622 Queries collected metrics data for a set of objects.
12623
12624 The data itself and related metric information are returned in seven
12625 parallel and one flattened array of arrays. Elements of
12626 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12627 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12628 the same index describe one set of values corresponding to a single
12629 metric.
12630
12631 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12632 start and length of a sub-array is indicated by
12633 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12634 value for metric <tt>metricNames[i]</tt> is at
12635 <tt>returnData[returnIndices[i]]</tt>.
12636
12637 <note>
12638 @c Null or empty metric name array means all metrics. @c Null or empty
12639 object array means all existing objects. If metric name array contains
12640 a single element and object array contains many, the single metric
12641 name array element is applied to each object array element to form
12642 metric/object pairs.
12643 </note>
12644 <note>
12645 Data collection continues behind the scenes after call to @c
12646 queryMetricsData. The return data can be seen as the snapshot of
12647 the current state at the time of @c queryMetricsData call. The
12648 internally kept metric values are not cleared by the call. This makes
12649 possible querying different subsets of metrics or aggregates with
12650 subsequent calls. If periodic querying is needed it is highly
12651 suggested to query the values with @c interval*count period to avoid
12652 confusion. This way a completely new set of data values will be
12653 provided by each query.
12654 </note>
12655 </desc>
12656 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12657 <desc>
12658 Metric name filter. Comma-separated list of metrics with wildcard
12659 support.
12660 </desc>
12661 </param>
12662 <param name="objects" type="$unknown" dir="in" safearray="yes">
12663 <desc>
12664 Set of objects to query metrics for.
12665 </desc>
12666 </param>
12667 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12668 <desc>
12669 Names of metrics returned in @c returnData.
12670 </desc>
12671 </param>
12672 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12673 <desc>
12674 Objects associated with metrics returned in @c returnData.
12675 </desc>
12676 </param>
12677 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12678 <desc>
12679 Units of measurement for each returned metric.
12680 </desc>
12681 </param>
12682 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12683 <desc>
12684 Divisor that should be applied to return values in order to get
12685 floating point values. For example:
12686 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12687 will retrieve the floating point value of i-th sample of the first
12688 metric.
12689 </desc>
12690 </param>
12691 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12692 <desc>
12693 Sequence numbers of the first elements of value sequences of particular metrics
12694 returned in @c returnData. For aggregate metrics it is the sequence number of
12695 the sample the aggregate started calculation from.
12696 </desc>
12697 </param>
12698 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12699 <desc>
12700 Indices of the first elements of value sequences of particular metrics
12701 returned in @c returnData.
12702 </desc>
12703 </param>
12704 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12705 <desc>
12706 Lengths of value sequences of particular metrics.
12707 </desc>
12708 </param>
12709 <param name="returnData" type="long" dir="return" safearray="yes">
12710 <desc>
12711 Flattened array of all metric data containing sequences of values for
12712 each metric.
12713 </desc>
12714 </param>
12715 </method>
12716
12717 </interface>
12718
12719 <module name="VBoxSVC" context="LocalServer">
12720 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12721 namespace="virtualbox.org">
12722 <interface name="IVirtualBox" default="yes"/>
12723 </class>
12724 </module>
12725
12726 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12727 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12728 namespace="virtualbox.org">
12729 <interface name="ISession" default="yes"/>
12730 </class>
12731 </module>
12732
12733</library>
12734
12735</idl>
12736
12737<!-- 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