VirtualBox

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

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

Main: OVF API docs.

  • Property svn:eol-style set to native
File size: 490.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
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="AccessMode"
363 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
364 >
365 <desc>
366 Access mode for opening files.
367 </desc>
368
369 <const name="ReadOnly" value="1"/>
370 <const name="ReadWrite" value="2"/>
371 </enum>
372
373 <enum
374 name="MachineState"
375 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
376 >
377 <desc>
378 Virtual machine execution state.
379
380 This enumeration represents possible values of the <link
381 to="IMachine::state"/> attribute.
382
383 Below is the basic virtual machine state diagram. It shows how the state
384 changes during virtual machine execution. The text in square braces shows
385 a method of the IConsole interface that performs the given state
386 transition.
387
388 <pre>
389 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
390 V |
391 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
392 | | | | V |
393 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
394 | | ^ | ^ |
395 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
396 | ^ | | | |
397 | | +-----------------------------------------+-|-------------------+ +
398 | | | | |
399 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
400 | | | |
401 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
402 | | |
403 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
404 </pre>
405
406 Note that states to the right from PoweredOff, Aborted and Saved in the
407 above diagram are called <i>online VM states</i>. These states
408 represent the virtual machine which is being executed in a dedicated
409 process (usually with a GUI window attached to it where you can see the
410 activity of the virtual machine and interact with it). There are two
411 special pseudo-states, FirstOnline and LastOnline, that can be used in
412 relational expressions to detect if the given machine state is online or
413 not:
414
415 <pre>
416 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
417 machine.GetState() &lt;= MachineState_LastOnline)
418 {
419 ...the machine is being executed...
420 }
421 </pre>
422
423 When the virtual machine is in one of the online VM states (that is, being
424 executed), only a few machine settings can be modified. Methods working
425 with such settings contain an explicit note about that. An attempt to
426 change any oter setting or perform a modifying operation during this time
427 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
428
429 All online states except Running, Paused and Stuck are transitional: they
430 represent temporary conditions of the virtual machine that will last as
431 long as the operation that initiated such a condition.
432
433 The Stuck state is a special case. It means that execution of the machine
434 has reached the "Guru Meditation" condition. This condition indicates an
435 internal VMM (virtual machine manager) failure which may happen as a
436 result of either an unhandled low-level virtual hardware exception or one
437 of the recompiler exceptions (such as the <i>too-many-traps</i>
438 condition).
439
440 Note also that any online VM state may transit to the Aborted state. This
441 happens if the process that is executing the virtual machine terminates
442 unexpectedly (for example, crashes). Other than that, the Aborted state is
443 equivalent to PoweredOff.
444
445 There are also a few additional state diagrams that do not deal with
446 virtual machine execution and therefore are shown separately. The states
447 shown on these diagrams are called <i>offline VM states</i> (this includes
448 PoweredOff, Aborted and Saved too).
449
450 The first diagram shows what happens when a lengthy setup operation is
451 being executed (such as <link to="IMachine::attachHardDisk"/>).
452
453 <pre>
454 +-----------------------------------(same sate as before the call)------+
455 | |
456 +-&gt; PoweredOff --+ |
457 | | |
458 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
459 | |
460 +-&gt; Saved -------+
461 </pre>
462
463 The next two diagrams demonstrate the process of taking a snapshot of a
464 powered off virtual machine and performing one of the "discard..."
465 operations, respectively.
466
467 <pre>
468 +-----------------------------------(same sate as before the call)------+
469 | |
470 +-&gt; PoweredOff --+ |
471 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
472 +-&gt; Aborted -----+
473
474 +-&gt; PoweredOff --+
475 | |
476 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
477 | | [discardCurrentState()] |
478 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
479 | |
480 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
481 </pre>
482
483 Note that the Saving state is present in both the offline state group and
484 online state group. Currently, the only way to determine what group is
485 assumed in a particular case is to remember the previous machine state: if
486 it was Running or Paused, then Saving is an online state, otherwise it is
487 an offline state. This inconsistency may be removed in one of the future
488 versions of VirtualBox by adding a new state.
489
490 <note internal="yes">
491 For whoever decides to touch this enum: In order to keep the
492 comparisons involving FirstOnline and LastOnline pseudo-states valid,
493 the numeric values of these states must be correspondingly updated if
494 needed: for any online VM state, the condition
495 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
496 <tt>true</tt>. The same relates to transient states for which
497 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
498 <tt>true</tt>.
499 </note>
500 </desc>
501
502 <const name="Null" value="0">
503 <desc>Null value (nver used by the API).</desc>
504 </const>
505 <const name="PoweredOff" value="1">
506 <desc>
507 The machine is not running.
508 </desc>
509 </const>
510 <const name="Saved" value="2">
511 <desc>
512 The machine is not currently running, but the execution state of the machine
513 has been saved to an external file when it was running.
514 </desc>
515 </const>
516 <const name="Aborted" value="3">
517 <desc>
518 The process running the machine has terminated abnormally.
519 </desc>
520 </const>
521 <const name="Running" value="4">
522 <desc>
523 The machine is currently being executed.
524 <note internal="yes">
525 For whoever decides to touch this enum: In order to keep the
526 comparisons in the old source code valid, this state must immediately
527 precede the Paused state.
528 </note>
529 </desc>
530 </const>
531 <const name="Paused" value="5">
532 <desc>
533 Execution of the machine has been paused.
534 <note internal="yes">
535 For whoever decides to touch this enum: In order to keep the
536 comparisons in the old source code valid, this state must immediately
537 follow the Running state.
538 </note>
539 </desc>
540 </const>
541 <const name="Stuck" value="6">
542 <desc>
543 Execution of the machine has reached the "Guru Meditation"
544 condition.
545 </desc>
546 </const>
547 <const name="Starting" value="7">
548 <desc>
549 Machine is being started after powering it on from a
550 zero execution state.
551 </desc>
552 </const>
553 <const name="Stopping" value="8">
554 <desc>
555 Machine is being normally stopped powering it off, or after the guest OS
556 has initiated a shutdown sequence.
557 </desc>
558 </const>
559 <const name="Saving" value="9">
560 <desc>
561 Machine is saving its execution state to a file or an online
562 snapshot of the machine is being taken.
563 </desc>
564 </const>
565 <const name="Restoring" value="10">
566 <desc>
567 Execution state of the machine is being restored from a file
568 after powering it on from the saved execution state.
569 </desc>
570 </const>
571 <const name="Discarding" value="11">
572 <desc>
573 Snapshot of the machine is being discarded.
574 </desc>
575 </const>
576 <const name="SettingUp" value="12">
577 <desc>
578 Lengthy setup operation is in progress.
579 </desc>
580 </const>
581
582 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
583 <desc>
584 Pseudo-state: first online state (for use in relational expressions).
585 </desc>
586 </const>
587 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
588 <desc>
589 Pseudo-state: last online state (for use in relational expressions).
590 </desc>
591 </const>
592
593 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
594 <desc>
595 Pseudo-state: first transient state (for use in relational expressions).
596 </desc>
597 </const>
598 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
599 <desc>
600 Pseudo-state: last transient state (for use in relational expressions).
601 </desc>
602 </const>
603
604 </enum>
605
606 <enum
607 name="SessionState"
608 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
609 >
610 <desc>
611 Session state. This enumeration represents possible values of
612 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
613 attributes. See individual enumerator descriptions for the meaning for
614 every value.
615 </desc>
616
617 <const name="Null" value="0">
618 <desc>Null value (never used by the API).</desc>
619 </const>
620 <const name="Closed" value="1">
621 <desc>
622 The machine has no open sessions (<link to="IMachine::sessionState"/>);
623 the session is closed (<link to="ISession::state"/>)
624 </desc>
625 </const>
626 <const name="Open" value="2">
627 <desc>
628 The machine has an open direct session (<link to="IMachine::sessionState"/>);
629 the session is open (<link to="ISession::state"/>)
630 </desc>
631 </const>
632 <const name="Spawning" value="3">
633 <desc>
634 A new (direct) session is being opened for the machine
635 as a result of <link to="IVirtualBox::openRemoteSession"/>
636 call (<link to="IMachine::sessionState"/>);
637 the session is currently being opened
638 as a result of <link to="IVirtualBox::openRemoteSession"/>
639 call (<link to="ISession::state"/>)
640 </desc>
641 </const>
642 <const name="Closing" value="4">
643 <desc>
644 The direct session is being closed (<link to="IMachine::sessionState"/>);
645 the session is being closed (<link to="ISession::state"/>)
646 </desc>
647 </const>
648 </enum>
649
650 <enum
651 name="SessionType"
652 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
653 >
654 <desc>
655 Session type. This enumeration represents possible values of the
656 <link to="ISession::type"/> attribute.
657 </desc>
658
659 <const name="Null" value="0">
660 <desc>Null value (never used by the API).</desc>
661 </const>
662 <const name="Direct" value="1">
663 <desc>
664 Direct session
665 (opened by <link to="IVirtualBox::openSession"/>)
666 </desc>
667 </const>
668 <const name="Remote" value="2">
669 <desc>
670 Remote session
671 (opened by <link to="IVirtualBox::openRemoteSession"/>)
672 </desc>
673 </const>
674 <const name="Existing" value="3">
675 <desc>
676 Existing session
677 (opened by <link to="IVirtualBox::openExistingSession"/>)
678 </desc>
679 </const>
680 </enum>
681
682 <enum
683 name="DeviceType"
684 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
685 >
686 <desc>
687 Device type.
688 </desc>
689 <const name="Null" value="0">
690 <desc>
691 Null value, may also mean "no device" (not allowed for
692 <link to="IConsole::getDeviceActivity"/>).
693 </desc>
694 </const>
695 <const name="Floppy" value="1">
696 <desc>Floppy device.</desc>
697 </const>
698 <const name="DVD" value="2">
699 <desc>CD/DVD-ROM device.</desc>
700 </const>
701 <const name="HardDisk" value="3">
702 <desc>Hard disk device.</desc>
703 </const>
704 <const name="Network" value="4">
705 <desc>Network device.</desc>
706 </const>
707 <const name="USB" value="5">
708 <desc>USB device.</desc>
709 </const>
710 <const name="SharedFolder" value="6">
711 <desc>Shared folder device.</desc>
712 </const>
713 </enum>
714
715 <enum
716 name="DeviceActivity"
717 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
718 >
719 <desc>
720 Device activity for <link to="IConsole::getDeviceActivity"/>.
721 </desc>
722
723 <const name="Null" value="0"/>
724 <const name="Idle" value="1"/>
725 <const name="Reading" value="2"/>
726 <const name="Writing" value="3"/>
727 </enum>
728
729 <enum
730 name="ClipboardMode"
731 uuid="33364716-4008-4701-8f14-be0fa3d62950"
732 >
733 <desc>
734 Host-Guest clipboard interchange mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="HostToGuest" value="1"/>
739 <const name="GuestToHost" value="2"/>
740 <const name="Bidirectional" value="3"/>
741 </enum>
742
743 <enum
744 name="Scope"
745 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
746 >
747 <desc>
748 Scope of the operation.
749
750 A generic enumeration used in various methods to define the action or
751 argument scope.
752 </desc>
753
754 <const name="Global" value="0"/>
755 <const name="Machine" value="1"/>
756 <const name="Session" value="2"/>
757 </enum>
758
759 <enum
760 name="GuestStatisticType"
761 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
762 >
763 <desc>
764 Statistics type for <link to="IGuest::getStatistic"/>.
765 </desc>
766
767 <const name="CPULoad_Idle" value="0">
768 <desc>
769 Idle CPU load (0-100%) for last interval.
770 </desc>
771 </const>
772 <const name="CPULoad_Kernel" value="1">
773 <desc>
774 Kernel CPU load (0-100%) for last interval.
775 </desc>
776 </const>
777 <const name="CPULoad_User" value="2">
778 <desc>
779 User CPU load (0-100%) for last interval.
780 </desc>
781 </const>
782 <const name="Threads" value="3">
783 <desc>
784 Total number of threads in the system.
785 </desc>
786 </const>
787 <const name="Processes" value="4">
788 <desc>
789 Total number of processes in the system.
790 </desc>
791 </const>
792 <const name="Handles" value="5">
793 <desc>
794 Total number of handles in the system.
795 </desc>
796 </const>
797 <const name="MemoryLoad" value="6">
798 <desc>
799 Memory load (0-100%).
800 </desc>
801 </const>
802 <const name="PhysMemTotal" value="7">
803 <desc>
804 Total physical memory in megabytes.
805 </desc>
806 </const>
807 <const name="PhysMemAvailable" value="8">
808 <desc>
809 Free physical memory in megabytes.
810 </desc>
811 </const>
812 <const name="PhysMemBalloon" value="9">
813 <desc>
814 Ballooned physical memory in megabytes.
815 </desc>
816 </const>
817 <const name="MemCommitTotal" value="10">
818 <desc>
819 Total amount of memory in the committed state in megabytes.
820 </desc>
821 </const>
822 <const name="MemKernelTotal" value="11">
823 <desc>
824 Total amount of memory used by the guest OS's kernel in megabytes.
825 </desc>
826 </const>
827 <const name="MemKernelPaged" value="12">
828 <desc>
829 Total amount of paged memory used by the guest OS's kernel in megabytes.
830 </desc>
831 </const>
832 <const name="MemKernelNonpaged" value="13">
833 <desc>
834 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
835 </desc>
836 </const>
837 <const name="MemSystemCache" value="14">
838 <desc>
839 Total amount of memory used by the guest OS's system cache in megabytes.
840 </desc>
841 </const>
842 <const name="PageFileSize" value="15">
843 <desc>
844 Pagefile size in megabytes.
845 </desc>
846 </const>
847 <const name="SampleNumber" value="16">
848 <desc>
849 Statistics sample number
850 </desc>
851 </const>
852 <const name="MaxVal" value="17"/>
853 </enum>
854
855 <enum
856 name="BIOSBootMenuMode"
857 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
858 >
859 <desc>
860 BIOS boot menu mode.
861 </desc>
862
863 <const name="Disabled" value="0"/>
864 <const name="MenuOnly" value="1"/>
865 <const name="MessageAndMenu" value="2"/>
866 </enum>
867
868 <enum
869 name="DriveState"
870 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
871 >
872 <const name="Null" value="0">
873 <desc>Null value (never used by the API).</desc>
874 </const>
875 <const name="NotMounted" value="1"/>
876 <const name="ImageMounted" value="2"/>
877 <const name="HostDriveCaptured" value="3"/>
878 </enum>
879
880 <enum
881 name="ProcessorFeature"
882 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
883 >
884 <desc>
885 CPU features.
886 </desc>
887
888 <const name="HWVirtEx" value="0"/>
889 <const name="PAE" value="1"/>
890 <const name="LongMode" value="2"/>
891 </enum>
892
893
894 <!--
895 // IVirtualBoxErrorInfo
896 /////////////////////////////////////////////////////////////////////////
897 -->
898
899 <interface
900 name="IVirtualBoxErrorInfo" extends="$errorinfo"
901 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
902 supportsErrorInfo="no"
903 wsmap="suppress"
904 >
905 <desc>
906 The IVirtualBoxErrorInfo interface represents extended error information.
907
908 Extended error information can be set by VirtualBox components after
909 unsuccessful or partially successful method invocation. This information
910 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
911 and then shown to the client in addition to the plain 32-bit result code.
912
913 In MS COM, this interface extends the IErrorInfo interface,
914 in XPCOM, it extends the nsIException interface. In both cases,
915 it provides a set of common attributes to retrieve error
916 information.
917
918 Sometimes invocation of some component's method may involve methods of
919 other components that may also fail (independently of this method's
920 failure), or a series of non-fatal errors may precede a fatal error that
921 causes method failure. In cases like that, it may be desirable to preserve
922 information about all errors happened during method invocation and deliver
923 it to the caller. The <link to="#next"/> attribute is intended
924 specifically for this purpose and allows to represent a chain of errors
925 through a single IVirtualBoxErrorInfo object set after method invocation.
926
927 Note that errors are stored to a chain in the reverse order, i.e. the
928 initial error object you query right after method invocation is the last
929 error set by the callee, the object it points to in the @a next attribute
930 is the previous error and so on, up to the first error (which is the last
931 in the chain).
932 </desc>
933
934 <attribute name="resultCode" type="result" readonly="yes">
935 <desc>
936 Result code of the error.
937 Usually, it will be the same as the result code returned
938 by the method that provided this error information, but not
939 always. For example, on Win32, CoCreateInstance() will most
940 likely return E_NOINTERFACE upon unsuccessful component
941 instantiation attempt, but not the value the component factory
942 returned.
943 <note>
944 In MS COM, there is no equivalent.
945 In XPCOM, it is the same as nsIException::result.
946 </note>
947 </desc>
948 </attribute>
949
950 <attribute name="interfaceID" type="uuid" readonly="yes">
951 <desc>
952 UUID of the interface that defined the error.
953 <note>
954 In MS COM, it is the same as IErrorInfo::GetGUID.
955 In XPCOM, there is no equivalent.
956 </note>
957 </desc>
958 </attribute>
959
960 <attribute name="component" type="wstring" readonly="yes">
961 <desc>
962 Name of the component that generated the error.
963 <note>
964 In MS COM, it is the same as IErrorInfo::GetSource.
965 In XPCOM, there is no equivalent.
966 </note>
967 </desc>
968 </attribute>
969
970 <attribute name="text" type="wstring" readonly="yes">
971 <desc>
972 Text description of the error.
973 <note>
974 In MS COM, it is the same as IErrorInfo::GetDescription.
975 In XPCOM, it is the same as nsIException::message.
976 </note>
977 </desc>
978 </attribute>
979
980 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
981 <desc>
982 Next error object if there is any, or @c null otherwise.
983 <note>
984 In MS COM, there is no equivalent.
985 In XPCOM, it is the same as nsIException::inner.
986 </note>
987 </desc>
988 </attribute>
989
990 </interface>
991
992
993 <!--
994 // IVirtualBox
995 /////////////////////////////////////////////////////////////////////////
996 -->
997
998 <interface
999 name="IVirtualBoxCallback" extends="$unknown"
1000 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1001 wsmap="suppress"
1002 >
1003 <method name="onMachineStateChange">
1004 <desc>
1005 The execution state of the given machine has changed.
1006 <see>IMachine::state</see>
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 <param name="state" type="MachineState" dir="in">
1012 <desc>New execution state.</desc>
1013 </param>
1014 </method>
1015
1016 <method name="onMachineDataChange">
1017 <desc>
1018 Any of the settings of the given machine has changed.
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 </method>
1024
1025 <method name="onExtraDataCanChange">
1026 <desc>
1027 Notification when someone tries to change extra data for
1028 either the given machine or (if null) global extra data.
1029 This gives the chance to veto against changes.
1030 </desc>
1031 <param name="machineId" type="uuid" dir="in">
1032 <desc>
1033 ID of the machine this event relates to
1034 (null ID for global extra data change requests).
1035 </desc>
1036 </param>
1037 <param name="key" type="wstring" dir="in">
1038 <desc>
1039 Extra data key for the attempted write.
1040 </desc>
1041 </param>
1042 <param name="value" type="wstring" dir="in">
1043 <desc>
1044 Extra data value for the given key.
1045 </desc>
1046 </param>
1047 <param name="error" type="wstring" dir="out">
1048 <desc>
1049 Optional error message describing the reason of the
1050 veto (ignored if this notification returns @c true).
1051 </desc>
1052 </param>
1053 <param name="allowChange" type="boolean" dir="return">
1054 <desc>
1055 Flag to indicate whether the callee agrees (@c true)
1056 or vetoes against the change (@c false).
1057 </desc>
1058 </param>
1059 </method>
1060
1061 <method name="onExtraDataChange">
1062 <desc>
1063 Notification when machine specific or global extra data
1064 has changed.
1065 </desc>
1066 <param name="machineId" type="uuid" dir="in">
1067 <desc>
1068 ID of the machine this event relates to.
1069 Null for global extra data changes.
1070 </desc>
1071 </param>
1072 <param name="key" type="wstring" dir="in">
1073 <desc>
1074 Extra data key that has changed.
1075 </desc>
1076 </param>
1077 <param name="value" type="wstring" dir="in">
1078 <desc>
1079 Extra data value for the given key.
1080 </desc>
1081 </param>
1082 </method>
1083
1084 <method name="onMediaRegistered">
1085 <desc>
1086 The given media was registered or unregistered
1087 within this VirtualBox installation.
1088
1089 The @a mediaType parameter describes what type of
1090 media the specified @a mediaId refers to. Possible
1091 values are:
1092
1093 <ul>
1094 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1095 that, if registered, can be obtained using the
1096 <link to="IVirtualBox::getHardDisk"/> call.</li>
1097 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1098 that, if registered, can be obtained using the
1099 <link to="IVirtualBox::getDVDImage"/> call.</li>
1100 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1101 that, if registered, can be obtained using the
1102 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1103 </ul>
1104
1105 Note that if this is a deregistration notification,
1106 there is no way to access the object representing the
1107 unregistered media. It is supposed that the
1108 application will do required cleanup based on the
1109 @a mediaId value.
1110 </desc>
1111 <param name="mediaId" type="uuid" dir="in">
1112 <desc>ID of the media this event relates to.</desc>
1113 </param>
1114 <param name="mediaType" type="DeviceType" dir="in">
1115 <desc>Type of the media this event relates to.</desc>
1116 </param>
1117 <param name="registered" type="boolean" dir="in">
1118 <desc>
1119 If true, the media was registered, otherwise it was
1120 unregistered.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 <method name="onMachineRegistered">
1126 <desc>
1127 The given machine was registered or unregistered
1128 within this VirtualBox installation.
1129 </desc>
1130 <param name="machineId" type="uuid" dir="in">
1131 <desc>ID of the machine this event relates to.</desc>
1132 </param>
1133 <param name="registered" type="boolean" dir="in">
1134 <desc>
1135 If true, the machine was registered, otherwise it was
1136 unregistered.
1137 </desc>
1138 </param>
1139 </method>
1140
1141 <method name="onSessionStateChange">
1142 <desc>
1143 The state of the session for the given machine was changed.
1144 <see>IMachine::sessionState</see>
1145 </desc>
1146 <param name="machineId" type="uuid" dir="in">
1147 <desc>ID of the machine this event relates to.</desc>
1148 </param>
1149 <param name="state" type="SessionState" dir="in">
1150 <desc>New session state.</desc>
1151 </param>
1152 </method>
1153
1154 <method name="onSnapshotTaken">
1155 <desc>
1156 A new snapshot of the machine has been taken.
1157 <see>ISnapshot</see>
1158 </desc>
1159 <param name="machineId" type="uuid" dir="in">
1160 <desc>ID of the machine this event relates to.</desc>
1161 </param>
1162 <param name="snapshotId" type="uuid" dir="in">
1163 <desc>ID of the new snapshot.</desc>
1164 </param>
1165 </method>
1166
1167 <method name="onSnapshotDiscarded">
1168 <desc>
1169 Snapshot of the given machine has been discarded.
1170
1171 <note>
1172 This notification is delivered <b>after</b> the snapshot
1173 object has been uninitialized on the server (so that any
1174 attempt to call its methods will return an error).
1175 </note>
1176
1177 <see>ISnapshot</see>
1178 </desc>
1179 <param name="machineId" type="uuid" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="snapshotId" type="uuid" dir="in">
1183 <desc>
1184 ID of the discarded snapshot. <tt>null</tt> means the
1185 current machine state has been discarded (restored from
1186 the current snapshot).
1187 </desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotChange">
1192 <desc>
1193 Snapshot properties (name and/or description) have been changed.
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>ID of the changed snapshot.</desc>
1201 </param>
1202 </method>
1203
1204 <method name="onGuestPropertyChange">
1205 <desc>
1206 Notification when a guest property has changed.
1207 </desc>
1208 <param name="machineId" type="uuid" dir="in">
1209 <desc>
1210 ID of the machine this event relates to.
1211 </desc>
1212 </param>
1213 <param name="name" type="wstring" dir="in">
1214 <desc>
1215 The name of the property that has changed.
1216 </desc>
1217 </param>
1218 <param name="value" type="wstring" dir="in">
1219 <desc>
1220 The new property value.
1221 </desc>
1222 </param>
1223 <param name="flags" type="wstring" dir="in">
1224 <desc>
1225 The new property flags.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 </interface>
1231
1232 <interface
1233 name="IDHCPServer" extends="$unknown"
1234 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1235 wsmap="managed"
1236 >
1237 <desc>
1238 The IDHCPServer interface represents the vbox dhcp server configuration.
1239
1240 To enumerate all the dhcp servers on the host, use the
1241 <link to="IVirtualBox::DHCPServers"/> attribute.
1242 </desc>
1243
1244 <attribute name="enabled" type="boolean">
1245 <desc>
1246 specifies if the dhcp server is enabled
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="IPAddress" type="wstring" readonly="yes">
1251 <desc>
1252 specifies server IP
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="networkMask" type="wstring" readonly="yes">
1257 <desc>
1258 specifies server network mask
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="networkName" type="wstring" readonly="yes">
1263 <desc>
1264 specifies internal network name the server is used for
1265 </desc>
1266 </attribute>
1267
1268 <attribute name="lowerIP" type="wstring" readonly="yes">
1269 <desc>
1270 specifies from IP adrres in server address range
1271 </desc>
1272 </attribute>
1273
1274 <attribute name="upperIP" type="wstring" readonly="yes">
1275 <desc>
1276 specifies to IP adrres in server address range
1277 </desc>
1278 </attribute>
1279
1280 <method name="setConfiguration">
1281 <desc>
1282 configures the server
1283 <result name="E_INVALIDARG">
1284 invalid configuration supplied
1285 </result>
1286 </desc>
1287 <param name="IPAddress" type="wstring" dir="in">
1288 <desc>
1289 server IP address
1290 </desc>
1291 </param>
1292 <param name="networkMask" type="wstring" dir="in">
1293 <desc>
1294 server network mask
1295 </desc>
1296 </param>
1297 <param name="FromIPAddress" type="wstring" dir="in">
1298 <desc>
1299 server From IP address for address range
1300 </desc>
1301 </param>
1302 <param name="ToIPAddress" type="wstring" dir="in">
1303 <desc>
1304 server To IP address for address range
1305 </desc>
1306 </param>
1307 </method>
1308
1309 <method name="start">
1310 <desc>
1311 Starts DHCP server process.
1312 <result name="E_FAIL">
1313 Failed to start the process.
1314 </result>
1315 </desc>
1316 <param name="networkName" type="wstring" dir="in">
1317 <desc>
1318 Name of internal network DHCP server should attach to.
1319 </desc>
1320 </param>
1321 <param name="trunkName" type="wstring" dir="in">
1322 <desc>
1323 Name of internal network trunk.
1324 </desc>
1325 </param>
1326 <param name="trunkType" type="wstring" dir="in">
1327 <desc>
1328 Type of internal network trunk.
1329 </desc>
1330 </param>
1331 </method>
1332
1333 <method name="stop">
1334 <desc>
1335 Stops DHCP server process.
1336 <result name="E_FAIL">
1337 Failed to stop the process.
1338 </result>
1339 </desc>
1340 </method>
1341 </interface>
1342
1343 <interface
1344 name="IVirtualBox" extends="$dispatched"
1345 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1346 wsmap="managed"
1347 >
1348 <desc>
1349 The IVirtualBox interface represents the main interface exposed by the
1350 product that provides virtual machine management.
1351
1352 An instance of IVirtualBox is required for the product to do anything
1353 useful. Even though the interface does not expose this, internally,
1354 IVirtualBox is implemented as a singleton and actually lives in the
1355 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1356 IVirtualBox can track the state of all virtual machines on a particular
1357 host, regardless of which frontend started them.
1358
1359 To enumerate all the virtual machines on the host, use the
1360 <link to="IVirtualBox::machines"/> attribute.
1361 </desc>
1362
1363 <attribute name="version" type="wstring" readonly="yes">
1364 <desc>
1365 A string representing the version number of the product. The
1366 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1367 last number represents the build number and will frequently change.
1368 </desc>
1369 </attribute>
1370
1371 <attribute name="revision" type="unsigned long" readonly="yes">
1372 <desc>
1373 The internal build revision number of the product.
1374 </desc>
1375 </attribute>
1376
1377 <attribute name="packageType" type="wstring" readonly="yes">
1378 <desc>
1379 A string representing the package type of this product. The
1380 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1381 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1382 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1383 this.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="homeFolder" type="wstring" readonly="yes">
1388 <desc>
1389 Full path to the directory where the global settings file,
1390 <tt>VirtualBox.xml</tt>, is stored.
1391
1392 In this version of VirtualBox, the value of this property is
1393 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1394 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1395 as determined by the host OS), and cannot be changed.
1396
1397 This path is also used as the base to resolve relative paths in
1398 places where relative paths are allowed (unless otherwise
1399 expressly indicated).
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1404 <desc>
1405 Full name of the global settings file.
1406 The value of this property corresponds to the value of
1407 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1408 </desc>
1409 </attribute>
1410
1411 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1412 <desc>
1413 Current version of the format of the global VirtualBox settings file
1414 (<tt>VirtualBox.xml</tt>).
1415
1416 The version string has the following format:
1417 <pre>
1418 x.y-platform
1419 </pre>
1420 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1421 versions, and <tt>platform</tt> is the platform identifier.
1422
1423 The current version usually matches the value of the
1424 <link to="#settingsFormatVersion"/> attribute unless the
1425 settings file was created by an older version of VirtualBox and there
1426 was a change of the settings file format since then.
1427
1428 Note that VirtualBox automatically converts settings files from older
1429 versions to the most recent version when reading them (usually at
1430 VirtualBox startup) but it doesn't save the changes back until
1431 you call a method that implicitly saves settings (such as
1432 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1433 explicitly. Therefore, if the value of this attribute differs from the
1434 value of <link to="#settingsFormatVersion"/>, then it
1435 means that the settings file was converted but the result of the
1436 conversion is not yet saved to disk.
1437
1438 The above feature may be used by interactive front-ends to inform users
1439 about the settings file format change and offer them to explicitly save
1440 all converted settings files (the global and VM-specific ones),
1441 optionally create backup copies of the old settings files before saving,
1442 etc.
1443
1444 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1445 </desc>
1446 </attribute>
1447
1448 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1449 <desc>
1450 Most recent version of the settings file format.
1451
1452 The version string has the following format:
1453 <pre>
1454 x.y-platform
1455 </pre>
1456 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1457 versions, and <tt>platform</tt> is the platform identifier.
1458
1459 VirtualBox uses this version of the format when saving settings files
1460 (either as a result of method calls that require to save settings or as
1461 a result of an explicit call to <link to="#saveSettings"/>).
1462
1463 <see>settingsFileVersion</see>
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="host" type="IHost" readonly="yes">
1468 <desc>Associated host object.</desc>
1469 </attribute>
1470
1471 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1472 <desc>Associated system information object.</desc>
1473 </attribute>
1474
1475 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1476 <desc>
1477 Array of machine objects registered within this VirtualBox instance.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1482 <desc>
1483 Array of hard disk objects known to this VirtualBox installation.
1484
1485 This array contains only base (root) hard disks. All differencing
1486 hard disks of the given base hard disk can be enumerated using
1487 <link to="IHardDisk::children"/>.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1492 <desc>
1493 Array of CD/DVD image objects registered with this VirtualBox instance.
1494 </desc>
1495 </attribute>
1496
1497 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1498 <desc>
1499 Array of floppy image objects registered with this VirtualBox instance.
1500 </desc>
1501 </attribute>
1502
1503 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1504
1505 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1506
1507 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1508 <desc>
1509 Collection of global shared folders. Global shared folders are
1510 available to all virtual machines.
1511
1512 New shared folders are added to the collection using
1513 <link to="#createSharedFolder"/>. Existing shared folders can be
1514 removed using <link to="#removeSharedFolder"/>.
1515
1516 <note>
1517 In the current version of the product, global shared folders are not
1518 implemented and therefore this collection is always empty.
1519 </note>
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1524 <desc>
1525 Associated performance collector object.
1526 </desc>
1527 </attribute>
1528
1529 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1530 <desc>
1531 dhcp server settings.
1532 </desc>
1533 </attribute>
1534
1535 <method name="createMachine">
1536 <desc>
1537 Creates a new virtual machine.
1538
1539 The new machine is created unregistered, with the initial configuration
1540 set according to the specified guest OS type. A typical sequence of
1541 actions to create a new virtual machine is as follows:
1542
1543 <ol>
1544 <li>
1545 Call this method to have a new machine created. The returned machine
1546 object will be "mutable" allowing to change any machine property.
1547 </li>
1548
1549 <li>
1550 Configure the machine using the appropriate attributes and methods.
1551 </li>
1552
1553 <li>
1554 Call <link to="IMachine::saveSettings" /> to write the settings
1555 to the machine's XML settings file. The configuration of the newly
1556 created machine will not be saved to disk until this method is
1557 called.
1558 </li>
1559
1560 <li>
1561 Call <link to="#registerMachine" /> to add the machine to the list
1562 of machines known to VirtualBox.
1563 </li>
1564 </ol>
1565
1566 You should specify valid name for the newly created machine when calling
1567 this method. See the <link to="IMachine::name"/> attribute description
1568 for more details about the machine name.
1569
1570 The specified guest OS type identifier must match an ID of one of known
1571 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1572 array.
1573
1574 Every machine has a <i>settings file</i> that is used to store
1575 the machine configuration. This file is stored in a directory called the
1576 <i>machine settings subfolder</i>. Both the settings subfolder and file
1577 will have a name that corresponds to the name of the virtual machine.
1578 You can specify where to create the machine setting subfolder using the
1579 @a baseFolder argument. The base folder can be absolute (full path) or
1580 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1581 directory</link>.
1582
1583 If @a baseFolder is a null or empty string (which is recommended), the
1584 <link to="ISystemProperties::defaultMachineFolder">default machine
1585 settings folder</link> will be used as a base folder for the created
1586 machine. Otherwise the given base folder will be used. In either case,
1587 the full path to the resulting settings file has the following
1588 structure:
1589 <pre>
1590 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1591 </pre>
1592
1593 Note that if the resulting settings file already exists, this method
1594 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1595
1596 Optionally, you may specify an UUID of to assign to the created machine.
1597 However, this is not recommended and you should normally pass an empty
1598 (null) UUID to this method so that a new UUID will be automatically
1599 generated for every created machine. You can use UUID
1600 00000000-0000-0000-0000-000000000000 as null value.
1601
1602 <note>
1603 There is no way to change the name of the settings file or
1604 subfolder of the created machine directly.
1605 </note>
1606
1607 <result name="VBOX_E_OBJECT_NOT_FOUND">
1608 @a osTypeId is invalid.
1609 </result>
1610 <result name="VBOX_E_FILE_ERROR">
1611 Resulting settings file name is invalid or the settings file already
1612 exists or could not be created due to an I/O error.
1613 </result>
1614 <result name="E_INVALIDARG">
1615 @a name is empty or null.
1616 </result>
1617 </desc>
1618
1619 <param name="name" type="wstring" dir="in">
1620 <desc>Machine name.</desc>
1621 </param>
1622 <param name="osTypeId" type="wstring" dir="in">
1623 <desc>Guest OS Type ID.</desc>
1624 </param>
1625 <param name="baseFolder" type="wstring" dir="in">
1626 <desc>Base machine folder (optional).</desc>
1627 </param>
1628 <param name="id" type="uuid" dir="in">
1629 <desc>Machine UUID (optional).</desc>
1630 </param>
1631 <param name="machine" type="IMachine" dir="return">
1632 <desc>Created machine object.</desc>
1633 </param>
1634 </method>
1635
1636 <method name="createLegacyMachine">
1637 <desc>
1638 Creates a new virtual machine in "legacy" mode, using the specified
1639 settings file to store machine settings.
1640
1641 As opposed to machines created by <link to="#createMachine"/>,
1642 the settings file of the machine created in "legacy" mode is not
1643 automatically renamed when the machine name is changed -- it will always
1644 remain the same as specified in this method call.
1645
1646 The specified settings file name can be absolute (full path) or relative
1647 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1648 directory</link>. If the file name doesn't contain an extension, the
1649 default extension (.xml) will be appended.
1650
1651 Note that the configuration of the newly created machine is not
1652 saved to disk (and therefore no settings file is created)
1653 until <link to="IMachine::saveSettings"/> is called. If the
1654 specified settings file already exists, this method
1655 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1656
1657 See <link to="#createMachine"/> for more information.
1658
1659 @deprecated This method may be removed later. Use <link
1660 to="IVirtualBox::createMachine"/> instead.
1661
1662 <note>
1663 There is no way to change the name of the settings file
1664 of the machine created in "legacy" mode.
1665 </note>
1666
1667 <result name="VBOX_E_OBJECT_NOT_FOUND">
1668 @a osTypeId is invalid.
1669 </result>
1670 <result name="VBOX_E_FILE_ERROR">
1671 @a settingsFile is invalid or the settings file already exists or
1672 could not be created due to an I/O error.
1673 </result>
1674 <result name="E_INVALIDARG">
1675 @a name or @a settingsFile is empty or null.
1676 </result>
1677 </desc>
1678
1679 <param name="name" type="wstring" dir="in">
1680 <desc>Machine name.</desc>
1681 </param>
1682 <param name="osTypeId" type="wstring" dir="in">
1683 <desc>Machine OS Type ID.</desc>
1684 </param>
1685 <param name="settingsFile" type="wstring" dir="in">
1686 <desc>Name of the machine settings file.</desc>
1687 </param>
1688 <param name="id" type="uuid" dir="in">
1689 <desc>Machine UUID (optional).</desc>
1690 </param>
1691 <param name="machine" type="IMachine" dir="return">
1692 <desc>Created machine object.</desc>
1693 </param>
1694 </method>
1695
1696 <method name="openMachine">
1697 <desc>
1698 Opens a virtual machine from the existing settings file.
1699 The opened machine remains unregistered until you call
1700 <link to="#registerMachine"/>.
1701
1702 The specified settings file name can be absolute
1703 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1704 VirtualBox home directory</link>. This file must exist
1705 and must be a valid machine settings file whose contents
1706 will be used to construct the machine object.
1707
1708 @deprecated Will be removed soon.
1709 <result name="VBOX_E_FILE_ERROR">
1710 Settings file name invalid, not found or sharing violation.
1711 </result>
1712 </desc>
1713 <param name="settingsFile" type="wstring" dir="in">
1714 <desc>
1715 Name of the machine settings file.
1716 </desc>
1717 </param>
1718 <param name="machine" type="IMachine" dir="return">
1719 <desc>Opened machine object.</desc>
1720 </param>
1721 <note>
1722 <link to="IMachine::settingsModified"/> will return
1723 false for the created machine, until any of machine settings
1724 are changed.
1725 </note>
1726 </method>
1727
1728 <method name="registerMachine">
1729 <desc>
1730
1731 Registers the machine previously created using
1732 <link to="#createMachine"/> or opened using
1733 <link to="#openMachine"/> within this VirtualBox installation. After
1734 successful method invocation, the
1735 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1736 to all registered callbacks.
1737
1738 <note>
1739 This method implicitly calls <link to="IMachine::saveSettings"/>
1740 to save all current machine settings before registering it.
1741 </note>
1742
1743 <result name="VBOX_E_OBJECT_NOT_FOUND">
1744 No matching virtual machine found.
1745 </result>
1746 <result name="VBOX_E_INVALID_OBJECT_STATE">
1747 Virtual machine was not created within this VirtualBox instance.
1748 </result>
1749
1750 </desc>
1751 <param name="machine" type="IMachine" dir="in"/>
1752 </method>
1753
1754 <method name="getMachine">
1755 <desc>
1756 Attempts to find a virtual machine given its UUID.
1757 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1758 instead.
1759
1760 <result name="VBOX_E_OBJECT_NOT_FOUND">
1761 Could not find registered machine matching @a id.
1762 </result>
1763
1764 </desc>
1765 <param name="id" type="uuid" dir="in"/>
1766 <param name="machine" type="IMachine" dir="return"/>
1767 </method>
1768
1769 <method name="findMachine">
1770 <desc>
1771 Attempts to find a virtual machine given its name.
1772 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1773 instead.
1774
1775 <result name="VBOX_E_OBJECT_NOT_FOUND">
1776 Could not find registered machine matching @a name.
1777 </result>
1778
1779 </desc>
1780 <param name="name" type="wstring" dir="in"/>
1781 <param name="machine" type="IMachine" dir="return"/>
1782 </method>
1783
1784 <method name="unregisterMachine">
1785 <desc>
1786
1787 Unregisters the machine previously registered using
1788 <link to="#registerMachine"/>. After successful method invocation, the
1789 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1790 to all registered callbacks.
1791
1792 <note>
1793 The specified machine must not be in the Saved state, have an open
1794 (or a spawning) direct session associated with it, have snapshots or
1795 have hard disks attached.
1796 </note>
1797
1798 <note>
1799 This method implicitly calls <link to="IMachine::saveSettings"/> to
1800 save all current machine settings before unregistering it.
1801 </note>
1802
1803 <note>
1804 If the given machine is inaccessible (see
1805 <link to="IMachine::accessible"/>), it will be unregistered and
1806 fully uninitialized right afterwards. As a result, the returned
1807 machine object will be unusable and an attempt to call
1808 <b>any</b> method will return the "Object not ready" error.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 Could not find registered machine matching @a id.
1813 </result>
1814 <result name="VBOX_E_INVALID_VM_STATE">
1815 Machine is in Saved state.
1816 </result>
1817 <result name="VBOX_E_INVALID_OBJECT_STATE">
1818 Machine has snapshot or open session or hard disk attached.
1819 </result>
1820
1821 </desc>
1822 <param name="id" type="uuid" dir="in">
1823 <desc>UUID of the machine to unregister.</desc>
1824 </param>
1825 <param name="machine" type="IMachine" dir="return">
1826 <desc>Unregistered machine object.</desc>
1827 </param>
1828 </method>
1829
1830 <method name="createAppliance">
1831 <desc>
1832 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1833 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1834 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1835 </desc>
1836 <param name="appliance" type="IAppliance" dir="return">
1837 <desc>New appliance.</desc>
1838 </param>
1839 </method>
1840
1841 <method name="createHardDisk">
1842 <desc>
1843 Creates a new base hard disk object that will use the given storage
1844 format and location for hard disk data.
1845
1846 Note that the actual storage unit is not created by this method. In
1847 order to do it, and before you are able to attach the created hard disk
1848 to virtual machines, you must call one of the following methods to
1849 allocate a format-specific storage unit at the specified location:
1850 <ul>
1851 <li><link to="IHardDisk::createBaseStorage"/></li>
1852 <li><link to="IHardDisk::createDiffStorage"/></li>
1853 </ul>
1854
1855 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1856 remain uninitialized until the hard disk storage unit is successfully
1857 created by one of the above methods.
1858
1859 After the storage unit is successfully created, the hard disk gets
1860 remembered by this VirtualBox installation and will be accessible
1861 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1862 methods. Remembered root (base) hard disks are also returned as part of
1863 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1864
1865 The list of all storage formats supported by this VirtualBox
1866 installation can be obtained using
1867 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1868 attribute is empty or <tt>null</tt> then the default storage format
1869 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1870 be used for creating a storage unit of the hard disk.
1871
1872 Note that the format of the location string is storage format specific.
1873 See <link to="IMedium::location"/>, IHardDisk and
1874 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1875
1876 <result name="VBOX_E_OBJECT_NOT_FOUND">
1877 @a format identifier is invalid. See
1878 <link to="ISystemProperties::hardDiskFormats"/>.
1879 </result>
1880 <result name="VBOX_E_FILE_ERROR">
1881 @a location is a not valid file name (for file-based formats only).
1882 </result>
1883 <result name="E_INVALIDARG">
1884 @a format is a null or empty string.
1885 </result>
1886 </desc>
1887 <param name="format" type="wstring" dir="in">
1888 <desc>
1889 Identifier of the storage format to use for the new hard disk.
1890 </desc>
1891 </param>
1892 <param name="location" type="wstring" dir="in">
1893 <desc>
1894 Location of the storage unit for the new hard disk.
1895 </desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk" dir="return">
1898 <desc>Created hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openHardDisk">
1903 <desc>
1904 Opens a hard disk from an existing location.
1905
1906 After the hard disk is successfully opened by this method, it gets
1907 remembered by (known to) this VirtualBox installation and will be
1908 accessible through <link to="#getHardDisk"/> and
1909 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1910 are also returned as part of the <link to="#hardDisks"/> array and can
1911 be attached to virtual machines. See IHardDisk for more details.
1912
1913 If a differencing hard disk is to be opened by this method, the
1914 operation will succeed only if its parent hard disk and all ancestors,
1915 if any, are already known to this VirtualBox installation (for example,
1916 were opened by this method before).
1917
1918 This method tries to guess the storage format of the specified hard disk
1919 by reading hard disk data at the specified location.
1920
1921 If @a write is ReadWrite (which it should be), the image is opened for
1922 read/write access and must have according permissions, as VirtualBox
1923 may actually write status information into the disk's metadata sections.
1924
1925 Note that write access is required for all typical image usage in VirtualBox,
1926 since VirtualBox may need to write metadata such as a UUID into the image.
1927 The only exception is opening a source image temporarily for copying and
1928 cloning when the image will quickly be closed again.
1929
1930 Note that the format of the location string is storage format specific.
1931 See <link to="IMedium::location"/>, IHardDisk and
1932 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1933
1934 <result name="VBOX_E_FILE_ERROR">
1935 Invalid hard disk storage file location.
1936 </result>
1937 <result name="VBOX_E_IPRT_ERROR">
1938 Could not get hard disk storage format.
1939 </result>
1940 <result name="E_INVALIDARG">
1941 Invalid hard disk storage format.
1942 </result>
1943
1944 </desc>
1945 <param name="location" type="wstring" dir="in">
1946 <desc>
1947 Location of the storage unit that contains hard disk data in one of
1948 the supported storage formats.
1949 </desc>
1950 </param>
1951 <param name="accessMode" type="AccessMode" dir="in">
1952 <desc>
1953 Determines whether to open the image in read/write or read-only mode.
1954 </desc>
1955 </param>
1956 <param name="hardDisk" type="IHardDisk" dir="return">
1957 <desc>Opened hard disk object.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="getHardDisk" const="yes">
1962 <desc>
1963 Returns a hard disk with the given UUID.
1964
1965 The hard disk with the given UUID must be known to this VirtualBox
1966 installation, i.e. it must be previously created by
1967 <link to="#createHardDisk"/> or opened by <link
1968 to="#openHardDisk"/>, or attached to some known virtual machine.
1969
1970 <result name="VBOX_E_OBJECT_NOT_FOUND">
1971 No hard disk object matching @a id found.
1972 </result>
1973
1974 </desc>
1975 <param name="id" type="uuid" dir="in">
1976 <desc>UUID of the hard disk to look for.</desc>
1977 </param>
1978 <param name="hardDisk" type="IHardDisk" dir="return">
1979 <desc>Found hard disk object.</desc>
1980 </param>
1981 </method>
1982
1983 <method name="findHardDisk">
1984 <desc>
1985 Returns a hard disk that uses the given location to store hard
1986 disk data.
1987
1988 The given hard disk must be known to this VirtualBox installation, i.e.
1989 it must be previously created by
1990 <link to="#createHardDisk"/> or opened by <link
1991 to="#openHardDisk"/>, or attached to some known virtual machine.
1992
1993 The search is done by comparing the value of the @a location argument to
1994 the <link to="IHardDisk::location"/> attribute of each known hard
1995 disk.
1996
1997 For locations represented by file names in the host's file system, the
1998 requested location can be a path relative to the
1999 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2000 only a file name without any path is given, the
2001 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2002 folder</link> will be prepended to the file name before searching. Note
2003 that on case sensitive file systems, a case sensitive comparison is
2004 performed, otherwise the case of symbols in the file path is ignored.
2005
2006 <result name="VBOX_E_OBJECT_NOT_FOUND">
2007 No hard disk object matching @a location found.
2008 </result>
2009
2010 </desc>
2011 <param name="location" type="wstring" dir="in">
2012 <desc>Location string to search for.</desc>
2013 </param>
2014 <param name="hardDisk" type="IHardDisk" dir="return">
2015 <desc>Found hard disk object.</desc>
2016 </param>
2017 </method>
2018
2019 <method name="openDVDImage">
2020 <desc>
2021 Opens a CD/DVD image contained in the specified file of the supported
2022 format and assigns it the given UUID.
2023
2024 After the image is successfully opened by this method, it gets
2025 remembered by (known to) this VirtualBox installation and will be
2026 accessible through <link to="#getDVDImage"/> and
2027 <link to="#findDVDImage"/> methods. Remembered images are also
2028 returned as part of the <link to="#DVDImages"/> array and can be mounted
2029 to virtual machines. See IMedium for more details.
2030
2031 See <link to="IMedium::location"/> to get more details about the format
2032 of the location string.
2033
2034 <note>
2035 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2036 </note>
2037
2038 <result name="VBOX_E_INVALID_OBJECT_STATE">
2039 CD/DVD image already exists in the media registry.
2040 </result>
2041
2042 </desc>
2043 <param name="location" type="wstring" dir="in">
2044 <desc>
2045 Full path to the file that contains a valid CD/DVD image.
2046 </desc>
2047 </param>
2048 <param name="id" type="uuid" dir="in">
2049 <desc>
2050 UUID to assign to the given image within this VirtualBox installation.
2051 If an empty (null) UUID is specified, the system will randomly
2052 generate a new UUID.
2053 </desc>
2054 </param>
2055 <param name="image" type="IDVDImage" dir="return">
2056 <desc>Opened CD/DVD image object.</desc>
2057 </param>
2058 </method>
2059
2060 <method name="getDVDImage">
2061 <desc>
2062 Returns a CD/DVD image with the given UUID.
2063
2064 The image with the given UUID must be known to this VirtualBox
2065 installation, i.e. it must be previously opened by <link
2066 to="#openDVDImage"/>, or mounted to some known virtual machine.
2067
2068 <result name="VBOX_E_OBJECT_NOT_FOUND">
2069 No matching DVD image found in the media registry.
2070 </result>
2071
2072 </desc>
2073 <param name="id" type="uuid" dir="in">
2074 <desc>UUID of the image to look for.</desc>
2075 </param>
2076 <param name="image" type="IDVDImage" dir="return">
2077 <desc>Found CD/DVD image object.</desc>
2078 </param>
2079 </method>
2080
2081 <method name="findDVDImage">
2082 <desc>
2083 Returns a CD/DVD image with the given image location.
2084
2085 The image with the given UUID must be known to this VirtualBox
2086 installation, i.e. it must be previously opened by <link
2087 to="#openDVDImage"/>, or mounted to some known virtual machine.
2088
2089 The search is done by comparing the value of the @a location argument to
2090 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2091
2092 The requested location can be a path relative to the
2093 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2094 only a file name without any path is given, the
2095 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2096 folder</link> will be prepended to the file name before searching. Note
2097 that on case sensitive file systems, a case sensitive comparison is
2098 performed, otherwise the case in the file path is ignored.
2099
2100 <result name="VBOX_E_FILE_ERROR">
2101 Invalid image file location.
2102 </result>
2103 <result name="VBOX_E_OBJECT_NOT_FOUND">
2104 No matching DVD image found in the media registry.
2105 </result>
2106
2107 </desc>
2108 <param name="location" type="wstring" dir="in">
2109 <desc>CD/DVD image file path to look for.</desc>
2110 </param>
2111 <param name="image" type="IDVDImage" dir="return">
2112 <desc>Found CD/DVD image object.</desc>
2113 </param>
2114 </method>
2115
2116 <method name="openFloppyImage">
2117 <desc>
2118 Opens a floppy image contained in the specified file of the supported
2119 format and assigns it the given UUID.
2120
2121 After the image is successfully opened by this method, it gets
2122 remembered by (known to) this VirtualBox installation and will be
2123 accessible through <link to="#getFloppyImage"/> and
2124 <link to="#findFloppyImage"/> methods. Remembered images are also
2125 returned as part of the <link to="#floppyImages"/> array and can be
2126 mounted to virtual machines. See IMedium for more details.
2127
2128 See <link to="IMedium::location"/> to get more details about the format
2129 of the location string.
2130
2131 <result name="VBOX_E_FILE_ERROR">
2132 Floppy image specified by @a location not accessible.
2133 </result>
2134 <result name="VBOX_E_INVALID_OBJECT_STATE">
2135 Floppy image already exists in the media registry.
2136 </result>
2137
2138 <note>
2139 Currently, only raw floppy images are supported by VirtualBox.
2140 </note>
2141 </desc>
2142 <param name="location" type="wstring" dir="in">
2143 <desc>
2144 Full path to the file that contains a valid floppy image.
2145 </desc>
2146 </param>
2147 <param name="id" type="uuid" dir="in">
2148 <desc>
2149 UUID to assign to the given image file within this VirtualBox
2150 installation. If an empty (null) UUID is specified, the system will
2151 randomly generate a new UUID.
2152 </desc>
2153 </param>
2154 <param name="image" type="IFloppyImage" dir="return">
2155 <desc>Opened floppy image object.</desc>
2156 </param>
2157 </method>
2158
2159 <method name="getFloppyImage">
2160 <desc>
2161 Returns a floppy image with the given UUID.
2162
2163 The image with the given UUID must be known to this VirtualBox
2164 installation, i.e. it must be previously opened by <link
2165 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2166
2167 <result name="VBOX_E_OBJECT_NOT_FOUND">
2168 No matching floppy image found in the media registry.
2169 </result>
2170
2171 </desc>
2172 <param name="id" type="uuid" dir="in">
2173 <desc>UUID of the image to look for.</desc>
2174 </param>
2175 <param name="image" type="IFloppyImage" dir="return">
2176 <desc>Found floppy image object.</desc>
2177 </param>
2178 </method>
2179
2180 <method name="findFloppyImage">
2181 <desc>
2182 Returns a floppy image with the given image location.
2183
2184 The image with the given UUID must be known to this VirtualBox
2185 installation, i.e. it must be previously opened by <link
2186 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2187
2188 The search is done by comparing the value of the @a location argument to
2189 the <link to="IMedium::location"/> attribute of each known floppy image.
2190
2191 The requested location can be a path relative to the
2192 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2193 only a file name without any path is given, the
2194 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2195 folder</link> will be prepended to the file name before searching. Note
2196 that on case sensitive file systems, a case sensitive comparison is
2197 performed, otherwise the case of symbols in the file path is ignored.
2198
2199 <result name="VBOX_E_FILE_ERROR">
2200 Invalid image file location.
2201 </result>
2202 <result name="VBOX_E_OBJECT_NOT_FOUND">
2203 No matching floppy image found in the media registry.
2204 </result>
2205
2206 </desc>
2207 <param name="location" type="wstring" dir="in">
2208 <desc>Floppy image file path to look for.</desc>
2209 </param>
2210 <param name="image" type="IFloppyImage" dir="return">
2211 <desc>Found floppy image object.</desc>
2212 </param>
2213 </method>
2214
2215 <method name="getGuestOSType">
2216 <desc>
2217 Returns an object describing the specified guest OS type.
2218
2219 The requested guest OS type is specified using a string which is a
2220 mnemonic identifier of the guest operating system, such as
2221 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2222 particular virtual machine can be read or set using the
2223 <link to="IMachine::OSTypeId"/> attribute.
2224
2225 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2226 available guest OS type objects. Each object has an
2227 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2228 the guest OS this object describes.
2229
2230 <result name="E_INVALIDARG">
2231 @a id is not a valid Guest OS type.
2232 </result>
2233
2234 </desc>
2235 <param name="id" type="wstring" dir="in">
2236 <desc>Guest OS type ID string.</desc>
2237 </param>
2238 <param name="type" type="IGuestOSType" dir="return">
2239 <desc>Guest OS type object.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="createSharedFolder">
2244 <desc>
2245 Creates a new global shared folder by associating the given logical
2246 name with the given host path, adds it to the collection of shared
2247 folders and starts sharing it. Refer to the description of
2248 <link to="ISharedFolder"/> to read more about logical names.
2249 <note>
2250 In the current implementation, this operation is not
2251 implemented.
2252 </note>
2253 </desc>
2254 <param name="name" type="wstring" dir="in">
2255 <desc>Unique logical name of the shared folder.</desc>
2256 </param>
2257 <param name="hostPath" type="wstring" dir="in">
2258 <desc>Full path to the shared folder in the host file system.</desc>
2259 </param>
2260 <param name="writable" type="boolean" dir="in">
2261 <desc>Whether the share is writable or readonly</desc>
2262 </param>
2263 </method>
2264
2265 <method name="removeSharedFolder">
2266 <desc>
2267 Removes the global shared folder with the given name previously
2268 created by <link to="#createSharedFolder"/> from the collection of
2269 shared folders and stops sharing it.
2270 <note>
2271 In the current implementation, this operation is not
2272 implemented.
2273 </note>
2274 </desc>
2275 <param name="name" type="wstring" dir="in">
2276 <desc>Logical name of the shared folder to remove.</desc>
2277 </param>
2278 </method>
2279
2280 <method name="getNextExtraDataKey">
2281 <desc>
2282 Returns the global extra data key name following the supplied key.
2283
2284 An error is returned if the supplied @a key does not exist. @c NULL is
2285 returned in @a nextKey if the supplied key is the last key. When
2286 supplying @c NULL or an empty string for the @a key, the first key item
2287 is returned in @a nextKey (if there is any). @a nextValue is an optional
2288 parameter and if supplied, the next key's value is returned in it.
2289
2290 <result name="VBOX_E_OBJECT_NOT_FOUND">
2291 Extra data @a key not found.
2292 </result>
2293
2294 </desc>
2295 <param name="key" type="wstring" dir="in">
2296 <desc>Name of the data key to follow.</desc>
2297 </param>
2298 <param name="nextKey" type="wstring" dir="out">
2299 <desc>Name of the next data key.</desc>
2300 </param>
2301 <param name="nextValue" type="wstring" dir="out">
2302 <desc>Value of the next data key.</desc>
2303 </param>
2304 </method>
2305
2306 <method name="getExtraData">
2307 <desc>
2308 Returns associated global extra data.
2309
2310 If the requested data @a key does not exist, this function will
2311 succeed and return @c NULL in the @a value argument.
2312
2313 <result name="VBOX_E_FILE_ERROR">
2314 Settings file not accessible.
2315 </result>
2316 <result name="VBOX_E_XML_ERROR">
2317 Could not parse the settings file.
2318 </result>
2319
2320 </desc>
2321 <param name="key" type="wstring" dir="in">
2322 <desc>Name of the data key to get.</desc>
2323 </param>
2324 <param name="value" type="wstring" dir="return">
2325 <desc>Value of the requested data key.</desc>
2326 </param>
2327 </method>
2328
2329 <method name="setExtraData">
2330 <desc>
2331 Sets associated global extra data.
2332
2333 If you pass @c NULL as a key @a value, the given @a key will be
2334 deleted.
2335
2336 <note>
2337 Before performing the actual data change, this method will ask all
2338 registered callbacks using the
2339 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2340 notification for a permission. If one of the callbacks refuses the
2341 new value, the change will not be performed.
2342 </note>
2343 <note>
2344 On success, the
2345 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2346 is called to inform all registered callbacks about a successful data
2347 change.
2348 </note>
2349
2350 <result name="VBOX_E_FILE_ERROR">
2351 Settings file not accessible.
2352 </result>
2353 <result name="VBOX_E_XML_ERROR">
2354 Could not parse the settings file.
2355 </result>
2356 <result name="E_ACCESSDENIED">
2357 Modification request refused.
2358 </result>
2359
2360 </desc>
2361 <param name="key" type="wstring" dir="in">
2362 <desc>Name of the data key to set.</desc>
2363 </param>
2364 <param name="value" type="wstring" dir="in">
2365 <desc>Value to assign to the key.</desc>
2366 </param>
2367 </method>
2368
2369 <method name="openSession">
2370 <desc>
2371 Opens a new direct session with the given virtual machine.
2372
2373 A direct session acts as a local lock on the given VM.
2374 There can be only one direct session open at a time for every
2375 virtual machine, protecting the VM from being manipulated by
2376 conflicting actions from different processes. Only after a
2377 direct session has been opened, one can change all VM settings
2378 and execute the VM in the process space of the session object.
2379
2380 Sessions therefore can be compared to mutex semaphores that
2381 lock a given VM for modification and execution.
2382 See <link to="ISession">ISession</link> for details.
2383
2384 <note>Unless you are writing a new VM frontend, you will not
2385 want to execute a VM in the current process. To spawn a new
2386 process that executes a VM, use
2387 <link to="IVirtualBox::openRemoteSession" />
2388 instead.</note>
2389
2390 Upon successful return, the session object can be used to
2391 get access to the machine and to the VM console.
2392
2393 In VirtualBox terminology, the machine becomes "mutable" after
2394 a session has been opened. Note that the "mutable" machine
2395 object, on which you may invoke IMachine methods to change its
2396 settings, will be a different object from the immutable IMachine
2397 objects returned by various IVirtualBox methods. To obtain a
2398 mutable IMachine object (upon which you can invoke settings methods),
2399 use the <link to="ISession::machine" /> attribute.
2400
2401 One must always call <link to="ISession::close" /> to release the
2402 lock on the machine, or the machine's state will eventually be
2403 set to "Aborted".
2404
2405 In other words, to change settings on a machine, the following
2406 sequence is typically performed:
2407
2408 <ol>
2409 <li>Call this method (openSession) to have a machine locked for
2410 the current session.</li>
2411
2412 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2413
2414 <li>Change the settings of the machine.</li>
2415
2416 <li>Call <link to="IMachine::saveSettings" />.</li>
2417
2418 <li>Close the session by calling <link to="ISession::close"/>.</li>
2419 </ol>
2420
2421 <result name="E_UNEXPECTED">
2422 Virtual machine not registered.
2423 </result>
2424 <result name="E_ACCESSDENIED">
2425 Process not started by OpenRemoteSession.
2426 </result>
2427 <result name="VBOX_E_OBJECT_NOT_FOUND">
2428 No matching virtual machine found.
2429 </result>
2430 <result name="VBOX_E_INVALID_OBJECT_STATE">
2431 Session already open or being opened.
2432 </result>
2433 <result name="VBOX_E_VM_ERROR">
2434 Failed to assign machine to session.
2435 </result>
2436
2437 </desc>
2438 <param name="session" type="ISession" dir="in">
2439 <desc>
2440 Session object that will represent the opened session after
2441 successful method invocation. This object must not represent
2442 the already open session.
2443 <note>
2444 This session will be automatically closed if the
2445 VirtualBox server is terminated for some reason.
2446 </note>
2447 </desc>
2448 </param>
2449 <param name="machineId" type="uuid" dir="in">
2450 <desc>ID of the virtual machine to open a session with.</desc>
2451 </param>
2452 </method>
2453
2454 <method name="openRemoteSession">
2455 <desc>
2456 Spawns a new process that executes a virtual machine (called a
2457 "remote session").
2458
2459 Opening a remote session causes the VirtualBox server to start a new
2460 process that opens a direct session with the given VM. As a result, the
2461 VM is locked by that direct session in the new process, preventing
2462 conflicting changes from other processes. Since sessions act as locks
2463 that prevent conflicting changes, one cannot open a remote session
2464 for a VM that already has another open session (direct or remote), or
2465 is currently in the process of opening one (see <link
2466 to="IMachine::sessionState"/>).
2467
2468 While the remote session still provides some level of control over the
2469 VM execution to the caller (using the <link to="IConsole" /> interface),
2470 not all VM settings are available for modification within the remote
2471 session context.
2472
2473 This operation can take some time (a new VM is started in a new process,
2474 for which memory and other resources need to be set up). Because of this,
2475 an <link to="IProgress" /> is returned to allow the caller to wait for this
2476 asynchronous operation to be completed. Until then, the remote session
2477 object remains in the closed state, and accessing the machine or its
2478 console through it is invalid. It is recommended to use
2479 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2480 completion.
2481
2482 As with all <link to="ISession" /> objects, it is recommended to call
2483 <link to="ISession::close" /> on the local session object once openRemoteSession()
2484 has been called. However, the session's state (see <link to="ISession::state" />)
2485 will not return to "Closed" until the remote session has also closed (i.e.
2486 until the VM is no longer running). In that case, however, the state of
2487 the session will automatically change back to "Closed".
2488
2489 Currently supported session types (values of the @a type
2490 argument) are:
2491 <ul>
2492 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2493 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2494 </ul>
2495
2496 The @a environment argument is a string containing definitions of
2497 environment variables in the following format:
2498 @code
2499 NAME[=VALUE]\n
2500 NAME[=VALUE]\n
2501 ...
2502 @endcode
2503 where <tt>\\n</tt> is the new line character. These environment
2504 variables will be appended to the environment of the VirtualBox server
2505 process. If an environment variable exists both in the server process
2506 and in this list, the value from this list takes precedence over the
2507 server's variable. If the value of the environment variable is
2508 omitted, this variable will be removed from the resulting environment.
2509 If the environment string is @c null, the server environment is
2510 inherited by the started process as is.
2511
2512 <see>openExistingSession</see>
2513
2514 <result name="E_UNEXPECTED">
2515 Virtual machine not registered.
2516 </result>
2517 <result name="E_INVALIDARG">
2518 Invalid session type @a type.
2519 </result>
2520 <result name="VBOX_E_OBJECT_NOT_FOUND">
2521 No machine matching @a machineId found.
2522 </result>
2523 <result name="VBOX_E_INVALID_OBJECT_STATE">
2524 Session already open or being opened.
2525 </result>
2526 <result name="VBOX_E_IPRT_ERROR">
2527 Launching process for machine failed.
2528 </result>
2529 <result name="VBOX_E_VM_ERROR">
2530 Failed to assign machine to session.
2531 </result>
2532
2533 </desc>
2534 <param name="session" type="ISession" dir="in">
2535 <desc>
2536 Session object that will represent the opened remote session
2537 after successful method invocation (this object must not
2538 represent an already open session).
2539 </desc>
2540 </param>
2541 <param name="machineId" type="uuid" dir="in">
2542 <desc>ID of the virtual machine to open a session with.</desc>
2543 </param>
2544 <param name="type" type="wstring" dir="in">
2545 <desc>
2546 Type of the remote session (case sensitive).
2547 </desc>
2548 </param>
2549 <param name="environment" type="wstring" dir="in">
2550 <desc>
2551 Environment to pass to the opened session (may be @c null).
2552 </desc>
2553 </param>
2554 <param name="progress" type="IProgress" dir="return">
2555 <desc>Progress object to track the operation completion.</desc>
2556 </param>
2557 </method>
2558
2559 <method name="openExistingSession">
2560 <desc>
2561 Opens a new remote session with the virtual machine for
2562 which a direct session is already open.
2563
2564 The remote session provides some level of control over the VM
2565 execution (using the IConsole interface) to the caller; however,
2566 within the remote session context, not all VM settings are available
2567 for modification.
2568
2569 As opposed to <link to="#openRemoteSession"/>, the number of
2570 remote sessions opened this way is not limited by the API
2571
2572 <note>
2573 It is an error to open a remote session with the machine that
2574 doesn't have an open direct session.
2575 </note>
2576
2577 <result name="E_UNEXPECTED">
2578 Virtual machine not registered.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No machine matching @a machineId found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_INVALID_SESSION_STATE">
2587 Direct session state not Open.
2588 </result>
2589 <result name="VBOX_E_VM_ERROR">
2590 Failed to get console object from direct session or assign
2591 machine to session.
2592 </result>
2593
2594 <see>openRemoteSession</see>
2595 </desc>
2596 <param name="session" type="ISession" dir="in">
2597 <desc>
2598 Session object that will represent the open remote session
2599 after successful method invocation. This object must not
2600 represent an already open session.
2601 <note>
2602 This session will be automatically closed when the peer
2603 (direct) session dies or gets closed.
2604 </note>
2605 </desc>
2606 </param>
2607 <param name="machineId" type="uuid" dir="in">
2608 <desc>ID of the virtual machine to open a session with.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="registerCallback">
2613 <desc>
2614 Registers a new global VirtualBox callback. The methods of the given
2615 callback object will be called by VirtualBox when an appropriate
2616 event occurs.
2617
2618 <result name="E_INVALIDARG">
2619 A @c NULL callback cannot be registered.
2620 </result>
2621
2622 </desc>
2623 <param name="callback" type="IVirtualBoxCallback" dir="in">
2624 <desc>Callback object to register.</desc>
2625 </param>
2626 </method>
2627
2628 <method name="unregisterCallback">
2629 <desc>
2630 Unregisters the previously registered global VirtualBox callback.
2631
2632 <result name="E_INVALIDARG">
2633 Specified @a callback not registered.
2634 </result>
2635
2636 </desc>
2637 <param name="callback" type="IVirtualBoxCallback" dir="in">
2638 <desc>Callback object to unregister.</desc>
2639 </param>
2640 </method>
2641
2642 <method name="waitForPropertyChange">
2643 <desc>
2644 Blocks the caller until any of the properties represented by the
2645 @a what argument changes the value or until the given timeout interval
2646 expires.
2647
2648 The @a what argument is a comma separated list of property masks that
2649 describe properties the caller is interested in. The property mask is
2650 a string in the following format:
2651
2652 <pre>
2653 [[group.]subgroup.]name
2654 </pre>
2655
2656 where @c name is the property name and @c group, @c subgroup are zero
2657 or more property group specifiers. Each element (group or name) in
2658 the property mask may be either a Latin string or an asterisk symbol
2659 (@c "*") which is used to match any string for the given element. A
2660 property mask that doesn't contain asterisk symbols represents a
2661 single fully qualified property name.
2662
2663 Groups in the fully qualified property name go from more generic (the
2664 left-most part) to more specific (the right-most part). The first
2665 element is usually a name of the object the property belongs to. The
2666 second element may be either a property name, or a child object name,
2667 or an index if the preceding element names an object which is one of
2668 many objects of the same type. This way, property names form a
2669 hierarchy of properties. Here are some examples of property names:
2670
2671 <table>
2672 <tr>
2673 <td><tt>VirtualBox.version</tt></td>
2674 <td><link to="IVirtualBox::version"/> property</td>
2675 </tr>
2676 <tr>
2677 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2678 <td><link to="IMachine::name"/> property of the machine with the
2679 given UUID</td>
2680 </tr>
2681 </table>
2682
2683 Most property names directly correspond to the properties of objects
2684 (components) provided by the VirtualBox library and may be used to
2685 track changes to these properties. However, there may be
2686 pseudo-property names that don't correspond to any existing object's
2687 property directly, as well as there may be object properties that
2688 don't have a corresponding property name that is understood by this
2689 method, and therefore changes to such properties cannot be
2690 tracked. See individual object's property descriptions to get a
2691 fully qualified property name that can be used with this method (if
2692 any).
2693
2694 There is a special property mask @c "*" (i.e. a string consisting of a
2695 single asterisk symbol) that can be used to match all properties.
2696 Below are more examples of property masks:
2697
2698 <table>
2699 <tr>
2700 <td><tt>VirtualBox.*</tt></td>
2701 <td>Track all properties of the VirtualBox object</td>
2702 </tr>
2703 <tr>
2704 <td><tt>Machine.*.name</tt></td>
2705 <td>Track changes to the <link to="IMachine::name"/> property of
2706 all registered virtual machines</td>
2707 </tr>
2708 </table>
2709
2710 <note>
2711 This function is not implemented in the current version of the
2712 product.
2713 </note>
2714 </desc>
2715 <param name="what" type="wstring" dir="in">
2716 <desc>Comma separated list of property masks.</desc>
2717 </param>
2718 <param name="timeout" type="unsigned long" dir="in">
2719 <desc>
2720 Wait timeout in milliseconds.
2721 Specify -1 for an indefinite wait.
2722 </desc>
2723 </param>
2724 <param name="changed" type="wstring" dir="out">
2725 <desc>
2726 Comma separated list of properties that have been changed and caused
2727 this method to return to the caller.
2728 </desc>
2729 </param>
2730 <param name="values" type="wstring" dir="out">
2731 <desc>Reserved, not currently used.</desc>
2732 </param>
2733 </method>
2734
2735 <method name="saveSettings">
2736 <desc>
2737 Saves the global settings to the global settings file
2738 (<link to="#settingsFilePath"/>).
2739
2740 This method is only useful for explicitly saving the global settings
2741 file after it has been auto-converted from the old format to the most
2742 recent format (see <link to="#settingsFileVersion"/> for details).
2743 Normally, the global settings file is implicitly saved when a global
2744 setting is changed.
2745
2746 <result name="VBOX_E_FILE_ERROR">
2747 Settings file not accessible.
2748 </result>
2749 <result name="VBOX_E_XML_ERROR">
2750 Could not parse the settings file.
2751 </result>
2752
2753 </desc>
2754 </method>
2755
2756 <method name="saveSettingsWithBackup">
2757 <desc>
2758 Creates a backup copy of the global settings file
2759 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2760 calls <link to="#saveSettings"/>.
2761
2762 Note that the backup copy is created <b>only</b> if the settings file
2763 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2764 details). Otherwise, this call is fully equivalent to
2765 <link to="#saveSettings"/> and no backup copying is done.
2766
2767 The backup copy is created in the same directory where the original
2768 settings file is located. It is given the following file name:
2769 <pre>
2770 original.xml.x.y-platform.bak
2771 </pre>
2772 where <tt>original.xml</tt> is the original settings file name
2773 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2774 format of the settings file (before auto-conversion).
2775
2776 If the given backup file already exists, this method will try to add the
2777 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2778 0 to 9) and copy it again until it succeeds. If all suffixes are
2779 occupied, or if any other copy error occurs, this method will return a
2780 failure.
2781
2782 If the copy operation succeeds, the @a bakFileName return argument will
2783 receive a full path to the created backup file (for informational
2784 purposes). Note that this will happen even if the subsequent
2785 <link to="#saveSettings"/> call performed by this method after the
2786 copy operation, fails.
2787
2788 <note>
2789 The VirtualBox API never calls this method. It is intended purely for
2790 the purposes of creating backup copies of the settings files by
2791 front-ends before saving the results of the automatically performed
2792 settings conversion to disk.
2793 </note>
2794
2795 <see>settingsFileVersion</see>
2796
2797 <result name="VBOX_E_FILE_ERROR">
2798 Settings file not accessible.
2799 </result>
2800 <result name="VBOX_E_XML_ERROR">
2801 Could not parse the settings file.
2802 </result>
2803 <result name="VBOX_E_IPRT_ERROR">
2804 Could not copy the settings file.
2805 </result>
2806
2807 </desc>
2808 <param name="bakFileName" type="wstring" dir="return">
2809 <desc>Full path to the created backup copy.</desc>
2810 </param>
2811 </method>
2812
2813 <!--method name="createDHCPServerForInterface">
2814 <desc>
2815 Creates a dhcp server settings to be used for the given interface
2816 <result name="E_INVALIDARG">
2817 Host network interface @a name already exists.
2818 </result>
2819 </desc>
2820 <param name="interface" type="IHostNetworkInterface" dir="in">
2821 <desc>Network Interface</desc>
2822 </param>
2823 <param name="server" type="IDHCPServer" dir="out">
2824 <desc>Dhcp server settings</desc>
2825 </param>
2826 </method-->
2827
2828 <method name="createDHCPServer">
2829 <desc>
2830 Creates a dhcp server settings to be used for the given internal network name
2831 <result name="E_INVALIDARG">
2832 Host network interface @a name already exists.
2833 </result>
2834 </desc>
2835 <param name="name" type="wstring" dir="in">
2836 <desc>server name</desc>
2837 </param>
2838 <param name="server" type="IDHCPServer" dir="return">
2839 <desc>Dhcp server settings</desc>
2840 </param>
2841 </method>
2842
2843 <method name="findDHCPServerByNetworkName">
2844 <desc>
2845 Searches a dhcp server settings to be used for the given internal network name
2846 <result name="E_INVALIDARG">
2847 Host network interface @a name already exists.
2848 </result>
2849
2850 </desc>
2851 <param name="name" type="wstring" dir="in">
2852 <desc>server name</desc>
2853 </param>
2854 <param name="server" type="IDHCPServer" dir="return">
2855 <desc>Dhcp server settings</desc>
2856 </param>
2857 </method>
2858
2859 <!--method name="findDHCPServerForInterface">
2860 <desc>
2861 Searches a dhcp server settings to be used for the given interface
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865 </desc>
2866 <param name="interface" type="IHostNetworkInterface" dir="in">
2867 <desc>Network Interface</desc>
2868 </param>
2869 <param name="server" type="IDHCPServer" dir="out">
2870 <desc>Dhcp server settings</desc>
2871 </param>
2872 </method-->
2873
2874 <method name="removeDHCPServer">
2875 <desc>
2876 Removes the dhcp server settings
2877 <result name="E_INVALIDARG">
2878 Host network interface @a name already exists.
2879 </result>
2880 </desc>
2881 <param name="server" type="IDHCPServer" dir="in">
2882 <desc>Dhcp server settings to be removed</desc>
2883 </param>
2884 </method>
2885
2886 </interface>
2887
2888 <!--
2889 // IAppliance
2890 /////////////////////////////////////////////////////////////////////////
2891 -->
2892
2893 <enum
2894 name="CIMOSType"
2895 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2896 >
2897 <desc>
2898 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2899 </desc>
2900
2901 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2902 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2903 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2904 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2905 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2906 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2907 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2908 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2909 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2910 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2911 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2912 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2913 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2914 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2915 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2916 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2917 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2918 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2919 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2920 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2921 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2922 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2923 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2924 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2925 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2926 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2927 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2928 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2929 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2930 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2931 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2932 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2933 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2934 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2935 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2936 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2937 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2938 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2939 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2940 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2941 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2942 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2943 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2944 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2945 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2946 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2947 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2948 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2949 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2950 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2951 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2952 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2953 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2954 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2955 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2956 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2957 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2958 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2959 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2960 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2961 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2962 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2963 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2964 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2965 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2966 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2967 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2968 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2969 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2970 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2971 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2972 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2973 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2974 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2975 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2976 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2977 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2978 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2979 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2980 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2981 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2982 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2983 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2984 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2985 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2986 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2987 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2988 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2989 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2990 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2991 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2992 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2993 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2994 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2995 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2996 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2997 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2998 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2999 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
3000 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
3001 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
3002 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
3003 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
3004 </enum>
3005
3006 <enum
3007 name="OVFResourceType"
3008 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
3009 >
3010 <desc>
3011 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
3012 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
3013 </desc>
3014
3015 <const name="Other" value="1" />
3016 <const name="ComputerSystem" value="2" />
3017 <const name="Processor" value="3" />
3018 <const name="Memory" value="4" />
3019 <const name="IDEController" value="5" />
3020 <const name="ParallelSCSIHBA" value="6" />
3021 <const name="FCHBA" value="7" />
3022 <const name="iSCSIHBA" value="8" />
3023 <const name="IBHCA" value="9" />
3024 <const name="EthernetAdapter" value="10" />
3025 <const name="OtherNetworkAdapter" value="11" />
3026 <const name="IOSlot" value="12" />
3027 <const name="IODevice" value="13" />
3028 <const name="FloppyDrive" value="14" />
3029 <const name="CDDrive" value="15" />
3030 <const name="DVDDrive" value="16" />
3031 <const name="HardDisk" value="17" />
3032 <const name="OtherStorageDevice" value="20" />
3033 <const name="USBController" value="23" />
3034 <const name="SoundCard" value="35" />
3035 </enum>
3036
3037 <interface
3038 name="IAppliance" extends="$unknown"
3039 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
3040 wsmap="managed"
3041 >
3042 <desc>
3043 Represents a platform-independent appliance in OVF format. An instance of this is returned
3044 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3045 appliances with VirtualBox.
3046
3047 The OVF standard suggests two different physical file formats:
3048
3049 <ol>
3050 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3051 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3052 this descriptor file references other files, as OVF appliances distributed as a set of
3053 files most likely do, those files must be in the same directory as the descriptor file.</li>
3054
3055 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3056 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3057 files and optionally other files.
3058
3059 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3060 be added with a later version.</li>
3061 </ol>
3062
3063 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3064 <link to="IMachine" /> involves the following sequence of API calls:
3065
3066 <ol>
3067 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3068 </li>
3069
3070 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3071 would like to import. So long as this file is syntactically valid, this will succeed
3072 and return an instance of IAppliance that contains the parsed data from the OVF file.
3073 </li>
3074
3075 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3076 contents of the IAppliance attributes accordingly. These can be inspected by a
3077 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3078 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3079 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3080 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3081 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3082 The GUI can then give the user the option to confirm and/or change these suggestions.
3083 </li>
3084
3085 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3086 virtual system to override the suggestions made by the interpret() routine.
3087 </li>
3088
3089 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3090 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3091 virtual system descriptions.
3092 </li>
3093 </ol>
3094
3095 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3096
3097 <ol>
3098 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3099 an empty IAppliance object.
3100 </li>
3101
3102 <li>For each machine you would like to export, call <link to="IMachine::export" />
3103 with the IAppliance object you just created. This creates an instance of
3104 <link to="IVirtualSystemDescription" /> inside the appliance.
3105 </li>
3106
3107 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3108 virtual system to override the suggestions made by the export() routine.
3109 </li>
3110
3111 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3112 file written.</li>
3113 </ol>
3114
3115 </desc>
3116
3117 <attribute name="path" type="wstring" readonly="yes">
3118 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3119 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3120 <link to="#write" /> (for export).
3121 This attribute is empty until one of these methods has been called.
3122 </desc>
3123 </attribute>
3124
3125 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3126 <desc>
3127 Array of virtual disk definitions. One such description exists for each
3128 disk definition in the OVF; each string array item represents one such piece of
3129 disk information, with the information fields separated by tab (\t) characters.
3130
3131 The caller should be prepared for additional fields being appended to
3132 this string in future versions of VirtualBox and therefore check for
3133 the number of tabs in the strings returned.
3134
3135 In the current version, the following eight fields are returned per string
3136 in the array:
3137
3138 <ol>
3139 <li>Disk ID (unique string identifier given to disk)</li>
3140
3141 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3142
3143 <li>Populated size (optional unsigned integer indicating the current size of the
3144 disk; can be approximate; -1 if unspecified)</li>
3145
3146 <li>Format (string identifying the disk format, typically
3147 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3148
3149 <li>Reference (where to find the disk image, typically a file name; if empty,
3150 then the disk should be created on import)</li>
3151
3152 <li>Image size (optional unsigned integer indicating the size of the image,
3153 which need not necessarily be the same as the values specified above, since
3154 the image may be compressed or sparse; -1 if not specified)</li>
3155
3156 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3157 presently unsupported and always -1)</li>
3158
3159 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3160 </ol>
3161 </desc>
3162 </attribute>
3163
3164 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3165 <desc> Array of virtual system descriptions. One such description is created
3166 for each virtual system found in the OVF.
3167 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3168 (for export) has been called.
3169 </desc>
3170 </attribute>
3171
3172 <method name="read">
3173 <desc>
3174 Reads an OVF file into the appliance object.
3175
3176 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3177 mere fact that this method returns successfully does not mean that VirtualBox supports all
3178 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3179 </desc>
3180 <param name="file" type="wstring" dir="in">
3181 <desc>
3182 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3183 on whether the appliance is distributed as a set of files or as a single file, respectively).
3184 </desc>
3185 </param>
3186 </method>
3187
3188 <method name="interpret">
3189 <desc>
3190 Interprets the OVF data that was read when the appliance was constructed. After
3191 calling this method, one can inspect the
3192 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3193 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3194 the appliance.
3195
3196 Calling this method is the second step of importing an appliance into VirtualBox;
3197 see <link to="IAppliance" /> for an overview.
3198
3199 After calling this method, one should call <link to="#getWarnings" /> to find out
3200 if problems were encountered during the processing which might later lead to
3201 errors.
3202 </desc>
3203 </method>
3204
3205 <method name="importMachines">
3206 <desc>
3207 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3208 and other interfaces that match the information contained in the appliance as
3209 closely as possible, as represented by the import instructions in the
3210 <link to="#virtualSystemDescriptions" /> array.
3211
3212 Calling this method is the final step of importing an appliance into VirtualBox;
3213 see <link to="IAppliance" /> for an overview.
3214
3215 Since importing the appliance will most probably involve copying and converting
3216 disk images, which can take a long time, this method operates asynchronously and
3217 returns an IProgress object to allow the caller to monitor the progress.
3218 </desc>
3219
3220 <param name="aProgress" type="IProgress" dir="return">
3221 <desc></desc>
3222 </param>
3223 </method>
3224
3225 <method name="write">
3226 <desc>
3227 Writes the contents of the appliance exports into a new OVF file.
3228
3229 Calling this method is the final step of exporting an appliance from VirtualBox;
3230 see <link to="IAppliance" /> for an overview.
3231
3232 Since exporting the appliance will most probably involve copying and converting
3233 disk images, which can take a long time, this method operates asynchronously and
3234 returns an IProgress object to allow the caller to monitor the progress.
3235 </desc>
3236 <param name="path" type="wstring" dir="in">
3237 <desc>
3238 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3239 on whether the appliance is distributed as a set of files or as a single file, respectively).
3240 </desc>
3241 </param>
3242 <param name="aProgress" type="IProgress" dir="return">
3243 <desc></desc>
3244 </param>
3245 </method>
3246
3247 <method name="getWarnings">
3248 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3249
3250 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3251 <desc></desc>
3252 </param>
3253 </method>
3254
3255 </interface>
3256
3257 <enum
3258 name="VirtualSystemDescriptionType"
3259 uuid="325e7fec-ce06-4174-9654-98f99478d03f"
3260 >
3261 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3262 a configuration value.</desc>
3263
3264 <const name="Ignore" value="1" />
3265 <const name="OS" value="2" />
3266 <const name="Name" value="3" />
3267 <const name="Description" value="4" />
3268 <const name="License" value="5" />
3269 <const name="CPU" value="6" />
3270 <const name="Memory" value="7" />
3271 <const name="HardDiskControllerIDE" value="8" />
3272 <const name="HardDiskControllerSATA" value="9" />
3273 <const name="HardDiskControllerSCSI" value="10" />
3274 <const name="HardDiskImage" value="11" />
3275 <const name="Floppy" value="12" />
3276 <const name="CDROM" value="13" />
3277 <const name="NetworkAdapter" value="14" />
3278 <const name="USBController" value="15" />
3279 <const name="SoundCard" value="16" />
3280
3281 </enum>
3282
3283 <enum
3284 name="VirtualSystemDescriptionValueType"
3285 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3286 >
3287 <desc>Used with <link to="GetValuesByType" /> to describe the value
3288 type to fetch.</desc>
3289
3290 <const name="Reference" value="1" />
3291 <const name="Original" value="2" />
3292 <const name="Auto" value="3" />
3293 <const name="ExtraConfig" value="4" />
3294
3295 </enum>
3296
3297 <interface
3298 name="IVirtualSystemDescription" extends="$unknown"
3299 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3300 wsmap="managed"
3301 >
3302
3303 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3304 After <link to="IAppliance::interpret" /> has been called, that array contains
3305 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3306 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3307 into VirtualBox.
3308 </desc>
3309
3310 <attribute name="count" type="unsigned long" readonly="yes">
3311 <desc>Return the number of virtual system description entries.</desc>
3312 </attribute>
3313
3314 <method name="getDescription">
3315 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3316 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3317
3318 The list below identifies the value sets that are possible depending on the
3319 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3320 the array item with the same index in aOvfValues[] will contain the original value as contained
3321 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3322 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3323 the aExtraConfigValues[] array item may also be used.
3324
3325 <ul>
3326 <li>
3327 "OS": the guest operating system type. There must be exactly one such array item on import. The
3328 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3329 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3330 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3331 (see <link to="CIMOSType" />).
3332 </li>
3333 <li>
3334 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3335 if none is present on import, then an automatic name will be created from the operating system
3336 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3337 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3338 <link to="IMachine" /> name that does not exist yet.
3339 </li>
3340 <li>
3341 "Description": an arbitrary description.
3342 </li>
3343 <li>
3344 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3345 code to display such a license for agreement; the Main API does not enforce any such policy.
3346 </li>
3347 <li>
3348 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3349 </li>
3350 <li>
3351 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3352 is present on import, then VirtualBox will set a meaningful default based on the operating system
3353 type.
3354 </li>
3355 <li>
3356 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3357 has no value in aOvfValues[] or aVboxValues[].
3358 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3359 type can use to specify which hard disk controller a virtual disk should be connected to.
3360 </li>
3361 <li>
3362 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3363 has no value in aOvfValues[] or aVboxValues[].
3364 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3365 </li>
3366 <li>
3367 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3368 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3369 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3370 </li>
3371 <li>
3372 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3373 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3374
3375 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3376 a path since the image file should be in the same location as the OVF file itself), whereas the
3377 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3378 hard disk image. This means that on import the image will be copied and converted from the
3379 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3380 On import, the target image will also be registered with VirtualBox.
3381
3382 The matching item in the aExtraConfigValues[] array must contain a string of the following
3383 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3384 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3385 the image to. That number must be the index of an array item with one of the hard disk controller
3386 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3387 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3388 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3389 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3390 SCSI conrollers, the channel can range from 0-29.
3391 </li>
3392 <li>
3393 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3394 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3395 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3396 </li>
3397 <li>
3398 "USBController": a USB controller. There can be at most one such item. If and only if such an
3399 item ispresent, USB support will be enabled for the new virtual machine.
3400 </li>
3401 <li>
3402 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3403 present, sound support will be enabled for the new virtual machine. Note that the virtual
3404 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3405 may be different from the virtual soundcard expected by the appliance.
3406 </li>
3407 </ul>
3408
3409 </desc>
3410
3411 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3412 <desc></desc>
3413 </param>
3414
3415 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3416 <desc></desc>
3417 </param>
3418
3419 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3420 <desc></desc>
3421 </param>
3422
3423 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3424 <desc></desc>
3425 </param>
3426
3427 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3428 <desc></desc>
3429 </param>
3430
3431 </method>
3432
3433 <method name="getDescriptionByType">
3434 <desc>This is the same as <link to="getDescription" /> except that you can specify which types
3435 should be returned.</desc>
3436
3437 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3438 <desc></desc>
3439 </param>
3440
3441 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3442 <desc></desc>
3443 </param>
3444
3445 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3446 <desc></desc>
3447 </param>
3448
3449 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3450 <desc></desc>
3451 </param>
3452
3453 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3454 <desc></desc>
3455 </param>
3456
3457 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3458 <desc></desc>
3459 </param>
3460
3461 </method>
3462
3463 <method name="getValuesByType">
3464 <desc>This is the same as <link to="getDescriptionByType" /> except that you can specify which
3465 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3466 values.</desc>
3467
3468 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3469 <desc></desc>
3470 </param>
3471
3472 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3473 <desc></desc>
3474 </param>
3475
3476 <param name="aValues" type="wstring" dir="return" safearray="yes">
3477 <desc></desc>
3478 </param>
3479
3480 </method>
3481
3482 <method name="setFinalValues">
3483 <desc>
3484 This method allows the appliance's user to change the configuration for the virtual
3485 system descriptions. For each array item returned from <link to="getDescription" />,
3486 you must pass in one boolean value and one configuration value.
3487
3488 Each item in the boolean array determines whether the particular configuration item
3489 should be enabled.
3490 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3491 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3492 and SoundCard.
3493
3494 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3495 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3496 the configuration remains unchanged. Please see the documentation for getDescription()
3497 for valid configuration values for the individual array item types. If the
3498 corresponding item in the aEnabled array is false, the configuration value is ignored.
3499 </desc>
3500
3501 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3502 <desc></desc>
3503 </param>
3504
3505 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3506 <desc></desc>
3507 </param>
3508
3509 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3510 <desc></desc>
3511 </param>
3512 </method>
3513
3514 <method name="addDescription">
3515 <desc>
3516 This method adds an additional description entry to the stack of already
3517 available descriptions for this virtual system. This is handy for writing
3518 values which aren't directly supported by VirtualBox. One example would
3519 be the License type of <link to="VirtualSystemDescriptionType" />.
3520 </desc>
3521
3522 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3523 <desc></desc>
3524 </param>
3525
3526 <param name="aVboxValue" type="wstring" dir="in">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aExtraConfigValue" type="wstring" dir="in">
3531 <desc></desc>
3532 </param>
3533 </method>
3534 </interface>
3535
3536
3537 <!--
3538 // IMachine
3539 /////////////////////////////////////////////////////////////////////////
3540 -->
3541
3542 <interface
3543 name="IInternalMachineControl" extends="$unknown"
3544 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3545 internal="yes"
3546 wsmap="suppress"
3547 >
3548 <method name="updateState">
3549 <desc>
3550 Updates the VM state.
3551 <note>
3552 This operation will also update the settings file with
3553 the correct information about the saved state file
3554 and delete this file from disk when appropriate.
3555 </note>
3556 </desc>
3557 <param name="state" type="MachineState" dir="in"/>
3558 </method>
3559
3560 <method name="getIPCId">
3561 <param name="id" type="wstring" dir="return"/>
3562 </method>
3563
3564 <method name="runUSBDeviceFilters">
3565 <desc>
3566 Asks the server to run USB devices filters of the associated
3567 machine against the given USB device and tell if there is
3568 a match.
3569 <note>
3570 Intended to be used only for remote USB devices. Local
3571 ones don't require to call this method (this is done
3572 implicitly by the Host and USBProxyService).
3573 </note>
3574 </desc>
3575 <param name="device" type="IUSBDevice" dir="in"/>
3576 <param name="matched" type="boolean" dir="out"/>
3577 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3578 </method>
3579
3580 <method name="captureUSBDevice">
3581 <desc>
3582 Requests a capture of the given host USB device.
3583 When the request is completed, the VM process will
3584 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3585 notification.
3586 </desc>
3587 <param name="id" type="uuid" dir="in"/>
3588 </method>
3589
3590 <method name="detachUSBDevice">
3591 <desc>
3592 Notification that a VM is going to detach (done = false) or has
3593 already detached (done = true) the given USB device.
3594 When the done = true request is completed, the VM process will
3595 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3596 notification.
3597 <note>
3598 In the done = true case, the server must run its own filters
3599 and filters of all VMs but this one on the detached device
3600 as if it were just attached to the host computer.
3601 </note>
3602 </desc>
3603 <param name="id" type="uuid" dir="in"/>
3604 <param name="done" type="boolean" dir="in"/>
3605 </method>
3606
3607 <method name="autoCaptureUSBDevices">
3608 <desc>
3609 Requests a capture all matching USB devices attached to the host.
3610 When the request is completed, the VM process will
3611 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3612 notification per every captured device.
3613 </desc>
3614 </method>
3615
3616 <method name="detachAllUSBDevices">
3617 <desc>
3618 Notification that a VM that is being powered down. The done
3619 parameter indicates whether which stage of the power down
3620 we're at. When done = false the VM is announcing its
3621 intentions, while when done = true the VM is reporting
3622 what it has done.
3623 <note>
3624 In the done = true case, the server must run its own filters
3625 and filters of all VMs but this one on all detach devices as
3626 if they were just attached to the host computer.
3627 </note>
3628 </desc>
3629 <param name="done" type="boolean" dir="in"/>
3630 </method>
3631
3632 <method name="onSessionEnd">
3633 <desc>
3634 Triggered by the given session object when the session is about
3635 to close normally.
3636 </desc>
3637 <param name="session" type="ISession" dir="in">
3638 <desc>Session that is being closed</desc>
3639 </param>
3640 <param name="progress" type="IProgress" dir="return">
3641 <desc>
3642 Used to wait until the corresponding machine is actually
3643 dissociated from the given session on the server.
3644 Returned only when this session is a direct one.
3645 </desc>
3646 </param>
3647 </method>
3648
3649 <method name="beginSavingState">
3650 <desc>
3651 Called by the VM process to inform the server it wants to
3652 save the current state and stop the VM execution.
3653 </desc>
3654 <param name="progress" type="IProgress" dir="in">
3655 <desc>
3656 Progress object created by the VM process to wait until
3657 the state is saved.
3658 </desc>
3659 </param>
3660 <param name="stateFilePath" type="wstring" dir="out">
3661 <desc>
3662 File path the VM process must save the execution state to.
3663 </desc>
3664 </param>
3665 </method>
3666
3667 <method name="endSavingState">
3668 <desc>
3669 Called by the VM process to inform the server that saving
3670 the state previously requested by #beginSavingState is either
3671 successfully finished or there was a failure.
3672
3673 <result name="VBOX_E_FILE_ERROR">
3674 Settings file not accessible.
3675 </result>
3676 <result name="VBOX_E_XML_ERROR">
3677 Could not parse the settings file.
3678 </result>
3679
3680 </desc>
3681
3682 <param name="success" type="boolean" dir="in">
3683 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3684 otherwise.
3685 </desc>
3686 </param>
3687 </method>
3688
3689 <method name="adoptSavedState">
3690 <desc>
3691 Gets called by IConsole::adoptSavedState.
3692 <result name="VBOX_E_FILE_ERROR">
3693 Invalid saved state file path.
3694 </result>
3695 </desc>
3696 <param name="savedStateFile" type="wstring" dir="in">
3697 <desc>Path to the saved state file to adopt.</desc>
3698 </param>
3699 </method>
3700
3701 <method name="beginTakingSnapshot">
3702 <desc>
3703 Called by the VM process to inform the server it wants to
3704 take a snapshot.
3705
3706 <result name="VBOX_E_FILE_ERROR">
3707 Settings file not accessible.
3708 </result>
3709 <result name="VBOX_E_XML_ERROR">
3710 Could not parse the settings file.
3711 </result>
3712 </desc>
3713 <param name="initiator" type="IConsole" dir="in">
3714 <desc>The console object that initiated this call.</desc>
3715 </param>
3716 <param name="name" type="wstring" dir="in">
3717 <desc>Snapshot name.</desc>
3718 </param>
3719 <param name="description" type="wstring" dir="in">
3720 <desc>Snapshot description.</desc>
3721 </param>
3722 <param name="progress" type="IProgress" dir="in">
3723 <desc>
3724 Progress object created by the VM process to wait until
3725 the state is saved (only for online snapshots).
3726 </desc>
3727 </param>
3728 <param name="stateFilePath" type="wstring" dir="out">
3729 <desc>
3730 File path the VM process must save the execution state to.
3731 </desc>
3732 </param>
3733 <param name="serverProgress" type="IProgress" dir="out">
3734 <desc>
3735 Progress object created by the server process to wait until
3736 the snapshot is taken (VDI diff creation, etc.).
3737 </desc>
3738 </param>
3739 </method>
3740
3741 <method name="endTakingSnapshot">
3742 <desc>
3743 Called by the VM process to inform the server that the snapshot
3744 previously requested by #beginTakingSnapshot is either
3745 successfully taken or there was a failure.
3746 </desc>
3747
3748 <param name="success" type="boolean" dir="in">
3749 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3750 </param>
3751 </method>
3752
3753 <method name="discardSnapshot">
3754 <desc>
3755 Gets called by IConsole::discardSnapshot.
3756 <result name="VBOX_E_INVALID_OBJECT_STATE">
3757 Snapshot has more than one child snapshot.
3758 </result>
3759 </desc>
3760 <param name="initiator" type="IConsole" dir="in">
3761 <desc>The console object that initiated this call.</desc>
3762 </param>
3763 <param name="id" type="uuid" dir="in">
3764 <desc>UUID of the snapshot to discard.</desc>
3765 </param>
3766 <param name="machineState" type="MachineState" dir="out">
3767 <desc>New machine state after this operation is started.</desc>
3768 </param>
3769 <param name="progress" type="IProgress" dir="return">
3770 <desc>Progress object to track the operation completion.</desc>
3771 </param>
3772 </method>
3773
3774 <method name="discardCurrentState">
3775 <desc>
3776 Gets called by IConsole::discardCurrentState.
3777 <result name="VBOX_E_INVALID_OBJECT_STATE">
3778 Virtual machine does not have any snapshot.
3779 </result>
3780 </desc>
3781 <param name="initiator" type="IConsole" dir="in">
3782 <desc>The console object that initiated this call.</desc>
3783 </param>
3784 <param name="machineState" type="MachineState" dir="out">
3785 <desc>New machine state after this operation is started.</desc>
3786 </param>
3787 <param name="progress" type="IProgress" dir="return">
3788 <desc>Progress object to track the operation completion.</desc>
3789 </param>
3790 </method>
3791
3792 <method name="discardCurrentSnapshotAndState">
3793 <desc>
3794 Gets called by IConsole::discardCurrentSnapshotAndState.
3795 <result name="VBOX_E_INVALID_OBJECT_STATE">
3796 Virtual machine does not have any snapshot.
3797 </result>
3798 </desc>
3799 <param name="initiator" type="IConsole" dir="in">
3800 <desc>The console object that initiated this call.</desc>
3801 </param>
3802 <param name="machineState" type="MachineState" dir="out">
3803 <desc>New machine state after this operation is started.</desc>
3804 </param>
3805 <param name="progress" type="IProgress" dir="return">
3806 <desc>Progress object to track the operation completion.</desc>
3807 </param>
3808 </method>
3809
3810 <method name="pullGuestProperties">
3811 <desc>
3812 Get the list of the guest properties matching a set of patterns along
3813 with their values, time stamps and flags and give responsibility for
3814 managing properties to the console.
3815 </desc>
3816 <param name="name" type="wstring" dir="out" safearray="yes">
3817 <desc>
3818 The names of the properties returned.
3819 </desc>
3820 </param>
3821 <param name="value" type="wstring" dir="out" safearray="yes">
3822 <desc>
3823 The values of the properties returned. The array entries match the
3824 corresponding entries in the @a name array.
3825 </desc>
3826 </param>
3827 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3828 <desc>
3829 The time stamps of the properties returned. The array entries match
3830 the corresponding entries in the @a name array.
3831 </desc>
3832 </param>
3833 <param name="flags" type="wstring" dir="out" safearray="yes">
3834 <desc>
3835 The flags of the properties returned. The array entries match the
3836 corresponding entries in the @a name array.
3837 </desc>
3838 </param>
3839 </method>
3840
3841 <method name="pushGuestProperties">
3842 <desc>
3843 Set the list of the guest properties matching a set of patterns along
3844 with their values, time stamps and flags and return responsibility for
3845 managing properties to IMachine.
3846 </desc>
3847 <param name="name" type="wstring" dir="in" safearray="yes">
3848 <desc>
3849 The names of the properties.
3850 </desc>
3851 </param>
3852 <param name="value" type="wstring" dir="in" safearray="yes">
3853 <desc>
3854 The values of the properties. The array entries match the
3855 corresponding entries in the @a name array.
3856 </desc>
3857 </param>
3858 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3859 <desc>
3860 The time stamps of the properties. The array entries match
3861 the corresponding entries in the @a name array.
3862 </desc>
3863 </param>
3864 <param name="flags" type="wstring" dir="in" safearray="yes">
3865 <desc>
3866 The flags of the properties. The array entries match the
3867 corresponding entries in the @a name array.
3868 </desc>
3869 </param>
3870 </method>
3871 <method name="pushGuestProperty">
3872 <desc>
3873 Update a single guest property in IMachine.
3874 </desc>
3875 <param name="name" type="wstring" dir="in">
3876 <desc>
3877 The name of the property to be updated.
3878 </desc>
3879 </param>
3880 <param name="value" type="wstring" dir="in">
3881 <desc>
3882 The value of the property.
3883 </desc>
3884 </param>
3885 <param name="timestamp" type="unsigned long long" dir="in">
3886 <desc>
3887 The timestamp of the property.
3888 </desc>
3889 </param>
3890 <param name="flags" type="wstring" dir="in">
3891 <desc>
3892 The flags of the property.
3893 </desc>
3894 </param>
3895 </method>
3896
3897 <method name="lockMedia">
3898 <desc>
3899 Locks all media attached to the machine for writing and parents of
3900 attahced different hard disks (if any) for reading. This operation is
3901 atomic so that if it fails no media is actually locked.
3902
3903 This method is intended to be called when the machine is in Starting or
3904 Restoring state. The locked media will be automatically unlocked when
3905 the machine is powered off or crashed.
3906 </desc>
3907 </method>
3908 </interface>
3909
3910 <interface
3911 name="IBIOSSettings" extends="$unknown"
3912 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3913 wsmap="managed"
3914 >
3915 <desc>
3916 The IBIOSSettings interface represents BIOS settings of the virtual
3917 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3918 </desc>
3919 <attribute name="logoFadeIn" type="boolean">
3920 <desc>Fade in flag for BIOS logo animation.</desc>
3921 </attribute>
3922
3923 <attribute name="logoFadeOut" type="boolean">
3924 <desc>Fade out flag for BIOS logo animation.</desc>
3925 </attribute>
3926
3927 <attribute name="logoDisplayTime" type="unsigned long">
3928 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3929 </attribute>
3930
3931 <attribute name="logoImagePath" type="wstring">
3932 <desc>Local file system path for external BIOS image.</desc>
3933 </attribute>
3934
3935 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3936 <desc>Mode of the BIOS boot device menu.</desc>
3937 </attribute>
3938
3939 <attribute name="ACPIEnabled" type="boolean">
3940 <desc>ACPI support flag.</desc>
3941 </attribute>
3942
3943 <attribute name="IOAPICEnabled" type="boolean">
3944 <desc>
3945 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3946 and support IRQs above 15.
3947 </desc>
3948 </attribute>
3949
3950 <attribute name="timeOffset" type="long long">
3951 <desc>
3952 Offset in milliseconds from the host system time. This allows for
3953 guests running with a different system date/time than the host.
3954 It is equivalent to setting the system date/time in the BIOS except
3955 it is not an absolute value but a relative one. Guest Additions
3956 time synchronization honors this offset.
3957 </desc>
3958 </attribute>
3959
3960 <attribute name="PXEDebugEnabled" type="boolean">
3961 <desc>
3962 PXE debug logging flag. If set, VirtualBox will write extensive
3963 PXE trace information to the release log.
3964 </desc>
3965 </attribute>
3966
3967 </interface>
3968
3969 <interface
3970 name="IMachine" extends="$unknown"
3971 uuid="13420cbb-175a-4456-85d0-301126dfdec7"
3972 wsmap="managed"
3973 >
3974 <desc>
3975 The IMachine interface represents a virtual machine, or guest, created
3976 in VirtualBox.
3977
3978 This interface is used in two contexts. First of all, a collection of
3979 objects implementing this interface is stored in the
3980 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3981 machines that are currently registered with this VirtualBox
3982 installation. Also, once a session has been opened for the given virtual
3983 machine (e.g. the virtual machine is running), the machine object
3984 associated with the open session can be queried from the session object;
3985 see <link to="ISession"/> for details.
3986
3987 The main role of this interface is to expose the settings of the virtual
3988 machine and provide methods to change various aspects of the virtual
3989 machine's configuration. For machine objects stored in the
3990 <link to="IVirtualBox::machines"/> collection, all attributes are
3991 read-only unless explicitly stated otherwise in individual attribute
3992 and method descriptions. In order to change a machine setting, a session
3993 for this machine must be opened using one of
3994 <link to="IVirtualBox::openSession"/>,
3995 <link to="IVirtualBox::openRemoteSession"/> or
3996 <link to="IVirtualBox::openExistingSession"/> methods. After the
3997 session has been successfully opened, a mutable machine object needs to
3998 be queried from the session object and then the desired settings changes
3999 can be applied to the returned object using IMachine attributes and
4000 methods. See the ISession interface description for more information
4001 about sessions.
4002
4003 Note that the IMachine interface does not provide methods to control
4004 virtual machine execution (such as start the machine, or power it
4005 down) -- these methods are grouped in a separate IConsole
4006 interface. Refer to the IConsole interface description to get more
4007 information about this topic.
4008
4009 <see>ISession, IConsole</see>
4010 </desc>
4011
4012 <attribute name="parent" type="IVirtualBox" readonly="yes">
4013 <desc>Associated parent object.</desc>
4014 </attribute>
4015
4016 <attribute name="accessible" type="boolean" readonly="yes">
4017 <desc>
4018 Whether this virtual machine is currently accessible or not.
4019
4020 The machine is considered to be inaccessible when:
4021 <ul>
4022 <li>It is a registered virtual machine, and
4023 </li>
4024 <li>Its settings file is inaccessible (for example, it is
4025 located on a network share that is not accessible during
4026 VirtualBox startup, or becomes inaccessible later, or if
4027 the settings file can be read but is invalid).
4028 </li>
4029 </ul>
4030
4031 Otherwise, the value of this property is always <tt>true</tt>.
4032
4033 Every time this property is read, the accessibility state of
4034 this machine is re-evaluated. If the returned value is |false|,
4035 the <link to="#accessError"/> property may be used to get the
4036 detailed error information describing the reason of
4037 inaccessibility.
4038
4039 When the machine is inaccessible, only the following properties
4040 can be used on it:
4041 <ul>
4042 <li><link to="#parent"/></li>
4043 <li><link to="#id"/></li>
4044 <li><link to="#settingsFilePath"/></li>
4045 <li><link to="#accessible"/></li>
4046 <li><link to="#accessError"/></li>
4047 </ul>
4048
4049 An attempt to access any other property or method will return
4050 an error.
4051
4052 The only possible action you can perform on an inaccessible
4053 machine is to unregister it using the
4054 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4055 for the accessibility state once more by querying this
4056 property).
4057
4058 <note>
4059 In the current implementation, once this property returns
4060 <tt>true</tt>, the machine will never become inaccessible
4061 later, even if its settings file cannot be successfully
4062 read/written any more (at least, until the VirtualBox
4063 server is restarted). This limitation may be removed in
4064 future releases.
4065 </note>
4066 </desc>
4067 </attribute>
4068
4069 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4070 <desc>
4071 Error information describing the reason of machine
4072 inaccessibility.
4073
4074 Reading this property is only valid after the last call to
4075 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
4076 machine is currently unaccessible). Otherwise, a null
4077 IVirtualBoxErrorInfo object will be returned.
4078 </desc>
4079 </attribute>
4080
4081 <attribute name="name" type="wstring">
4082 <desc>
4083 Name of the virtual machine.
4084
4085 Besides being used for human-readable identification purposes
4086 everywhere in VirtualBox, the virtual machine name is also used
4087 as a name of the machine's settings file and as a name of the
4088 subdirectory this settings file resides in. Thus, every time you
4089 change the value of this property, the settings file will be
4090 renamed once you call <link to="#saveSettings"/> to confirm the
4091 change. The containing subdirectory will be also renamed, but
4092 only if it has exactly the same name as the settings file
4093 itself prior to changing this property (for backward compatibility
4094 with previous API releases). The above implies the following
4095 limitations:
4096 <ul>
4097 <li>The machine name cannot be empty.</li>
4098 <li>The machine name can contain only characters that are valid
4099 file name characters according to the rules of the file
4100 system used to store VirtualBox configuration.</li>
4101 <li>You cannot have two or more machines with the same name
4102 if they use the same subdirectory for storing the machine
4103 settings files.</li>
4104 <li>You cannot change the name of the machine if it is running,
4105 or if any file in the directory containing the settings file
4106 is being used by another running machine or by any other
4107 process in the host operating system at a time when
4108 <link to="#saveSettings"/> is called.
4109 </li>
4110 </ul>
4111 If any of the above limitations are hit, <link to="#saveSettings"/>
4112 will return an appropriate error message explaining the exact
4113 reason and the changes you made to this machine will not be
4114 saved.
4115 <note>
4116 For "legacy" machines created using the
4117 <link to="IVirtualBox::createLegacyMachine"/> call,
4118 the above naming limitations do not apply because the
4119 machine name does not affect the settings file name.
4120 The settings file name remains the same as it was specified
4121 during machine creation and never changes.
4122 </note>
4123 </desc>
4124 </attribute>
4125
4126 <attribute name="description" type="wstring">
4127 <desc>
4128 Description of the virtual machine.
4129
4130 The description attribute can contain any text and is
4131 typically used to describe the hardware and software
4132 configuration of the virtual machine in detail (i.e. network
4133 settings, versions of the installed software and so on).
4134 </desc>
4135 </attribute>
4136
4137 <attribute name="id" type="uuid" readonly="yes">
4138 <desc>UUID of the virtual machine.</desc>
4139 </attribute>
4140
4141 <attribute name="OSTypeId" type="wstring">
4142 <desc>
4143 User-defined identifier of the Guest OS type.
4144 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4145 an IGuestOSType object representing details about the given
4146 Guest OS type.
4147 <note>
4148 This value may differ from the value returned by
4149 <link to="IGuest::OSTypeId"/> if Guest Additions are
4150 installed to the guest OS.
4151 </note>
4152 </desc>
4153 </attribute>
4154
4155 <attribute name="HardwareVersion" type="wstring">
4156 <desc>Hardware version identifier. Internal use only for now.</desc>
4157 </attribute>
4158
4159 <attribute name="CPUCount" type="unsigned long">
4160 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4161 </attribute>
4162
4163 <attribute name="memorySize" type="unsigned long">
4164 <desc>System memory size in megabytes.</desc>
4165 </attribute>
4166
4167 <attribute name="memoryBalloonSize" type="unsigned long">
4168 <desc>Initial memory balloon size in megabytes.</desc>
4169 </attribute>
4170
4171 <attribute name="statisticsUpdateInterval" type="unsigned long">
4172 <desc>Initial interval to update guest statistics in seconds.</desc>
4173 </attribute>
4174
4175 <attribute name="VRAMSize" type="unsigned long">
4176 <desc>Video memory size in megabytes.</desc>
4177 </attribute>
4178
4179 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4180 <desc>
4181 This setting determines whether VirtualBox allows guests to make use
4182 of the 3D graphics support available on the host. Currently limited
4183 to OpenGL only. </desc>
4184 </attribute>
4185
4186 <attribute name="monitorCount" type="unsigned long">
4187 <desc>
4188 Number of virtual monitors.
4189 <note>
4190 Only effective on Windows XP and later guests with
4191 Guest Additions installed.
4192 </note>
4193 </desc>
4194 </attribute>
4195
4196 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4197 <desc>Object containing all BIOS settings.</desc>
4198 </attribute>
4199
4200 <attribute name="HWVirtExEnabled" type="TSBool">
4201 <desc>
4202 This setting determines whether VirtualBox will try to make use of
4203 the host CPU's hardware virtualization extensions such as Intel VT-x
4204 and AMD-V. Note that in case such extensions are not available,
4205 they will not be used.
4206 </desc>
4207 </attribute>
4208
4209 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4210 <desc>
4211 This setting determines whether VirtualBox will try to make use of
4212 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4213 such extensions are not available, they will not be used.
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4218 <desc>
4219 This setting determines whether VirtualBox will try to make use of
4220 the VPID extension of Intel VT-x. Note that in case such extensions are
4221 not available, they will not be used.
4222 </desc>
4223 </attribute>
4224
4225 <attribute name="PAEEnabled" type="boolean" default="false">
4226 <desc>
4227 This setting determines whether VirtualBox will expose the Physical Address
4228 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4229 is not available, it will not be reported.
4230 </desc>
4231 </attribute>
4232
4233 <attribute name="snapshotFolder" type="wstring">
4234 <desc>
4235 Full path to the directory used to store snapshot data
4236 (differencing hard disks and saved state files) of this machine.
4237
4238 The initial value of this property is
4239 <tt>&lt;</tt><link to="#settingsFilePath">
4240 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4241 <link to="#id">machine_uuid</link>
4242 <tt>&gt;</tt>.
4243
4244 Currently, it is an error to try to change this property on
4245 a machine that has snapshots (because this would require to
4246 move possibly large files to a different location).
4247 A separate method will be available for this purpose later.
4248
4249 <note>
4250 Setting this property to <tt>null</tt> will restore the
4251 initial value.
4252 </note>
4253 <note>
4254 When setting this property, the specified path can be
4255 absolute (full path) or relative to the directory where the
4256 <link to="#settingsFilePath">machine settings file</link>
4257 is located. When reading this property, a full path is
4258 always returned.
4259 </note>
4260 <note>
4261 The specified path may not exist, it will be created
4262 when necessary.
4263 </note>
4264 </desc>
4265 </attribute>
4266
4267 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4268 <desc>VRDP server object.</desc>
4269 </attribute>
4270
4271 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4272 <desc>Array of hard disks attached to this machine.</desc>
4273 </attribute>
4274
4275 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4276 <desc>Associated DVD drive object.</desc>
4277 </attribute>
4278
4279 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4280 <desc>Associated floppy drive object.</desc>
4281 </attribute>
4282
4283 <attribute name="USBController" type="IUSBController" readonly="yes">
4284 <desc>
4285 Associated USB controller object.
4286
4287 <note>
4288 This method may set a @ref com_warnings "warning result code".
4289 </note>
4290 <note>
4291 If USB functionality is not available in the given edition of
4292 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4293 </note>
4294 </desc>
4295 </attribute>
4296
4297 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4298 <desc>Associated audio adapter, always present.</desc>
4299 </attribute>
4300
4301 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4302 <desc>Array of storage controllers attached to this machine.</desc>
4303 </attribute>
4304
4305 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4306 <desc>
4307 Full name of the file containing machine settings data.
4308 </desc>
4309 </attribute>
4310
4311 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4312 <desc>
4313 Current version of the format of the settings file of this machine
4314 (<link to="#settingsFilePath"/>).
4315
4316 The version string has the following format:
4317 <pre>
4318 x.y-platform
4319 </pre>
4320 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4321 versions, and <tt>platform</tt> is the platform identifier.
4322
4323 The current version usually matches the value of the
4324 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4325 settings file was created by an older version of VirtualBox and there
4326 was a change of the settings file format since then.
4327
4328 Note that VirtualBox automatically converts settings files from older
4329 versions to the most recent version when reading them (usually at
4330 VirtualBox startup) but it doesn't save the changes back until
4331 you call a method that implicitly saves settings (such as
4332 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4333 explicitly. Therefore, if the value of this attribute differs from the
4334 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4335 means that the settings file was converted but the result of the
4336 conversion is not yet saved to disk.
4337
4338 The above feature may be used by interactive front-ends to inform users
4339 about the settings file format change and offer them to explicitly save
4340 all converted settings files (the global and VM-specific ones),
4341 optionally create backup copies of the old settings files before saving,
4342 etc.
4343
4344 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4345 </desc>
4346 </attribute>
4347
4348 <attribute name="settingsModified" type="boolean" readonly="yes">
4349 <desc>
4350 Whether the settings of this machine have been modified
4351 (but neither yet saved nor discarded).
4352 <note>
4353 Reading this property is only valid on instances returned
4354 by <link to="ISession::machine"/> and on new machines
4355 created by <link to="IVirtualBox::createMachine"/> or opened
4356 by <link to="IVirtualBox::openMachine"/> but not
4357 yet registered, or on unregistered machines after calling
4358 <link to="IVirtualBox::unregisterMachine"/>. For all other
4359 cases, the settings can never be modified.
4360 </note>
4361 <note>
4362 For newly created unregistered machines, the value of this
4363 property is always TRUE until <link to="#saveSettings"/>
4364 is called (no matter if any machine settings have been
4365 changed after the creation or not). For opened machines
4366 the value is set to FALSE (and then follows to normal rules).
4367 </note>
4368 </desc>
4369 </attribute>
4370
4371 <attribute name="sessionState" type="SessionState" readonly="yes">
4372 <desc>Current session state for this machine.</desc>
4373 </attribute>
4374
4375 <attribute name="sessionType" type="wstring" readonly="yes">
4376 <desc>
4377 Type of the session. If <link to="#sessionState"/> is
4378 SessionSpawning or SessionOpen, this attribute contains the
4379 same value as passed to the
4380 <link to="IVirtualBox::openRemoteSession"/> method in the
4381 @a type parameter. If the session was opened directly using
4382 <link to="IVirtualBox::openSession"/>, or if
4383 <link to="#sessionState"/> is SessionClosed, the value of this
4384 attribute is @c null.
4385 </desc>
4386 </attribute>
4387
4388 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4389 <desc>
4390 Identifier of the session process. This attribute contains the
4391 platform-dependent identifier of the process that has opened a
4392 direct session for this machine using the
4393 <link to="IVirtualBox::openSession"/> call. The returned value
4394 is only valid if <link to="#sessionState"/> is SessionOpen or
4395 SessionClosing (i.e. a session is currently open or being
4396 closed) by the time this property is read.
4397 </desc>
4398 </attribute>
4399
4400 <attribute name="state" type="MachineState" readonly="yes">
4401 <desc>Current execution state of this machine.</desc>
4402 </attribute>
4403
4404 <attribute name="lastStateChange" type="long long" readonly="yes">
4405 <desc>
4406 Time stamp of the last execution state change,
4407 in milliseconds since 1970-01-01 UTC.
4408 </desc>
4409 </attribute>
4410
4411 <attribute name="stateFilePath" type="wstring" readonly="yes">
4412 <desc>
4413 Full path to the file that stores the execution state of
4414 the machine when it is in the <link to="MachineState_Saved"/> state.
4415 <note>
4416 When the machine is not in the Saved state, this attribute
4417 <tt>null</tt>.
4418 </note>
4419 </desc>
4420 </attribute>
4421
4422 <attribute name="logFolder" type="wstring" readonly="yes">
4423 <desc>
4424 Full path to the folder that stores a set of rotated log files
4425 recorded during machine execution. The most recent log file is
4426 named <tt>VBox.log</tt>, the previous log file is
4427 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4428 in the current version).
4429 </desc>
4430 </attribute>
4431
4432 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4433 <desc>
4434 Current snapshot of this machine.
4435 <note>
4436 A <tt>null</tt> object is returned if the machine doesn't
4437 have snapshots.
4438 </note>
4439 <see><link to="ISnapshot"/></see>
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4444 <desc>
4445 Number of snapshots taken on this machine. Zero means the
4446 machine doesn't have any snapshots.
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="currentStateModified" type="boolean" readonly="yes">
4451 <desc>
4452 Returns <tt>true</tt> if the current state of the machine is not
4453 identical to the state stored in the current snapshot.
4454
4455 The current state is identical to the current snapshot right
4456 after one of the following calls are made:
4457 <ul>
4458 <li><link to="IConsole::discardCurrentState"/> or
4459 <link to="IConsole::discardCurrentSnapshotAndState"/>
4460 </li>
4461 <li><link to="IConsole::takeSnapshot"/> (issued on a
4462 powered off or saved machine, for which
4463 <link to="#settingsModified"/> returns <tt>false</tt>)
4464 </li>
4465 <li><link to="IMachine::setCurrentSnapshot"/>
4466 </li>
4467 </ul>
4468
4469 The current state remains identical until one of the following
4470 happens:
4471 <ul>
4472 <li>settings of the machine are changed</li>
4473 <li>the saved state is discarded</li>
4474 <li>the current snapshot is discarded</li>
4475 <li>an attempt to execute the machine is made</li>
4476 </ul>
4477
4478 <note>
4479 For machines that don't have snapshots, this property is
4480 always <tt>false</tt>.
4481 </note>
4482 </desc>
4483 </attribute>
4484
4485 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4486 <desc>
4487 Collection of shared folders for this machine (permanent shared
4488 folders). These folders are shared automatically at machine startup
4489 and available only to the guest OS installed within this machine.
4490
4491 New shared folders are added to the collection using
4492 <link to="#createSharedFolder"/>. Existing shared folders can be
4493 removed using <link to="#removeSharedFolder"/>.
4494 </desc>
4495 </attribute>
4496
4497 <attribute name="clipboardMode" type="ClipboardMode">
4498 <desc>
4499 Synchronization mode between the host OS clipboard
4500 and the guest OS clipboard.
4501 </desc>
4502 </attribute>
4503
4504 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4505 <desc>
4506 A comma-separated list of simple glob patterns. Changes to guest
4507 properties whose name matches one of the patterns will generate an
4508 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4509 </desc>
4510 </attribute>
4511
4512 <method name="setBootOrder">
4513 <desc>
4514 Puts the given device to the specified position in
4515 the boot order.
4516
4517 To indicate that no device is associated with the given position,
4518 <link to="DeviceType_Null"/> should be used.
4519
4520 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4521
4522 <result name="E_INVALIDARG">
4523 Boot @a position out of range.
4524 </result>
4525 <result name="E_NOTIMPL">
4526 Booting from USB @a device currently not supported.
4527 </result>
4528
4529 </desc>
4530 <param name="position" type="unsigned long" dir="in">
4531 <desc>
4532 Position in the boot order (<tt>1</tt> to the total number of
4533 devices the machine can boot from, as returned by
4534 <link to="ISystemProperties::maxBootPosition"/>).
4535 </desc>
4536 </param>
4537 <param name="device" type="DeviceType" dir="in">
4538 <desc>
4539 The type of the device used to boot at the given position.
4540 </desc>
4541 </param>
4542 </method>
4543
4544 <method name="getBootOrder" const="yes">
4545 <desc>
4546 Returns the device type that occupies the specified
4547 position in the boot order.
4548
4549 @todo [remove?]
4550 If the machine can have more than one device of the returned type
4551 (such as hard disks), then a separate method should be used to
4552 retrieve the individual device that occupies the given position.
4553
4554 If here are no devices at the given position, then
4555 <link to="DeviceType_Null"/> is returned.
4556
4557 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4558
4559 <result name="E_INVALIDARG">
4560 Boot @a position out of range.
4561 </result>
4562
4563 </desc>
4564 <param name="position" type="unsigned long" dir="in">
4565 <desc>
4566 Position in the boot order (<tt>1</tt> to the total number of
4567 devices the machine can boot from, as returned by
4568 <link to="ISystemProperties::maxBootPosition"/>).
4569 </desc>
4570 </param>
4571 <param name="device" type="DeviceType" dir="return">
4572 <desc>
4573 Device at the given position.
4574 </desc>
4575 </param>
4576 </method>
4577
4578 <method name="attachHardDisk">
4579 <desc>
4580 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4581 by the given UUID @a id) to the given hard disk controller
4582 (<link to="IStorageController" />, identified by @a name),
4583 at the indicated port and device.
4584
4585 For the IDE bus, the @a controllerPort parameter can be either
4586 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4587 respectively. For the primary controller of the IDE bus,
4588 @a device can be either @c 0 or @c 1, to specify the master or the
4589 slave device, respectively. For the secondary IDE controller, the
4590 device number must be @c 1 because VirtualBox reserves the
4591 secondary master for the CD-ROM drive.
4592
4593 For an SATA controller, @a controllerPort must be a number ranging
4594 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4595 be a number ranging from @c 0 to @c 15.
4596
4597 For both SCSI and SATA, the @a device parameter is unused and must
4598 be @c 0.
4599
4600 The specified device slot must not have another disk attached to it, or
4601 this method will fail.
4602
4603 See <link to="IHardDisk"/> for more detailed information about
4604 attaching hard disks.
4605
4606 <note>
4607 You cannot attach a hard disk to a running machine. Also, you cannot
4608 attach a hard disk to a newly created machine until this machine's
4609 settings are saved to disk using <link to="#saveSettings"/>.
4610 </note>
4611 <note>
4612 If the hard disk is being attached indirectly, a new differencing hard
4613 disk will implicitly be created for it and attached instead. If the
4614 changes made to the machine settings (including this indirect
4615 attachment) are later cancelled using <link to="#discardSettings"/>,
4616 this implicitly created differencing hard disk will implicitly
4617 be deleted.
4618 </note>
4619
4620 <result name="E_INVALIDARG">
4621 SATA device, SATA port, IDE port or IDE slot out of range.
4622 </result>
4623 <result name="VBOX_E_INVALID_OBJECT_STATE">
4624 Attempt to attach hard disk to an unregistered virtual machine.
4625 </result>
4626 <result name="VBOX_E_INVALID_VM_STATE">
4627 Invalid machine state.
4628 </result>
4629 <result name="VBOX_E_OBJECT_IN_USE">
4630 Hard disk already attached to this or another virtual machine.
4631 </result>
4632
4633 </desc>
4634 <param name="id" type="uuid" dir="in">
4635 <desc>UUID of the hard disk to attach.</desc>
4636 </param>
4637 <param name="name" type="wstring" dir="in">
4638 <desc>Name of the storage controller to attach the hard disk to.</desc>
4639 </param>
4640 <param name="controllerPort" type="long" dir="in">
4641 <desc>Port to attach the hard disk to.</desc>
4642 </param>
4643 <param name="device" type="long" dir="in">
4644 <desc>
4645 Device slot in the given port to attach the hard disk to.
4646 </desc>
4647 </param>
4648 </method>
4649
4650 <method name="getHardDisk" const="yes">
4651 <desc>
4652 Returns the virtual hard disk attached to a device slot of the specified
4653 bus.
4654
4655 Note that if the hard disk was indirectly attached by
4656 <link to="#attachHardDisk"/> to the given device slot then this
4657 method will return not the same object as passed to the
4658 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4659 more detailed information about attaching hard disks.
4660
4661 <result name="VBOX_E_OBJECT_NOT_FOUND">
4662 No hard disk attached to given slot/bus.
4663 </result>
4664
4665 </desc>
4666 <param name="name" type="wstring" dir="in">
4667 <desc>Name of the storage controller the hard disk is attached to.</desc>
4668 </param>
4669 <param name="controllerPort" type="long" dir="in">
4670 <desc>Port to query.</desc>
4671 </param>
4672 <param name="device" type="long" dir="in">
4673 <desc>Device slot in the given port to query.</desc>
4674 </param>
4675 <param name="hardDisk" type="IHardDisk" dir="return">
4676 <desc>Attached hard disk object.</desc>
4677 </param>
4678 </method>
4679
4680 <method name="detachHardDisk">
4681 <desc>
4682 Detaches the virtual hard disk attached to a device slot of the
4683 specified bus.
4684
4685 Detaching the hard disk from the virtual machine is deferred. This means
4686 that the hard disk remains associated with the machine when this method
4687 returns and gets actually de-associated only after a successful
4688 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4689 for more detailed information about attaching hard disks.
4690
4691 <note>
4692 You cannot detach the hard disk from a running machine.
4693 </note>
4694 <note>
4695 Detaching differencing hard disks implicitly created by <link
4696 to="#attachHardDisk"/> for the indirect attachment using this
4697 method will <b>not</b> implicitly delete them. The
4698 <link to="IHardDisk::deleteStorage"/> operation should be
4699 explicitly performed by the caller after the hard disk is successfully
4700 detached and the settings are saved with
4701 <link to="#saveSettings"/>, if it is the desired action.
4702 </note>
4703
4704 <result name="VBOX_E_INVALID_VM_STATE">
4705 Attempt to detach hard disk from a running virtual machine.
4706 </result>
4707 <result name="VBOX_E_OBJECT_NOT_FOUND">
4708 No hard disk attached to given slot/bus.
4709 </result>
4710 <result name="VBOX_E_NOT_SUPPORTED">
4711 Hard disk format does not support storage deletion.
4712 </result>
4713
4714 </desc>
4715 <param name="name" type="wstring" dir="in">
4716 <desc>name of the storage controller to detach the hard disk from.</desc>
4717 </param>
4718 <param name="controllerPort" type="long" dir="in">
4719 <desc>Port number to detach the hard disk from.</desc>
4720 </param>
4721 <param name="device" type="long" dir="in">
4722 <desc>Device slot number to detach the hard disk from.</desc>
4723 </param>
4724 </method>
4725
4726 <method name="getHardDiskAttachmentsOfController" const="yes">
4727 <desc>
4728 Returns an array of hard disk attachments which are attached to the
4729 the controller with the given name.
4730
4731 <result name="VBOX_E_OBJECT_NOT_FOUND">
4732 A storage controller with given name doesn't exist.
4733 </result>
4734 </desc>
4735 <param name="name" type="wstring" dir="in"/>
4736 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4737 </method>
4738
4739 <method name="getNetworkAdapter" const="yes">
4740 <desc>
4741 Returns the network adapter associated with the given slot.
4742 Slots are numbered sequentially, starting with zero. The total
4743 number of adapters per machine is defined by the
4744 <link to="ISystemProperties::networkAdapterCount"/> property,
4745 so the maximum slot number is one less than that property's value.
4746
4747 <result name="E_INVALIDARG">
4748 Invalid @a slot number.
4749 </result>
4750
4751 </desc>
4752 <param name="slot" type="unsigned long" dir="in"/>
4753 <param name="adapter" type="INetworkAdapter" dir="return"/>
4754 </method>
4755
4756 <method name="addStorageController">
4757 <desc>
4758 Adds a new storage controller (SCSI or SATA controller) to the
4759 machine and returns it as an instance of
4760 <link to="IStorageController" />.
4761
4762 @a name identifies the controller with subsequent calls such as
4763 <link to="#getStorageControllerByName" /> or
4764 <link to="#removeStorageController" /> or
4765 <link to="#attachHardDisk" />.
4766
4767 After the controller has been added, you can set its exact
4768 type by setting the <link to="IStorageController::controllerType" />.
4769
4770 <result name="VBOX_E_OBJECT_IN_USE">
4771 A storage controller with given name exists already.
4772 </result>
4773 <result name="E_INVALIDARG">
4774 Invalid @a controllerType.
4775 </result>
4776 </desc>
4777 <param name="name" type="wstring" dir="in"/>
4778 <param name="connectionType" type="StorageBus" dir="in"/>
4779 <param name="controller" type="IStorageController" dir="return"/>
4780 </method>
4781
4782 <method name="getStorageControllerByName" const="yes">
4783 <desc>
4784 Returns a storage controller with the given name.
4785
4786 <result name="VBOX_E_OBJECT_NOT_FOUND">
4787 A storage controller with given name doesn't exist.
4788 </result>
4789 </desc>
4790 <param name="name" type="wstring" dir="in"/>
4791 <param name="storageController" type="IStorageController" dir="return"/>
4792 </method>
4793
4794 <method name="removeStorageController">
4795 <desc>
4796 Removes a storage controller from the machine.
4797
4798 <result name="VBOX_E_OBJECT_NOT_FOUND">
4799 A storage controller with given name doesn't exist.
4800 </result>
4801 </desc>
4802 <param name="name" type="wstring" dir="in"/>
4803 </method>
4804
4805 <method name="getSerialPort" const="yes">
4806 <desc>
4807 Returns the serial port associated with the given slot.
4808 Slots are numbered sequentially, starting with zero. The total
4809 number of serial ports per machine is defined by the
4810 <link to="ISystemProperties::serialPortCount"/> property,
4811 so the maximum slot number is one less than that property's value.
4812
4813 <result name="E_INVALIDARG">
4814 Invalid @a slot number.
4815 </result>
4816
4817 </desc>
4818 <param name="slot" type="unsigned long" dir="in"/>
4819 <param name="port" type="ISerialPort" dir="return"/>
4820 </method>
4821
4822 <method name="getParallelPort" const="yes">
4823 <desc>
4824 Returns the parallel port associated with the given slot.
4825 Slots are numbered sequentially, starting with zero. The total
4826 number of parallel ports per machine is defined by the
4827 <link to="ISystemProperties::parallelPortCount"/> property,
4828 so the maximum slot number is one less than that property's value.
4829
4830 <result name="E_INVALIDARG">
4831 Invalid @a slot number.
4832 </result>
4833
4834 </desc>
4835 <param name="slot" type="unsigned long" dir="in"/>
4836 <param name="port" type="IParallelPort" dir="return"/>
4837 </method>
4838
4839 <method name="getNextExtraDataKey">
4840 <desc>
4841 Returns the machine-specific extra data key name following the
4842 supplied key.
4843
4844 An error is returned if the supplied @a key does not exist. @c NULL is
4845 returned in @a nextKey if the supplied key is the last key. When
4846 supplying @c NULL for the @a key, the first key item is returned in
4847 @a nextKey (if there is any). @a nextValue is an optional parameter and
4848 if supplied, the next key's value is returned in it.
4849
4850 <result name="VBOX_E_OBJECT_NOT_FOUND">
4851 Extra data @a key not found.
4852 </result>
4853
4854 </desc>
4855 <param name="key" type="wstring" dir="in">
4856 <desc>Name of the data key to follow.</desc>
4857 </param>
4858 <param name="nextKey" type="wstring" dir="out">
4859 <desc>Name of the next data key.</desc>
4860 </param>
4861 <param name="nextValue" type="wstring" dir="out">
4862 <desc>Value of the next data key.</desc>
4863 </param>
4864 </method>
4865
4866 <method name="getExtraData">
4867 <desc>
4868 Returns associated machine-specific extra data.
4869
4870 If the requested data @a key does not exist, this function will
4871 succeed and return @c NULL in the @a value argument.
4872
4873 <result name="VBOX_E_FILE_ERROR">
4874 Settings file not accessible.
4875 </result>
4876 <result name="VBOX_E_XML_ERROR">
4877 Could not parse the settings file.
4878 </result>
4879
4880 </desc>
4881 <param name="key" type="wstring" dir="in">
4882 <desc>Name of the data key to get.</desc>
4883 </param>
4884 <param name="value" type="wstring" dir="return">
4885 <desc>Value of the requested data key.</desc>
4886 </param>
4887 </method>
4888
4889 <method name="setExtraData">
4890 <desc>
4891 Sets associated machine-specific extra data.
4892
4893 If you pass @c NULL as a key @a value, the given @a key will be
4894 deleted.
4895
4896 <note>
4897 Before performing the actual data change, this method will ask all
4898 registered callbacks using the
4899 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4900 notification for a permission. If one of the callbacks refuses the
4901 new value, the change will not be performed.
4902 </note>
4903 <note>
4904 On success, the
4905 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4906 is called to inform all registered callbacks about a successful data
4907 change.
4908 </note>
4909 <note>
4910 This method can be called outside the machine session and therefore
4911 it's a caller's responsibility to handle possible race conditions
4912 when several clients change the same key at the same time.
4913 </note>
4914
4915 <result name="VBOX_E_FILE_ERROR">
4916 Settings file not accessible.
4917 </result>
4918 <result name="VBOX_E_XML_ERROR">
4919 Could not parse the settings file.
4920 </result>
4921
4922 </desc>
4923 <param name="key" type="wstring" dir="in">
4924 <desc>Name of the data key to set.</desc>
4925 </param>
4926 <param name="value" type="wstring" dir="in">
4927 <desc>Value to assign to the key.</desc>
4928 </param>
4929 </method>
4930
4931 <method name="saveSettings">
4932 <desc>
4933 Saves any changes to machine settings made since the session
4934 has been opened or a new machine has been created, or since the
4935 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4936 For registered machines, new settings become visible to all
4937 other VirtualBox clients after successful invocation of this
4938 method.
4939 <note>
4940 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4941 notification event after the configuration has been successfully
4942 saved (only for registered machines).
4943 </note>
4944 <note>
4945 Calling this method is only valid on instances returned
4946 by <link to="ISession::machine"/> and on new machines
4947 created by <link to="IVirtualBox::createMachine"/> but not
4948 yet registered, or on unregistered machines after calling
4949 <link to="IVirtualBox::unregisterMachine"/>.
4950 </note>
4951
4952 <result name="VBOX_E_FILE_ERROR">
4953 Settings file not accessible.
4954 </result>
4955 <result name="VBOX_E_XML_ERROR">
4956 Could not parse the settings file.
4957 </result>
4958 <result name="E_ACCESSDENIED">
4959 Modification request refused.
4960 </result>
4961
4962 </desc>
4963 </method>
4964
4965 <method name="saveSettingsWithBackup">
4966 <desc>
4967 Creates a backup copy of the machine settings file (<link
4968 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4969 <link to="#saveSettings"/>.
4970
4971 Note that the backup copy is created <b>only</b> if the settings file
4972 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4973 details). Otherwise, this call is fully equivalent to
4974 <link to="#saveSettings"/> and no backup copying is done.
4975
4976 The backup copy is created in the same directory where the original
4977 settings file is located. It is given the following file name:
4978 <pre>
4979 original.xml.x.y-platform.bak
4980 </pre>
4981 where <tt>original.xml</tt> is the original settings file name
4982 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4983 format of the settings file (before auto-conversion).
4984
4985 If the given backup file already exists, this method will try to add the
4986 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4987 0 to 9) and copy it again until it succeeds. If all suffixes are
4988 occupied, or if any other copy error occurs, this method will return a
4989 failure.
4990
4991 If the copy operation succeeds, the @a bakFileName return argument will
4992 receive a full path to the created backup file (for informational
4993 purposes). Note that this will happen even if the subsequent
4994 <link to="#saveSettings"/> call performed by this method after the
4995 copy operation, fails.
4996
4997 <note>
4998 The VirtualBox API never calls this method. It is intended purely for
4999 the purposes of creating backup copies of the settings files by
5000 front-ends before saving the results of the automatically performed
5001 settings conversion to disk.
5002 </note>
5003
5004 <see>settingsFileVersion</see>
5005
5006 <result name="VBOX_E_FILE_ERROR">
5007 Settings file not accessible.
5008 </result>
5009 <result name="VBOX_E_XML_ERROR">
5010 Could not parse the settings file.
5011 </result>
5012 <result name="VBOX_E_INVALID_VM_STATE">
5013 Virtual machine is not mutable.
5014 </result>
5015 <result name="E_ACCESSDENIED">
5016 Modification request refused.
5017 </result>
5018
5019 </desc>
5020 <param name="bakFileName" type="wstring" dir="return">
5021 <desc>Full path to the created backup copy.</desc>
5022 </param>
5023 </method>
5024
5025 <method name="discardSettings">
5026 <desc>
5027 Discards any changes to the machine settings made since the session
5028 has been opened or since the last call to <link to="#saveSettings"/>
5029 or <link to="#discardSettings"/>.
5030 <note>
5031 Calling this method is only valid on instances returned
5032 by <link to="ISession::machine"/> and on new machines
5033 created by <link to="IVirtualBox::createMachine"/> or
5034 opened by <link to="IVirtualBox::openMachine"/> but not
5035 yet registered, or on unregistered machines after calling
5036 <link to="IVirtualBox::unregisterMachine"/>.
5037 </note>
5038
5039 <result name="VBOX_E_INVALID_VM_STATE">
5040 Virtual machine is not mutable.
5041 </result>
5042
5043 </desc>
5044 </method>
5045
5046 <method name="deleteSettings">
5047 <desc>
5048 Deletes the settings file of this machine from disk.
5049 The machine must not be registered in order for this operation
5050 to succeed.
5051 <note>
5052 <link to="#settingsModified"/> will return TRUE after this
5053 method successfully returns.
5054 </note>
5055 <note>
5056 Calling this method is only valid on instances returned
5057 by <link to="ISession::machine"/> and on new machines
5058 created by <link to="IVirtualBox::createMachine"/> or
5059 opened by <link to="IVirtualBox::openMachine"/> but not
5060 yet registered, or on unregistered machines after calling
5061 <link to="IVirtualBox::unregisterMachine"/>.
5062 </note>
5063 <note>
5064 The deleted machine settings file can be restored (saved again)
5065 by calling <link to="#saveSettings"/>.
5066 </note>
5067
5068 <result name="VBOX_E_INVALID_VM_STATE">
5069 Cannot delete settings of a registered machine or
5070 machine not mutable.
5071 </result>
5072 <result name="VBOX_E_IPRT_ERROR">
5073 Could not delete the settings file.
5074 </result>
5075
5076 </desc>
5077 </method>
5078
5079 <method name="export">
5080 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5081 steps required to export VirtualBox machines to OVF.
5082 </desc>
5083
5084 <param name="aAppliance" type="IAppliance" dir="in">
5085 <desc>Appliance to export this machine to.</desc>
5086 </param>
5087 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5088 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5089 </param>
5090 </method >
5091
5092 <method name="getSnapshot">
5093 <desc>
5094 Returns a snapshot of this machine with the given UUID.
5095 A <tt>null</tt> UUID can be used to obtain the first snapshot
5096 taken on this machine. This is useful if you want to traverse
5097 the whole tree of snapshots starting from the root.
5098
5099 <result name="VBOX_E_OBJECT_NOT_FOUND">
5100 Virtual machine has no snapshots or snapshot not found.
5101 </result>
5102
5103 </desc>
5104 <param name="id" type="uuid" dir="in">
5105 <desc>UUID of the snapshot to get</desc>
5106 </param>
5107 <param name="snapshot" type="ISnapshot" dir="return">
5108 <desc>Snapshot object with the given UUID.</desc>
5109 </param>
5110 </method>
5111
5112 <method name="findSnapshot">
5113 <desc>
5114 Returns a snapshot of this machine with the given name.
5115
5116 <result name="VBOX_E_OBJECT_NOT_FOUND">
5117 Virtual machine has no snapshots or snapshot not found.
5118 </result>
5119
5120 </desc>
5121 <param name="name" type="wstring" dir="in">
5122 <desc>Name of the snapshot to find</desc>
5123 </param>
5124 <param name="snapshot" type="ISnapshot" dir="return">
5125 <desc>Snapshot object with the given name.</desc>
5126 </param>
5127 </method>
5128
5129 <method name="setCurrentSnapshot">
5130 <desc>
5131 Sets the current snapshot of this machine.
5132 <note>
5133 In the current implementation, this operation is not
5134 implemented.
5135 </note>
5136 </desc>
5137 <param name="id" type="uuid" dir="in">
5138 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5139 </param>
5140 </method>
5141
5142 <method name="createSharedFolder">
5143 <desc>
5144 Creates a new permanent shared folder by associating the given logical
5145 name with the given host path, adds it to the collection of shared
5146 folders and starts sharing it. Refer to the description of
5147 <link to="ISharedFolder"/> to read more about logical names.
5148
5149 <result name="VBOX_E_OBJECT_IN_USE">
5150 Shared folder already exists.
5151 </result>
5152 <result name="VBOX_E_FILE_ERROR">
5153 Shared folder @a hostPath not accessible.
5154 </result>
5155
5156 </desc>
5157 <param name="name" type="wstring" dir="in">
5158 <desc>Unique logical name of the shared folder.</desc>
5159 </param>
5160 <param name="hostPath" type="wstring" dir="in">
5161 <desc>Full path to the shared folder in the host file system.</desc>
5162 </param>
5163 <param name="writable" type="boolean" dir="in">
5164 <desc>Whether the share is writable or readonly</desc>
5165 </param>
5166 </method>
5167
5168 <method name="removeSharedFolder">
5169 <desc>
5170 Removes the permanent shared folder with the given name previously
5171 created by <link to="#createSharedFolder"/> from the collection of
5172 shared folders and stops sharing it.
5173
5174 <result name="VBOX_E_INVALID_VM_STATE">
5175 Virtual machine is not mutable.
5176 </result>
5177 <result name="VBOX_E_OBJECT_NOT_FOUND">
5178 Shared folder @a name does not exist.
5179 </result>
5180
5181 </desc>
5182 <param name="name" type="wstring" dir="in">
5183 <desc>Logical name of the shared folder to remove.</desc>
5184 </param>
5185 </method>
5186
5187 <method name="canShowConsoleWindow">
5188 <desc>
5189 Returns @c true if the VM console process can activate the
5190 console window and bring it to foreground on the desktop of
5191 the host PC.
5192 <note>
5193 This method will fail if a session for this machine is not
5194 currently open.
5195 </note>
5196
5197 <result name="VBOX_E_INVALID_VM_STATE">
5198 Machine session is not open.
5199 </result>
5200
5201 </desc>
5202 <param name="canShow" type="boolean" dir="return">
5203 <desc>
5204 @c true if the console window can be shown and @c
5205 false otherwise.
5206 </desc>
5207 </param>
5208 </method>
5209
5210 <method name="showConsoleWindow">
5211 <desc>
5212 Activates the console window and brings it to foreground on
5213 the desktop of the host PC. Many modern window managers on
5214 many platforms implement some sort of focus stealing
5215 prevention logic, so that it may be impossible to activate
5216 a window without the help of the currently active
5217 application. In this case, this method will return a non-zero
5218 identifier that represents the top-level window of the VM
5219 console process. The caller, if it represents a currently
5220 active process, is responsible to use this identifier (in a
5221 platform-dependent manner) to perform actual window
5222 activation.
5223 <note>
5224 This method will fail if a session for this machine is not
5225 currently open.
5226 </note>
5227
5228 <result name="VBOX_E_INVALID_VM_STATE">
5229 Machine session is not open.
5230 </result>
5231
5232 </desc>
5233 <param name="winId" type="unsigned long long" dir="return">
5234 <desc>
5235 Platform-dependent identifier of the top-level VM console
5236 window, or zero if this method has performed all actions
5237 necessary to implement the <i>show window</i> semantics for
5238 the given platform and/or VirtualBox front-end.
5239 </desc>
5240 </param>
5241 </method>
5242
5243 <method name="getGuestProperty">
5244 <desc>
5245 Reads an entry from the machine's guest property store.
5246
5247 <result name="VBOX_E_INVALID_VM_STATE">
5248 Machine session is not open.
5249 </result>
5250
5251 </desc>
5252 <param name="name" type="wstring" dir="in">
5253 <desc>
5254 The name of the property to read.
5255 </desc>
5256 </param>
5257 <param name="value" type="wstring" dir="out">
5258 <desc>
5259 The value of the property. If the property does not exist then this
5260 will be empty.
5261 </desc>
5262 </param>
5263 <param name="timestamp" type="unsigned long long" dir="out">
5264 <desc>
5265 The time at which the property was last modified, as seen by the
5266 server process.
5267 </desc>
5268 </param>
5269 <param name="flags" type="wstring" dir="out">
5270 <desc>
5271 Additional property parameters, passed as a comma-separated list of
5272 "name=value" type entries.
5273 </desc>
5274 </param>
5275 </method>
5276
5277 <method name="getGuestPropertyValue">
5278 <desc>
5279 Reads a value from the machine's guest property store.
5280
5281 <result name="VBOX_E_INVALID_VM_STATE">
5282 Machine session is not open.
5283 </result>
5284
5285 </desc>
5286 <param name="property" type="wstring" dir="in">
5287 <desc>
5288 The name of the property to read.
5289 </desc>
5290 </param>
5291 <param name="value" type="wstring" dir="return">
5292 <desc>
5293 The value of the property. If the property does not exist then this
5294 will be empty.
5295 </desc>
5296 </param>
5297 </method>
5298
5299 <method name="getGuestPropertyTimestamp">
5300 <desc>
5301 Reads a property timestamp from the machine's guest property store.
5302
5303 <result name="VBOX_E_INVALID_VM_STATE">
5304 Machine session is not open.
5305 </result>
5306
5307 </desc>
5308 <param name="property" type="wstring" dir="in">
5309 <desc>
5310 The name of the property to read.
5311 </desc>
5312 </param>
5313 <param name="value" type="unsigned long long" dir="return">
5314 <desc>
5315 The timestamp. If the property does not exist then this will be
5316 empty.
5317 </desc>
5318 </param>
5319 </method>
5320
5321 <method name="setGuestProperty">
5322 <desc>
5323 Sets, changes or deletes an entry in the machine's guest property
5324 store.
5325
5326 <result name="E_ACCESSDENIED">
5327 Property cannot be changed.
5328 </result>
5329 <result name="E_INVALIDARG">
5330 Invalid @a flags.
5331 </result>
5332 <result name="VBOX_E_INVALID_VM_STATE">
5333 Virtual machine is not mutable or session not open.
5334 </result>
5335 <result name="VBOX_E_INVALID_OBJECT_STATE">
5336 Cannot set transient property when machine not running.
5337 </result>
5338
5339 </desc>
5340 <param name="property" type="wstring" dir="in">
5341 <desc>
5342 The name of the property to set, change or delete.
5343 </desc>
5344 </param>
5345 <param name="value" type="wstring" dir="in">
5346 <desc>
5347 The new value of the property to set, change or delete. If the
5348 property does not yet exist and value is non-empty, it will be
5349 created. If the value is empty, the key will be deleted if it
5350 exists.
5351 </desc>
5352 </param>
5353 <param name="flags" type="wstring" dir="in">
5354 <desc>
5355 Additional property parameters, passed as a comma-separated list of
5356 "name=value" type entries.
5357 </desc>
5358 </param>
5359 </method>
5360
5361 <method name="setGuestPropertyValue">
5362 <desc>
5363 Sets, changes or deletes a value in the machine's guest property
5364 store. The flags field will be left unchanged or created empty for a
5365 new property.
5366
5367 <result name="E_ACCESSDENIED">
5368 Property cannot be changed.
5369 </result>
5370 <result name="VBOX_E_INVALID_VM_STATE">
5371 Virtual machine is not mutable or session not open.
5372 </result>
5373 <result name="VBOX_E_INVALID_OBJECT_STATE">
5374 Cannot set transient property when machine not running.
5375 </result>
5376 </desc>
5377
5378 <param name="property" type="wstring" dir="in">
5379 <desc>
5380 The name of the property to set, change or delete.
5381 </desc>
5382 </param>
5383 <param name="value" type="wstring" dir="in">
5384 <desc>
5385 The new value of the property to set, change or delete. If the
5386 property does not yet exist and value is non-empty, it will be
5387 created. If value is empty, the property will be deleted if it
5388 exists.
5389 </desc>
5390 </param>
5391 </method>
5392
5393 <method name="enumerateGuestProperties">
5394 <desc>
5395 Return a list of the guest properties matching a set of patterns along
5396 with their values, time stamps and flags.
5397 </desc>
5398 <param name="patterns" type="wstring" dir="in">
5399 <desc>
5400 The patterns to match the properties against, separated by '|'
5401 characters. If this is empty or NULL, all properties will match.
5402 </desc>
5403 </param>
5404 <param name="name" type="wstring" dir="out" safearray="yes">
5405 <desc>
5406 The names of the properties returned.
5407 </desc>
5408 </param>
5409 <param name="value" type="wstring" dir="out" safearray="yes">
5410 <desc>
5411 The values of the properties returned. The array entries match the
5412 corresponding entries in the @a name array.
5413 </desc>
5414 </param>
5415 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5416 <desc>
5417 The time stamps of the properties returned. The array entries match
5418 the corresponding entries in the @a name array.
5419 </desc>
5420 </param>
5421 <param name="flags" type="wstring" dir="out" safearray="yes">
5422 <desc>
5423 The flags of the properties returned. The array entries match the
5424 corresponding entries in the @a name array.
5425 </desc>
5426 </param>
5427 </method>
5428</interface>
5429
5430 <!--
5431 // IConsole
5432 /////////////////////////////////////////////////////////////////////////
5433 -->
5434
5435 <interface
5436 name="IConsoleCallback" extends="$unknown"
5437 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5438 wsmap="suppress"
5439 >
5440
5441 <method name="onMousePointerShapeChange">
5442 <desc>
5443 Notification when the guest mouse pointer shape has
5444 changed. The new shape data is given.
5445 </desc>
5446 <param name="visible" type="boolean" dir="in">
5447 <desc>
5448 Flag whether the pointer is visible.
5449 </desc>
5450 </param>
5451 <param name="alpha" type="boolean" dir="in">
5452 <desc>
5453 Flag whether the pointer has an alpha channel.
5454 </desc>
5455 </param>
5456 <param name="xHot" type="unsigned long" dir="in">
5457 <desc>
5458 The pointer hot spot x coordinate.
5459 </desc>
5460 </param>
5461 <param name="yHot" type="unsigned long" dir="in">
5462 <desc>
5463 The pointer hot spot y coordinate.
5464 </desc>
5465 </param>
5466 <param name="width" type="unsigned long" dir="in">
5467 <desc>
5468 Width of the pointer shape in pixels.
5469 </desc>
5470 </param>
5471 <param name="height" type="unsigned long" dir="in">
5472 <desc>
5473 Height of the pointer shape in pixels.
5474 </desc>
5475 </param>
5476 <param name="shape" type="octet" mod="ptr" dir="in">
5477 <desc>
5478 Address of the shape buffer.
5479
5480 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5481 followed by a 32-bpp XOR (color) mask.
5482
5483 For pointers without alpha channel the XOR mask pixels are 32
5484 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5485 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5486
5487 An AND mask is used for pointers with alpha channel, so if the
5488 callback does not support alpha, the pointer could be
5489 displayed as a normal color pointer.
5490
5491 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5492 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5493 height</tt>. The padding bits at the end of each scanline are
5494 undefined.
5495
5496 The XOR mask follows the AND mask on the next 4-byte aligned
5497 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5498 Bytes in the gap between the AND and the XOR mask are undefined.
5499 The XOR mask scanlines have no gap between them and the size of
5500 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5501
5502 <note>
5503 If @a shape is 0, only the pointer visibility is changed.
5504 </note>
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="onMouseCapabilityChange">
5510 <desc>
5511 Notification when the mouse capabilities reported by the
5512 guest have changed. The new capabilities are passed.
5513 </desc>
5514 <param name="supportsAbsolute" type="boolean" dir="in"/>
5515 <param name="needsHostCursor" type="boolean" dir="in"/>
5516 </method>
5517
5518 <method name="onKeyboardLedsChange">
5519 <desc>
5520 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5521 to alter the state of the keyboard LEDs.
5522 </desc>
5523 <param name="numLock" type="boolean" dir="in"/>
5524 <param name="capsLock" type="boolean" dir="in"/>
5525 <param name="scrollLock" type="boolean" dir="in"/>
5526 </method>
5527
5528 <method name="onStateChange">
5529 <desc>
5530 Notification when the execution state of the machine has changed.
5531 The new state will be given.
5532 </desc>
5533 <param name="state" type="MachineState" dir="in"/>
5534 </method>
5535
5536 <method name="onAdditionsStateChange">
5537 <desc>
5538 Notification when a Guest Additions property changes.
5539 Interested callees should query IGuest attributes to
5540 find out what has changed.
5541 </desc>
5542 </method>
5543
5544 <method name="onDVDDriveChange">
5545 <desc>
5546 Notification when a property of the
5547 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5548 Interested callees should use IDVDDrive methods to find out what has
5549 changed.
5550 </desc>
5551 </method>
5552
5553 <method name="onFloppyDriveChange">
5554 <desc>
5555 Notification when a property of the
5556 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5557 Interested callees should use IFloppyDrive methods to find out what
5558 has changed.
5559 </desc>
5560 </method>
5561
5562 <method name="onNetworkAdapterChange">
5563 <desc>
5564 Notification when a property of one of the
5565 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5566 changes. Interested callees should use INetworkAdapter methods and
5567 attributes to find out what has changed.
5568 </desc>
5569 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5570 <desc>Network adapter that is subject to change.</desc>
5571 </param>
5572 </method>
5573
5574 <method name="onSerialPortChange">
5575 <desc>
5576 Notification when a property of one of the
5577 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5578 Interested callees should use ISerialPort methods and attributes
5579 to find out what has changed.
5580 </desc>
5581 <param name="serialPort" type="ISerialPort" dir="in">
5582 <desc>Serial port that is subject to change.</desc>
5583 </param>
5584 </method>
5585
5586 <method name="onParallelPortChange">
5587 <desc>
5588 Notification when a property of one of the
5589 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5590 changes. Interested callees should use ISerialPort methods and
5591 attributes to find out what has changed.
5592 </desc>
5593 <param name="parallelPort" type="IParallelPort" dir="in">
5594 <desc>Parallel port that is subject to change.</desc>
5595 </param>
5596 </method>
5597
5598 <method name="onStorageControllerChange">
5599 <desc>
5600 Notification when a property of one of the
5601 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5602 changes. Interested callees should use query the corresponding collections
5603 to find out what has changed.
5604 </desc>
5605 </method>
5606
5607 <method name="onVRDPServerChange">
5608 <desc>
5609 Notification when a property of the
5610 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5611 Interested callees should use IVRDPServer methods and attributes to
5612 find out what has changed.
5613 </desc>
5614 </method>
5615
5616 <method name="onUSBControllerChange">
5617 <desc>
5618 Notification when a property of the virtual
5619 <link to="IMachine::USBController">USB controller</link> changes.
5620 Interested callees should use IUSBController methods and attributes to
5621 find out what has changed.
5622 </desc>
5623 </method>
5624
5625 <method name="onUSBDeviceStateChange">
5626 <desc>
5627 Notification when a USB device is attached to or detached from
5628 the virtual USB controller.
5629
5630 This notification is sent as a result of the indirect
5631 request to attach the device because it matches one of the
5632 machine USB filters, or as a result of the direct request
5633 issued by <link to="IConsole::attachUSBDevice"/> or
5634 <link to="IConsole::detachUSBDevice"/>.
5635
5636 This notification is sent in case of both a succeeded and a
5637 failed request completion. When the request succeeds, the
5638 @a error parameter is @c null, and the given device has been
5639 already added to (when @a attached is @c true) or removed from
5640 (when @a attached is @c false) the collection represented by
5641 <link to="IConsole::USBDevices"/>. On failure, the collection
5642 doesn't change and the @a error parameter represents the error
5643 message describing the failure.
5644
5645 </desc>
5646 <param name="device" type="IUSBDevice" dir="in">
5647 <desc>Device that is subject to state change.</desc>
5648 </param>
5649 <param name="attached" type="boolean" dir="in">
5650 <desc>
5651 <tt>true</tt> if the device was attached
5652 and <tt>false</tt> otherwise.
5653 </desc>
5654 </param>
5655 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5656 <desc>
5657 <tt>null</tt> on success or an error message object on
5658 failure.
5659 </desc>
5660 </param>
5661 </method>
5662
5663 <method name="onSharedFolderChange">
5664 <desc>
5665 Notification when a shared folder is added or removed.
5666 The @a scope argument defines one of three scopes:
5667 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5668 (<link to="Scope_Global">Global</link>),
5669 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5670 the machine (<link to="Scope_Machine">Machine</link>) or <link
5671 to="IConsole::sharedFolders">transient shared folders</link> of the
5672 machine (<link to="Scope_Session">Session</link>). Interested callees
5673 should use query the corresponding collections to find out what has
5674 changed.
5675 </desc>
5676 <param name="scope" type="Scope" dir="in">
5677 <desc>Scope of the notification.</desc>
5678 </param>
5679 </method>
5680
5681 <method name="onRuntimeError">
5682 <desc>
5683 Notification when an error happens during the virtual
5684 machine execution.
5685
5686 There are three kinds of runtime errors:
5687 <ul>
5688 <li><i>fatal</i></li>
5689 <li><i>non-fatal with retry</i></li>
5690 <li><i>non-fatal warnings</i></li>
5691 </ul>
5692
5693 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5694 to <tt>true</tt>. In case of fatal errors, the virtual machine
5695 execution is always paused before calling this notification, and
5696 the notification handler is supposed either to immediately save
5697 the virtual machine state using <link to="IConsole::saveState"/>
5698 or power it off using <link to="IConsole::powerDown"/>.
5699 Resuming the execution can lead to unpredictable results.
5700
5701 <b>Non-fatal</b> errors and warnings are indicated by the
5702 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5703 is in the Paused state by the time the error notification is
5704 received, it means that the user can <i>try to resume</i> the machine
5705 execution after attempting to solve the problem that caused the
5706 error. In this case, the notification handler is supposed
5707 to show an appropriate message to the user (depending on the
5708 value of the @a id parameter) that offers several actions such
5709 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5710 wants to retry, the notification handler should continue
5711 the machine execution using the <link to="IConsole::resume"/>
5712 call. If the machine execution is not Paused during this
5713 notification, then it means this notification is a <i>warning</i>
5714 (for example, about a fatal condition that can happen very soon);
5715 no immediate action is required from the user, the machine
5716 continues its normal execution.
5717
5718 Note that in either case the notification handler
5719 <b>must not</b> perform any action directly on a thread
5720 where this notification is called. Everything it is allowed to
5721 do is to post a message to another thread that will then talk
5722 to the user and take the corresponding action.
5723
5724 Currently, the following error identifiers are known:
5725 <ul>
5726 <li><tt>"HostMemoryLow"</tt></li>
5727 <li><tt>"HostAudioNotResponding"</tt></li>
5728 <li><tt>"VDIStorageFull"</tt></li>
5729 </ul>
5730
5731 <note>
5732 This notification is not designed to be implemented by
5733 more than one callback at a time. If you have multiple
5734 IConsoleCallback instances registered on the given
5735 IConsole object, make sure you simply do nothing but
5736 return @c S_OK from all but one of them that does actual
5737 user notification and performs necessary actions.
5738 </note>
5739
5740 </desc>
5741 <param name="fatal" type="boolean" dir="in">
5742 <desc>Whether the error is fatal or not</desc>
5743 </param>
5744 <param name="id" type="wstring" dir="in">
5745 <desc>Error identifier</desc>
5746 </param>
5747 <param name="message" type="wstring" dir="in">
5748 <desc>Optional error message</desc>
5749 </param>
5750 </method>
5751
5752 <method name="onCanShowWindow">
5753 <desc>
5754 Notification when a call to
5755 <link to="IMachine::canShowConsoleWindow"/> is made by a
5756 front-end to check if a subsequent call to
5757 <link to="IMachine::showConsoleWindow"/> can succeed.
5758
5759 The callee should give an answer appropriate to the current
5760 machine state in the @a canShow argument. This answer must
5761 remain valid at least until the next
5762 <link to="IConsole::state">machine state</link> change.
5763
5764 <note>
5765 This notification is not designed to be implemented by
5766 more than one callback at a time. If you have multiple
5767 IConsoleCallback instances registered on the given
5768 IConsole object, make sure you simply do nothing but
5769 return @c true and @c S_OK from all but one of them that
5770 actually manages console window activation.
5771 </note>
5772 </desc>
5773 <param name="canShow" type="boolean" dir="return">
5774 <desc>
5775 @c true if the console window can be shown and @c
5776 false otherwise.
5777 </desc>
5778 </param>
5779 </method>
5780
5781 <method name="onShowWindow">
5782 <desc>
5783 Notification when a call to
5784 <link to="IMachine::showConsoleWindow"/>
5785 requests the console window to be activated and brought to
5786 foreground on the desktop of the host PC.
5787
5788 This notification should cause the VM console process to
5789 perform the requested action as described above. If it is
5790 impossible to do it at a time of this notification, this
5791 method should return a failure.
5792
5793 Note that many modern window managers on many platforms
5794 implement some sort of focus stealing prevention logic, so
5795 that it may be impossible to activate a window without the
5796 help of the currently active application (which is supposedly
5797 an initiator of this notification). In this case, this method
5798 must return a non-zero identifier that represents the
5799 top-level window of the VM console process. The caller, if it
5800 represents a currently active process, is responsible to use
5801 this identifier (in a platform-dependent manner) to perform
5802 actual window activation.
5803
5804 This method must set @a winId to zero if it has performed all
5805 actions necessary to complete the request and the console
5806 window is now active and in foreground, to indicate that no
5807 further action is required on the caller's side.
5808
5809 <note>
5810 This notification is not designed to be implemented by
5811 more than one callback at a time. If you have multiple
5812 IConsoleCallback instances registered on the given
5813 IConsole object, make sure you simply do nothing but
5814 return @c S_OK from all but one of them that actually
5815 manages console window activation.
5816 </note>
5817 </desc>
5818 <param name="winId" type="unsigned long long" dir="return">
5819 <desc>
5820 Platform-dependent identifier of the top-level VM console
5821 window, or zero if this method has performed all actions
5822 necessary to implement the <i>show window</i> semantics for
5823 the given platform and/or this VirtualBox front-end.
5824 </desc>
5825 </param>
5826 </method>
5827
5828 </interface>
5829
5830 <interface
5831 name="IRemoteDisplayInfo" extends="$unknown"
5832 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5833 wsmap="struct"
5834 >
5835 <desc>
5836 Contains information about the remote display (VRDP) capabilities and status.
5837 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5838 </desc>
5839
5840 <attribute name="active" type="boolean" readonly="yes">
5841 <desc>
5842 Whether the remote display connection is active.
5843 </desc>
5844 </attribute>
5845
5846 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5847 <desc>
5848 How many times a client connected.
5849 </desc>
5850 </attribute>
5851
5852 <attribute name="beginTime" type="long long" readonly="yes">
5853 <desc>
5854 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="endTime" type="long long" readonly="yes">
5859 <desc>
5860 When the last connection was terminated or the current time, if
5861 connection is still active, in milliseconds since 1970-01-01 UTC.
5862 </desc>
5863 </attribute>
5864
5865 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5866 <desc>
5867 How many bytes were sent in last or current, if still active, connection.
5868 </desc>
5869 </attribute>
5870
5871 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5872 <desc>
5873 How many bytes were sent in all connections.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5878 <desc>
5879 How many bytes were received in last or current, if still active, connection.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were received in all connections.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="user" type="wstring" readonly="yes">
5890 <desc>
5891 Login user name supplied by the client.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="domain" type="wstring" readonly="yes">
5896 <desc>
5897 Login domain name supplied by the client.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="clientName" type="wstring" readonly="yes">
5902 <desc>
5903 The client name supplied by the client.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="clientIP" type="wstring" readonly="yes">
5908 <desc>
5909 The IP address of the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5914 <desc>
5915 The client software version number.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5920 <desc>
5921 Public key exchange method used when connection was established.
5922 Values: 0 - RDP4 public key exchange scheme.
5923 1 - X509 certificates were sent to client.
5924 </desc>
5925 </attribute>
5926
5927 </interface>
5928
5929 <interface
5930 name="IConsole" extends="$unknown"
5931 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5932 wsmap="managed"
5933 >
5934 <desc>
5935 The IConsole interface represents an interface to control virtual
5936 machine execution.
5937
5938 The console object that implements the IConsole interface is obtained
5939 from a session object after the session for the given machine has been
5940 opened using one of <link to="IVirtualBox::openSession"/>,
5941 <link to="IVirtualBox::openRemoteSession"/> or
5942 <link to="IVirtualBox::openExistingSession"/> methods.
5943
5944 Methods of the IConsole interface allow the caller to query the current
5945 virtual machine execution state, pause the machine or power it down, save
5946 the machine state or take a snapshot, attach and detach removable media
5947 and so on.
5948
5949 <see>ISession</see>
5950 </desc>
5951
5952 <attribute name="machine" type="IMachine" readonly="yes">
5953 <desc>
5954 Machine object this console is sessioned with.
5955 <note>
5956 This is a convenience property, it has the same value as
5957 <link to="ISession::machine"/> of the corresponding session
5958 object.
5959 </note>
5960 </desc>
5961 </attribute>
5962
5963 <attribute name="state" type="MachineState" readonly="yes">
5964 <desc>
5965 Current execution state of the machine.
5966 <note>
5967 This property always returns the same value as the corresponding
5968 property of the IMachine object this console is sessioned with.
5969 For the process that owns (executes) the VM, this is the
5970 preferable way of querying the VM state, because no IPC
5971 calls are made.
5972 </note>
5973 </desc>
5974 </attribute>
5975
5976 <attribute name="guest" type="IGuest" readonly="yes">
5977 <desc>Guest object.</desc>
5978 </attribute>
5979
5980 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5981 <desc>
5982 Virtual keyboard object.
5983 <note>
5984 If the machine is not running, any attempt to use
5985 the returned object will result in an error.
5986 </note>
5987 </desc>
5988 </attribute>
5989
5990 <attribute name="mouse" type="IMouse" readonly="yes">
5991 <desc>
5992 Virtual mouse object.
5993 <note>
5994 If the machine is not running, any attempt to use
5995 the returned object will result in an error.
5996 </note>
5997 </desc>
5998 </attribute>
5999
6000 <attribute name="display" type="IDisplay" readonly="yes">
6001 <desc>Virtual display object.
6002 <note>
6003 If the machine is not running, any attempt to use
6004 the returned object will result in an error.
6005 </note>
6006 </desc>
6007 </attribute>
6008
6009 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6010 <desc>Debugging interface.</desc>
6011 </attribute>
6012
6013 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6014 <desc>
6015 Collection of USB devices currently attached to the virtual
6016 USB controller.
6017 <note>
6018 The collection is empty if the machine is not running.
6019 </note>
6020 </desc>
6021 </attribute>
6022
6023 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6024 <desc>
6025 List of USB devices currently attached to the remote VRDP client.
6026 Once a new device is physically attached to the remote host computer,
6027 it appears in this list and remains there until detached.
6028 </desc>
6029 </attribute>
6030
6031 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6032 <desc>
6033 Collection of shared folders for the current session. These folders
6034 are called transient shared folders because they are available to the
6035 guest OS running inside the associated virtual machine only for the
6036 duration of the session (as opposed to
6037 <link to="IMachine::sharedFolders"/> which represent permanent shared
6038 folders). When the session is closed (e.g. the machine is powered down),
6039 these folders are automatically discarded.
6040
6041 New shared folders are added to the collection using
6042 <link to="#createSharedFolder"/>. Existing shared folders can be
6043 removed using <link to="#removeSharedFolder"/>.
6044 </desc>
6045 </attribute>
6046
6047 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6048 <desc>
6049 Interface that provides information on Remote Display (VRDP) connection.
6050 </desc>
6051 </attribute>
6052
6053 <method name="powerUp">
6054 <desc>
6055 Starts the virtual machine execution using the current machine
6056 state (that is, its current execution state, current settings and
6057 current hard disks).
6058
6059 If the machine is powered off or aborted, the execution will
6060 start from the beginning (as if the real hardware were just
6061 powered on).
6062
6063 If the machine is in the <link to="MachineState_Saved"/> state,
6064 it will continue its execution the point where the state has
6065 been saved.
6066
6067 <note>
6068 Unless you are trying to write a new VirtualBox front-end that
6069 performs direct machine execution (like the VirtualBox or VBoxSDL
6070 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6071 session opened by <link to="IVirtualBox::openSession"/> and use this
6072 session only to change virtual machine settings. If you simply want to
6073 start virtual machine execution using one of the existing front-ends
6074 (for example the VirtualBox GUI or headless server), simply use
6075 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6076 power up the machine automatically for you.
6077 </note>
6078
6079 <see>#saveState</see>
6080 <result name="VBOX_E_INVALID_VM_STATE">
6081 Virtual machine already running.
6082 </result>
6083 <result name="VBOX_E_HOST_ERROR">
6084 Host interface does not exist or name not set.
6085 </result>
6086 <result name="VBOX_E_FILE_ERROR">
6087 Invalid saved state file.
6088 </result>
6089 </desc>
6090 <param name="progress" type="IProgress" dir="return">
6091 <desc>Progress object to track the operation completion.</desc>
6092 </param>
6093 </method>
6094
6095 <method name="powerUpPaused">
6096 <desc>
6097 Identical to powerUp except that the VM will enter the
6098 <link to="MachineState_Paused"/> state, instead of
6099 <link to="MachineState_Running"/>.
6100
6101 <see>#powerUp</see>
6102 <result name="VBOX_E_INVALID_VM_STATE">
6103 Virtual machine already running.
6104 </result>
6105 <result name="VBOX_E_HOST_ERROR">
6106 Host interface does not exist or name not set.
6107 </result>
6108 <result name="VBOX_E_FILE_ERROR">
6109 Invalid saved state file.
6110 </result>
6111 </desc>
6112 <param name="progress" type="IProgress" dir="return">
6113 <desc>Progress object to track the operation completion.</desc>
6114 </param>
6115 </method>
6116
6117 <method name="powerDown">
6118 <desc>
6119 Stops the virtual machine execution.
6120 After this operation completes, the machine will go to the
6121 PoweredOff state.
6122
6123 @deprecated This method will be removed in VirtualBox 2.1 where the
6124 powerDownAsync() method will take its name. Do not use this method in
6125 the code.
6126 <result name="VBOX_E_INVALID_VM_STATE">
6127 Virtual machine must be Running, Paused or Stuck to be powered down.
6128 </result>
6129 <result name="VBOX_E_VM_ERROR">
6130 Unable to power off or destroy virtual machine.
6131 </result>
6132 </desc>
6133 </method>
6134
6135 <method name="powerDownAsync">
6136 <desc>
6137 Initiates the power down procedure to stop the virtual machine
6138 execution.
6139
6140 The completion of the power down procedure is tracked using the returned
6141 IProgress object. After the operation is complete, the machine will go
6142 to the PoweredOff state.
6143
6144 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6145 where the original powerDown() method will be removed. You will need to
6146 rename "powerDownAsync" to "powerDown" in your sources to make them
6147 build with version 2.1.
6148 <result name="VBOX_E_INVALID_VM_STATE">
6149 Virtual machine must be Running, Paused or Stuck to be powered down.
6150 </result>
6151 </desc>
6152 <param name="progress" type="IProgress" dir="return">
6153 <desc>Progress object to track the operation completion.</desc>
6154 </param>
6155 </method>
6156
6157 <method name="reset">
6158 <desc>Resets the virtual machine.
6159 <result name="VBOX_E_INVALID_VM_STATE">
6160 Virtual machine not in Running state.
6161 </result>
6162 <result name="VBOX_E_VM_ERROR">
6163 Virtual machine error in reset operation.
6164 </result>
6165 </desc>
6166 </method>
6167
6168 <method name="pause">
6169 <desc>Pauses the virtual machine execution.
6170 <result name="VBOX_E_INVALID_VM_STATE">
6171 Virtual machine not in Running state.
6172 </result>
6173 <result name="VBOX_E_VM_ERROR">
6174 Virtual machine error in suspend operation.
6175 </result>
6176 </desc>
6177 </method>
6178
6179 <method name="resume">
6180 <desc>Resumes the virtual machine execution.
6181 <result name="VBOX_E_INVALID_VM_STATE">
6182 Virtual machine not in Paused state.
6183 </result>
6184 <result name="VBOX_E_VM_ERROR">
6185 Virtual machine error in resume operation.
6186 </result>
6187 </desc>
6188 </method>
6189
6190 <method name="powerButton">
6191 <desc>Sends the ACPI power button event to the guest.
6192 <result name="VBOX_E_INVALID_VM_STATE">
6193 Virtual machine not in Running state.
6194 </result>
6195 <result name="VBOX_E_PDM_ERROR">
6196 Controlled power off failed.
6197 </result>
6198 </desc>
6199 </method>
6200
6201 <method name="sleepButton">
6202 <desc>Sends the ACPI sleep button event to the guest.
6203 <result name="VBOX_E_INVALID_VM_STATE">
6204 Virtual machine not in Running state.
6205 </result>
6206 <result name="VBOX_E_PDM_ERROR">
6207 Sending sleep button event failed.
6208 </result>
6209 </desc>
6210 </method>
6211
6212 <method name="getPowerButtonHandled">
6213 <desc>Checks if the last power button event was handled by guest.
6214 <result name="VBOX_E_PDM_ERROR">
6215 Checking if the event was handled by the guest OS failed.
6216 </result>
6217 </desc>
6218 <param name="handled" type="boolean" dir="return"/>
6219 </method>
6220
6221 <method name="getGuestEnteredACPIMode">
6222 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6223 G1 (sleeping). If this method returns false, the guest will
6224 most likely not respond to external ACPI events.
6225 <result name="VBOX_E_INVALID_VM_STATE">
6226 Virtual machine not in Running state.
6227 </result>
6228 </desc>
6229 <param name="entered" type="boolean" dir="return"/>
6230 </method>
6231
6232 <method name="saveState">
6233 <desc>
6234 Saves the current execution state of a running virtual machine
6235 and stops its execution.
6236
6237 After this operation completes, the machine will go to the
6238 Saved state. Next time it is powered up, this state will
6239 be restored and the machine will continue its execution from
6240 the place where it was saved.
6241
6242 This operation differs from taking a snapshot to the effect
6243 that it doesn't create new differencing hard disks. Also, once
6244 the machine is powered up from the state saved using this method,
6245 the saved state is deleted, so it will be impossible to return
6246 to this state later.
6247
6248 <note>
6249 On success, this method implicitly calls
6250 <link to="IMachine::saveSettings"/> to save all current machine
6251 settings (including runtime changes to the DVD drive, etc.).
6252 Together with the impossibility to change any VM settings when it is
6253 in the Saved state, this guarantees adequate hardware
6254 configuration of the machine when it is restored from the saved
6255 state file.
6256 </note>
6257
6258 <note>
6259 The machine must be in the Running or Paused state, otherwise
6260 the operation will fail.
6261 </note>
6262 <result name="VBOX_E_INVALID_VM_STATE">
6263 Virtual machine state neither Running nor Paused.
6264 </result>
6265 <result name="VBOX_E_FILE_ERROR">
6266 Failed to create directory for saved state file.
6267 </result>
6268
6269 <see><link to="#takeSnapshot"/></see>
6270 </desc>
6271 <param name="progress" type="IProgress" dir="return">
6272 <desc>Progress object to track the operation completion.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="adoptSavedState">
6277 <desc>
6278 Associates the given saved state file to the virtual machine.
6279
6280 On success, the machine will go to the Saved state. Next time it is
6281 powered up, it will be restored from the adopted saved state and
6282 continue execution from the place where the saved state file was
6283 created.
6284
6285 The specified saved state file path may be absolute or relative to the
6286 folder the VM normally saves the state to (usually,
6287 <link to="IMachine::snapshotFolder"/>).
6288
6289 <note>
6290 It's a caller's responsibility to make sure the given saved state
6291 file is compatible with the settings of this virtual machine that
6292 represent its virtual hardware (memory size, hard disk configuration
6293 etc.). If there is a mismatch, the behavior of the virtual machine
6294 is undefined.
6295 </note>
6296 <result name="VBOX_E_INVALID_VM_STATE">
6297 Virtual machine state neither PoweredOff nor Aborted.
6298 </result>
6299 </desc>
6300 <param name="savedStateFile" type="wstring" dir="in">
6301 <desc>Path to the saved state file to adopt.</desc>
6302 </param>
6303 </method>
6304
6305 <method name="discardSavedState">
6306 <desc>
6307 Discards (deletes) the saved state of the virtual machine
6308 previously created by <link to="#saveState"/>. Next time the
6309 machine is powered up, a clean boot will occur.
6310 <note>
6311 This operation is equivalent to resetting or powering off
6312 the machine without doing a proper shutdown in the guest OS.
6313 </note>
6314 <result name="VBOX_E_INVALID_VM_STATE">
6315 Virtual machine not in state Saved.
6316 </result>
6317 </desc>
6318 </method>
6319
6320 <method name="getDeviceActivity">
6321 <desc>
6322 Gets the current activity type of a given device or device group.
6323 <result name="E_INVALIDARG">
6324 Invalid device type.
6325 </result>
6326 </desc>
6327 <param name="type" type="DeviceType" dir="in"/>
6328 <param name="activity" type="DeviceActivity" dir="return"/>
6329 </method>
6330
6331 <method name="attachUSBDevice">
6332 <desc>
6333 Attaches a host USB device with the given UUID to the
6334 USB controller of the virtual machine.
6335
6336 The device needs to be in one of the following states:
6337 <link to="USBDeviceState_Busy"/>,
6338 <link to="USBDeviceState_Available"/> or
6339 <link to="USBDeviceState_Held"/>,
6340 otherwise an error is immediately returned.
6341
6342 When the device state is
6343 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6344 be returned if the host computer refuses to release it for some reason.
6345
6346 <see>IUSBController::deviceFilters, USBDeviceState</see>
6347 <result name="VBOX_E_INVALID_VM_STATE">
6348 Virtual machine state neither Running nor Paused.
6349 </result>
6350 <result name="VBOX_E_PDM_ERROR">
6351 Virtual machine does not have a USB controller.
6352 </result>
6353 </desc>
6354 <param name="id" type="uuid" dir="in">
6355 <desc>UUID of the host USB device to attach.</desc>
6356 </param>
6357 </method>
6358
6359 <method name="detachUSBDevice">
6360 <desc>
6361 Detaches an USB device with the given UUID from the USB controller
6362 of the virtual machine.
6363
6364 After this method succeeds, the VirtualBox server re-initiates
6365 all USB filters as if the device were just physically attached
6366 to the host, but filters of this machine are ignored to avoid
6367 a possible automatic re-attachment.
6368
6369 <see>IUSBController::deviceFilters, USBDeviceState</see>
6370
6371 <result name="VBOX_E_PDM_ERROR">
6372 Virtual machine does not have a USB controller.
6373 </result>
6374 <result name="E_INVALIDARG">
6375 USB device not attached to this virtual machine.
6376 </result>
6377 </desc>
6378 <param name="id" type="uuid" dir="in">
6379 <desc>UUID of the USB device to detach.</desc>
6380 </param>
6381 <param name="device" type="IUSBDevice" dir="return">
6382 <desc>Detached USB device.</desc>
6383 </param>
6384 </method>
6385
6386 <method name="findUSBDeviceByAddress">
6387 <desc>
6388 Searches for a USB device with the given host address.
6389
6390 <result name="VBOX_E_OBJECT_NOT_FOUND">
6391 Given @c name does not correspond to any USB device.
6392 </result>
6393
6394 <see>IUSBDevice::address</see>
6395 </desc>
6396 <param name="name" type="wstring" dir="in">
6397 <desc>
6398 Address of the USB device (as assigned by the host) to
6399 search for.
6400 </desc>
6401 </param>
6402 <param name="device" type="IUSBDevice" dir="return">
6403 <desc>Found USB device object.</desc>
6404 </param>
6405 </method>
6406
6407 <method name="findUSBDeviceById">
6408 <desc>
6409 Searches for a USB device with the given UUID.
6410
6411 <result name="VBOX_E_OBJECT_NOT_FOUND">
6412 Given @c id does not correspond to any USB device.
6413 </result>
6414
6415 <see>IUSBDevice::id</see>
6416 </desc>
6417 <param name="id" type="uuid" dir="in">
6418 <desc>UUID of the USB device to search for.</desc>
6419 </param>
6420 <param name="device" type="IUSBDevice" dir="return">
6421 <desc>Found USB device object.</desc>
6422 </param>
6423 </method>
6424
6425 <method name="createSharedFolder">
6426 <desc>
6427 Creates a transient new shared folder by associating the given logical
6428 name with the given host path, adds it to the collection of shared
6429 folders and starts sharing it. Refer to the description of
6430 <link to="ISharedFolder"/> to read more about logical names.
6431
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine in Saved state or currently changing state.
6434 </result>
6435 <result name="VBOX_E_FILE_ERROR">
6436 Shared folder already exists or not accessible.
6437 </result>
6438 </desc>
6439 <param name="name" type="wstring" dir="in">
6440 <desc>Unique logical name of the shared folder.</desc>
6441 </param>
6442 <param name="hostPath" type="wstring" dir="in">
6443 <desc>Full path to the shared folder in the host file system.</desc>
6444 </param>
6445 <param name="writable" type="boolean" dir="in">
6446 <desc>Whether the share is writable or readonly</desc>
6447 </param>
6448 </method>
6449
6450 <method name="removeSharedFolder">
6451 <desc>
6452 Removes a transient shared folder with the given name previously
6453 created by <link to="#createSharedFolder"/> from the collection of
6454 shared folders and stops sharing it.
6455 <result name="VBOX_E_INVALID_VM_STATE">
6456 Virtual machine in Saved state or currently changing state.
6457 </result>
6458 <result name="VBOX_E_FILE_ERROR">
6459 Shared folder does not exists.
6460 </result>
6461 </desc>
6462 <param name="name" type="wstring" dir="in">
6463 <desc>Logical name of the shared folder to remove.</desc>
6464 </param>
6465 </method>
6466
6467 <method name="takeSnapshot">
6468 <desc>
6469 Saves the current execution state and all settings of the
6470 machine and creates differencing images for all
6471 normal (non-independent) hard disks.
6472
6473 This method can be called for a PoweredOff, Saved, Running or
6474 Paused virtual machine. When the machine is PoweredOff, an
6475 offline <link to="ISnapshot">snapshot</link> is created,
6476 in all other cases -- an online snapshot.
6477
6478 The taken snapshot is always based on the
6479 <link to="IMachine::currentSnapshot">current
6480 snapshot</link> of the associated virtual machine and becomes
6481 a new current snapshot.
6482
6483 <note>
6484 This method implicitly calls <link to="IMachine::saveSettings"/> to
6485 save all current machine settings before taking an offline snapshot.
6486 </note>
6487
6488 <see>ISnapshot, <link to="#saveState"/></see>
6489 <result name="VBOX_E_INVALID_VM_STATE">
6490 Virtual machine currently changing state.
6491 </result>
6492 </desc>
6493 <param name="name" type="wstring" dir="in">
6494 <desc>Short name for the snapshot.</desc>
6495 </param>
6496 <param name="description" type="wstring" dir="in">
6497 <desc>Optional description of the snapshot.</desc>
6498 </param>
6499 <param name="progress" type="IProgress" dir="return">
6500 <desc>Progress object to track the operation completion.</desc>
6501 </param>
6502 </method>
6503
6504 <method name="discardSnapshot">
6505 <desc>
6506
6507 Starts discarding the specified snapshot. The execution state
6508 and settings of the associated machine stored in the snapshot
6509 will be deleted. The contents of all differencing hard disks of
6510 this snapshot will be merged with the contents of their
6511 dependent child hard disks to keep the, disks valid (in other
6512 words, all changes represented by hard disks being discarded
6513 will be propagated to their child hard disks). After that, this
6514 snapshot's differencing hard disks will be deleted. The parent
6515 of this snapshot will become a new parent for all its child
6516 snapshots.
6517
6518 If the discarded snapshot is the current one, its parent
6519 snapshot will become a new current snapshot. The current machine
6520 state is not directly affected in this case, except that
6521 currently attached differencing hard disks based on hard disks
6522 of the discarded snapshot will be also merged as described
6523 above.
6524
6525 If the discarded snapshot is the first one (the root snapshot)
6526 and it has exactly one child snapshot, this child snapshot will
6527 become the first snapshot after discarding. If there are no
6528 children at all (i.e. the first snapshot is the only snapshot of
6529 the machine), both the current and the first snapshot of the
6530 machine will be set to null. In all other cases, the first
6531 snapshot cannot be discarded.
6532
6533 You cannot discard the snapshot if it
6534 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6535 hard disks that have differencing hard disks based on them. Snapshots of
6536 such kind can be discarded only when every normal hard disk has either
6537 no children at all or exactly one child. In the former case, the normal
6538 hard disk simply becomes unused (i.e. not attached to any VM). In the
6539 latter case, it receives all the changes stored in the child hard disk,
6540 and then it replaces the child hard disk in the configuration of the
6541 corresponding snapshot or machine.
6542
6543 Also, you cannot discard the snapshot if it stores hard disks
6544 (of any type) having differencing child hard disks that belong
6545 to other machines. Such snapshots can be only discarded after
6546 you discard all snapshots of other machines containing "foreign"
6547 child disks, or detach these "foreign" child disks from machines
6548 they are attached to.
6549
6550 One particular example of the snapshot storing normal hard disks
6551 is the first snapshot of a virtual machine that had normal hard
6552 disks attached when taking the snapshot. Be careful when
6553 discarding such snapshots because this implicitly commits
6554 changes (made since the snapshot being discarded has been taken)
6555 to normal hard disks (as described above), which may be not what
6556 you want.
6557
6558 The virtual machine is put to
6559 the <link to="MachineState_Discarding">Discarding</link> state until
6560 the discard operation is completed.
6561
6562 <note>
6563 The machine must not be running, otherwise the operation
6564 will fail.
6565 </note>
6566
6567 <note>
6568 Child hard disks of all normal hard disks of the discarded snapshot
6569 must be accessible (see <link to="IMedium::state"/>) for this
6570 operation to succeed. In particular, this means that all virtual
6571 machines, whose hard disks are directly or indirectly based on the
6572 hard disks of discarded snapshot, must be powered off.
6573 </note>
6574 <note>
6575 Merging hard disk contents can be very time and disk space
6576 consuming, if these disks are big in size and have many
6577 children. However, if the snapshot being discarded is the last
6578 (head) snapshot on the branch, the operation will be rather
6579 quick.
6580 </note>
6581 <note>
6582 Note that discarding the current snapshot
6583 will implicitly call <link to="IMachine::saveSettings"/> to
6584 make all current machine settings permanent.
6585 </note>
6586 <result name="VBOX_E_INVALID_VM_STATE">
6587 Virtual machine is running.
6588 </result>
6589 </desc>
6590 <param name="id" type="uuid" dir="in">
6591 <desc>UUID of the snapshot to discard.</desc>
6592 </param>
6593 <param name="progress" type="IProgress" dir="return">
6594 <desc>Progress object to track the operation completion.</desc>
6595 </param>
6596 </method>
6597
6598 <method name="discardCurrentState">
6599 <desc>
6600 This operation is similar to <link to="#discardSnapshot"/> but
6601 affects the current machine state. This means that the state stored in
6602 the current snapshot will become a new current state, and all current
6603 settings of the machine and changes stored in differencing hard disks
6604 will be lost.
6605
6606 After this operation is successfully completed, new empty differencing
6607 hard disks are created for all normal hard disks of the machine.
6608
6609 If the current snapshot of the machine is an online snapshot, the
6610 machine will go to the <link to="MachineState_Saved"> saved
6611 state</link>, so that the next time it is powered on, the execution
6612 state will be restored from the current snapshot.
6613
6614 <note>
6615 The machine must not be running, otherwise the operation will fail.
6616 </note>
6617
6618 <note>
6619 If the machine state is <link to="MachineState_Saved">Saved</link>
6620 prior to this operation, the saved state file will be implicitly
6621 discarded (as if <link to="IConsole::discardSavedState"/> were
6622 called).
6623 </note>
6624
6625 <result name="VBOX_E_INVALID_VM_STATE">
6626 Virtual machine is running.
6627 </result>
6628 </desc>
6629 <param name="progress" type="IProgress" dir="return">
6630 <desc>Progress object to track the operation completion.</desc>
6631 </param>
6632 </method>
6633
6634 <method name="discardCurrentSnapshotAndState">
6635 <desc>
6636
6637 This method is equivalent to
6638 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6639 (currentSnapshot.id(), progress) followed by
6640 <link to="#discardCurrentState"/>.
6641
6642 As a result, the machine will be fully restored from the
6643 snapshot preceding the current snapshot, while both the current
6644 snapshot and the current machine state will be discarded.
6645
6646 If the current snapshot is the first snapshot of the machine (i.e. it
6647 has the only snapshot), the current machine state will be
6648 discarded <b>before</b> discarding the snapshot. In other words, the
6649 machine will be restored from its last snapshot, before discarding
6650 it. This differs from performing a single
6651 <link to="#discardSnapshot"/> call (note that no
6652 <link to="#discardCurrentState"/> will be possible after it)
6653 to the effect that the latter will preserve the current state instead of
6654 discarding it.
6655
6656 Unless explicitly mentioned otherwise, all remarks and
6657 limitations of the above two methods also apply to this method.
6658
6659 <note>
6660 The machine must not be running, otherwise the operation
6661 will fail.
6662 </note>
6663
6664 <note>
6665 If the machine state is <link to="MachineState_Saved">Saved</link>
6666 prior to this operation, the saved state file will be implicitly
6667 discarded (as if <link to="#discardSavedState"/> were
6668 called).
6669 </note>
6670
6671 <note>
6672 This method is more efficient than calling both of the above
6673 methods separately: it requires less IPC calls and provides
6674 a single progress object.
6675 </note>
6676
6677 <result name="VBOX_E_INVALID_VM_STATE">
6678 Virtual machine is running.
6679 </result>
6680 </desc>
6681 <param name="progress" type="IProgress" dir="return">
6682 <desc>Progress object to track the operation completion.</desc>
6683 </param>
6684 </method>
6685
6686 <method name="registerCallback">
6687 <desc>
6688 Registers a new console callback on this instance. The methods of the
6689 callback interface will be called by this instance when the appropriate
6690 event occurs.
6691 </desc>
6692 <param name="callback" type="IConsoleCallback" dir="in"/>
6693 </method>
6694
6695 <method name="unregisterCallback">
6696 <desc>
6697 Unregisters the console callback previously registered using
6698 <link to="#registerCallback"/>.
6699 <result name="E_INVALIDARG">
6700 Given @a callback handler is not registered.
6701 </result>
6702 </desc>
6703 <param name="callback" type="IConsoleCallback" dir="in"/>
6704 </method>
6705 </interface>
6706
6707 <!--
6708 // IHost
6709 /////////////////////////////////////////////////////////////////////////
6710 -->
6711
6712 <interface
6713 name="IHostDVDDrive" extends="$unknown"
6714 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6715 wsmap="managed"
6716 >
6717 <desc>
6718 The IHostDVDDrive interface represents the physical CD/DVD drive
6719 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6720 </desc>
6721
6722 <attribute name="name" type="wstring" readonly="yes">
6723 <desc>
6724 Returns the platform-specific device identifier.
6725 On DOS-like platforms, it is a drive name (e.g. R:).
6726 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6727 </desc>
6728 </attribute>
6729 <attribute name="description" type="wstring" readonly="yes">
6730 <desc>
6731 Returns a human readable description for the drive. This
6732 description usually contains the product and vendor name. A
6733 @c null string is returned if the description is not available.
6734 </desc>
6735 </attribute>
6736 <attribute name="udi" type="wstring" readonly="yes">
6737 <desc>
6738 Returns the unique device identifier for the drive. This
6739 attribute is reserved for future use instead of
6740 <link to="#name"/>. Currently it is not used and may return
6741 @c null on some platforms.
6742 </desc>
6743 </attribute>
6744
6745 </interface>
6746
6747 <interface
6748 name="IHostFloppyDrive" extends="$unknown"
6749 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6750 wsmap="managed"
6751 >
6752 <desc>
6753 The IHostFloppyDrive interface represents the physical floppy drive
6754 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6755 </desc>
6756 <attribute name="name" type="wstring" readonly="yes">
6757 <desc>
6758 Returns the platform-specific device identifier.
6759 On DOS-like platforms, it is a drive name (e.g. A:).
6760 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6761 </desc>
6762 </attribute>
6763 <attribute name="description" type="wstring" readonly="yes">
6764 <desc>
6765 Returns a human readable description for the drive. This
6766 description usually contains the product and vendor name. A
6767 @c null string is returned if the description is not available.
6768 </desc>
6769 </attribute>
6770 <attribute name="udi" type="wstring" readonly="yes">
6771 <desc>
6772 Returns the unique device identifier for the drive. This
6773 attribute is reserved for future use instead of
6774 <link to="#name"/>. Currently it is not used and may return
6775 @c null on some platforms.
6776 </desc>
6777 </attribute>
6778 </interface>
6779
6780 <enum
6781 name="HostNetworkInterfaceMediumType"
6782 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6783 >
6784 <desc>
6785 Type of encapsulation. Ethernet encapsulation includes both wired and
6786 wireless Ethernet connections.
6787 <see>IHostNetworkInterface</see>
6788 </desc>
6789
6790 <const name="Unknown" value="0">
6791 <desc>
6792 The type of interface cannot be determined.
6793 </desc>
6794 </const>
6795 <const name="Ethernet" value="1">
6796 <desc>
6797 Ethernet frame encapsulation.
6798 </desc>
6799 </const>
6800 <const name="PPP" value="2">
6801 <desc>
6802 Point-to-point protocol encapsulation.
6803 </desc>
6804 </const>
6805 <const name="SLIP" value="3">
6806 <desc>
6807 Serial line IP encapsulation.
6808 </desc>
6809 </const>
6810 </enum>
6811
6812 <enum
6813 name="HostNetworkInterfaceStatus"
6814 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6815 >
6816 <desc>
6817 Current status of the interface.
6818 <see>IHostNetworkInterface</see>
6819 </desc>
6820
6821 <const name="Unknown" value="0">
6822 <desc>
6823 The state of interface cannot be determined.
6824 </desc>
6825 </const>
6826 <const name="Up" value="1">
6827 <desc>
6828 The interface is fully operational.
6829 </desc>
6830 </const>
6831 <const name="Down" value="2">
6832 <desc>
6833 The interface is not functioning.
6834 </desc>
6835 </const>
6836 </enum>
6837
6838 <enum
6839 name="HostNetworkInterfaceType"
6840 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6841 >
6842 <desc>
6843 Network interface type.
6844 </desc>
6845 <const name="Bridged" value="1"/>
6846 <const name="HostOnly" value="2"/>
6847 </enum>
6848
6849 <interface
6850 name="IHostNetworkInterface" extends="$unknown"
6851 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6852 wsmap="managed"
6853 >
6854 <desc>
6855 Reprents one of host's network interfaces. IP V6 address and network
6856 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6857 separated by colons.
6858 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6859 </desc>
6860 <attribute name="name" type="wstring" readonly="yes">
6861 <desc>Returns the host network interface name.</desc>
6862 </attribute>
6863
6864 <attribute name="id" type="uuid" readonly="yes">
6865 <desc>Returns the interface UUID.</desc>
6866 </attribute>
6867
6868 <attribute name="networkName" type="wstring" readonly="yes">
6869 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6870 </attribute>
6871
6872 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6873 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6874 </attribute>
6875
6876 <attribute name="IPAddress" type="wstring" readonly="yes">
6877 <desc>Returns the IP V4 address of the interface.</desc>
6878 </attribute>
6879
6880 <attribute name="networkMask" type="wstring" readonly="yes">
6881 <desc>Returns the network mask of the interface.</desc>
6882 </attribute>
6883
6884 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6885 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6886 </attribute>
6887
6888 <attribute name="IPV6Address" type="wstring" readonly="yes">
6889 <desc>Returns the IP V6 address of the interface.</desc>
6890 </attribute>
6891
6892 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6893 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6894 </attribute>
6895
6896 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6897 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6898 </attribute>
6899
6900 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6901 <desc>Type of protocol encapsulation used.</desc>
6902 </attribute>
6903
6904 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6905 <desc>Status of the interface.</desc>
6906 </attribute>
6907
6908 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6909 <desc>specifies the host interface type.</desc>
6910 </attribute>
6911
6912 <method name="enableStaticIpConfig">
6913 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6914 <param name="IPAddress" type="wstring" dir="in">
6915 <desc>
6916 IP address.
6917 </desc>
6918 </param>
6919 <param name="networkMask" type="wstring" dir="in">
6920 <desc>
6921 network mask.
6922 </desc>
6923 </param>
6924 </method>
6925
6926 <method name="enableStaticIpConfigV6">
6927 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6928 <param name="IPV6Address" type="wstring" dir="in">
6929 <desc>
6930 IP address.
6931 </desc>
6932 </param>
6933 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6934 <desc>
6935 network mask.
6936 </desc>
6937 </param>
6938 </method>
6939
6940 <method name="enableDynamicIpConfig">
6941 <desc>enables the dynamic IP configuration.</desc>
6942 </method>
6943
6944 <method name="dhcpRediscover">
6945 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6946 </method>
6947
6948 </interface>
6949
6950 <interface
6951 name="IHost" extends="$unknown"
6952 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6953 wsmap="managed"
6954 >
6955 <desc>
6956 The IHost interface represents the physical machine that this VirtualBox
6957 installation runs on.
6958
6959 An object implementing this interface is returned by the
6960 <link to="IVirtualBox::host" /> attribute. This interface contains
6961 read-only information about the host's physical hardware (such as what
6962 processors and disks are available, what the host operating system is,
6963 and so on) and also allows for manipulating some of the host's hardware,
6964 such as global USB device filters and host interface networking.
6965
6966 </desc>
6967 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6968 <desc>List of DVD drives available on the host.</desc>
6969 </attribute>
6970
6971 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6972 <desc>List of floppy drives available on the host.</desc>
6973 </attribute>
6974
6975 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6976 <desc>
6977 List of USB devices currently attached to the host.
6978 Once a new device is physically attached to the host computer,
6979 it appears in this list and remains there until detached.
6980
6981 <note>
6982 This method may set a @ref com_warnings "warning result code".
6983 </note>
6984 <note>
6985 If USB functionality is not available in the given edition of
6986 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6987 </note>
6988 </desc>
6989 </attribute>
6990
6991 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6992 <desc>
6993 List of USB device filters in action.
6994 When a new device is physically attached to the host computer,
6995 filters from this list are applied to it (in order they are stored
6996 in the list). The first matched filter will determine the
6997 <link to="IHostUSBDeviceFilter::action">action</link>
6998 performed on the device.
6999
7000 Unless the device is ignored by these filters, filters of all
7001 currently running virtual machines
7002 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7003
7004 <note>
7005 This method may set a @ref com_warnings "warning result code".
7006 </note>
7007 <note>
7008 If USB functionality is not available in the given edition of
7009 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7010 </note>
7011
7012 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7013 </desc>
7014 </attribute>
7015
7016 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7017 <desc>List of host network interfaces currently defined on the host.</desc>
7018 </attribute>
7019
7020 <attribute name="processorCount" type="unsigned long" readonly="yes">
7021 <desc>Number of (logical) CPUs installed in the host system.</desc>
7022 </attribute>
7023
7024 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7025 <desc>Number of (logical) CPUs online in the host system.</desc>
7026 </attribute>
7027
7028 <method name="getProcessorSpeed">
7029 <desc>Query the (approximate) maximum speed of a specified host CPU in
7030 Megahertz.
7031 </desc>
7032 <param name="cpuId" type="unsigned long" dir="in">
7033 <desc>
7034 Identifier of the CPU.
7035 </desc>
7036 </param>
7037 <param name="speed" type="unsigned long" dir="return">
7038 <desc>
7039 Speed value. 0 is returned if value is not known or @a cpuId is
7040 invalid.
7041 </desc>
7042 </param>
7043 </method>
7044
7045 <method name="getProcessorFeature">
7046 <desc>Query whether a CPU feature is supported or not.</desc>
7047 <param name="feature" type="ProcessorFeature" dir="in">
7048 <desc>
7049 CPU Feature identifier.
7050 </desc>
7051 </param>
7052 <param name="supported" type="boolean" dir="return">
7053 <desc>
7054 Feature is supported or not.
7055 </desc>
7056 </param>
7057 </method>
7058
7059 <method name="getProcessorDescription">
7060 <desc>Query the model string of a specified host CPU.
7061 <note>
7062 This function is not implemented in the current version of the
7063 product.
7064 </note>
7065 </desc>
7066 <param name="cpuId" type="unsigned long" dir="in">
7067 <desc>
7068 Identifier of the CPU.
7069 </desc>
7070 </param>
7071 <param name="description" type="wstring" dir="return">
7072 <desc>
7073 Model string. A NULL string is returned if value is not known or
7074 @a cpuId is invalid.
7075 </desc>
7076 </param>
7077 </method>
7078
7079 <attribute name="memorySize" type="unsigned long" readonly="yes">
7080 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7081 </attribute>
7082
7083 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7084 <desc>Available system memory in the host system.</desc>
7085 </attribute>
7086
7087 <attribute name="operatingSystem" type="wstring" readonly="yes">
7088 <desc>Name of the host system's operating system.</desc>
7089 </attribute>
7090
7091 <attribute name="OSVersion" type="wstring" readonly="yes">
7092 <desc>Host operating system's version string.</desc>
7093 </attribute>
7094
7095 <attribute name="UTCTime" type="long long" readonly="yes">
7096 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7097 </attribute>
7098
7099<if target="midl">
7100 <method name="createHostOnlyNetworkInterface">
7101 <desc>
7102 Creates a new adapter for Host Only Networking.
7103 <result name="E_INVALIDARG">
7104 Host network interface @a name already exists.
7105 </result>
7106 </desc>
7107 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7108 <desc>
7109 Created host interface object.
7110 </desc>
7111 </param>
7112 <param name="progress" type="IProgress" dir="return">
7113 <desc>
7114 Progress object to track the operation completion.
7115 </desc>
7116 </param>
7117 </method>
7118 <method name="removeHostOnlyNetworkInterface">
7119 <desc>
7120 Removes the given Host Only Networking interface.
7121 <result name="VBOX_E_OBJECT_NOT_FOUND">
7122 No host network interface matching @a id found.
7123 </result>
7124 </desc>
7125 <param name="id" type="uuid" dir="in">
7126 <desc>
7127 Adapter GUID.
7128 </desc>
7129 </param>
7130 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7131 <desc>
7132 Removed host interface object.
7133 </desc>
7134 </param>
7135 <param name="progress" type="IProgress" dir="return">
7136 <desc>
7137 Progress object to track the operation completion.
7138 </desc>
7139 </param>
7140 </method>
7141</if>
7142
7143 <method name="createUSBDeviceFilter">
7144 <desc>
7145 Creates a new USB device filter. All attributes except
7146 the filter name are set to <tt>null</tt> (any match),
7147 <i>active</i> is <tt>false</tt> (the filter is not active).
7148
7149 The created filter can be added to the list of filters using
7150 <link to="#insertUSBDeviceFilter"/>.
7151
7152 <see>#USBDeviceFilters</see>
7153 </desc>
7154 <param name="name" type="wstring" dir="in">
7155 <desc>
7156 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7157 for more info.
7158 </desc>
7159 </param>
7160 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7161 <desc>Created filter object.</desc>
7162 </param>
7163 </method>
7164
7165 <method name="insertUSBDeviceFilter">
7166 <desc>
7167 Inserts the given USB device to the specified position
7168 in the list of filters.
7169
7170 Positions are numbered starting from <tt>0</tt>. If the specified
7171 position is equal to or greater than the number of elements in
7172 the list, the filter is added at the end of the collection.
7173
7174 <note>
7175 Duplicates are not allowed, so an attempt to insert a
7176 filter that is already in the list, will return an
7177 error.
7178 </note>
7179 <note>
7180 This method may set a @ref com_warnings "warning result code".
7181 </note>
7182 <note>
7183 If USB functionality is not available in the given edition of
7184 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7185 </note>
7186
7187 <see>#USBDeviceFilters</see>
7188
7189 <result name="VBOX_E_INVALID_OBJECT_STATE">
7190 USB device filter is not created within this VirtualBox instance.
7191 </result>
7192 <result name="E_INVALIDARG">
7193 USB device filter already in list.
7194 </result>
7195
7196 </desc>
7197 <param name="position" type="unsigned long" dir="in">
7198 <desc>Position to insert the filter to.</desc>
7199 </param>
7200 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7201 <desc>USB device filter to insert.</desc>
7202 </param>
7203 </method>
7204
7205 <method name="removeUSBDeviceFilter">
7206 <desc>
7207 Removes a USB device filter from the specified position in the
7208 list of filters.
7209
7210 Positions are numbered starting from <tt>0</tt>. Specifying a
7211 position equal to or greater than the number of elements in
7212 the list will produce an error.
7213
7214 <note>
7215 This method may set a @ref com_warnings "warning result code".
7216 </note>
7217 <note>
7218 If USB functionality is not available in the given edition of
7219 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7220 </note>
7221
7222 <see>#USBDeviceFilters</see>
7223
7224 <result name="E_INVALIDARG">
7225 USB device filter list empty or invalid @a position.
7226 </result>
7227
7228 </desc>
7229 <param name="position" type="unsigned long" dir="in">
7230 <desc>Position to remove the filter from.</desc>
7231 </param>
7232 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7233 <desc>Removed USB device filter.</desc>
7234 </param>
7235 </method>
7236
7237 <method name="findHostDVDDrive">
7238 <desc>
7239 Searches for a host DVD drive with the given @c name.
7240
7241 <result name="VBOX_E_OBJECT_NOT_FOUND">
7242 Given @c name does not correspond to any host drive.
7243 </result>
7244
7245 </desc>
7246 <param name="name" type="wstring" dir="in">
7247 <desc>Name of the host drive to search for</desc>
7248 </param>
7249 <param name="drive" type="IHostDVDDrive" dir="return">
7250 <desc>Found host drive object</desc>
7251 </param>
7252 </method>
7253
7254 <method name="findHostFloppyDrive">
7255 <desc>
7256 Searches for a host floppy drive with the given @c name.
7257
7258 <result name="VBOX_E_OBJECT_NOT_FOUND">
7259 Given @c name does not correspond to any host floppy drive.
7260 </result>
7261
7262 </desc>
7263 <param name="name" type="wstring" dir="in">
7264 <desc>Name of the host floppy drive to search for</desc>
7265 </param>
7266 <param name="drive" type="IHostFloppyDrive" dir="return">
7267 <desc>Found host floppy drive object</desc>
7268 </param>
7269 </method>
7270
7271 <method name="findHostNetworkInterfaceByName">
7272 <desc>
7273 Searches through all host network interfaces for an interface with
7274 the given @c name.
7275 <note>
7276 The method returns an error if the given @c name does not
7277 correspond to any host network interface.
7278 </note>
7279 </desc>
7280 <param name="name" type="wstring" dir="in">
7281 <desc>Name of the host network interface to search for.</desc>
7282 </param>
7283 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7284 <desc>Found host network interface object.</desc>
7285 </param>
7286 </method>
7287 <method name="findHostNetworkInterfaceById">
7288 <desc>
7289 Searches through all host network interfaces for an interface with
7290 the given GUID.
7291 <note>
7292 The method returns an error if the given GUID does not
7293 correspond to any host network interface.
7294 </note>
7295 </desc>
7296 <param name="id" type="uuid" dir="in">
7297 <desc>GUID of the host network interface to search for.</desc>
7298 </param>
7299 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7300 <desc>Found host network interface object.</desc>
7301 </param>
7302 </method>
7303 <method name="findHostNetworkInterfacesOfType">
7304 <desc>
7305 Searches through all host network interfaces and returns a list of interfaces of the specified type
7306 </desc>
7307 <param name="type" type="HostNetworkInterfaceType" dir="in">
7308 <desc>type of the host network interfaces to search for.</desc>
7309 </param>
7310 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7311 <desc>Found host network interface objects.</desc>
7312 </param>
7313 </method>
7314
7315 <method name="findUSBDeviceById">
7316 <desc>
7317 Searches for a USB device with the given UUID.
7318
7319 <result name="VBOX_E_OBJECT_NOT_FOUND">
7320 Given @id does not correspond to any USB device.
7321 </result>
7322
7323 <see>IHostUSBDevice::id</see>
7324 </desc>
7325 <param name="id" type="uuid" dir="in">
7326 <desc>UUID of the USB device to search for.</desc>
7327 </param>
7328 <param name="device" type="IHostUSBDevice" dir="return">
7329 <desc>Found USB device object.</desc>
7330 </param>
7331 </method>
7332
7333 <method name="findUSBDeviceByAddress">
7334 <desc>
7335 Searches for a USB device with the given host address.
7336
7337 <result name="VBOX_E_OBJECT_NOT_FOUND">
7338 Given @c name does not correspond to any USB device.
7339 </result>
7340
7341 <see>IHostUSBDevice::address</see>
7342 </desc>
7343 <param name="name" type="wstring" dir="in">
7344 <desc>
7345 Address of the USB device (as assigned by the host) to
7346 search for.
7347 </desc>
7348 </param>
7349 <param name="device" type="IHostUSBDevice" dir="return">
7350 <desc>Found USB device object.</desc>
7351 </param>
7352 </method>
7353
7354 </interface>
7355
7356 <!--
7357 // ISystemProperties
7358 /////////////////////////////////////////////////////////////////////////
7359 -->
7360
7361 <interface
7362 name="ISystemProperties"
7363 extends="$unknown"
7364 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7365 wsmap="managed"
7366 >
7367 <desc>
7368 The ISystemProperties interface represents global properties of the given
7369 VirtualBox installation.
7370
7371 These properties define limits and default values for various attributes
7372 and parameters. Most of the properties are read-only, but some can be
7373 changed by a user.
7374 </desc>
7375
7376 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7377 <desc>Minimum guest system memory in Megabytes.</desc>
7378 </attribute>
7379
7380 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7381 <desc>Maximum guest system memory in Megabytes.</desc>
7382 </attribute>
7383
7384 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7385 <desc>Minimum guest video memory in Megabytes.</desc>
7386 </attribute>
7387
7388 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7389 <desc>Maximum guest video memory in Megabytes.</desc>
7390 </attribute>
7391
7392 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7393 <desc>Minimum CPU count.</desc>
7394 </attribute>
7395
7396 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7397 <desc>Maximum CPU count.</desc>
7398 </attribute>
7399
7400 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7401 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7402 </attribute>
7403
7404 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7405 <desc>
7406 Number of network adapters associated with every
7407 <link to="IMachine"/> instance.
7408 </desc>
7409 </attribute>
7410
7411 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7412 <desc>
7413 Number of serial ports associated with every
7414 <link to="IMachine"/> instance.
7415 </desc>
7416 </attribute>
7417
7418 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7419 <desc>
7420 Number of parallel ports associated with every
7421 <link to="IMachine"/> instance.
7422 </desc>
7423 </attribute>
7424
7425 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7426 <desc>
7427 Maximum device position in the boot order. This value corresponds
7428 to the total number of devices a machine can boot from, to make it
7429 possible to include all possible devices to the boot list.
7430 <see><link to="IMachine::setBootOrder"/></see>
7431 </desc>
7432 </attribute>
7433
7434 <attribute name="defaultMachineFolder" type="wstring">
7435 <desc>
7436 Full path to the default directory used to create new or open
7437 existing machines when a settings file name contains no
7438 path.
7439
7440 The initial value of this property is
7441 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7442 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7443
7444 <note>
7445 Setting this property to <tt>null</tt> will restore the
7446 initial value.
7447 </note>
7448 <note>
7449 When settings this property, the specified path can be
7450 absolute (full path) or relative
7451 to the <link to="IVirtualBox::homeFolder">
7452 VirtualBox home directory</link>.
7453 When reading this property, a full path is
7454 always returned.
7455 </note>
7456 <note>
7457 The specified path may not exist, it will be created
7458 when necessary.
7459 </note>
7460
7461 <see>
7462 <link to="IVirtualBox::createMachine"/>,
7463 <link to="IVirtualBox::openMachine"/>
7464 </see>
7465 </desc>
7466 </attribute>
7467
7468 <attribute name="defaultHardDiskFolder" type="wstring">
7469 <desc>
7470 Full path to the default directory used to create new or open existing
7471 virtual disks.
7472
7473 This path is used when the storage unit of a hard disk is a regular file
7474 in the host's file system and only a file name that contains no path is
7475 given.
7476
7477 The initial value of this property is
7478 <tt>&lt;</tt>
7479 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7480 <tt>&gt;/HardDisks</tt>.
7481
7482 <note>
7483 Setting this property to <tt>null</tt> will restore the
7484 initial value.
7485 </note>
7486 <note>
7487 When settings this property, the specified path can be relative
7488 to the
7489 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7490 absolute. When reading this property, a full path is
7491 always returned.
7492 </note>
7493 <note>
7494 The specified path may not exist, it will be created
7495 when necessary.
7496 </note>
7497
7498 <see>
7499 IHardDisk,
7500 <link to="IVirtualBox::createHardDisk"/>,
7501 <link to="IVirtualBox::openHardDisk"/>,
7502 <link to="IMedium::location"/>
7503 </see>
7504 </desc>
7505 </attribute>
7506
7507 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7508 <desc>
7509 List of all hard disk storage formats supported by this VirtualBox
7510 installation.
7511
7512 Keep in mind that the hard disk format identifier
7513 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7514 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7515 hard disk format is a case-insensitive string. This means that, for
7516 example, all of the following strings:
7517 <pre>
7518 "VDI"
7519 "vdi"
7520 "VdI"</pre>
7521 refer to the same hard disk format.
7522
7523 Note that the virtual hard disk framework is backend-based, therefore
7524 the list of supported formats depends on what backends are currently
7525 installed.
7526
7527 <see>
7528 <link to="IHardDiskFormat"/>,
7529 </see>
7530 </desc>
7531 </attribute>
7532
7533 <attribute name="defaultHardDiskFormat" type="wstring">
7534 <desc>
7535 Identifier of the default hard disk format used by VirtualBox.
7536
7537 The hard disk format set by this attribute is used by VirtualBox
7538 when the hard disk format was not specified explicitly. One example is
7539 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7540 format argument. A more complex example is implicit creation of
7541 differencing hard disks when taking a snapshot of a virtual machine:
7542 this operation will try to use a format of the parent hard disk first
7543 and if this format does not support differencing hard disks the default
7544 format specified by this argument will be used.
7545
7546 The list of supported hard disk formats may be obtained by the
7547 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7548 format must have a capability to create differencing hard disks;
7549 otherwise opeartions that create hard disks implicitly may fail
7550 unexpectedly.
7551
7552 The initial value of this property is <tt>VDI</tt> in the current
7553 version of the VirtualBox product, but may change in the future.
7554
7555 <note>
7556 Setting this property to <tt>null</tt> will restore the
7557 initial value.
7558 </note>
7559
7560 <see>
7561 <link to="#hardDiskFormats"/>,
7562 <link to="IHardDiskFormat::id"/>,
7563 <link to="IVirtualBox::createHardDisk"/>
7564 </see>
7565 </desc>
7566 </attribute>
7567
7568 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7569 <desc>
7570 Library that provides authentication for VRDP clients. The library
7571 is used if a virtual machine's authentication type is set to "external"
7572 in the VM RemoteDisplay configuration.
7573
7574 The system library extension (".DLL" or ".so") must be omitted.
7575 A full path can be specified; if not, then the library must reside on the
7576 system's default library path.
7577
7578 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7579 of that name in one of the default VirtualBox library directories.
7580
7581 For details about VirtualBox authentication libraries and how to implement
7582 them, please refer to the VirtualBox manual.
7583
7584 <note>
7585 Setting this property to <tt>null</tt> will restore the
7586 initial value.
7587 </note>
7588 </desc>
7589 </attribute>
7590
7591 <attribute name="webServiceAuthLibrary" type="wstring">
7592 <desc>
7593 Library that provides authentication for webservice clients. The library
7594 is used if a virtual machine's authentication type is set to "external"
7595 in the VM RemoteDisplay configuration and will be called from
7596 within the <link to="IWebsessionManager::logon" /> implementation.
7597
7598 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7599 there is no per-VM setting for this, as the webservice is a global
7600 resource (if it is running). Only for this setting (for the webservice),
7601 setting this value to a literal "null" string disables authentication,
7602 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7603 no matter what user name and password are supplied.
7604
7605 The initial value of this property is <tt>VRDPAuth</tt>,
7606 meaning that the webservice will use the same authentication
7607 library that is used by default for VBoxVRDP (again, see
7608 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7609 The format and calling convention of authentication libraries
7610 is the same for the webservice as it is for VBoxVRDP.
7611
7612 </desc>
7613 </attribute>
7614
7615 <attribute name="HWVirtExEnabled" type="boolean">
7616 <desc>
7617 This specifies the default value for hardware virtualization
7618 extensions. If enabled, virtual machines will make use of
7619 hardware virtualization extensions such as Intel VT-x and
7620 AMD-V by default. This value can be overridden by each VM
7621 using their <link to="IMachine::HWVirtExEnabled" /> property.
7622 </desc>
7623 </attribute>
7624
7625 <attribute name="LogHistoryCount" type="unsigned long">
7626 <desc>
7627 This value specifies how many old release log files are kept.
7628 </desc>
7629 </attribute>
7630 </interface>
7631
7632 <!--
7633 // IGuest
7634 /////////////////////////////////////////////////////////////////////////
7635 -->
7636
7637 <interface
7638 name="IGuestOSType" extends="$unknown"
7639 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7640 wsmap="struct"
7641 >
7642 <desc>
7643 </desc>
7644
7645 <attribute name="familyId" type="wstring" readonly="yes">
7646 <desc>Guest OS family identifier string.</desc>
7647 </attribute>
7648
7649 <attribute name="familyDescription" type="wstring" readonly="yes">
7650 <desc>Human readable description of the guest OS family.</desc>
7651 </attribute>
7652
7653 <attribute name="id" type="wstring" readonly="yes">
7654 <desc>Guest OS identifier string.</desc>
7655 </attribute>
7656
7657 <attribute name="description" type="wstring" readonly="yes">
7658 <desc>Human readable description of the guest OS.</desc>
7659 </attribute>
7660
7661 <attribute name="is64Bit" type="boolean" readonly="yes">
7662 <desc>Returns @c true if the given OS is 64-bit</desc>
7663 </attribute>
7664
7665 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7666 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7667 </attribute>
7668
7669 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7670 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7671 </attribute>
7672
7673 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7674 <desc>Recommended RAM size in Megabytes.</desc>
7675 </attribute>
7676
7677 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7678 <desc>Recommended video RAM size in Megabytes.</desc>
7679 </attribute>
7680
7681 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7682 <desc>Recommended hard disk size in Megabytes.</desc>
7683 </attribute>
7684
7685 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7686 <desc>Returns recommended network adapter for this OS type.</desc>
7687 </attribute>
7688 </interface>
7689
7690 <interface
7691 name="IGuest" extends="$unknown"
7692 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7693
7694 wsmap="suppress"
7695 >
7696 <desc>
7697 The IGuest interface represents information about the operating system
7698 running inside the virtual machine. Used in
7699 <link to="IConsole::guest"/>.
7700
7701 IGuest provides information about the guest operating system, whether
7702 Guest Additions are installed and other OS-specific virtual machine
7703 properties.
7704 </desc>
7705
7706 <attribute name="OSTypeId" type="wstring" readonly="yes">
7707 <desc>
7708 Identifier of the Guest OS type as reported by the Guest
7709 Additions.
7710 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7711 an IGuestOSType object representing details about the given
7712 Guest OS type.
7713 <note>
7714 If Guest Additions are not installed, this value will be
7715 the same as <link to="IMachine::OSTypeId"/>.
7716 </note>
7717 </desc>
7718 </attribute>
7719
7720 <attribute name="additionsActive" type="boolean" readonly="yes">
7721 <desc>
7722 Flag whether the Guest Additions are installed and active
7723 in which case their version will be returned by the
7724 <link to="#additionsVersion"/> property.
7725 </desc>
7726 </attribute>
7727
7728 <attribute name="additionsVersion" type="wstring" readonly="yes">
7729 <desc>
7730 Version of the Guest Additions (3 decimal numbers separated
7731 by dots) or empty when the Additions are not installed. The
7732 Additions may also report a version but yet not be active as
7733 the version might be refused by VirtualBox (incompatible) or
7734 other failures occurred.
7735 </desc>
7736 </attribute>
7737
7738 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7739 <desc>
7740 Flag whether seamless guest display rendering (seamless desktop
7741 integration) is supported.
7742 </desc>
7743 </attribute>
7744
7745 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7746 <desc>
7747 Flag whether the guest is in graphics mode. If it is not, then
7748 seamless rendering will not work, resize hints are not immediately
7749 acted on and guest display resizes are probably not initiated by
7750 the guest additions.
7751 </desc>
7752 </attribute>
7753
7754 <attribute name="memoryBalloonSize" type="unsigned long">
7755 <desc>Guest system memory balloon size in megabytes.</desc>
7756 </attribute>
7757
7758 <attribute name="statisticsUpdateInterval" type="unsigned long">
7759 <desc>Interval to update guest statistics in seconds.</desc>
7760 </attribute>
7761
7762 <method name="setCredentials">
7763 <desc>
7764 Store login credentials that can be queried by guest operating
7765 systems with Additions installed. The credentials are transient
7766 to the session and the guest may also choose to erase them. Note
7767 that the caller cannot determine whether the guest operating system
7768 has queried or made use of the credentials.
7769
7770 <result name="VBOX_E_VM_ERROR">
7771 VMM device is not available.
7772 </result>
7773
7774 </desc>
7775 <param name="userName" type="wstring" dir="in">
7776 <desc>User name string, can be empty</desc>
7777 </param>
7778 <param name="password" type="wstring" dir="in">
7779 <desc>Password string, can be empty</desc>
7780 </param>
7781 <param name="domain" type="wstring" dir="in">
7782 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7783 </param>
7784 <param name="allowInteractiveLogon" type="boolean" dir="in">
7785 <desc>
7786 Flag whether the guest should alternatively allow the user to
7787 interactively specify different credentials. This flag might
7788 not be supported by all versions of the Additions.
7789 </desc>
7790 </param>
7791 </method>
7792
7793 <method name="getStatistic">
7794 <desc>
7795 Query specified guest statistics as reported by the VirtualBox Additions.
7796 </desc>
7797 <param name="cpuId" type="unsigned long" dir="in">
7798 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7799 </param>
7800 <param name="statistic" type="GuestStatisticType" dir="in">
7801 <desc>Statistic type.</desc>
7802 </param>
7803 <param name="statVal" type="unsigned long" dir="out">
7804 <desc>Statistics value</desc>
7805 </param>
7806 </method>
7807
7808 </interface>
7809
7810
7811 <!--
7812 // IProgress
7813 /////////////////////////////////////////////////////////////////////////
7814 -->
7815
7816 <interface
7817 name="IProgress" extends="$unknown"
7818 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7819 wsmap="managed"
7820 >
7821 <desc>
7822 The IProgress interface represents a task progress object that allows
7823 to wait for the completion of some asynchronous task.
7824
7825 The task consists of one or more operations that run sequentially,
7826 one by one. There is an individual percentage of completion of the
7827 current operation and the percentage of completion of the task as a
7828 whole. Similarly, you can wait for the completion of a particular
7829 operation or for the completion of the whole task.
7830
7831 Every operation is identified by a number (starting from 0)
7832 and has a separate description.
7833 </desc>
7834
7835 <attribute name="id" type="uuid" readonly="yes">
7836 <desc>ID of the task.</desc>
7837 </attribute>
7838
7839 <attribute name="description" type="wstring" readonly="yes">
7840 <desc>Description of the task.</desc>
7841 </attribute>
7842
7843 <attribute name="initiator" type="$unknown" readonly="yes">
7844 <desc>Initiator of the task.</desc>
7845 </attribute>
7846
7847 <attribute name="cancelable" type="boolean" readonly="yes">
7848 <desc>Whether the task can be interrupted.</desc>
7849 </attribute>
7850
7851 <attribute name="percent" type="long" readonly="yes">
7852 <desc>
7853 Current task progress value in percent.
7854 This value depends on how many operations are already complete.
7855 </desc>
7856 </attribute>
7857
7858 <attribute name="completed" type="boolean" readonly="yes">
7859 <desc>Whether the task has been completed.</desc>
7860 </attribute>
7861
7862 <attribute name="canceled" type="boolean" readonly="yes">
7863 <desc>Whether the task has been canceled.</desc>
7864 </attribute>
7865
7866 <attribute name="resultCode" type="result" readonly="yes">
7867 <desc>
7868 Result code of the progress task.
7869 Valid only if <link to="#completed"/> is true.
7870 </desc>
7871 </attribute>
7872
7873 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7874 <desc>
7875 Extended information about the unsuccessful result of the
7876 progress operation. May be NULL when no extended information
7877 is available.
7878 Valid only if <link to="#completed"/> is true and
7879 <link to="#resultCode"/> indicates a failure.
7880 </desc>
7881 </attribute>
7882
7883 <attribute name="operationCount" type="unsigned long" readonly="yes">
7884 <desc>
7885 Number of operations this task is divided into.
7886 Every task consists of at least one operation.
7887 </desc>
7888 </attribute>
7889
7890 <attribute name="operation" type="unsigned long" readonly="yes">
7891 <desc>Number of the operation being currently executed.</desc>
7892 </attribute>
7893
7894 <attribute name="operationDescription" type="wstring" readonly="yes">
7895 <desc>
7896 Description of the operation being currently executed.
7897 </desc>
7898 </attribute>
7899
7900 <attribute name="operationPercent" type="long" readonly="yes">
7901 <desc>Current operation progress value in percent.</desc>
7902 </attribute>
7903
7904 <method name="waitForCompletion">
7905 <desc>
7906 Waits until the task is done (including all operations) with a
7907 given timeout.
7908
7909 <result name="VBOX_E_IPRT_ERROR">
7910 Failed to wait for task completion.
7911 </result>
7912
7913 </desc>
7914 <param name="timeout" type="long" dir="in">
7915 <desc>
7916 Timeout value in milliseconds.
7917 Specify -1 for an indefinite wait.
7918 </desc>
7919 </param>
7920 </method>
7921
7922 <method name="waitForOperationCompletion">
7923 <desc>
7924 Waits until the given operation is done with a given timeout.
7925
7926 <result name="VBOX_E_IPRT_ERROR">
7927 Failed to wait for operation completion.
7928 </result>
7929
7930 </desc>
7931 <param name="operation" type="unsigned long" dir="in">
7932 <desc>
7933 Number of the operation to wait for.
7934 Must be less than <link to="#operationCount"/>.
7935 </desc>
7936 </param>
7937 <param name="timeout" type="long" dir="in">
7938 <desc>
7939 Timeout value in milliseconds.
7940 Specify -1 for an indefinite wait.
7941 </desc>
7942 </param>
7943 </method>
7944
7945 <method name="cancel">
7946 <desc>
7947 Cancels the task.
7948 <note>
7949 If <link to="#cancelable"/> is <tt>false</tt>, then
7950 this method will fail.
7951 </note>
7952
7953 <result name="VBOX_E_INVALID_OBJECT_STATE">
7954 Operation cannot be canceled.
7955 </result>
7956
7957 </desc>
7958 </method>
7959
7960 </interface>
7961
7962
7963 <!--
7964 // ISnapshot
7965 /////////////////////////////////////////////////////////////////////////
7966 -->
7967
7968 <interface
7969 name="ISnapshot" extends="$unknown"
7970 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7971 wsmap="managed"
7972 >
7973 <desc>
7974 The ISnapshot interface represents a snapshot of the virtual
7975 machine.
7976
7977 The <i>snapshot</i> stores all the information about a virtual
7978 machine necessary to bring it to exactly the same state as it was at
7979 the time of taking the snapshot. The snapshot includes:
7980
7981 <ul>
7982 <li>all settings of the virtual machine (i.e. its hardware
7983 configuration: RAM size, attached hard disks, etc.)
7984 </li>
7985 <li>the execution state of the virtual machine (memory contents,
7986 CPU state, etc.).
7987 </li>
7988 </ul>
7989
7990 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7991 or <i>online</i> (taken when the VM is running). The execution
7992 state of the offline snapshot is called a <i>zero execution state</i>
7993 (it doesn't actually contain any information about memory contents
7994 or the CPU state, assuming that all hardware is just powered off).
7995
7996 <h3>Snapshot branches</h3>
7997
7998 Snapshots can be chained. Chained snapshots form a branch where
7999 every next snapshot is based on the previous one. This chaining is
8000 mostly related to hard disk branching (see <link to="IHardDisk"/>
8001 description). This means that every time a new snapshot is created,
8002 a new differencing hard disk is implicitly created for all normal
8003 hard disks attached to the given virtual machine. This allows to
8004 fully restore hard disk contents when the machine is later reverted
8005 to a particular snapshot.
8006
8007 In the current implementation, multiple snapshot branches within one
8008 virtual machine are not allowed. Every machine has a single branch,
8009 and <link to="IConsole::takeSnapshot"/> operation adds a new
8010 snapshot to the top of that branch.
8011
8012 Existing snapshots can be discarded using
8013 <link to="IConsole::discardSnapshot"/>.
8014
8015 <h3>Current snapshot</h3>
8016
8017 Every virtual machine has a current snapshot, identified by
8018 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8019 a base for the <i>current machine state</i> (see below), to the effect
8020 that all normal hard disks of the machine and its execution
8021 state are based on this snapshot.
8022
8023 In the current implementation, the current snapshot is always the
8024 last taken snapshot (i.e. the head snapshot on the branch) and it
8025 cannot be changed.
8026
8027 The current snapshot is <tt>null</tt> if the machine doesn't have
8028 snapshots at all; in this case the current machine state is just
8029 current settings of this machine plus its current execution state.
8030
8031 <h3>Current machine state</h3>
8032
8033 The current machine state is what represented by IMachine instances got
8034 directly from IVirtualBox
8035 using <link
8036 to="IVirtualBox::getMachine">getMachine()</link>, <link
8037 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8038 to instances returned by <link to="ISnapshot::machine"/>). This state
8039 is always used when the machine is <link to="IConsole::powerUp"> powered
8040 on</link>.
8041
8042 The current machine state also includes the current execution state.
8043 If the machine is being currently executed
8044 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8045 and above), its execution state is just what's happening now.
8046 If it is powered off (<link to="MachineState_PoweredOff"/> or
8047 <link to="MachineState_Aborted"/>), it has a zero execution state.
8048 If the machine is saved (<link to="MachineState_Saved"/>), its
8049 execution state is what saved in the execution state file
8050 (<link to="IMachine::stateFilePath"/>).
8051
8052 If the machine is in the saved state, then, next time it is powered
8053 on, its execution state will be fully restored from the saved state
8054 file and the execution will continue from the point where the state
8055 was saved.
8056
8057 Similarly to snapshots, the current machine state can be discarded
8058 using <link to="IConsole::discardCurrentState"/>.
8059
8060 <h3>Taking and discarding snapshots</h3>
8061
8062 The table below briefly explains the meaning of every snapshot
8063 operation:
8064
8065 <table>
8066 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8067
8068 <tr><td><link to="IConsole::takeSnapshot"/></td>
8069
8070 <td>Save the current state of the virtual machine, including all
8071 settings, contents of normal hard disks and the current modifications
8072 to immutable hard disks (for online snapshots)</td>
8073
8074 <td>The current state is not changed (the machine will continue
8075 execution if it is being executed when the snapshot is
8076 taken)</td></tr>
8077
8078 <tr><td><link to="IConsole::discardSnapshot"/></td>
8079
8080 <td>Forget the state of the virtual machine stored in the snapshot:
8081 dismiss all saved settings and delete the saved execution state (for
8082 online snapshots)</td>
8083
8084 <td>Other snapshots (including child snapshots, if any) and the
8085 current state are not directly affected</td></tr>
8086
8087 <tr><td><link to="IConsole::discardCurrentState"/></td>
8088
8089 <td>Restore the current state of the virtual machine from the state
8090 stored in the current snapshot, including all settings and hard disk
8091 contents</td>
8092
8093 <td>The current state of the machine existed prior to this operation
8094 is lost</td></tr>
8095
8096 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8097
8098 <td>Completely revert the virtual machine to the state it was in
8099 before the current snapshot has been taken</td>
8100
8101 <td>The current state, as well as the current snapshot, are
8102 lost</td></tr>
8103
8104 </table>
8105
8106 </desc>
8107
8108 <attribute name="id" type="uuid" readonly="yes">
8109 <desc>UUID of the snapshot.</desc>
8110 </attribute>
8111
8112 <attribute name="name" type="wstring">
8113 <desc>Short name of the snapshot.</desc>
8114 </attribute>
8115
8116 <attribute name="description" type="wstring">
8117 <desc>Optional description of the snapshot.</desc>
8118 </attribute>
8119
8120 <attribute name="timeStamp" type="long long" readonly="yes">
8121 <desc>
8122 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8123 </desc>
8124 </attribute>
8125
8126 <attribute name="online" type="boolean" readonly="yes">
8127 <desc>
8128 <tt>true</tt> if this snapshot is an online snapshot and
8129 <tt>false</tt> otherwise.
8130
8131 <note>
8132 When this attribute is <tt>true</tt>, the
8133 <link to="IMachine::stateFilePath"/> attribute of the
8134 <link to="#machine"/> object associated with this snapshot
8135 will point to the saved state file. Otherwise, it will be
8136 <tt>null</tt>.
8137 </note>
8138 </desc>
8139 </attribute>
8140
8141 <attribute name="machine" type="IMachine" readonly="yes">
8142 <desc>
8143 Virtual machine this snapshot is taken on. This object
8144 stores all settings the machine had when taking this snapshot.
8145 <note>
8146 The returned machine object is immutable, i.e. no
8147 any settings can be changed.
8148 </note>
8149 </desc>
8150 </attribute>
8151
8152 <attribute name="parent" type="ISnapshot" readonly="yes">
8153 <desc>
8154 Parent snapshot (a snapshot this one is based on).
8155 <note>
8156 It's not an error to read this attribute on a snapshot
8157 that doesn't have a parent -- a null object will be
8158 returned to indicate this.
8159 </note>
8160 </desc>
8161 </attribute>
8162
8163 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8164 <desc>
8165 Child snapshots (all snapshots having this one as a parent).
8166 <note>
8167 In the current implementation, there can be only one
8168 child snapshot, or no children at all, meaning this is the
8169 last (head) snapshot.
8170 </note>
8171 </desc>
8172 </attribute>
8173
8174 </interface>
8175
8176
8177 <!--
8178 // IMedia
8179 /////////////////////////////////////////////////////////////////////////
8180 -->
8181
8182 <enum
8183 name="MediaState"
8184 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8185 >
8186 <desc>
8187 Virtual media state.
8188 <see>IMedia</see>
8189 </desc>
8190
8191 <const name="NotCreated" value="0">
8192 <desc>
8193 Associated media storage does not exist (either was not created yet or
8194 was deleted).
8195 </desc>
8196 </const>
8197 <const name="Created" value="1">
8198 <desc>
8199 Associated storage exists and accessible.
8200 </desc>
8201 </const>
8202 <const name="LockedRead" value="2">
8203 <desc>
8204 Media is locked for reading, no data modification is possible.
8205 </desc>
8206 </const>
8207 <const name="LockedWrite" value="3">
8208 <desc>
8209 Media is locked for writing, no concurrent data reading or modification
8210 is possible.
8211 </desc>
8212 </const>
8213 <const name="Inaccessible" value="4">
8214 <desc>
8215 Associated media storage is not accessible.
8216 </desc>
8217 </const>
8218 <const name="Creating" value="5">
8219 <desc>
8220 Associated media storage is being created.
8221 </desc>
8222 </const>
8223 <const name="Deleting" value="6">
8224 <desc>
8225 Associated media storage is being deleted.
8226 </desc>
8227 </const>
8228 </enum>
8229
8230 <interface
8231 name="IMedium" extends="$unknown"
8232 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8233 wsmap="managed"
8234 >
8235 <desc>
8236 The IMedium interface is a common interface for all objects representing
8237 virtual media such as hard disks, CD/DVD images and floppy images.
8238
8239 Each medium is associated with a storage unit (such as a file on the host
8240 computer or a network resource) that holds actual data. The location of
8241 the storage unit is represented by the #location attribute. The value of
8242 this attribute is media type dependent.
8243
8244 The exact media type may be determined by querying the appropriate
8245 interface such as:
8246 <ul>
8247 <li>IHardDisk (virtual hard disks)</li>
8248 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8249 <li>IFloppyImage (raw floppy image files)</li>
8250 </ul>
8251
8252 Existing media are opened using the following methods, depending on the
8253 media type:
8254 <ul>
8255 <li><link to="IVirtualBox::openHardDisk"/></li>
8256 <li><link to="IVirtualBox::openDVDImage"/></li>
8257 <li><link to="IVirtualBox::openFloppyImage"/></li>
8258 </ul>
8259
8260 New hard disk media are created using the
8261 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8262 images are created outside VirtualBox, usually by storing a copy
8263 of the real medium of the corresponding type in a regular file.
8264
8265 <h3>Known Media</h3>
8266
8267 When an existing medium gets opened for the first time, it gets
8268 automatically remembered by the given VirtualBox installation or, in other
8269 words, becomes a <i>known medium</i>. Known media are stored in the media
8270 registry transparently maintained by VirtualBox and stored in settings
8271 files so that this registry is preserved when VirtualBox is not running.
8272
8273 Newly created virtual hard disks get remembered only when the associated
8274 storage unit is actually created (see IHardDisk for more details).
8275
8276 All known media can be enumerated using
8277 <link to="IVirtualBox::hardDisks"/>,
8278 <link to="IVirtualBox::DVDImages"/> and
8279 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8280 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8281 and similar methods or by location using
8282 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8283
8284 Only known media can be attached to virtual machines.
8285
8286 Removing known media from the media registry is performed when the given
8287 medium is closed using the <link to="#close"/> method or when its
8288 associated storage unit is deleted (only for hard disks).
8289
8290 <h3>Accessibility Checks</h3>
8291
8292 The given medium (with the created storage unit) is considered to be
8293 <i>accessible</i> when its storage unit can be read.
8294 Accessible media are indicated by the <link to="MediaState_Created"/>
8295 value of the <link to="#state"/> attribute. When the storage unit cannot
8296 be read (for example, because it is located on a disconnected network
8297 resource, or was accidentally deleted outside VirtualBox), the medium is
8298 considered to be <i>inaccessible</i> which is indicated by the
8299 <link to="MediaState_Inaccessible"/> state. The details about the reason
8300 of being inaccessible can be obtained using the
8301 <link to="#lastAccessError"/> attribute.
8302
8303 A new accessibility check is performed each time the <link to="#state"/>
8304 attribute is read. Please note that this check may take long time (several
8305 seconds or even minutes, depending on the storage unit location and
8306 format), and will block the calling thread until finished. For this
8307 reason, it is recommended to never read this attribute on the main UI
8308 thread to avoid making the UI unresponsive.
8309
8310 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8311 created for the first time), all known media are in the
8312 <link to="MediaState_Inaccessible"/> state but the value of the <link
8313 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8314 accessibility check is made on startup. This is done to make the
8315 VirtualBox object ready for serving requests as
8316 fast as possible and let the end-user application decide if it needs to
8317 check media accessibility right away or not.
8318 </desc>
8319
8320 <attribute name="id" type="uuid" readonly="yes">
8321 <desc>
8322 UUID of the medium. For a newly created medium, this value is a randomly
8323 generated UUID.
8324
8325 <note>
8326 For media in one of MediaState_NotCreated, MediaState_Creating or
8327 MediaState_Deleting states, the value of this property is undefined
8328 and will most likely be an empty UUID.
8329 </note>
8330 </desc>
8331 </attribute>
8332
8333 <attribute name="description" type="wstring">
8334 <desc>
8335 Optional description of the medium. For newly created media, the value
8336 of this attribute value is <tt>null</tt>.
8337
8338 Media types that don't support this attribute will return E_NOTIMPL in
8339 attempt to get or set this attribute's value.
8340
8341 <note>
8342 For some storage types, reading this attribute may return an outdated
8343 (last known) value when <link to="#state"/> is <link
8344 to="MediaState_Inaccessible"/> or <link
8345 to="MediaState_LockedWrite"/> because the value of this attribute is
8346 stored within the storage unit itself. Also note that changing the
8347 attribute value is not possible in such case, as well as when the
8348 medium is the <link to="MediaState_LockedRead"/> state.
8349 </note>
8350 </desc>
8351 </attribute>
8352
8353 <attribute name="state" type="MediaState" readonly="yes">
8354 <desc>
8355 Current media state. Inspect <link to="MediaState"/> values for details.
8356
8357 Reading this attribute may take a long time because an accessibility
8358 check of the storage unit is performed each time the attribute is read.
8359 This check may cause a significant delay if the storage unit of the
8360 given medium is, for example, a file located on a network share which is
8361 not currently accessible due to connectivity problems -- the call will
8362 not return until a timeout interval defined by the host OS for this
8363 operation expires.
8364
8365 If the last known state of the medium is <link to="MediaState_Created"/>
8366 and the accessibility check fails then the state would be set to
8367 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8368 may be used to get more details about the failure. If the state of the
8369 medium is <link to="MediaState_LockedRead"/> or
8370 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8371 non-null value of <link to="#lastAccessError"/> will indicate a failed
8372 accessibility check in this case.
8373
8374 Note that not all media states are applicable to all media types.
8375 For example, states <link to="MediaState_NotCreated"/>,
8376 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8377 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8378 IFloppyImage media.
8379 </desc>
8380 </attribute>
8381
8382 <attribute name="location" type="wstring">
8383 <desc>
8384 Location of the storage unit holding media data.
8385
8386 The format of the location string is media type specific. For media
8387 types using regular files in a host's file system, the location
8388 string is the full file name.
8389
8390 Some media types may support changing the storage unit location by
8391 simply changing the value of this property. If this operation is not
8392 supported, the implementation will return E_NOTIMPL in attempt to set
8393 this attribute's value.
8394
8395 When setting a value of the location attribute which is a regular file
8396 in the host's file system, the given file name may be either relative to
8397 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8398 absolute. Note that if the given location specification does not contain
8399 the file extension part then a proper default extension will be
8400 automatically appended by the implementation depending on the media type.
8401 </desc>
8402 </attribute>
8403
8404 <attribute name="name" type="wstring" readonly="yes">
8405 <desc>
8406 Name of the storage unit holding media data.
8407
8408 The returned string is a short version of the <link to="#location"/>
8409 attribute that is suitable for representing the medium in situations
8410 where the full location specification is too long (such as lists
8411 and comboboxes in GUI frontends). This string is also used by frontends
8412 to sort the media list alphabetically when needed.
8413
8414 For example, for locations that are regular files in the host's file
8415 system, the value of this attribute is just the file name (+ extension),
8416 without the path specification.
8417
8418 Note that as opposed to the <link to="#location"/> attribute, the name
8419 attribute will not necessary be unique for a list of media of the
8420 given type and format.
8421 </desc>
8422 </attribute>
8423
8424 <attribute name="size" type="unsigned long long" readonly="yes">
8425 <desc>
8426 Physical size of the storage unit used to hold media data (in bytes).
8427
8428 <note>
8429 For media whose <link to="#state"/> is <link
8430 to="MediaState_Inaccessible"/>, the value of this property is the
8431 last known size. For <link to="MediaState_NotCreated"/> media,
8432 the returned value is zero.
8433 </note>
8434 </desc>
8435 </attribute>
8436
8437 <attribute name="lastAccessError" type="wstring" readonly="yes">
8438 <desc>
8439 Text message that represents the result of the last accessibility
8440 check.
8441
8442 Accessibility checks are performed each time the <link to="#state"/>
8443 attribute is read. A @c null string is returned if the last
8444 accessibility check was successful. A non-null string indicates a
8445 failure and should normally describe a reason of the failure (for
8446 example, a file read error).
8447 </desc>
8448 </attribute>
8449
8450 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8451 <desc>
8452 Array of UUIDs of all machines this medium is attached to.
8453
8454 A <tt>null</tt> array is returned if this medium is not attached to any
8455 machine or to any machine's snapshot.
8456
8457 <note>
8458 The returned array will include a machine even if this medium is not
8459 attached to that machine in the current state but attached to it in
8460 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8461 details.
8462 </note>
8463 </desc>
8464 </attribute>
8465
8466 <method name="getSnapshotIds">
8467 <desc>
8468 Returns an array of UUIDs of all snapshots of the given machine where
8469 this medium is attached to.
8470
8471 If the medium is attached to the machine in the current state, then the
8472 first element in the array will always be the ID of the queried machine
8473 (i.e. the value equal to the @c machineId argument), followed by
8474 snapshot IDs (if any).
8475
8476 If the medium is not attached to the machine in the current state, then
8477 the array will contain only snapshot IDs.
8478
8479 The returned array may be <tt>null</tt> if this medium is not attached
8480 to the given machine at all, neither in the current state nor in one of
8481 the snapshots.
8482 </desc>
8483 <param name="machineId" type="uuid" dir="in">
8484 <desc>
8485 UUID of the machine to query.
8486 </desc>
8487 </param>
8488 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8489 <desc>
8490 Array of snapshot UUIDs of the given machine using this medium.
8491 </desc>
8492 </param>
8493 </method>
8494
8495 <method name="lockRead">
8496 <desc>
8497 Locks this medium for reading.
8498
8499 The read lock is shared: many clients can simultaneously lock the
8500 same media for reading unless it is already locked for writing (see
8501 <link to="#lockWrite"/>) in which case an error is returned.
8502
8503 When the medium is locked for reading, it cannot be modified
8504 from within VirtualBox. This means that any method that changes
8505 the properties of this medium or contents of the storage unit
8506 will return an error (unless explicitly stated otherwise) and
8507 that an attempt to start a virtual machine that wants to modify
8508 the medium will also fail.
8509
8510 When the virtual machine is started up, it locks for reading all
8511 media it uses in read-only mode. If some media cannot be locked
8512 for reading, the startup procedure will fail.
8513
8514 The medium locked for reading must be unlocked using the <link
8515 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8516 can be nested and must be followed by the same number of paired
8517 <link to="#unlockRead"/> calls.
8518
8519 This method sets the media state to <link
8520 to="MediaState_LockedRead"/> on success. The state prior to
8521 this call must be <link to="MediaState_Created"/>, <link
8522 to="MediaState_Inaccessible"/> or <link
8523 to="MediaState_LockedRead"/>. As you can see, inaccessible
8524 media can be locked too. This is not an error; this method
8525 performs a logical lock that prevents modifications of this
8526 media through the VirtualBox API, not a physical lock of the
8527 underlying storage unit.
8528
8529 This method returns the current state of the medium
8530 <b>before</b> the operation.
8531
8532 <result name="VBOX_E_INVALID_OBJECT_STATE">
8533 Invalid media state (e.g. not created, locked, inaccessible,
8534 creating, deleting).
8535 </result>
8536
8537 </desc>
8538 <param name="state" type="MediaState" dir="return">
8539 <desc>
8540 State of the medium after the operation.
8541 </desc>
8542 </param>
8543 </method>
8544
8545 <method name="unlockRead">
8546 <desc>
8547 Cancels the read lock previously set by <link to="#lockRead"/>.
8548
8549 For both, success and failure, this method returns the current state
8550 of the medium <b>after</b> the operation.
8551
8552 See <link to="#lockRead"/> for more details.
8553
8554 <result name="VBOX_E_INVALID_OBJECT_STATE">
8555 Medium not locked for reading.
8556 </result>
8557
8558 </desc>
8559 <param name="state" type="MediaState" dir="return">
8560 <desc>
8561 State of the medium after the operation.
8562 </desc>
8563 </param>
8564 </method>
8565
8566 <method name="lockWrite">
8567 <desc>
8568 Locks this medium for writing.
8569
8570 The write lock, as opposed to <link to="#lockRead"/>, is
8571 exclusive: there may be only one client holding a write lock
8572 and there may be no read locks while the write lock is held.
8573
8574 When the medium is locked for writing, it cannot be modified
8575 from within VirtualBox and it is not guaranteed that the values
8576 of its properties are up-to-date. Any method that changes the
8577 properties of this medium or contents of the storage unit will
8578 return an error (unless explicitly stated otherwise) and an
8579 attempt to start a virtual machine wanting to modify or to
8580 read the medium will fail.
8581
8582 When the virtual machine is started up, it locks for writing all
8583 media it uses to write data to. If any medium could not be locked
8584 for writing, the startup procedure will fail.
8585
8586 The medium locked for writing must be unlocked using the <link
8587 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8588 can <b>not</b> be nested and must be followed by a<link
8589 to="#unlockWrite"/> call before the next lockWrite call.
8590
8591 This method sets the media state to <link
8592 to="MediaState_LockedWrite"/> on success. The state prior to
8593 this call must be <link to="MediaState_Created"/> or <link
8594 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8595 media can be locked too. This is not an error; this method
8596 performs a logical lock preventing modifications of this
8597 media through the VirtualBox API, not a physical lock of the
8598 underlying storage unit.
8599
8600 For both, success and failure, this method returns the current
8601 state of the medium <b>before</b> the operation.
8602
8603 <result name="VBOX_E_INVALID_OBJECT_STATE">
8604 Invalid media state (e.g. not created, locked, inaccessible,
8605 creating, deleting).
8606 </result>
8607
8608 </desc>
8609 <param name="state" type="MediaState" dir="return">
8610 <desc>
8611 State of the medium after the operation.
8612 </desc>
8613 </param>
8614 </method>
8615
8616 <method name="unlockWrite">
8617 <desc>
8618 Cancels the write lock previously set by <link to="#lockWrite"/>.
8619
8620 For both, success and failure, this method returns the current
8621 state of the medium <b>after</b> the operation.
8622
8623 See <link to="#lockWrite"/> for more details.
8624
8625 <result name="VBOX_E_INVALID_OBJECT_STATE">
8626 Medium not locked for writing.
8627 </result>
8628
8629 </desc>
8630 <param name="state" type="MediaState" dir="return">
8631 <desc>
8632 State of the medium after the operation.
8633 </desc>
8634 </param>
8635 </method>
8636
8637 <method name="close">
8638 <desc>
8639 Closes this medium.
8640
8641 The hard disk must not be attached to any known virtual machine
8642 and must not have any known child hard disks, otherwise the
8643 operation will fail.
8644
8645 When the hard disk is successfully closed, it gets removed from
8646 the list of remembered hard disks, but its storage unit is not
8647 deleted. In particular, this means that this hard disk can be
8648 later opened again using the <link
8649 to="IVirtualBox::openHardDisk"/> call.
8650
8651 Note that after this method successfully returns, the given hard
8652 disk object becomes uninitialized. This means that any attempt
8653 to call any of its methods or attributes will fail with the
8654 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8655
8656 <result name="VBOX_E_INVALID_OBJECT_STATE">
8657 Invalid media state (other than not created, created or
8658 inaccessible).
8659 </result>
8660 <result name="VBOX_E_OBJECT_IN_USE">
8661 Medium attached to virtual machine.
8662 </result>
8663 <result name="VBOX_E_FILE_ERROR">
8664 Settings file not accessible.
8665 </result>
8666 <result name="VBOX_E_XML_ERROR">
8667 Could not parse the settings file.
8668 </result>
8669
8670 </desc>
8671 </method>
8672
8673 </interface>
8674
8675
8676 <!--
8677 // IHardDisk
8678 /////////////////////////////////////////////////////////////////////////
8679 -->
8680
8681 <enum
8682 name="HardDiskType"
8683 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8684 >
8685 <desc>
8686 Virtual hard disk type.
8687 <see>IHardDisk</see>
8688 </desc>
8689
8690 <const name="Normal" value="0">
8691 <desc>
8692 Normal hard disk (attached directly or indirectly, preserved
8693 when taking snapshots).
8694 </desc>
8695 </const>
8696 <const name="Immutable" value="1">
8697 <desc>
8698 Immutable hard disk (attached indirectly, changes are wiped out
8699 after powering off the virtual machine).
8700 </desc>
8701 </const>
8702 <const name="Writethrough" value="2">
8703 <desc>
8704 Write through hard disk (attached directly, ignored when
8705 taking snapshots).
8706 </desc>
8707 </const>
8708 </enum>
8709
8710 <enum
8711 name="HardDiskVariant"
8712 uuid="99334b63-7ed0-4f61-8a7e-7ec3e20dd912"
8713 >
8714 <desc>
8715 Virtual hard disk image variant. More than one flag may be set.
8716 <see>IHardDisk</see>
8717 </desc>
8718
8719 <const name="Standard" value="0">
8720 <desc>
8721 No particular variant requested, results in using the backend default.
8722 </desc>
8723 </const>
8724 <const name="VmdkSplit2G" value="0x01">
8725 <desc>
8726 VMDK image split in chunks of less than 2GByte.
8727 </desc>
8728 </const>
8729 <const name="VmdkStreamOptimized" value="0x04">
8730 <desc>
8731 VMDK streamOptimized image. Special import/export format which is
8732 read-only/append-only.
8733 </desc>
8734 </const>
8735 <const name="Fixed" value="0x1000">
8736 <desc>
8737 Fixed image. Only allowed for base images.
8738 </desc>
8739 </const>
8740 <const name="Diff" value="0x2000">
8741 <desc>
8742 Fixed image. Only allowed for base images.
8743 </desc>
8744 </const>
8745 </enum>
8746
8747 <interface
8748 name="IHardDiskAttachment" extends="$unknown"
8749 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8750 wsmap="struct"
8751 >
8752 <desc>
8753 The IHardDiskAttachment interface represents a hard disk attachment of a
8754 virtual machine.
8755
8756 Every hard disk attachment specifies a slot of the virtual hard disk
8757 controller and a virtual hard disk attached to this slot.
8758
8759 The array of hard disk attachments is returned by
8760 <link to="IMachine::hardDiskAttachments"/>.
8761 </desc>
8762 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8763 <desc>Hard disk object associated with this attachment.</desc>
8764 </attribute>
8765
8766 <attribute name="controller" type="wstring" readonly="yes">
8767 <desc>Interface bus of this attachment.</desc>
8768 </attribute>
8769
8770 <attribute name="port" type="long" readonly="yes">
8771 <desc>Port number of this attachment.</desc>
8772 </attribute>
8773
8774 <attribute name="device" type="long" readonly="yes">
8775 <desc>Device slot number of this attachment.</desc>
8776 </attribute>
8777
8778 </interface>
8779
8780 <interface
8781 name="IHardDisk" extends="IMedium"
8782 uuid="3498d065-dee6-48bf-bcc5-47018fee4f42"
8783 wsmap="managed"
8784 >
8785 <desc>
8786 The IHardDisk interface represents a virtual hard disk drive
8787 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8788
8789 Virtual hard disk objects virtualize the hard disk hardware and look like
8790 regular hard disks for the guest OS running inside the virtual machine.
8791
8792 <h3>Hard Disk Types</h3>
8793
8794 There are three types of hard disks:
8795 <link to="HardDiskType_Normal">Normal</link>,
8796 <link to="HardDiskType_Immutable">Immutable</link> and
8797 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8798 hard disk defines how the hard disk is attached to a virtual machine and
8799 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8800 machine with the attached hard disk is taken. The type of the hard disk is
8801 defined by the <link to="#type"/> attribute.
8802
8803 All hard disks can be also divided in two big groups: <i>base</i> hard
8804 disks and <i>differencing</i> hard disks. A base hard disk contains all
8805 sectors of the hard disk data in its storage unit and therefore can be
8806 used independently. On the contrary, a differencing hard disk contains
8807 only some part of the hard disk data (a subset of sectors) and needs
8808 another hard disk to get access to the missing sectors of data. This
8809 another hard disk is called a <i>parent</i> hard disk and defines a hard
8810 disk to which this differencing hard disk is known to be <i>linked to</i>.
8811 The parent hard disk may be itself a differencing hard disk. This
8812 way, differencing hard disks form a linked hard disk chain. This chain
8813 always ends with the base hard disk which is sometimes referred to as the
8814 root hard disk of this chain. Note that several differencing hard disks
8815 may be linked to the same parent hard disk. This way, all known hard disks
8816 form a hard disk tree which is based on their parent-child relationship.
8817
8818 Differencing hard disks can be distinguished from base hard disks by
8819 querying the <link to="#parent"/> attribute: base hard disks do not have
8820 parents they would depend on, so the value of this attribute is always
8821 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8822 the hard disk tree (from the child hard disk to its parent). It is also
8823 possible to walk down the tree using the <link to="#children"/>
8824 attribute.
8825
8826 Note that the type of all differencing hard disks is
8827 <link to="HardDiskType_Normal">Normal</link>; all other values are
8828 meaningless for them. Base hard disks may be of any type.
8829
8830 <h3>Creating Hard Disks</h3>
8831
8832 New base hard disks are created using
8833 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8834 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8835 disks are usually implicitly created by VirtualBox when needed but may
8836 also be created explicitly using <link to="#createDiffStorage"/>.
8837
8838 After the hard disk is successfully created (including the storage unit)
8839 or opened, it becomes a known hard disk (remembered in the internal media
8840 registry). Known hard disks can be attached to a virtual machine, accessed
8841 through <link to="IVirtualBox::getHardDisk"/> and
8842 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8843 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8844
8845 The following methods, besides <link to="IMedium::close"/>,
8846 automatically remove the hard disk from the media registry:
8847 <ul>
8848 <li><link to="#deleteStorage"/></li>
8849 <li><link to="#mergeTo"/></li>
8850 </ul>
8851
8852 If the storage unit of the hard disk is a regular file in the host's
8853 file system then the rules stated in the description of the
8854 <link to="IMedium::location"/> attribute apply when setting its value. In
8855 addition, a plain file name without any path may be given, in which case
8856 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8857 folder</link> will be prepended to it.
8858
8859 <h4>Automatic composition of the file name part</h4>
8860
8861 Another extension to the <link to="IMedium::location"/> attribute is that
8862 there is a possibility to cause VirtualBox to compose a unique value for
8863 the file name part of the location using the UUID of the hard disk. This
8864 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8865 e.g. before the storage unit is created, and works as follows. You set the
8866 value of the <link to="IMedium::location"/> attribute to a location
8867 specification which only contains the path specification but not the file
8868 name part and ends with either a forward slash or a backslash character.
8869 In response, VirtualBox will generate a new UUID for the hard disk and
8870 compose the file name using the following pattern:
8871 <pre>
8872 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8873 </pre>
8874 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8875 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8876 is the default extension for the storage format of this hard disk. After
8877 that, you may call any of the methods that create a new hard disk storage
8878 unit and they will use the generated UUID and file name.
8879
8880 <h3>Attaching Hard Disks</h3>
8881
8882 Hard disks are attached to virtual machines using the
8883 <link to="IMachine::attachHardDisk"/> method and detached using the
8884 <link to="IMachine::detachHardDisk"/> method. Depending on their
8885 <link to="#type"/>, hard disks are attached either
8886 <i>directly</i> or <i>indirectly</i>.
8887
8888 When a hard disk is being attached directly, it is associated with the
8889 virtual machine and used for hard disk operations when the machine is
8890 running. When a hard disk is being attached indirectly, a new differencing
8891 hard disk linked to it is implicitly created and this differencing hard
8892 disk is associated with the machine and used for hard disk operations.
8893 This also means that if <link to="IMachine::attachHardDisk"/> performs
8894 a direct attachment then the same hard disk will be returned in response
8895 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8896 an indirect attachment is performed then
8897 <link to="IMachine::getHardDisk"/> will return the implicitly created
8898 differencing hard disk, not the original one passed to <link
8899 to="IMachine::attachHardDisk"/>. The following table shows the
8900 dependency of the attachment type on the hard disk type:
8901
8902 <table>
8903 <tr>
8904 <th>Hard Disk Type</th>
8905 <th>Direct or Indirect?</th>
8906 </tr>
8907 <tr>
8908 <td>Normal (Base)</td>
8909 <td>
8910 Normal base hard disks that do not have children (i.e. differencing
8911 hard disks linked to them) and that are not already attached to
8912 virtual machines in snapshots are attached <b>directly</b>.
8913 Otherwise, they are attached <b>indirectly</b> because having
8914 dependent children or being part of the snapshot makes it impossible
8915 to modify hard disk contents without breaking the integrity of the
8916 dependent party. The <link to="#readOnly"/> attribute allows to
8917 quickly determine the kind of the attachment for the given hard
8918 disk. Note that if a normal base hard disk is to be indirectly
8919 attached to a virtual machine with snapshots then a special
8920 procedure called <i>smart attachment</i> is performed (see below).
8921 </td>
8922 </tr>
8923 <tr>
8924 <td>Normal (Differencing)</td>
8925 <td>
8926 Differencing hard disks are like normal base hard disks: attached
8927 <b>directly</b> if they do not have children and are not attached to
8928 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8929 that the smart attachment procedure is never performed for
8930 differencing hard disks.
8931 </td>
8932 </tr>
8933 <tr>
8934 <td>Immutable</td>
8935 <td>
8936 Immutable hard disks are always attached <b>indirectly</b> because
8937 they are designed to be non-writable. If an immutable hard disk is
8938 attached to a virtual machine with snapshots then a special
8939 procedure called smart attachment is performed (see below).
8940 </td>
8941 </tr>
8942 <tr>
8943 <td>Writethrough</td>
8944 <td>
8945 Writethrough hard disks are always attached <b>directly</b>, also as
8946 designed. This also means that writethrough hard disks cannot have
8947 other hard disks linked to them at all.
8948 </td>
8949 </tr>
8950 </table>
8951
8952 Note that the same hard disk, regardless of its type, may be attached to
8953 more than one virtual machine at a time. In this case, the machine that is
8954 started first gains exclusive access to the hard disk and attempts to
8955 start other machines having this hard disk attached will fail until the
8956 first machine is powered down.
8957
8958 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8959 that the given hard disk remains associated with the given machine after a
8960 successful <link to="IMachine::detachHardDisk"/> call until
8961 <link to="IMachine::saveSettings"/> is called to save all changes to
8962 machine settings to disk. This deferring is necessary to guarantee that
8963 the hard disk configuration may be restored at any time by a call to
8964 <link to="IMachine::discardSettings"/> before the settings
8965 are saved (committed).
8966
8967 Note that if <link to="IMachine::discardSettings"/> is called after
8968 indirectly attaching some hard disks to the machine but before a call to
8969 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8970 all differencing hard disks implicitly created by
8971 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8972 Such implicitly created hard disks will also be immediately deleted when
8973 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8974 call if it is made before <link to="IMachine::saveSettings"/>. This
8975 implicit deletion is safe because newly created differencing hard
8976 disks do not contain any user data.
8977
8978 However, keep in mind that detaching differencing hard disks that were
8979 implicitly created by <link to="IMachine::attachHardDisk"/>
8980 before the last <link to="IMachine::saveSettings"/> call will
8981 <b>not</b> implicitly delete them as they may already contain some data
8982 (for example, as a result of virtual machine execution). If these hard
8983 disks are no more necessary, the caller can always delete them explicitly
8984 using <link to="#deleteStorage"/> after they are actually de-associated
8985 from this machine by the <link to="IMachine::saveSettings"/> call.
8986
8987 <h3>Smart Attachment</h3>
8988
8989 When normal base or immutable hard disks are indirectly attached to a
8990 virtual machine then some additional steps are performed to make sure the
8991 virtual machine will have the most recent "view" of the hard disk being
8992 attached. These steps include walking through the machine's snapshots
8993 starting from the current one and going through ancestors up to the first
8994 snapshot. Hard disks attached to the virtual machine in all
8995 of the encountered snapshots are checked whether they are descendants of
8996 the given normal base or immutable hard disk. The first found child (which
8997 is the differencing hard disk) will be used instead of the normal base or
8998 immutable hard disk as a parent for creating a new differencing hard disk
8999 that will be actually attached to the machine. And only if no descendants
9000 are found or if the virtual machine does not have any snapshots then the
9001 normal base or immutable hard disk will be used itself as a parent for
9002 this differencing hard disk.
9003
9004 It is easier to explain what smart attachment does using the
9005 following example:
9006 <pre>
9007BEFORE attaching B.vdi: AFTER attaching B.vdi:
9008
9009Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9010 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9011 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9012 Snapshot 4 (none) Snapshot 4 (none)
9013 CurState (none) CurState (D3->D2.vdi)
9014
9015 NOT
9016 ...
9017 CurState (D3->B.vdi)
9018 </pre>
9019 The first column is the virtual machine configuration before the base hard
9020 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9021 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9022 mean that the hard disk that is actually attached to the machine is a
9023 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9024 another hard disk, <tt>B.vdi</tt>.
9025
9026 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9027 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9028 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9029 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9030 it cannot be attached directly and needs an indirect attachment (i.e.
9031 implicit creation of a new differencing hard disk). Due to the smart
9032 attachment procedure, the new differencing hard disk
9033 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9034 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9035 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9036 machine.
9037
9038 Note that if there is more than one descendant hard disk of the given base
9039 hard disk found in a snapshot, and there is an exact device, channel and
9040 bus match, then this exact match will be used. Otherwise, the youngest
9041 descendant will be picked up.
9042
9043 There is one more important aspect of the smart attachment procedure which
9044 is not related to snapshots at all. Before walking through the snapshots
9045 as described above, the backup copy of the current list of hard disk
9046 attachment is searched for descendants. This backup copy is created when
9047 the hard disk configuration is changed for the first time after the last
9048 <link to="IMachine::saveSettings"/> call and used by
9049 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9050 changes. When such a descendant is found in this backup copy, it will be
9051 simply re-attached back, without creating a new differencing hard disk for
9052 it. This optimization is necessary to make it possible to re-attach the
9053 base or immutable hard disk to a different bus, channel or device slot
9054 without losing the contents of the differencing hard disk actually
9055 attached to the machine in place of it.
9056 </desc>
9057
9058 <attribute name="format" type="wstring" readonly="yes">
9059 <desc>
9060 Storage format of this hard disk.
9061
9062 The value of this attribute is a string that specifies a backend used to
9063 store hard disk data. The storage format is defined when you create a
9064 new hard disk or automatically detected when you open an existing hard
9065 disk medium, and cannot be changed later.
9066
9067 The list of all storage formats supported by this VirtualBox
9068 installation can be obtained using
9069 <link to="ISystemProperties::hardDiskFormats"/>.
9070 </desc>
9071 </attribute>
9072
9073 <attribute name="type" type="HardDiskType">
9074 <desc>
9075 Type (role) of this hard disk.
9076
9077 The following constraints apply when changing the value of this
9078 attribute:
9079 <ul>
9080 <li>If a hard disk is attached to a virtual machine (either in the
9081 current state or in one of the snapshots), its type cannot be
9082 changed.
9083 </li>
9084 <li>As long as the hard disk has children, its type cannot be set
9085 to <link to="HardDiskType_Writethrough"/>.
9086 </li>
9087 <li>The type of all differencing hard disks is
9088 <link to="HardDiskType_Normal"/> and cannot be changed.
9089 </li>
9090 </ul>
9091
9092 The type of a newly created or opened hard disk is set to
9093 <link to="HardDiskType_Normal"/>.
9094 </desc>
9095 </attribute>
9096
9097 <attribute name="parent" type="IHardDisk" readonly="yes">
9098 <desc>
9099 Parent of this hard disk (a hard disk this hard disk is directly based
9100 on).
9101
9102 Only differencing hard disks have parents. For base (non-differencing)
9103 hard disks, <tt>null</tt> is returned.
9104 </desc>
9105 </attribute>
9106
9107 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9108 <desc>
9109 Children of this hard disk (all differencing hard disks directly based
9110 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9111 does not have any children.
9112 </desc>
9113 </attribute>
9114
9115 <attribute name="root" type="IHardDisk" readonly="yes">
9116 <desc>
9117 Root hard disk of this hard disk.
9118
9119 If this is a differencing hard disk, its root hard disk is the base hard
9120 disk the given hard disk branch starts from. For all other types of hard
9121 disks, this property returns the hard disk object itself (i.e. the same
9122 object this property is read on).
9123 </desc>
9124 </attribute>
9125
9126 <attribute name="readOnly" type="boolean" readonly="yes">
9127 <desc>
9128 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9129 otherwise.
9130
9131 A hard disk is considered to be read-only when its contents cannot be
9132 modified without breaking the integrity of other parties that depend on
9133 this hard disk such as its child hard disks or snapshots of virtual
9134 machines where this hard disk is attached to these machines. If there
9135 are no children and no such snapshots then there is no dependency and
9136 the hard disk is not read-only.
9137
9138 The value of this attribute can be used to determine the kind of the
9139 attachment that will take place when attaching this hard disk to a
9140 virtual machine. If the value is <tt>false</tt> then the hard disk will
9141 be attached directly. If the value is <tt>true</tt> then the hard disk
9142 will be attached indirectly by creating a new differencing child hard
9143 disk for that. See the interface description for more information.
9144
9145 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9146 disks are always read-only while all
9147 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9148 always not.
9149
9150 <note>
9151 The read-only condition represented by this attribute is related to
9152 the hard disk type and usage, not to the current
9153 <link to="IMedium::state">media state</link> and not to the read-only
9154 state of the storage unit.
9155 </note>
9156 </desc>
9157 </attribute>
9158
9159 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9160 <desc>
9161 Logical size of this hard disk (in megabytes), as reported to the
9162 guest OS running inside the virtual machine this disk is
9163 attached to. The logical size is defined when the hard disk is created
9164 and cannot be changed later.
9165
9166 <note>
9167 Reading this property on a differencing hard disk will return the size
9168 of its <link to="#root"/> hard disk.
9169 </note>
9170 <note>
9171 For hard disks whose state is <link to="#state"/> is <link
9172 to="MediaState_Inaccessible"/>, the value of this property is the
9173 last known logical size. For <link to="MediaState_NotCreated"/> hard
9174 disks, the returned value is zero.
9175 </note>
9176 </desc>
9177 </attribute>
9178
9179 <attribute name="autoReset" type="boolean">
9180 <desc>
9181 Whether this differencing hard disk will be automatically reset each
9182 time a virtual machine it is attached to is powered up.
9183
9184 See <link to="#reset()"/> for more information about resetting
9185 differencing hard disks.
9186
9187 <note>
9188 Reading this property on a base (non-differencing) hard disk will
9189 always <tt>false</tt>. Changing the value of this property in this
9190 case is not supported.
9191 </note>
9192
9193 <result name="VBOX_E_NOT_SUPPORTED">
9194 This is not a differencing hard disk (when changing the attribute
9195 value).
9196 </result>
9197 </desc>
9198 </attribute>
9199
9200 <!-- storage methods -->
9201
9202 <method name="getProperty">
9203 <desc>
9204 Returns the value of the custom hard disk property with the given name.
9205
9206 The list of all properties supported by the given hard disk format can
9207 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9208
9209 Note that if this method returns a <tt>null</tt> @a value, the requested
9210 property is supported but currently not assigned any value.
9211
9212 <result name="VBOX_E_OBJECT_NOT_FOUND">
9213 Requested property does not exist (not supported by the format).
9214 </result>
9215 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9216 </desc>
9217 <param name="name" type="wstring" dir="in">
9218 <desc>Name of the property to get.</desc>
9219 </param>
9220 <param name="value" type="wstring" dir="return">
9221 <desc>Current property value.</desc>
9222 </param>
9223 </method>
9224
9225 <method name="setProperty">
9226 <desc>
9227 Sets the value of the custom hard disk property with the given name.
9228
9229 The list of all properties supported by the given hard disk format can
9230 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9231
9232 Note that setting the property value to <tt>null</tt> is equivalent to
9233 deleting the existing value. A default value (if it is defined for this
9234 property) will be used by the format backend in this case.
9235
9236 <result name="VBOX_E_OBJECT_NOT_FOUND">
9237 Requested property does not exist (not supported by the format).
9238 </result>
9239 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9240 </desc>
9241 <param name="name" type="wstring" dir="in">
9242 <desc>Name of the property to set.</desc>
9243 </param>
9244 <param name="value" type="wstring" dir="in">
9245 <desc>Property value to set.</desc>
9246 </param>
9247 </method>
9248
9249 <method name="getProperties">
9250 <desc>
9251 Returns values for a group of properties in one call.
9252
9253 The names of the properties to get are specified using the @a names
9254 argument which is a list of comma-separated property names or
9255 <tt>null</tt> if all properties are to be returned. Note that currently
9256 the value of this argument is ignored and the method always returns all
9257 existing properties.
9258
9259 The list of all properties supported by the given hard disk format can
9260 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9261
9262 The method returns two arrays, the array of property names corresponding
9263 to the @a names argument and the current values of these properties.
9264 Both arrays have the same number of elements with each elemend at the
9265 given index in the first array corresponds to an element at the same
9266 index in the second array.
9267
9268 Note that for properties that do not have assigned values,
9269 <tt>null</tt> is returned at the appropriate index in the
9270 @a returnValues array.
9271
9272 </desc>
9273 <param name="names" type="wstring" dir="in">
9274 <desc>
9275 Names of properties to get.
9276 </desc>
9277 </param>
9278 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9279 <desc>Names of returned properties.</desc>
9280 </param>
9281 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9282 <desc>Values of returned properties.</desc>
9283 </param>
9284 </method>
9285
9286 <method name="setProperties">
9287 <desc>
9288 Sets values for a group of properties in one call.
9289
9290 The names of the properties to set are passed in the @a names
9291 array along with the new values for them in the @a values array. Both
9292 arrays have the same number of elements with each elemend at the given
9293 index in the first array corresponding to an element at the same index
9294 in the second array.
9295
9296 If there is at least one property name in @a names that is not valid,
9297 the method will fail before changing the values of any other properties
9298 from the @a names array.
9299
9300 Using this method over <link to="#setProperty"/> is preferred if you
9301 need to set several properties at once since it will result into less
9302 IPC calls.
9303
9304 The list of all properties supported by the given hard disk format can
9305 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9306
9307 Note that setting the property value to <tt>null</tt> is equivalent to
9308 deleting the existing value. A default value (if it is defined for this
9309 property) will be used by the format backend in this case.
9310 </desc>
9311 <param name="names" type="wstring" safearray="yes" dir="in">
9312 <desc>Names of properties to set.</desc>
9313 </param>
9314 <param name="values" type="wstring" safearray="yes" dir="in">
9315 <desc>Values of properties to set.</desc>
9316 </param>
9317 </method>
9318
9319 <!-- storage methods -->
9320
9321 <method name="createBaseStorage">
9322 <desc>
9323 Starts creating a hard disk storage unit (fixed/dynamic, according
9324 to the variant flags) in in the background. The previous storage unit
9325 created for this object, if any, must first be deleted using
9326 <link to="#deleteStorage"/>, otherwise the operation will fail.
9327
9328 Before the operation starts, the hard disk is placed in
9329 <link to="MediaState_Creating"/> state. If the create operation
9330 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9331 state.
9332
9333 After the returned progress object reports that the operation has
9334 successfully completed, the media state will be set to <link
9335 to="MediaState_Created"/>, the hard disk will be remembered by this
9336 VirtualBox installation and may be attached to virtual machines.
9337
9338 <result name="VBOX_E_NOT_SUPPORTED">
9339 The variant of storage creation operation is not supported. See <link
9340 to="IHardDiskFormat::capabilities"/>.
9341 </result>
9342 </desc>
9343 <param name="logicalSize" type="unsigned long long" dir="in">
9344 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9345 </param>
9346 <param name="variant" type="HardDiskVariant" dir="in">
9347 <desc>Exact image variant which should be created.</desc>
9348 </param>
9349 <param name="progress" type="IProgress" dir="return">
9350 <desc>Progress object to track the operation completion.</desc>
9351 </param>
9352 </method>
9353
9354 <method name="deleteStorage">
9355 <desc>
9356 Starts deleting the storage unit of this hard disk.
9357
9358 The hard disk must not be attached to any known virtual machine and must
9359 not have any known child hard disks, otherwise the operation will fail.
9360 It will also fail if there is no storage unit to delete or if deletion
9361 is already in progress, or if the hard disk is being in use (locked for
9362 read or for write) or inaccessible. Therefore, the only valid state for
9363 this operation to succeed is <link to="MediaState_Created"/>.
9364
9365 Before the operation starts, the hard disk is placed to
9366 <link to="MediaState_Deleting"/> state and gets removed from the list
9367 of remembered hard disks (media registry). If the delete operation
9368 fails, the media will be remembered again and placed back to
9369 <link to="MediaState_Created"/> state.
9370
9371 After the returned progress object reports that the operation is
9372 complete, the media state will be set to
9373 <link to="MediaState_NotCreated"/> and you will be able to use one of
9374 the storage creation methods to create it again.
9375
9376 <see>#close()</see>
9377
9378 <result name="VBOX_E_OBJECT_IN_USE">
9379 Hard disk is attached to a virtual machine.
9380 </result>
9381 <result name="VBOX_E_NOT_SUPPORTED">
9382 Storage deletion is not allowed because neither of storage creation
9383 operations are supported. See
9384 <link to="IHardDiskFormat::capabilities"/>.
9385 </result>
9386
9387 <note>
9388 If the deletion operation fails, it is not guaranteed that the storage
9389 unit still exists. You may check the <link to="IMedium::state"/> value
9390 to answer this question.
9391 </note>
9392 </desc>
9393 <param name="progress" type="IProgress" dir="return">
9394 <desc>Progress object to track the operation completion.</desc>
9395 </param>
9396 </method>
9397
9398 <!-- diff methods -->
9399
9400 <method name="createDiffStorage">
9401 <desc>
9402 Starts creating an empty differencing storage unit based on this hard
9403 disk in the format and at the location defined by the @a target
9404 argument.
9405
9406 The target hard disk must be in <link to="MediaState_NotCreated"/>
9407 state (i.e. must not have an existing storage unit). Upon successful
9408 completion, this operation will set the type of the target hard disk to
9409 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9410 represent the differencing hard disk data in the given format (according
9411 to the storage format of the target object).
9412
9413 After the returned progress object reports that the operation is
9414 successfully complete, the target hard disk gets remembered by this
9415 VirtualBox installation and may be attached to virtual machines.
9416
9417 <note>
9418 The hard disk will be set to <link to="MediaState_LockedRead"/>
9419 state for the duration of this operation.
9420 </note>
9421 <result name="VBOX_E_OBJECT_IN_USE">
9422 Hard disk not in NotCreated state.
9423 </result>
9424 </desc>
9425 <param name="target" type="IHardDisk" dir="in">
9426 <desc>Target hard disk.</desc>
9427 </param>
9428 <param name="variant" type="HardDiskVariant" dir="in">
9429 <desc>Exact image variant which should be created.</desc>
9430 </param>
9431 <param name="progress" type="IProgress" dir="return">
9432 <desc>Progress object to track the operation completion.</desc>
9433 </param>
9434 </method>
9435
9436 <method name="mergeTo">
9437 <desc>
9438 Starts merging the contents of this hard disk and all intermediate
9439 differencing hard disks in the chain to the given target hard disk.
9440
9441 The target hard disk must be either a descendant of this hard disk or
9442 its ancestor (otherwise this method will immediately return a failure).
9443 It follows that there are two logical directions of the merge operation:
9444 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9445 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9446 chain:
9447
9448 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9449
9450 Here, calling this method on the <tt>Base</tt> hard disk object with
9451 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9452 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9453 merge. Note that in both cases the contents of the resulting hard disk
9454 will be the same, the only difference is the hard disk object that takes
9455 the result of the merge operation. In case of the forward merge in the
9456 above example, the result will be written to <tt>Diff_2</tt>; in case of
9457 the backward merge, the result will be written to <tt>Base</tt>. In
9458 other words, the result of the operation is always stored in the target
9459 hard disk.
9460
9461 Upon successful operation completion, the storage units of all hard
9462 disks in the chain between this (source) hard disk and the target hard
9463 disk, including the source hard disk itself, will be automatically
9464 deleted and the relevant hard disk objects (including this hard disk)
9465 will become uninitialized. This means that any attempt to call any of
9466 their methods or attributes will fail with the
9467 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9468 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9469 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9470 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9471 disk itself since it will no longer be based on any other hard disk.
9472
9473 Considering the above, all of the following conditions must be met in
9474 order for the merge operation to succeed:
9475 <ul>
9476 <li>
9477 Neither this (source) hard disk nor any intermediate
9478 differencing hard disk in the chain between it and the target
9479 hard disk is attached to any virtual machine.
9480 </li>
9481 <li>
9482 Neither the source hard disk nor the target hard disk is an
9483 <link to="HardDiskType_Immutable"/> hard disk.
9484 </li>
9485 <li>
9486 The part of the hard disk tree from the source hard disk to the
9487 target hard disk is a linear chain, i.e. all hard disks in this
9488 chain have exactly one child which is the next hard disk in this
9489 chain. The only exception from this rule is the target hard disk in
9490 the forward merge operation; it is allowed to have any number of
9491 child hard disks because the merge operation will hot change its
9492 logical contents (as it is seen by the guest OS or by children).
9493 </li>
9494 <li>
9495 None of the involved hard disks are in
9496 <link to="MediaState_LockedRead"/> or
9497 <link to="MediaState_LockedWrite"/> state.
9498 </li>
9499 </ul>
9500
9501 <note>
9502 This (source) hard disk and all intermediates will be placed to <link
9503 to="MediaState_Deleting"/> state and the target hard disk will be
9504 placed to <link to="MediaState_LockedWrite"/> state and for the
9505 duration of this operation.
9506 </note>
9507 </desc>
9508 <param name="targetId" type="uuid" dir="in">
9509 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9510 </param>
9511 <param name="progress" type="IProgress" dir="return">
9512 <desc>Progress object to track the operation completion.</desc>
9513 </param>
9514 </method>
9515
9516 <!-- clone methods -->
9517
9518 <method name="cloneTo">
9519 <desc>
9520 Starts creating a clone of this hard disk in the format and at the
9521 location defined by the @a target argument.
9522
9523 The target hard disk must be in <link to="MediaState_NotCreated"/>
9524 state (i.e. must not have an existing storage unit). Upon successful
9525 completion, the cloned hard disk will contain exactly the same sector
9526 data as the hard disk being cloned, except that a new UUID for the clone
9527 will be randomly generated.
9528
9529 After the returned progress object reports that the operation is
9530 successfully complete, the target hard disk gets remembered by this
9531 VirtualBox installation and may be attached to virtual machines.
9532
9533 <note>
9534 If the cloned hard disk is a differencing hard disk, it will inherit
9535 parent dependency of the original hard disk.
9536 </note>
9537 <note>
9538 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9539 state for the duration of this operation.
9540 </note>
9541 </desc>
9542 <param name="target" type="IHardDisk" dir="in">
9543 <desc>Target hard disk.</desc>
9544 </param>
9545 <param name="variant" type="HardDiskVariant" dir="in">
9546 <desc>Exact image variant which should be created.</desc>
9547 </param>
9548 <param name="progress" type="IProgress" dir="return">
9549 <desc>Progress object to track the operation completion.</desc>
9550 </param>
9551 </method>
9552
9553 <method name="flattenTo">
9554 <desc>
9555 Starts creating a deep (independent) clone of this hard disk in the
9556 format and at the location defined by the @a target argument.
9557
9558 This operation is similar to <link to="#cloneTo"/> except that when
9559 applied to a differencing hard disk, it will also copy missing hard disk
9560 data from all parent hard disks it is linked to. This will make the
9561 created clone an independent base hard disk that contains all hard disk
9562 data and does not need any other hard disks to operate.
9563
9564 After the returned progress object reports that the operation is
9565 successfully complete, the target hard disk gets remembered by this
9566 VirtualBox installation and may be attached to virtual machines.
9567
9568 <note>
9569 For base hard disks, this operation is identical to
9570 <link to="#cloneTo"/>.
9571 </note>
9572 <note>
9573 This hard disk and all its parent hard disks will be placed to <link
9574 to="MediaState_LockedRead"/> state for the duration of this
9575 operation.
9576 </note>
9577 </desc>
9578 <param name="target" type="IHardDisk" dir="in">
9579 <desc>Target hard disk.</desc>
9580 </param>
9581 <param name="variant" type="HardDiskVariant" dir="in">
9582 <desc>Exact image variant which should be created.</desc>
9583 </param>
9584 <param name="progress" type="IProgress" dir="return">
9585 <desc>Progress object to track the operation completion.</desc>
9586 </param>
9587 </method>
9588
9589 <!-- other methods -->
9590
9591 <method name="compact">
9592 <desc>
9593 Starts compacting of this hard disk. This means that the disk is
9594 transformed into a possibly more compact storage representation.
9595 This potentially creates temporary images, which can require a
9596 substantial amount of additional disk space.
9597
9598 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9599 state and all its parent hard disks (if any) will be placed to
9600 <link to="MediaState_LockedRead"/> state for the duration of this
9601 operation.
9602 </desc>
9603 <param name="progress" type="IProgress" dir="return">
9604 <desc>Progress object to track the operation completion.</desc>
9605 </param>
9606 </method>
9607
9608 <method name="reset">
9609 <desc>
9610 Starts erasing the contents of this differencing hard disk.
9611
9612 This operation will reset the differencing hard disk to its initial
9613 state when it does not contain any sector data and any read operation is
9614 redirected to its parent hard disk.
9615
9616 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9617 for the duration of this operation.
9618
9619 <result name="VBOX_E_NOT_SUPPORTED">
9620 This is not a differencing hard disk.
9621 </result>
9622 <result name="VBOX_E_INVALID_OBJECT_STATE">
9623 Hard disk is not in <link to="MediaState_Created"/> or
9624 <link to="MediaState_Inaccessible"/> state.
9625 </result>
9626 </desc>
9627 <param name="progress" type="IProgress" dir="return">
9628 <desc>Progress object to track the operation completion.</desc>
9629 </param>
9630 </method>
9631
9632 </interface>
9633
9634
9635 <!--
9636 // IHardDiskFormat
9637 /////////////////////////////////////////////////////////////////////////
9638 -->
9639
9640 <enum
9641 name="DataType"
9642 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9643 >
9644 <const name="Int32" value="0"/>
9645 <const name="Int8" value="1"/>
9646 <const name="String" value="2"/>
9647 </enum>
9648
9649 <enum
9650 name="DataFlags"
9651 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9652 >
9653 <const name="None" value="0x00"/>
9654 <const name="Mandatory" value="0x01"/>
9655 <const name="Expert" value="0x02"/>
9656 <const name="Array" value="0x04"/>
9657 <const name="FlagMask" value="0x07"/>
9658 </enum>
9659
9660 <enum
9661 name="HardDiskFormatCapabilities"
9662 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9663 >
9664 <desc>
9665 Hard disk format capability flags.
9666 </desc>
9667
9668 <const name="Uuid" value="0x01">
9669 <desc>
9670 Supports UUIDs as expected by VirtualBox code.
9671 </desc>
9672 </const>
9673
9674 <const name="CreateFixed" value="0x02">
9675 <desc>
9676 Supports creating fixed size images, allocating all space instantly.
9677 </desc>
9678 </const>
9679
9680 <const name="CreateDynamic" value="0x04">
9681 <desc>
9682 Supports creating dynamically growing images, allocating space on
9683 demand.
9684 </desc>
9685 </const>
9686
9687 <const name="CreateSplit2G" value="0x08">
9688 <desc>
9689 Supports creating images split in chunks of a bit less than 2 GBytes.
9690 </desc>
9691 </const>
9692
9693 <const name="Differencing" value="0x10">
9694 <desc>
9695 Supports being used as a format for differencing hard disks (see <link
9696 to="IHardDisk::createDiffStorage"/>).
9697 </desc>
9698 </const>
9699
9700 <const name="Asynchronous" value="0x20">
9701 <desc>
9702 Supports asynchronous I/O operations for at least some configurations.
9703 </desc>
9704 </const>
9705
9706 <const name="File" value="0x40">
9707 <desc>
9708 The format backend operates on files (the <link to="IMedium::location"/>
9709 attribute of the hard disk specifies a file used to store hard disk
9710 data; for a list of supported file extensions see
9711 <link to="IHardDiskFormat::fileExtensions"/>).
9712 </desc>
9713 </const>
9714
9715 <const name="Properties" value="0x80">
9716 <desc>
9717 The format backend uses the property interface to configure the storage
9718 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9719 method is used to get access to properties supported by the given hard
9720 disk format).
9721 </desc>
9722 </const>
9723
9724 <const name="CapabilityMask" value="0xFF"/>
9725 </enum>
9726
9727 <interface
9728 name="IHardDiskFormat" extends="$unknown"
9729 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9730 wsmap="managed"
9731 >
9732 <desc>
9733 The IHardDiskFormat interface represents a virtual hard disk format.
9734
9735 Each hard disk format has an associated backend which is used to handle
9736 hard disks stored in this format. This interface provides information
9737 about the properties of the associated backend.
9738
9739 Each hard disk format is identified by a string represented by the
9740 <link to="#id"/> attribute. This string is used in calls like
9741 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9742 format.
9743
9744 The list of all supported hard disk formats can be obtained using
9745 <link to="ISystemProperties::hardDiskFormats"/>.
9746
9747 <see>IHardDisk</see>
9748 </desc>
9749
9750 <attribute name="id" type="wstring" readonly="yes">
9751 <desc>
9752 Identifier of this format.
9753
9754 The format identifier is a non-null non-empty ASCII string. Note that
9755 this string is case-insensitive. This means that, for example, all of
9756 the following strings:
9757 <pre>
9758 "VDI"
9759 "vdi"
9760 "VdI"</pre>
9761 refer to the same hard disk format.
9762
9763 This string is used in methods of other interfaces where it is necessary
9764 to specify a hard disk format, such as
9765 <link to="IVirtualBox::createHardDisk"/>.
9766 </desc>
9767 </attribute>
9768
9769 <attribute name="name" type="wstring" readonly="yes">
9770 <desc>
9771 Human readable description of this format.
9772
9773 Mainly for use in file open dialogs.
9774 </desc>
9775 </attribute>
9776
9777 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9778 <desc>
9779 Array of strings containing the supported file extensions.
9780
9781 The first extension in the array is the extension preferred by the
9782 backend. It is recommended to use this extension when specifying a
9783 location of the storage unit for a new hard disk.
9784
9785 Note that some backends do not work on files, so this array may be
9786 empty.
9787
9788 <see>IHardDiskFormat::capabilities</see>
9789 </desc>
9790 </attribute>
9791
9792 <attribute name="capabilities" type="unsigned long" readonly="yes">
9793 <desc>
9794 Capabilities of the format as a set of bit flags.
9795
9796 For the meaning of individual capability flags see
9797 <link to="HardDiskFormatCapabilities"/>.
9798 </desc>
9799 </attribute>
9800
9801 <method name="describeProperties">
9802 <desc>
9803 Returns several arrays describing the properties supported by this
9804 format.
9805
9806 An element with the given index in each array describes one
9807 property. Thus, the number of elements in each returned array is the
9808 same and corresponds to the number of supported properties.
9809
9810 The returned arrays are filled in only if the
9811 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9812 All arguments must be non-NULL.
9813
9814 <see>DataType</see>
9815 <see>DataFlags</see>
9816 </desc>
9817
9818 <param name="names" type="wstring" safearray="yes" dir="out">
9819 <desc>Array of property names.</desc>
9820 </param>
9821 <param name="description" type="wstring" safearray="yes" dir="out">
9822 <desc>Array of property descriptions.</desc>
9823 </param>
9824 <param name="types" type="DataType" safearray="yes" dir="out">
9825 <desc>Array of property types.</desc>
9826 </param>
9827 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9828 <desc>Array of property flags.</desc>
9829 </param>
9830 <param name="defaults" type="wstring" safearray="yes" dir="out">
9831 <desc>Array of default property values.</desc>
9832 </param>
9833 </method>
9834
9835 </interface>
9836
9837
9838 <!--
9839 // IFloppyImage
9840 /////////////////////////////////////////////////////////////////////////
9841 -->
9842
9843 <interface
9844 name="IFloppyImage" extends="IMedium"
9845 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9846 wsmap="managed"
9847 >
9848 <desc>
9849 The IFloppyImage interface represents a medium containing the image
9850 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9851 </desc>
9852
9853 </interface>
9854
9855
9856 <!--
9857 // IDVDImage
9858 /////////////////////////////////////////////////////////////////////////
9859 -->
9860
9861 <interface
9862 name="IDVDImage" extends="IMedium"
9863 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9864 wsmap="managed"
9865 >
9866 <desc>
9867 The IDVDImage interface represents a medium containing the image
9868 of a CD or DVD disk in the ISO format.
9869
9870 This is a subclass of <link to="IMedium" />; see remarks there.
9871 </desc>
9872
9873 </interface>
9874
9875
9876 <!--
9877 // IDVDDrive
9878 /////////////////////////////////////////////////////////////////////////
9879 -->
9880
9881 <interface
9882 name="IDVDDrive" extends="$unknown"
9883 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9884 wsmap="managed"
9885 >
9886 <desc>
9887 The IDVDDrive interface represents the virtual CD/DVD drive of the
9888 virtual machine. An object of this type is returned by
9889 <link to="IMachine::DVDDrive"/>.
9890 </desc>
9891
9892 <attribute name="state" type="DriveState" readonly="yes">
9893 <desc>Current drive state.</desc>
9894 </attribute>
9895
9896 <attribute name="passthrough" type="boolean">
9897 <desc>
9898 When a host drive is mounted and passthrough is enabled
9899 the guest OS will be able to directly send SCSI commands to
9900 the host drive. This enables the guest OS to use CD/DVD writers
9901 but is potentially dangerous.
9902 </desc>
9903 </attribute>
9904
9905 <method name="mountImage">
9906 <desc>Mounts a CD/DVD image with the specified UUID.
9907
9908 <result name="VBOX_E_FILE_ERROR">
9909 Invalid image file location.
9910 </result>
9911 <result name="VBOX_E_OBJECT_NOT_FOUND">
9912 Could not find a CD/DVD image matching @a imageId.
9913 </result>
9914 <result name="VBOX_E_INVALID_OBJECT_STATE">
9915 Invalid media state.
9916 </result>
9917
9918 </desc>
9919 <param name="imageId" type="uuid" dir="in"/>
9920 </method>
9921
9922 <method name="captureHostDrive">
9923 <desc>Captures the specified host CD/DVD drive.</desc>
9924 <param name="drive" type="IHostDVDDrive" dir="in"/>
9925 </method>
9926
9927 <method name="unmount">
9928 <desc>Unmounts the currently mounted image or host drive.</desc>
9929 </method>
9930
9931 <method name="getImage">
9932 <desc>Returns the currently mounted CD/DVD image.</desc>
9933 <param name="image" type="IDVDImage" dir="return"/>
9934 </method>
9935
9936 <method name="getHostDrive">
9937 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9938 <param name="drive" type="IHostDVDDrive" dir="return"/>
9939 </method>
9940
9941 </interface>
9942
9943
9944 <!--
9945 // IFloppyDrive
9946 /////////////////////////////////////////////////////////////////////////
9947 -->
9948
9949 <interface
9950 name="IFloppyDrive" extends="$unknown"
9951 uuid="159412cd-bab8-452e-8097-218a020825a6"
9952 wsmap="managed"
9953 >
9954 <desc>
9955 The IFloppyDrive interface represents the virtual floppy drive of the
9956 virtual machine. An object of this type is returned by
9957 <link to="IMachine::floppyDrive" />.
9958 </desc>
9959
9960 <attribute name="enabled" type="boolean">
9961 <desc>
9962 Flag whether the floppy drive is enabled. If it is disabled,
9963 the floppy drive will not be reported to the guest OS.
9964 </desc>
9965 </attribute>
9966
9967 <attribute name="state" type="DriveState" readonly="yes">
9968 <desc>Current drive state.</desc>
9969 </attribute>
9970
9971 <method name="mountImage">
9972 <desc>Mounts a floppy image with the specified UUID.
9973
9974 <result name="VBOX_E_FILE_ERROR">
9975 Invalid image file location.
9976 </result>
9977 <result name="VBOX_E_OBJECT_NOT_FOUND">
9978 Could not find a floppy image matching @a imageID.
9979 </result>
9980 <result name="VBOX_E_INVALID_OBJECT_STATE">
9981 Invalid media state.
9982 </result>
9983
9984 </desc>
9985 <param name="imageId" type="uuid" dir="in"/>
9986 </method>
9987
9988 <method name="captureHostDrive">
9989 <desc>Captures the specified host floppy drive.</desc>
9990 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9991 </method>
9992
9993 <method name="unmount">
9994 <desc>Unmounts the currently mounted image or host drive.</desc>
9995 </method>
9996
9997 <method name="getImage">
9998 <desc>Returns the currently mounted floppy image.</desc>
9999 <param name="image" type="IFloppyImage" dir="return"/>
10000 </method>
10001
10002 <method name="getHostDrive">
10003 <desc>Returns the currently mounted host floppy drive.</desc>
10004 <param name="drive" type="IHostFloppyDrive" dir="return"/>
10005 </method>
10006
10007 </interface>
10008
10009
10010 <!--
10011 // IKeyboard
10012 /////////////////////////////////////////////////////////////////////////
10013 -->
10014
10015 <interface
10016 name="IKeyboard" extends="$unknown"
10017 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10018 wsmap="managed"
10019 >
10020 <desc>
10021 The IKeyboard interface represents the virtual machine's keyboard. Used
10022 in <link to="IConsole::keyboard"/>.
10023
10024 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10025 to the virtual machine.
10026
10027 </desc>
10028 <method name="putScancode">
10029 <desc>Sends a scancode to the keyboard.
10030
10031 <result name="VBOX_E_IPRT_ERROR">
10032 Could not send scan code to virtual keyboard.
10033 </result>
10034
10035 </desc>
10036 <param name="scancode" type="long" dir="in"/>
10037 </method>
10038
10039 <method name="putScancodes">
10040 <desc>Sends an array of scancodes to the keyboard.
10041
10042 <result name="VBOX_E_IPRT_ERROR">
10043 Could not send all scan codes to virtual keyboard.
10044 </result>
10045
10046 </desc>
10047 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10048 <param name="codesStored" type="unsigned long" dir="return"/>
10049 </method>
10050
10051 <method name="putCAD">
10052 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10053 function is nothing special, it is just a convenience function
10054 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10055
10056 <result name="VBOX_E_IPRT_ERROR">
10057 Could not send all scan codes to virtual keyboard.
10058 </result>
10059
10060 </desc>
10061 </method>
10062
10063 </interface>
10064
10065
10066 <!--
10067 // IMouse
10068 /////////////////////////////////////////////////////////////////////////
10069 -->
10070
10071 <enum
10072 name="MouseButtonState"
10073 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10074 >
10075 <desc>
10076 Mouse button state.
10077 </desc>
10078
10079 <const name="LeftButton" value="0x01"/>
10080 <const name="RightButton" value="0x02"/>
10081 <const name="MiddleButton" value="0x04"/>
10082 <const name="WheelUp" value="0x08"/>
10083 <const name="WheelDown" value="0x10"/>
10084 <const name="MouseStateMask" value="0x1F"/>
10085 </enum>
10086
10087 <interface
10088 name="IMouse" extends="$unknown"
10089 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10090 wsmap="managed"
10091 >
10092 <desc>
10093 The IMouse interface represents the virtual machine's mouse. Used in
10094 <link to="IConsole::mouse"/>.
10095
10096 Through this interface, the virtual machine's virtual mouse can be
10097 controlled.
10098 </desc>
10099
10100 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10101 <desc>
10102 Whether the guest OS supports absolute mouse pointer positioning
10103 or not.
10104 <note>
10105 VirtualBox Guest Tools need to be installed to the guest OS
10106 in order to enable absolute mouse positioning support.
10107 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10108 callback to be instantly informed about changes of this attribute
10109 during virtual machine execution.
10110 </note>
10111 <see><link to="#putMouseEventAbsolute"/></see>
10112 </desc>
10113 </attribute>
10114
10115 <method name="putMouseEvent">
10116 <desc>
10117 Initiates a mouse event using relative pointer movements
10118 along x and y axis.
10119
10120 <result name="E_ACCESSDENIED">
10121 Console not powered up.
10122 </result>
10123 <result name="VBOX_E_IPRT_ERROR">
10124 Could not send mouse event to virtual mouse.
10125 </result>
10126
10127 </desc>
10128
10129 <param name="dx" type="long" dir="in">
10130 <desc>
10131 Amount of pixels the mouse should move to the right.
10132 Negative values move the mouse to the left.
10133 </desc>
10134 </param>
10135 <param name="dy" type="long" dir="in">
10136 <desc>
10137 Amount of pixels the mouse should move downwards.
10138 Negative values move the mouse upwards.
10139 </desc>
10140 </param>
10141 <param name="dz" type="long" dir="in">
10142 <desc>
10143 Amount of mouse wheel moves.
10144 Positive values describe clockwise wheel rotations,
10145 negative values describe counterclockwise rotations.
10146 </desc>
10147 </param>
10148 <param name="buttonState" type="long" dir="in">
10149 <desc>
10150 The current state of mouse buttons. Every bit represents
10151 a mouse button as follows:
10152 <table>
10153 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10154 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10155 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10156 </table>
10157 A value of <tt>1</tt> means the corresponding button is pressed.
10158 otherwise it is released.
10159 </desc>
10160 </param>
10161 </method>
10162
10163 <method name="putMouseEventAbsolute">
10164 <desc>
10165 Positions the mouse pointer using absolute x and y coordinates.
10166 These coordinates are expressed in pixels and
10167 start from <tt>[1,1]</tt> which corresponds to the top left
10168 corner of the virtual display.
10169
10170 <result name="E_ACCESSDENIED">
10171 Console not powered up.
10172 </result>
10173 <result name="VBOX_E_IPRT_ERROR">
10174 Could not send mouse event to virtual mouse.
10175 </result>
10176
10177 <note>
10178 This method will have effect only if absolute mouse
10179 positioning is supported by the guest OS.
10180 </note>
10181
10182 <see><link to="#absoluteSupported"/></see>
10183 </desc>
10184
10185 <param name="x" type="long" dir="in">
10186 <desc>
10187 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10188 </desc>
10189 </param>
10190 <param name="y" type="long" dir="in">
10191 <desc>
10192 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10193 </desc>
10194 </param>
10195 <param name="dz" type="long" dir="in">
10196 <desc>
10197 Amount of mouse wheel moves.
10198 Positive values describe clockwise wheel rotations,
10199 negative values describe counterclockwise rotations.
10200 </desc>
10201 </param>
10202 <param name="buttonState" type="long" dir="in">
10203 <desc>
10204 The current state of mouse buttons. Every bit represents
10205 a mouse button as follows:
10206 <table>
10207 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10208 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10209 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10210 </table>
10211 A value of <tt>1</tt> means the corresponding button is pressed.
10212 otherwise it is released.
10213 </desc>
10214 </param>
10215 </method>
10216
10217 </interface>
10218
10219 <!--
10220 // IDisplay
10221 /////////////////////////////////////////////////////////////////////////
10222 -->
10223
10224 <enum
10225 name="FramebufferAccelerationOperation"
10226 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10227 >
10228 <desc>
10229 Frame buffer acceleration operation.
10230 </desc>
10231
10232 <const name="SolidFillAcceleration" value="1"/>
10233 <const name="ScreenCopyAcceleration" value="2"/>
10234 </enum>
10235
10236 <enum
10237 name="FramebufferPixelFormat"
10238 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10239 >
10240 <desc>
10241 Format of the video memory buffer. Constants represented by this enum can
10242 be used to test for particular values of <link
10243 to="IFramebuffer::pixelFormat"/>. See also <link
10244 to="IFramebuffer::requestResize"/>.
10245
10246 See also www.fourcc.org for more information about FOURCC pixel formats.
10247 </desc>
10248
10249 <const name="Opaque" value="0">
10250 <desc>
10251 Unknown buffer format (the user may not assume any particular format of
10252 the buffer).
10253 </desc>
10254 </const>
10255 <const name="FOURCC_RGB" value="0x32424752">
10256 <desc>
10257 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10258 bit layout).
10259 </desc>
10260 </const>
10261 </enum>
10262
10263 <interface
10264 name="IFramebuffer" extends="$unknown"
10265 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10266 wsmap="suppress"
10267 >
10268 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10269 <desc>Address of the start byte of the frame buffer.</desc>
10270 </attribute>
10271
10272 <attribute name="width" type="unsigned long" readonly="yes">
10273 <desc>Frame buffer width, in pixels.</desc>
10274 </attribute>
10275
10276 <attribute name="height" type="unsigned long" readonly="yes">
10277 <desc>Frame buffer height, in pixels.</desc>
10278 </attribute>
10279
10280 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10281 <desc>
10282 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10283 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10284 are: 8, 15, 16, 24 and 32.
10285 </desc>
10286 </attribute>
10287
10288 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10289 <desc>
10290 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10291 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10292 size of the scan line must be aligned to 32 bits.
10293 </desc>
10294 </attribute>
10295
10296 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10297 <desc>
10298 Frame buffer pixel format. It's either one of the values defined by <link
10299 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10300 <note>
10301 This attribute must never return <link
10302 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10303 <link to="#address"/> points to must be always known.
10304 </note>
10305 </desc>
10306 </attribute>
10307
10308 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10309 <desc>
10310 Defines whether this frame buffer uses the virtual video card's memory
10311 buffer (guest VRAM) directly or not. See <link
10312 to="IFramebuffer::requestResize"/> for more information.
10313 </desc>
10314 </attribute>
10315
10316 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10317 <desc>
10318 Hint from the frame buffer about how much of the standard
10319 screen height it wants to use for itself. This information is
10320 exposed to the guest through the VESA BIOS and VMMDev interface
10321 so that it can use it for determining its video mode table. It
10322 is not guaranteed that the guest respects the value.
10323 </desc>
10324 </attribute>
10325
10326 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10327 <desc>
10328 An alpha-blended overlay which is superposed over the frame buffer.
10329 The initial purpose is to allow the display of icons providing
10330 information about the VM state, including disk activity, in front
10331 ends which do not have other means of doing that. The overlay is
10332 designed to controlled exclusively by IDisplay. It has no locking
10333 of its own, and any changes made to it are not guaranteed to be
10334 visible until the affected portion of IFramebuffer is updated. The
10335 overlay can be created lazily the first time it is requested. This
10336 attribute can also return NULL to signal that the overlay is not
10337 implemented.
10338 </desc>
10339 </attribute>
10340
10341 <attribute name="winId" type="unsigned long long" readonly="yes">
10342 <desc>
10343 Platform-dependent identifier of the window where context of this
10344 frame buffer is drawn, or zero if there's no such window.
10345 </desc>
10346 </attribute>
10347
10348 <method name="lock">
10349 <desc>
10350 Locks the frame buffer.
10351 Gets called by the IDisplay object where this frame buffer is
10352 bound to.
10353 </desc>
10354 </method>
10355
10356 <method name="unlock">
10357 <desc>
10358 Unlocks the frame buffer.
10359 Gets called by the IDisplay object where this frame buffer is
10360 bound to.
10361 </desc>
10362 </method>
10363
10364 <method name="notifyUpdate">
10365 <desc>
10366 Informs about an update.
10367 Gets called by the display object where this buffer is
10368 registered.
10369 </desc>
10370 <param name="x" type="unsigned long" dir="in"/>
10371 <param name="y" type="unsigned long" dir="in"/>
10372 <param name="width" type="unsigned long" dir="in"/>
10373 <param name="height" type="unsigned long" dir="in"/>
10374 <param name="finished" type="boolean" dir="return"/>
10375 </method>
10376
10377 <method name="requestResize">
10378 <desc>
10379 Requests a size and pixel format change.
10380
10381 There are two modes of working with the video buffer of the virtual
10382 machine. The <i>indirect</i> mode implies that the IFramebuffer
10383 implementation allocates a memory buffer for the requested display mode
10384 and provides it to the virtual machine. In <i>direct</i> mode, the
10385 IFramebuffer implementation uses the memory buffer allocated and owned
10386 by the virtual machine. This buffer represents the video memory of the
10387 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10388 usually faster because the implementation gets a raw pointer to the
10389 guest VRAM buffer which it can directly use for visualizing the contents
10390 of the virtual display, as opposed to the indirect mode where the
10391 contents of guest VRAM are copied to the memory buffer provided by
10392 the implementation every time a display update occurs.
10393
10394 It is important to note that the direct mode is really fast only when
10395 the implementation uses the given guest VRAM buffer directly, for
10396 example, by blitting it to the window representing the virtual machine's
10397 display, which saves at least one copy operation comparing to the
10398 indirect mode. However, using the guest VRAM buffer directly is not
10399 always possible: the format and the color depth of this buffer may be
10400 not supported by the target window, or it may be unknown (opaque) as in
10401 case of text or non-linear multi-plane VGA video modes. In this case,
10402 the indirect mode (that is always available) should be used as a
10403 fallback: when the guest VRAM contents are copied to the
10404 implementation-provided memory buffer, color and format conversion is
10405 done automatically by the underlying code.
10406
10407 The @a pixelFormat parameter defines whether the direct mode is
10408 available or not. If @a pixelFormat is <link
10409 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10410 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10411 @a bytesPerLine parameters must be ignored and the implementation must use
10412 the indirect mode (where it provides its own buffer in one of the
10413 supported formats). In all other cases, @a pixelFormat together with
10414 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10415 buffer pointed to by the @a VRAM parameter and the implementation is
10416 free to choose which mode to use. To indicate that this frame buffer uses
10417 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10418 attribute must return <tt>true</tt> and <link to="#address"/> must
10419 return exactly the same address that is passed in the @a VRAM parameter
10420 of this method; otherwise it is assumed that the indirect strategy is
10421 chosen.
10422
10423 The @a width and @a height parameters represent the size of the
10424 requested display mode in both modes. In case of indirect mode, the
10425 provided memory buffer should be big enough to store data of the given
10426 display mode. In case of direct mode, it is guaranteed that the given
10427 @a VRAM buffer contains enough space to represent the display mode of the
10428 given size. Note that this frame buffer's <link to="#width"/> and <link
10429 to="#height"/> attributes must return exactly the same values as
10430 passed to this method after the resize is completed (see below).
10431
10432 The @a finished output parameter determines if the implementation has
10433 finished resizing the frame buffer or not. If, for some reason, the
10434 resize cannot be finished immediately during this call, @a finished
10435 must be set to @c false, and the implementation must call
10436 <link to="IDisplay::resizeCompleted"/> after it has returned from
10437 this method as soon as possible. If @a finished is @c false, the
10438 machine will not call any frame buffer methods until
10439 <link to="IDisplay::resizeCompleted"/> is called.
10440
10441 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10442 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10443 this frame buffer must return exactly the same values as specified in the
10444 parameters of this method, after the resize is completed. If the
10445 indirect mode is chosen, these attributes must return values describing
10446 the format of the implementation's own memory buffer <link
10447 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10448 value must always correlate with <link to="#pixelFormat"/>. Note that
10449 the <link to="#pixelFormat"/> attribute must never return <link
10450 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10451
10452 <note>
10453 This method is called by the IDisplay object under the
10454 <link to="#lock"/> provided by this IFramebuffer
10455 implementation. If this method returns @c false in @a finished, then
10456 this lock is not released until
10457 <link to="IDisplay::resizeCompleted"/> is called.
10458 </note>
10459 </desc>
10460 <param name="screenId" type="unsigned long" dir="in">
10461 <desc>
10462 Logical screen number. Must be used in the corresponding call to
10463 <link to="IDisplay::resizeCompleted"/> if this call is made.
10464 </desc>
10465 </param>
10466 <param name="pixelFormat" type="unsigned long" dir="in">
10467 <desc>
10468 Pixel format of the memory buffer pointed to by @a VRAM.
10469 See also <link to="FramebufferPixelFormat"/>.
10470 </desc>
10471 </param>
10472 <param name="VRAM" type="octet" mod="ptr" dir="in">
10473 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10474 </param>
10475 <param name="bitsPerPixel" type="unsigned long" dir="in">
10476 <desc>Color depth, bits per pixel.</desc>
10477 </param>
10478 <param name="bytesPerLine" type="unsigned long" dir="in">
10479 <desc>Size of one scan line, in bytes.</desc>
10480 </param>
10481 <param name="width" type="unsigned long" dir="in">
10482 <desc>Width of the guest display, in pixels.</desc>
10483 </param>
10484 <param name="height" type="unsigned long" dir="in">
10485 <desc>Height of the guest display, in pixels.</desc>
10486 </param>
10487 <param name="finished" type="boolean" dir="return">
10488 <desc>
10489 Can the VM start using the new frame buffer immediately
10490 after this method returns or it should wait for
10491 <link to="IDisplay::resizeCompleted"/>.
10492 </desc>
10493 </param>
10494 </method>
10495
10496 <method name="operationSupported">
10497 <desc>
10498 Returns whether the given acceleration operation is supported
10499 by the IFramebuffer implementation. If not, the display object
10500 will not attempt to call the corresponding IFramebuffer entry
10501 point. Even if an operation is indicated as supported, the
10502 IFramebuffer implementation always has the option to return non
10503 supported from the corresponding acceleration method in which
10504 case the operation will be performed by the display engine. This
10505 allows for reduced IFramebuffer implementation complexity where
10506 only common cases are handled.
10507 </desc>
10508 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10509 <param name="supported" type="boolean" dir="return"/>
10510 </method>
10511
10512 <method name="videoModeSupported">
10513 <desc>
10514 Returns whether the frame buffer implementation is willing to
10515 support a given video mode. In case it is not able to render
10516 the video mode (or for some reason not willing), it should
10517 return false. Usually this method is called when the guest
10518 asks the VMM device whether a given video mode is supported
10519 so the information returned is directly exposed to the guest.
10520 It is important that this method returns very quickly.
10521 </desc>
10522 <param name="width" type="unsigned long" dir="in"/>
10523 <param name="height" type="unsigned long" dir="in"/>
10524 <param name="bpp" type="unsigned long" dir="in"/>
10525 <param name="supported" type="boolean" dir="return"/>
10526 </method>
10527
10528 <method name="solidFill">
10529 <desc>
10530 Fills the specified rectangle on screen with a solid color.
10531 </desc>
10532 <param name="x" type="unsigned long" dir="in"/>
10533 <param name="y" type="unsigned long" dir="in"/>
10534 <param name="width" type="unsigned long" dir="in"/>
10535 <param name="height" type="unsigned long" dir="in"/>
10536 <param name="color" type="unsigned long" dir="in"/>
10537 <param name="handled" type="boolean" dir="return"/>
10538 </method>
10539
10540 <method name="copyScreenBits">
10541 <desc>
10542 Copies specified rectangle on the screen.
10543 </desc>
10544 <param name="xDst" type="unsigned long" dir="in"/>
10545 <param name="yDst" type="unsigned long" dir="in"/>
10546 <param name="xSrc" type="unsigned long" dir="in"/>
10547 <param name="ySrc" type="unsigned long" dir="in"/>
10548 <param name="width" type="unsigned long" dir="in"/>
10549 <param name="height" type="unsigned long" dir="in"/>
10550 <param name="handled" type="boolean" dir="return"/>
10551 </method>
10552
10553 <method name="getVisibleRegion">
10554 <desc>
10555 Returns the visible region of this frame buffer.
10556
10557 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10558 @a count parameter is ignored and the number of elements necessary to
10559 describe the current visible region is returned in @a countCopied.
10560
10561 If @a rectangles is not <tt>NULL</tt> but @a count is less
10562 than the required number of elements to store region data, the method
10563 will report a failure. If @a count is equal or greater than the
10564 required number of elements, then the actual number of elements copied
10565 to the provided array will be returned in @a countCopied.
10566
10567 <note>
10568 The address of the provided array must be in the process space of
10569 this IFramebuffer object.
10570 </note>
10571 <note>
10572 Method not yet implemented.
10573 </note>
10574 </desc>
10575 <param name="rectangles" type="octet" mod="ptr" dir="in">
10576 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10577 </param>
10578 <param name="count" type="unsigned long" dir="in">
10579 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10580 </param>
10581 <param name="countCopied" type="unsigned long" dir="return">
10582 <desc>Number of elements copied to the @a rectangles array.</desc>
10583 </param>
10584 </method>
10585
10586 <method name="setVisibleRegion">
10587 <desc>
10588 Suggests a new visible region to this frame buffer. This region
10589 represents the area of the VM display which is a union of regions of
10590 all top-level windows of the guest operating system running inside the
10591 VM (if the Guest Additions for this system support this
10592 functionality). This information may be used by the frontends to
10593 implement the seamless desktop integration feature.
10594
10595 <note>
10596 The address of the provided array must be in the process space of
10597 this IFramebuffer object.
10598 </note>
10599 <note>
10600 The IFramebuffer implementation must make a copy of the provided
10601 array of rectangles.
10602 </note>
10603 <note>
10604 Method not yet implemented.
10605 </note>
10606 </desc>
10607 <param name="rectangles" type="octet" mod="ptr" dir="in">
10608 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10609 </param>
10610 <param name="count" type="unsigned long" dir="in">
10611 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10612 </param>
10613 </method>
10614
10615 </interface>
10616
10617 <interface
10618 name="IFramebufferOverlay" extends="IFramebuffer"
10619 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10620 wsmap="suppress"
10621 >
10622 <desc>
10623 The IFramebufferOverlay interface represents an alpha blended overlay
10624 for displaying status icons above an IFramebuffer. It is always created
10625 not visible, so that it must be explicitly shown. It only covers a
10626 portion of the IFramebuffer, determined by its width, height and
10627 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10628 that order) format, and may be written to directly. Do re-read the
10629 width though, after setting it, as it may be adjusted (increased) to
10630 make it more suitable for the front end.
10631 </desc>
10632 <attribute name="x" type="unsigned long" readonly="yes">
10633 <desc>X position of the overlay, relative to the frame buffer.</desc>
10634 </attribute>
10635
10636 <attribute name="y" type="unsigned long" readonly="yes">
10637 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10638 </attribute>
10639
10640 <attribute name="visible" type="boolean" readonly="no">
10641 <desc>
10642 Whether the overlay is currently visible.
10643 </desc>
10644 </attribute>
10645
10646 <attribute name="alpha" type="unsigned long" readonly="no">
10647 <desc>
10648 The global alpha value for the overlay. This may or may not be
10649 supported by a given front end.
10650 </desc>
10651 </attribute>
10652
10653 <method name="move">
10654 <desc>
10655 Changes the overlay's position relative to the IFramebuffer.
10656 </desc>
10657 <param name="x" type="unsigned long" dir="in"/>
10658 <param name="y" type="unsigned long" dir="in"/>
10659 </method>
10660
10661 </interface>
10662
10663 <interface
10664 name="IDisplay" extends="$unknown"
10665 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10666 wsmap="suppress"
10667 >
10668 <desc>
10669 The IDisplay interface represents the virtual machine's display.
10670
10671 The object implementing this interface is contained in each
10672 <link to="IConsole::display"/> attribute and represents the visual
10673 output of the virtual machine.
10674
10675 The virtual display supports pluggable output targets represented by the
10676 IFramebuffer interface. Examples of the output target are a window on
10677 the host computer or an RDP session's display on a remote computer.
10678 </desc>
10679 <attribute name="width" type="unsigned long" readonly="yes">
10680 <desc>Current display width.</desc>
10681 </attribute>
10682
10683 <attribute name="height" type="unsigned long" readonly="yes">
10684 <desc>Current display height.</desc>
10685 </attribute>
10686
10687 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10688 <desc>
10689 Current guest display color depth. Note that this may differ
10690 from <link to="IFramebuffer::bitsPerPixel"/>.
10691 </desc>
10692 </attribute>
10693
10694 <method name="setupInternalFramebuffer">
10695 <desc>
10696 Prepares an internally managed frame buffer.
10697 </desc>
10698 <param name="depth" type="unsigned long" dir="in"/>
10699 </method>
10700
10701 <method name="lockFramebuffer">
10702 <desc>
10703 Requests access to the internal frame buffer.
10704
10705 <result name="VBOX_E_NOT_SUPPORTED">
10706 Attempt to lock a non-internal frame buffer.
10707 </result>
10708
10709 </desc>
10710 <param name="address" type="octet" mod="ptr" dir="return"/>
10711 </method>
10712
10713 <method name="unlockFramebuffer">
10714 <desc>
10715 Releases access to the internal frame buffer.
10716
10717 <result name="VBOX_E_NOT_SUPPORTED">
10718 Attempt to unlock a non-internal frame buffer.
10719 </result>
10720
10721 </desc>
10722 </method>
10723
10724 <method name="registerExternalFramebuffer">
10725 <desc>
10726 Registers an external frame buffer.
10727 </desc>
10728 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10729 </method>
10730
10731 <method name="setFramebuffer">
10732 <desc>
10733 Sets the framebuffer for given screen.
10734 </desc>
10735 <param name="screenId" type="unsigned long" dir="in"/>
10736 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10737 </method>
10738
10739 <method name="getFramebuffer">
10740 <desc>
10741 Queries the framebuffer for given screen.
10742 </desc>
10743 <param name="screenId" type="unsigned long" dir="in"/>
10744 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10745 <param name="xOrigin" type="long" dir="out"/>
10746 <param name="yOrigin" type="long" dir="out"/>
10747 </method>
10748
10749 <method name="setVideoModeHint">
10750 <desc>
10751 Asks VirtualBox to request the given video mode from
10752 the guest. This is just a hint and it cannot be guaranteed
10753 that the requested resolution will be used. Guest Additions
10754 are required for the request to be seen by guests. The caller
10755 should issue the request and wait for a resolution change and
10756 after a timeout retry.
10757
10758 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10759 parameters means that the corresponding values should be taken from the
10760 current video mode (i.e. left unchanged).
10761
10762 If the guest OS supports multi-monitor configuration then the @a display
10763 parameter specifies the number of the guest display to send the hint to:
10764 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10765 so on. If the multi-monitor configuration is not supported, @a display
10766 must be <tt>0</tt>.
10767
10768 <result name="E_INVALIDARG">
10769 The @a display is not associated with any monitor.
10770 </result>
10771
10772 </desc>
10773 <param name="width" type="unsigned long" dir="in"/>
10774 <param name="height" type="unsigned long" dir="in"/>
10775 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10776 <param name="display" type="unsigned long" dir="in"/>
10777 </method>
10778
10779 <method name="setSeamlessMode">
10780 <desc>
10781 Enables or disables seamless guest display rendering (seamless desktop
10782 integration) mode.
10783 <note>
10784 Calling this method has no effect if <link
10785 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10786 </note>
10787 </desc>
10788 <param name="enabled" type="boolean" dir="in"/>
10789 </method>
10790
10791 <method name="takeScreenShot">
10792 <desc>
10793 Takes a screen shot of the requested size and copies it to the
10794 32-bpp buffer allocated by the caller.
10795
10796 <result name="E_NOTIMPL">
10797 Feature not implemented.
10798 </result>
10799 <result name="VBOX_E_IPRT_ERROR">
10800 Could not take a screenshot.
10801 </result>
10802
10803 </desc>
10804 <param name="address" type="octet" mod="ptr" dir="in"/>
10805 <param name="width" type="unsigned long" dir="in"/>
10806 <param name="height" type="unsigned long" dir="in"/>
10807 </method>
10808
10809 <method name="drawToScreen">
10810 <desc>
10811 Draws a 32-bpp image of the specified size from the given buffer
10812 to the given point on the VM display.
10813
10814 <result name="E_NOTIMPL">
10815 Feature not implemented.
10816 </result>
10817 <result name="VBOX_E_IPRT_ERROR">
10818 Could not draw to screen.
10819 </result>
10820
10821 </desc>
10822 <param name="address" type="octet" mod="ptr" dir="in"/>
10823 <param name="x" type="unsigned long" dir="in"/>
10824 <param name="y" type="unsigned long" dir="in"/>
10825 <param name="width" type="unsigned long" dir="in"/>
10826 <param name="height" type="unsigned long" dir="in"/>
10827 </method>
10828
10829 <method name="invalidateAndUpdate">
10830 <desc>
10831 Does a full invalidation of the VM display and instructs the VM
10832 to update it.
10833
10834 <result name="VBOX_E_IPRT_ERROR">
10835 Could not invalidate and update screen.
10836 </result>
10837
10838 </desc>
10839 </method>
10840
10841 <method name="resizeCompleted">
10842 <desc>
10843 Signals that a framebuffer has completed the resize operation.
10844
10845 <result name="VBOX_E_NOT_SUPPORTED">
10846 Operation only valid for external frame buffers.
10847 </result>
10848
10849 </desc>
10850 <param name="screenId" type="unsigned long" dir="in"/>
10851 </method>
10852
10853 <method name="updateCompleted">
10854 <desc>
10855 Signals that a framebuffer has completed the update operation.
10856
10857 <result name="VBOX_E_NOT_SUPPORTED">
10858 Operation only valid for external frame buffers.
10859 </result>
10860
10861 </desc>
10862 </method>
10863
10864 </interface>
10865
10866 <!--
10867 // INetworkAdapter
10868 /////////////////////////////////////////////////////////////////////////
10869 -->
10870
10871 <enum
10872 name="NetworkAttachmentType"
10873 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10874 >
10875 <desc>
10876 Network attachment type.
10877 </desc>
10878
10879 <const name="Null" value="0">
10880 <desc>Null value, also means "not attached".</desc>
10881 </const>
10882 <const name="NAT" value="1"/>
10883 <const name="Bridged" value="2"/>
10884 <const name="Internal" value="3"/>
10885 <const name="HostOnly" value="4"/>
10886 </enum>
10887
10888 <enum
10889 name="NetworkAdapterType"
10890 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10891 >
10892 <desc>
10893 Network adapter type.
10894 </desc>
10895
10896 <const name="Null" value="0">
10897 <desc>Null value (never used by the API).</desc>
10898 </const>
10899 <const name="Am79C970A" value="1"/>
10900 <const name="Am79C973" value="2"/>
10901 <const name="I82540EM" value="3"/>
10902 <const name="I82543GC" value="4"/>
10903 </enum>
10904
10905 <interface
10906 name="INetworkAdapter" extends="$unknown"
10907 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10908 wsmap="managed"
10909 >
10910 <desc>
10911 Represents a virtual network adapter that is attached to a virtual machine.
10912 Each virtual machine has a fixed number of network adapter slots with one
10913 instance of this attached to each of them. Call
10914 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10915 is attached to a given slot in a given machine.
10916
10917 Each network adapter can be in one of five attachment modes, which are
10918 represented by the <link to="NetworkAttachmentType" /> enumeration;
10919 see the <link to="#attachmentType" /> attribute.
10920 </desc>
10921
10922 <attribute name="adapterType" type="NetworkAdapterType">
10923 <desc>
10924 Type of the virtual network adapter. Depending on this value,
10925 VirtualBox will provide a different virtual network hardware
10926 to the guest.
10927 </desc>
10928 </attribute>
10929
10930 <attribute name="slot" type="unsigned long" readonly="yes">
10931 <desc>
10932 Slot number this adapter is plugged into. Corresponds to
10933 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10934 to obtain this instance.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="enabled" type="boolean">
10939 <desc>
10940 Flag whether the network adapter is present in the
10941 guest system. If disabled, the virtual guest hardware will
10942 not contain this network adapter. Can only be changed when
10943 the VM is not running.
10944 </desc>
10945 </attribute>
10946
10947 <attribute name="MACAddress" type="wstring">
10948 <desc>
10949 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10950 it to NULL, VirtualBox will generate a unique MAC address.
10951 </desc>
10952 </attribute>
10953
10954 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10955
10956 <attribute name="hostInterface" type="wstring">
10957 <desc>
10958 Name of the host network interface the VM is attached to.
10959 </desc>
10960 </attribute>
10961
10962 <attribute name="internalNetwork" type="wstring">
10963 <desc>
10964 Name of the internal network the VM is attached to.
10965 </desc>
10966 </attribute>
10967
10968 <attribute name="NATNetwork" type="wstring">
10969 <desc>
10970 Name of the NAT network the VM is attached to.
10971 </desc>
10972 </attribute>
10973
10974 <attribute name="cableConnected" type="boolean">
10975 <desc>
10976 Flag whether the adapter reports the cable as connected or not.
10977 It can be used to report offline situations to a VM.
10978 </desc>
10979 </attribute>
10980
10981 <attribute name="lineSpeed" type="unsigned long">
10982 <desc>
10983 Line speed reported by custom drivers, in units of 1 kbps.
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="traceEnabled" type="boolean">
10988 <desc>
10989 Flag whether network traffic from/to the network card should be traced.
10990 Can only be toggled when the VM is turned off.
10991 </desc>
10992 </attribute>
10993
10994 <attribute name="traceFile" type="wstring">
10995 <desc>
10996 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10997 will be used.
10998 </desc>
10999 </attribute>
11000
11001 <method name="attachToNAT">
11002 <desc>
11003 Attach the network adapter to the Network Address Translation (NAT) interface.
11004 </desc>
11005 </method>
11006
11007 <method name="attachToBridgedInterface">
11008 <desc>
11009 Attach the network adapter to a bridged host interface.
11010 </desc>
11011 </method>
11012
11013 <method name="attachToInternalNetwork">
11014 <desc>
11015 Attach the network adapter to an internal network.
11016 </desc>
11017 </method>
11018
11019 <method name="attachToHostOnlyInterface">
11020 <desc>
11021 Attach the network adapter to the host-only network.
11022 </desc>
11023 </method>
11024
11025 <method name="detach">
11026 <desc>
11027 Detach the network adapter
11028 </desc>
11029 </method>
11030 </interface>
11031
11032
11033 <!--
11034 // ISerialPort
11035 /////////////////////////////////////////////////////////////////////////
11036 -->
11037
11038 <enum
11039 name="PortMode"
11040 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
11041 >
11042 <desc>
11043 The PortMode enumeration represents possible communication modes for
11044 the virtual serial port device.
11045 </desc>
11046
11047 <const name="Disconnected" value="0">
11048 <desc>Virtual device is not attached to any real host device.</desc>
11049 </const>
11050 <const name="HostPipe" value="1">
11051 <desc>Virtual device is attached to a host pipe.</desc>
11052 </const>
11053 <const name="HostDevice" value="2">
11054 <desc>Virtual device is attached to a host device.</desc>
11055 </const>
11056 </enum>
11057
11058 <interface
11059 name="ISerialPort" extends="$unknown"
11060 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11061 wsmap="managed"
11062 >
11063
11064 <desc>
11065 The ISerialPort interface represents the virtual serial port device.
11066
11067 The virtual serial port device acts like an ordinary serial port
11068 inside the virtual machine. This device communicates to the real
11069 serial port hardware in one of two modes: host pipe or host device.
11070
11071 In host pipe mode, the #path attribute specifies the path to the pipe on
11072 the host computer that represents a serial port. The #server attribute
11073 determines if this pipe is created by the virtual machine process at
11074 machine startup or it must already exist before starting machine
11075 execution.
11076
11077 In host device mode, the #path attribute specifies the name of the
11078 serial port device on the host computer.
11079
11080 There is also a third communication mode: the disconnected mode. In this
11081 mode, the guest OS running inside the virtual machine will be able to
11082 detect the serial port, but all port write operations will be discarded
11083 and all port read operations will return no data.
11084
11085 <see>IMachine::getSerialPort</see>
11086 </desc>
11087
11088 <attribute name="slot" type="unsigned long" readonly="yes">
11089 <desc>
11090 Slot number this serial port is plugged into. Corresponds to
11091 the value you pass to <link to="IMachine::getSerialPort"/>
11092 to obtain this instance.
11093 </desc>
11094 </attribute>
11095
11096 <attribute name="enabled" type="boolean">
11097 <desc>
11098 Flag whether the serial port is enabled. If disabled,
11099 the serial port will not be reported to the guest OS.
11100 </desc>
11101 </attribute>
11102
11103 <attribute name="IOBase" type="unsigned long">
11104 <desc>Base I/O address of the serial port.</desc>
11105 </attribute>
11106
11107 <attribute name="IRQ" type="unsigned long">
11108 <desc>IRQ number of the serial port.</desc>
11109 </attribute>
11110
11111 <attribute name="hostMode" type="PortMode">
11112 <desc>
11113 How is this port connected to the host.
11114 <note>
11115 Changing this attribute may fail if the conditions for
11116 <link to="#path"/> are not met.
11117 </note>
11118 </desc>
11119 </attribute>
11120
11121 <attribute name="server" type="boolean">
11122 <desc>
11123 Flag whether this serial port acts as a server (creates a new pipe on
11124 the host) or as a client (uses the existing pipe). This attribute is
11125 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11126 </desc>
11127 </attribute>
11128
11129 <attribute name="path" type="wstring">
11130 <desc>
11131 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11132 PortMode_HostPipe, or the host serial device name when
11133 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11134 cases, setting a @c null or an empty string as the attribute's value
11135 will result into an error. Otherwise, the value of this property is
11136 ignored.
11137 </desc>
11138 </attribute>
11139
11140 </interface>
11141
11142 <!--
11143 // IParallelPort
11144 /////////////////////////////////////////////////////////////////////////
11145 -->
11146
11147 <interface
11148 name="IParallelPort" extends="$unknown"
11149 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11150 wsmap="managed"
11151 >
11152
11153 <desc>
11154 The IParallelPort interface represents the virtual parallel port device.
11155
11156 The virtual parallel port device acts like an ordinary parallel port
11157 inside the virtual machine. This device communicates to the real
11158 parallel port hardware using the name of the parallel device on the host
11159 computer specified in the #path attribute.
11160
11161 Each virtual parallel port device is assigned a base I/O address and an
11162 IRQ number that will be reported to the guest operating system and used
11163 to operate the given parallel port from within the virtual machine.
11164
11165 <see>IMachine::getParallelPort</see>
11166 </desc>
11167
11168 <attribute name="slot" type="unsigned long" readonly="yes">
11169 <desc>
11170 Slot number this parallel port is plugged into. Corresponds to
11171 the value you pass to <link to="IMachine::getParallelPort"/>
11172 to obtain this instance.
11173 </desc>
11174 </attribute>
11175
11176 <attribute name="enabled" type="boolean">
11177 <desc>
11178 Flag whether the parallel port is enabled. If disabled,
11179 the parallel port will not be reported to the guest OS.
11180 </desc>
11181 </attribute>
11182
11183 <attribute name="IOBase" type="unsigned long">
11184 <desc>Base I/O address of the parallel port.</desc>
11185 </attribute>
11186
11187 <attribute name="IRQ" type="unsigned long">
11188 <desc>IRQ number of the parallel port.</desc>
11189 </attribute>
11190
11191 <attribute name="path" type="wstring">
11192 <desc>
11193 Host parallel device name. If this parallel port is enabled, setting a
11194 @c null or an empty string as this attribute's value will result into
11195 an error.
11196 </desc>
11197 </attribute>
11198
11199 </interface>
11200
11201
11202 <!--
11203 // IMachineDebugger
11204 /////////////////////////////////////////////////////////////////////////
11205 -->
11206
11207 <interface
11208 name="IMachineDebugger" extends="$unknown"
11209 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11210 wsmap="suppress"
11211 >
11212 <method name="resetStats">
11213 <desc>
11214 Reset VM statistics.
11215 </desc>
11216 <param name="pattern" type="wstring" dir="in">
11217 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11218 </param>
11219 </method>
11220
11221 <method name="dumpStats">
11222 <desc>
11223 Dumps VM statistics.
11224 </desc>
11225 <param name="pattern" type="wstring" dir="in">
11226 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11227 </param>
11228 </method>
11229
11230 <method name="getStats">
11231 <desc>
11232 Get the VM statistics in a XMLish format.
11233 </desc>
11234 <param name="pattern" type="wstring" dir="in">
11235 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11236 </param>
11237 <param name="withDescriptions" type="boolean" dir="in">
11238 <desc>Whether to include the descriptions.</desc>
11239 </param>
11240 <param name="stats" type="wstring" dir="out">
11241 <desc>The XML document containing the statistics.</desc>
11242 </param>
11243 </method>
11244
11245 <method name="injectNMI">
11246 <desc>
11247 Inject an NMI into a running VT-x/AMD-V VM.
11248 </desc>
11249 </method>
11250
11251 <attribute name="singlestep" type="boolean">
11252 <desc>Switch for enabling singlestepping.</desc>
11253 </attribute>
11254
11255 <attribute name="recompileUser" type="boolean">
11256 <desc>Switch for forcing code recompilation for user mode code.</desc>
11257 </attribute>
11258
11259 <attribute name="recompileSupervisor" type="boolean">
11260 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11261 </attribute>
11262
11263 <attribute name="PATMEnabled" type="boolean">
11264 <desc>Switch for enabling and disabling the PATM component.</desc>
11265 </attribute>
11266
11267 <attribute name="CSAMEnabled" type="boolean">
11268 <desc>Switch for enabling and disabling the CSAM component.</desc>
11269 </attribute>
11270
11271 <attribute name="logEnabled" type="boolean">
11272 <desc>Switch for enabling and disabling logging.</desc>
11273 </attribute>
11274
11275 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11276 <desc>
11277 Flag indicating whether the VM is currently making use of CPU hardware
11278 virtualization extensions.
11279 </desc>
11280 </attribute>
11281
11282 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11283 <desc>
11284 Flag indicating whether the VM is currently making use of the nested paging
11285 CPU hardware virtualization extension.
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11290 <desc>
11291 Flag indicating whether the VM is currently making use of the VPID
11292 VT-x extension.
11293 </desc>
11294 </attribute>
11295
11296 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11297 <desc>
11298 Flag indicating whether the VM is currently making use of the Physical
11299 Address Extension CPU feature.
11300 </desc>
11301 </attribute>
11302
11303 <attribute name="virtualTimeRate" type="unsigned long">
11304 <desc>
11305 The rate at which the virtual time runs expressed as a percentage.
11306 The accepted range is 2% to 20000%.
11307 </desc>
11308 </attribute>
11309
11310 <!-- @todo method for setting log flags, groups and destination! -->
11311
11312 <attribute name="VM" type="unsigned long long" readonly="yes">
11313 <desc>
11314 Gets the VM handle. This is only for internal use while
11315 we carve the details of this interface.
11316 </desc>
11317 </attribute>
11318
11319 </interface>
11320
11321 <!--
11322 // IUSBController
11323 /////////////////////////////////////////////////////////////////////////
11324 -->
11325
11326 <interface
11327 name="IUSBController" extends="$unknown"
11328 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11329 wsmap="managed"
11330 >
11331 <attribute name="enabled" type="boolean">
11332 <desc>
11333 Flag whether the USB controller is present in the
11334 guest system. If disabled, the virtual guest hardware will
11335 not contain any USB controller. Can only be changed when
11336 the VM is powered off.
11337 </desc>
11338 </attribute>
11339
11340 <attribute name="enabledEhci" type="boolean">
11341 <desc>
11342 Flag whether the USB EHCI controller is present in the
11343 guest system. If disabled, the virtual guest hardware will
11344 not contain a USB EHCI controller. Can only be changed when
11345 the VM is powered off.
11346 </desc>
11347 </attribute>
11348
11349 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11350 <desc>
11351 USB standard version which the controller implements.
11352 This is a BCD which means that the major version is in the
11353 high byte and minor version is in the low byte.
11354 </desc>
11355 </attribute>
11356
11357 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11358 <desc>
11359 List of USB device filters associated with the machine.
11360
11361 If the machine is currently running, these filters are activated
11362 every time a new (supported) USB device is attached to the host
11363 computer that was not ignored by global filters
11364 (<link to="IHost::USBDeviceFilters"/>).
11365
11366 These filters are also activated when the machine is powered up.
11367 They are run against a list of all currently available USB
11368 devices (in states
11369 <link to="USBDeviceState_Available"/>,
11370 <link to="USBDeviceState_Busy"/>,
11371 <link to="USBDeviceState_Held"/>) that were not previously
11372 ignored by global filters.
11373
11374 If at least one filter matches the USB device in question, this
11375 device is automatically captured (attached to) the virtual USB
11376 controller of this machine.
11377
11378 <see>IUSBDeviceFilter, ::IUSBController</see>
11379 </desc>
11380 </attribute>
11381
11382 <method name="createDeviceFilter">
11383 <desc>
11384 Creates a new USB device filter. All attributes except
11385 the filter name are set to <tt>null</tt> (any match),
11386 <i>active</i> is <tt>false</tt> (the filter is not active).
11387
11388 The created filter can then be added to the list of filters using
11389 <link to="#insertDeviceFilter"/>.
11390
11391 <result name="VBOX_E_INVALID_VM_STATE">
11392 The virtual machine is not mutable.
11393 </result>
11394
11395 <see>#deviceFilters</see>
11396 </desc>
11397 <param name="name" type="wstring" dir="in">
11398 <desc>
11399 Filter name. See <link to="IUSBDeviceFilter::name"/>
11400 for more info.
11401 </desc>
11402 </param>
11403 <param name="filter" type="IUSBDeviceFilter" dir="return">
11404 <desc>Created filter object.</desc>
11405 </param>
11406 </method>
11407
11408 <method name="insertDeviceFilter">
11409 <desc>
11410 Inserts the given USB device to the specified position
11411 in the list of filters.
11412
11413 Positions are numbered starting from <tt>0</tt>. If the specified
11414 position is equal to or greater than the number of elements in
11415 the list, the filter is added to the end of the collection.
11416
11417 <note>
11418 Duplicates are not allowed, so an attempt to insert a
11419 filter that is already in the collection, will return an
11420 error.
11421 </note>
11422
11423 <result name="VBOX_E_INVALID_VM_STATE">
11424 Virtual machine is not mutable.
11425 </result>
11426 <result name="E_INVALIDARG">
11427 USB device filter not created within this VirtualBox instance.
11428 </result>
11429 <result name="VBOX_E_INVALID_OBJECT_STATE">
11430 USB device filter already in list.
11431 </result>
11432
11433 <see>#deviceFilters</see>
11434 </desc>
11435 <param name="position" type="unsigned long" dir="in">
11436 <desc>Position to insert the filter to.</desc>
11437 </param>
11438 <param name="filter" type="IUSBDeviceFilter" dir="in">
11439 <desc>USB device filter to insert.</desc>
11440 </param>
11441 </method>
11442
11443 <method name="removeDeviceFilter">
11444 <desc>
11445 Removes a USB device filter from the specified position in the
11446 list of filters.
11447
11448 Positions are numbered starting from <tt>0</tt>. Specifying a
11449 position equal to or greater than the number of elements in
11450 the list will produce an error.
11451
11452 <see>#deviceFilters</see>
11453
11454 <result name="VBOX_E_INVALID_VM_STATE">
11455 Virtual machine is not mutable.
11456 </result>
11457 <result name="E_INVALIDARG">
11458 USB device filter list empty or invalid @a position.
11459 </result>
11460
11461 </desc>
11462 <param name="position" type="unsigned long" dir="in">
11463 <desc>Position to remove the filter from.</desc>
11464 </param>
11465 <param name="filter" type="IUSBDeviceFilter" dir="return">
11466 <desc>Removed USB device filter.</desc>
11467 </param>
11468 </method>
11469
11470 </interface>
11471
11472
11473 <!--
11474 // IUSBDevice
11475 /////////////////////////////////////////////////////////////////////////
11476 -->
11477
11478 <interface
11479 name="IUSBDevice" extends="$unknown"
11480 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11481 wsmap="managed"
11482 >
11483 <desc>
11484 The IUSBDevice interface represents a virtual USB device attached to the
11485 virtual machine.
11486
11487 A collection of objects implementing this interface is stored in the
11488 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11489 attached to a running virtual machine's USB controller.
11490 </desc>
11491
11492 <attribute name="id" type="uuid" readonly="yes">
11493 <desc>
11494 Unique USB device ID. This ID is built from #vendorId,
11495 #productId, #revision and #serialNumber.
11496 </desc>
11497 </attribute>
11498
11499 <attribute name="vendorId" type="unsigned short" readonly="yes">
11500 <desc>Vendor ID.</desc>
11501 </attribute>
11502
11503 <attribute name="productId" type="unsigned short" readonly="yes">
11504 <desc>Product ID.</desc>
11505 </attribute>
11506
11507 <attribute name="revision" type="unsigned short" readonly="yes">
11508 <desc>
11509 Product revision number. This is a packed BCD represented as
11510 unsigned short. The high byte is the integer part and the low
11511 byte is the decimal.
11512 </desc>
11513 </attribute>
11514
11515 <attribute name="manufacturer" type="wstring" readonly="yes">
11516 <desc>Manufacturer string.</desc>
11517 </attribute>
11518
11519 <attribute name="product" type="wstring" readonly="yes">
11520 <desc>Product string.</desc>
11521 </attribute>
11522
11523 <attribute name="serialNumber" type="wstring" readonly="yes">
11524 <desc>Serial number string.</desc>
11525 </attribute>
11526
11527 <attribute name="address" type="wstring" readonly="yes">
11528 <desc>Host specific address of the device.</desc>
11529 </attribute>
11530
11531 <attribute name="port" type="unsigned short" readonly="yes">
11532 <desc>
11533 Host USB port number the device is physically
11534 connected to.
11535 </desc>
11536 </attribute>
11537
11538 <attribute name="version" type="unsigned short" readonly="yes">
11539 <desc>
11540 The major USB version of the device - 1 or 2.
11541 </desc>
11542 </attribute>
11543
11544 <attribute name="portVersion" type="unsigned short" readonly="yes">
11545 <desc>
11546 The major USB version of the host USB port the device is
11547 physically connected to - 1 or 2. For devices not connected to
11548 anything this will have the same value as the version attribute.
11549 </desc>
11550 </attribute>
11551
11552 <attribute name="remote" type="boolean" readonly="yes">
11553 <desc>
11554 Whether the device is physically connected to a remote VRDP
11555 client or to a local host machine.
11556 </desc>
11557 </attribute>
11558
11559 </interface>
11560
11561
11562 <!--
11563 // IUSBDeviceFilter
11564 /////////////////////////////////////////////////////////////////////////
11565 -->
11566
11567 <interface
11568 name="IUSBDeviceFilter" extends="$unknown"
11569 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11570 wsmap="managed"
11571 >
11572 <desc>
11573 The IUSBDeviceFilter interface represents an USB device filter used
11574 to perform actions on a group of USB devices.
11575
11576 This type of filters is used by running virtual machines to
11577 automatically capture selected USB devices once they are physically
11578 attached to the host computer.
11579
11580 A USB device is matched to the given device filter if and only if all
11581 attributes of the device match the corresponding attributes of the
11582 filter (that is, attributes are joined together using the logical AND
11583 operation). On the other hand, all together, filters in the list of
11584 filters carry the semantics of the logical OR operation. So if it is
11585 desirable to create a match like "this vendor id OR this product id",
11586 one needs to create two filters and specify "any match" (see below)
11587 for unused attributes.
11588
11589 All filter attributes used for matching are strings. Each string
11590 is an expression representing a set of values of the corresponding
11591 device attribute, that will match the given filter. Currently, the
11592 following filtering expressions are supported:
11593
11594 <ul>
11595 <li><i>Interval filters</i>. Used to specify valid intervals for
11596 integer device attributes (Vendor ID, Product ID and Revision).
11597 The format of the string is:
11598
11599 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11600
11601 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11602 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11603 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11604 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11605 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11606 possible integer is assumed.
11607 </li>
11608 <li><i>Boolean filters</i>. Used to specify acceptable values for
11609 boolean device attributes. The format of the string is:
11610
11611 <tt>true|false|yes|no|0|1</tt>
11612
11613 </li>
11614 <li><i>Exact match</i>. Used to specify a single value for the given
11615 device attribute. Any string that doesn't start with <tt>int:</tt>
11616 represents the exact match. String device attributes are compared to
11617 this string including case of symbols. Integer attributes are first
11618 converted to a string (see individual filter attributes) and then
11619 compared ignoring case.
11620
11621 </li>
11622 <li><i>Any match</i>. Any value of the corresponding device attribute
11623 will match the given filter. An empty or <tt>null</tt> string is
11624 used to construct this type of filtering expressions.
11625
11626 </li>
11627 </ul>
11628
11629 <note>
11630 On the Windows host platform, interval filters are not currently
11631 available. Also all string filter attributes
11632 (<link to="#manufacturer"/>, <link to="#product"/>,
11633 <link to="#serialNumber"/>) are ignored, so they behave as
11634 <i>any match</i> no matter what string expression is specified.
11635 </note>
11636
11637 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11638 </desc>
11639
11640 <attribute name="name" type="wstring">
11641 <desc>
11642 Visible name for this filter.
11643 This name is used to visually distinguish one filter from another,
11644 so it can neither be <tt>null</tt> nor an empty string.
11645 </desc>
11646 </attribute>
11647
11648 <attribute name="active" type="boolean">
11649 <desc>Whether this filter active or has been temporarily disabled.</desc>
11650 </attribute>
11651
11652 <attribute name="vendorId" type="wstring">
11653 <desc>
11654 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11655 The string representation for the <i>exact matching</i>
11656 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11657 (including leading zeroes).
11658 </desc>
11659 </attribute>
11660
11661 <attribute name="productId" type="wstring">
11662 <desc>
11663 <link to="IUSBDevice::productId">Product ID</link> filter.
11664 The string representation for the <i>exact matching</i>
11665 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11666 (including leading zeroes).
11667 </desc>
11668 </attribute>
11669
11670 <attribute name="revision" type="wstring">
11671 <desc>
11672 <link to="IUSBDevice::productId">Product revision number</link>
11673 filter. The string representation for the <i>exact matching</i>
11674 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11675 of the integer part of the revision, and <tt>F</tt> is the
11676 decimal digit of its fractional part (including leading and
11677 trailing zeros).
11678 Note that for interval filters, it's best to use the hexadecimal
11679 form, because the revision is stored as a 16 bit packed BCD value;
11680 so the expression <tt>int:0x0100-0x0199</tt> will match any
11681 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11682 </desc>
11683 </attribute>
11684
11685 <attribute name="manufacturer" type="wstring">
11686 <desc>
11687 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11688 </desc>
11689 </attribute>
11690
11691 <attribute name="product" type="wstring">
11692 <desc>
11693 <link to="IUSBDevice::product">Product</link> filter.
11694 </desc>
11695 </attribute>
11696
11697 <attribute name="serialNumber" type="wstring">
11698 <desc>
11699 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11700 </desc>
11701 </attribute>
11702
11703 <attribute name="port" type="wstring">
11704 <desc>
11705 <link to="IUSBDevice::port">Host USB port</link> filter.
11706 </desc>
11707 </attribute>
11708
11709 <attribute name="remote" type="wstring">
11710 <desc>
11711 <link to="IUSBDevice::remote">Remote state</link> filter.
11712 <note>
11713 This filter makes sense only for machine USB filters,
11714 i.e. it is ignored by IHostUSBDeviceFilter objects.
11715 </note>
11716 </desc>
11717 </attribute>
11718
11719 <attribute name="maskedInterfaces" type="unsigned long">
11720 <desc>
11721 This is an advanced option for hiding one or more USB interfaces
11722 from the guest. The value is a bit mask where the bits that are set
11723 means the corresponding USB interface should be hidden, masked off
11724 if you like.
11725 This feature only works on Linux hosts.
11726 </desc>
11727 </attribute>
11728
11729 </interface>
11730
11731
11732 <!--
11733 // IHostUSBDevice
11734 /////////////////////////////////////////////////////////////////////////
11735 -->
11736
11737 <enum
11738 name="USBDeviceState"
11739 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11740 >
11741 <desc>
11742 USB device state. This enumeration represents all possible states
11743 of the USB device physically attached to the host computer regarding
11744 its state on the host computer and availability to guest computers
11745 (all currently running virtual machines).
11746
11747 Once a supported USB device is attached to the host, global USB
11748 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11749 either ignore the device, or put it to USBDeviceState_Held state, or do
11750 nothing. Unless the device is ignored by global filters, filters of all
11751 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11752 activated that can put it to USBDeviceState_Captured state.
11753
11754 If the device was ignored by global filters, or didn't match
11755 any filters at all (including guest ones), it is handled by the host
11756 in a normal way. In this case, the device state is determined by
11757 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11758 or USBDeviceState_Available, depending on the current device usage.
11759
11760 Besides auto-capturing based on filters, the device can be manually
11761 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11762 state is USBDeviceState_Busy, USBDeviceState_Available or
11763 USBDeviceState_Held.
11764
11765 <note>
11766 Due to differences in USB stack implementations in Linux and Win32,
11767 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11768 only to the Linux version of the product. This also means that (<link
11769 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11770 device state is USBDeviceState_Held.
11771 </note>
11772
11773 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11774 </desc>
11775
11776 <const name="NotSupported" value="0">
11777 <desc>
11778 Not supported by the VirtualBox server, not available to guests.
11779 </desc>
11780 </const>
11781 <const name="Unavailable" value="1">
11782 <desc>
11783 Being used by the host computer exclusively,
11784 not available to guests.
11785 </desc>
11786 </const>
11787 <const name="Busy" value="2">
11788 <desc>
11789 Being used by the host computer, potentially available to guests.
11790 </desc>
11791 </const>
11792 <const name="Available" value="3">
11793 <desc>
11794 Not used by the host computer, available to guests (the host computer
11795 can also start using the device at any time).
11796 </desc>
11797 </const>
11798 <const name="Held" value="4">
11799 <desc>
11800 Held by the VirtualBox server (ignored by the host computer),
11801 available to guests.
11802 </desc>
11803 </const>
11804 <const name="Captured" value="5">
11805 <desc>
11806 Captured by one of the guest computers, not available
11807 to anybody else.
11808 </desc>
11809 </const>
11810 </enum>
11811
11812 <interface
11813 name="IHostUSBDevice" extends="IUSBDevice"
11814 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11815 wsmap="managed"
11816 >
11817 <desc>
11818 The IHostUSBDevice interface represents a physical USB device attached
11819 to the host computer.
11820
11821 Besides properties inherited from IUSBDevice, this interface adds the
11822 <link to="#state"/> property that holds the current state of the USB
11823 device.
11824
11825 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11826 </desc>
11827
11828 <attribute name="state" type="USBDeviceState" readonly="yes">
11829 <desc>
11830 Current state of the device.
11831 </desc>
11832 </attribute>
11833
11834 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11835
11836 </interface>
11837
11838
11839 <!--
11840 // IHostUSBDeviceFilter
11841 /////////////////////////////////////////////////////////////////////////
11842 -->
11843
11844 <enum
11845 name="USBDeviceFilterAction"
11846 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11847 >
11848 <desc>
11849 Actions for host USB device filters.
11850 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11851 </desc>
11852
11853 <const name="Null" value="0">
11854 <desc>Null value (never used by the API).</desc>
11855 </const>
11856 <const name="Ignore" value="1">
11857 <desc>Ignore the matched USB device.</desc>
11858 </const>
11859 <const name="Hold" value="2">
11860 <desc>Hold the matched USB device.</desc>
11861 </const>
11862 </enum>
11863
11864 <interface
11865 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11866 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11867 wsmap="managed"
11868 >
11869 <desc>
11870 The IHostUSBDeviceFilter interface represents a global filter for a
11871 physical USB device used by the host computer. Used indirectly in
11872 <link to="IHost::USBDeviceFilters"/>.
11873
11874 Using filters of this type, the host computer determines the initial
11875 state of the USB device after it is physically attached to the
11876 host's USB controller.
11877
11878 <note>
11879 The <link to="#remote"/> attribute is ignored by this type of
11880 filters, because it makes sense only for
11881 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11882 </note>
11883
11884 <see>IHost::USBDeviceFilters</see>
11885 </desc>
11886
11887 <attribute name="action" type="USBDeviceFilterAction">
11888 <desc>
11889 Action performed by the host when an attached USB device
11890 matches this filter.
11891 </desc>
11892 </attribute>
11893
11894 </interface>
11895
11896 <!--
11897 // IAudioAdapter
11898 /////////////////////////////////////////////////////////////////////////
11899 -->
11900
11901 <enum
11902 name="AudioDriverType"
11903 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11904 >
11905 <desc>
11906 Host audio driver type.
11907 </desc>
11908
11909 <const name="Null" value="0">
11910 <desc>Null value, also means "dummy audio driver".</desc>
11911 </const>
11912 <const name="WinMM" value="1"/>
11913 <const name="OSS" value="2"/>
11914 <const name="ALSA" value="3"/>
11915 <const name="DirectSound" value="4"/>
11916 <const name="CoreAudio" value="5"/>
11917 <const name="MMPM" value="6"/>
11918 <const name="Pulse" value="7"/>
11919 <const name="SolAudio" value="8"/>
11920 </enum>
11921
11922 <enum
11923 name="AudioControllerType"
11924 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11925 >
11926 <desc>
11927 Virtual audio controller type.
11928 </desc>
11929
11930 <const name="AC97" value="0"/>
11931 <const name="SB16" value="1"/>
11932 </enum>
11933
11934 <interface
11935 name="IAudioAdapter" extends="$unknown"
11936 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11937 wsmap="managed"
11938 >
11939 <desc>
11940 The IAudioAdapter interface represents the virtual audio adapter of
11941 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11942 </desc>
11943 <attribute name="enabled" type="boolean">
11944 <desc>
11945 Flag whether the audio adapter is present in the
11946 guest system. If disabled, the virtual guest hardware will
11947 not contain any audio adapter. Can only be changed when
11948 the VM is not running.
11949 </desc>
11950 </attribute>
11951 <attribute name="audioController" type="AudioControllerType">
11952 <desc>
11953 The audio hardware we emulate.
11954 </desc>
11955 </attribute>
11956 <attribute name="audioDriver" type="AudioDriverType">
11957 <desc>
11958 Audio driver the adapter is connected to. This setting
11959 can only be changed when the VM is not running.
11960 </desc>
11961 </attribute>
11962 </interface>
11963
11964 <!--
11965 // IVRDPServer
11966 /////////////////////////////////////////////////////////////////////////
11967 -->
11968
11969 <enum
11970 name="VRDPAuthType"
11971 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11972 >
11973 <desc>
11974 VRDP authentication type.
11975 </desc>
11976
11977 <const name="Null" value="0">
11978 <desc>Null value, also means "no authentication".</desc>
11979 </const>
11980 <const name="External" value="1"/>
11981 <const name="Guest" value="2"/>
11982 </enum>
11983
11984 <interface
11985 name="IVRDPServer" extends="$unknown"
11986 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11987 wsmap="managed"
11988 >
11989 <attribute name="enabled" type="boolean">
11990 <desc>VRDP server status.</desc>
11991 </attribute>
11992
11993 <attribute name="port" type="unsigned long">
11994 <desc>
11995 VRDP server port number.
11996 <note>
11997 Setting the value of this property to <tt>0</tt> will reset the port
11998 number to the default value which is
11999 currently <tt>3389</tt>. Reading this property will always return a
12000 real port number, even after it has been set to <tt>0</tt> (in which
12001 case the default port is returned).
12002 </note>
12003 </desc>
12004 </attribute>
12005
12006 <attribute name="netAddress" type="wstring">
12007 <desc>VRDP server address.</desc>
12008 </attribute>
12009
12010 <attribute name="authType" type="VRDPAuthType">
12011 <desc>VRDP authentication method.</desc>
12012 </attribute>
12013
12014 <attribute name="authTimeout" type="unsigned long">
12015 <desc>Timeout for guest authentication. Milliseconds.</desc>
12016 </attribute>
12017
12018 <attribute name="allowMultiConnection" type="boolean">
12019 <desc>
12020 Flag whether multiple simultaneous connections to the VM are permitted.
12021 Note that this will be replaced by a more powerful mechanism in the future.
12022 </desc>
12023 </attribute>
12024
12025 <attribute name="reuseSingleConnection" type="boolean">
12026 <desc>
12027 Flag whether the existing connection must be dropped and a new connection
12028 must be established by the VRDP server, when a new client connects in single
12029 connection mode.
12030 </desc>
12031 </attribute>
12032
12033 </interface>
12034
12035
12036 <!--
12037 // ISharedFolder
12038 /////////////////////////////////////////////////////////////////////////
12039 -->
12040
12041 <interface
12042 name="ISharedFolder" extends="$unknown"
12043 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12044 wsmap="struct"
12045 >
12046 <desc>
12047 The ISharedFolder interface represents a folder in the host computer's
12048 file system accessible from the guest OS running inside a virtual
12049 machine using an associated logical name.
12050
12051 There are three types of shared folders:
12052 <ul>
12053 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12054 folders available to all virtual machines.</li>
12055 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12056 VM-specific shared folders available to the given virtual machine at
12057 startup.</li>
12058 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12059 VM-specific shared folders created in the session context (for
12060 example, when the virtual machine is running) and automatically
12061 discarded when the session is closed (the VM is powered off).</li>
12062 </ul>
12063
12064 Logical names of shared folders must be unique within the given scope
12065 (global, permanent or transient). However, they do not need to be unique
12066 across scopes. In this case, the definition of the shared folder in a
12067 more specific scope takes precedence over definitions in all other
12068 scopes. The order of precedence is (more specific to more general):
12069 <ol>
12070 <li>Transient definitions</li>
12071 <li>Permanent definitions</li>
12072 <li>Global definitions</li>
12073 </ol>
12074
12075 For example, if MyMachine has a shared folder named
12076 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12077 transient shared folder named <tt>C_DRIVE</tt> (that points
12078 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12079 of <tt>C_DRIVE</tt> in the guest OS so
12080 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12081 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12082 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12083 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12084 to <tt>C:\\</tt> if it still exists.
12085
12086 Note that permanent and transient shared folders of different machines
12087 are in different name spaces, so they don't overlap and don't need to
12088 have unique logical names.
12089
12090 <note>
12091 Global shared folders are not implemented in the current version of the
12092 product.
12093 </note>
12094 </desc>
12095
12096 <attribute name="name" type="wstring" readonly="yes">
12097 <desc>Logical name of the shared folder.</desc>
12098 </attribute>
12099
12100 <attribute name="hostPath" type="wstring" readonly="yes">
12101 <desc>Full path to the shared folder in the host file system.</desc>
12102 </attribute>
12103
12104 <attribute name="accessible" type="boolean" readonly="yes">
12105 <desc>
12106 Whether the folder defined by the host path is currently
12107 accessible or not.
12108 For example, the folder can be unaccessible if it is placed
12109 on the network share that is not available by the time
12110 this property is read.
12111 </desc>
12112 </attribute>
12113
12114 <attribute name="writable" type="boolean" readonly="yes">
12115 <desc>
12116 Whether the folder defined by the host path is writable or
12117 not.
12118 </desc>
12119 </attribute>
12120
12121 <attribute name="lastAccessError" type="wstring" readonly="yes">
12122 <desc>
12123 Text message that represents the result of the last accessibility
12124 check.
12125
12126 Accessibility checks are performed each time the <link to="#accessible"/>
12127 attribute is read. A @c null string is returned if the last
12128 accessibility check was successful. A non-null string indicates a
12129 failure and should normally describe a reason of the failure (for
12130 example, a file read error).
12131 </desc>
12132 </attribute>
12133
12134 </interface>
12135
12136 <!--
12137 // ISession
12138 /////////////////////////////////////////////////////////////////////////
12139 -->
12140
12141 <interface
12142 name="IInternalSessionControl" extends="$unknown"
12143 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12144 internal="yes"
12145 wsmap="suppress"
12146 >
12147 <method name="getPID">
12148 <desc>PID of the process that has created this Session object.
12149 </desc>
12150 <param name="pid" type="unsigned long" dir="return"/>
12151 </method>
12152
12153 <method name="getRemoteConsole">
12154 <desc>
12155 Returns the console object suitable for remote control.
12156
12157 <result name="VBOX_E_INVALID_VM_STATE">
12158 Session state prevents operation.
12159 </result>
12160 <result name="VBOX_E_INVALID_OBJECT_STATE">
12161 Session type prevents operation.
12162 </result>
12163
12164 </desc>
12165 <param name="console" type="IConsole" dir="return"/>
12166 </method>
12167
12168 <method name="assignMachine">
12169 <desc>
12170 Assigns the machine object associated with this direct-type
12171 session or informs the session that it will be a remote one
12172 (if @a machine == NULL).
12173
12174 <result name="VBOX_E_INVALID_VM_STATE">
12175 Session state prevents operation.
12176 </result>
12177 <result name="VBOX_E_INVALID_OBJECT_STATE">
12178 Session type prevents operation.
12179 </result>
12180
12181 </desc>
12182 <param name="machine" type="IMachine" dir="in"/>
12183 </method>
12184
12185 <method name="assignRemoteMachine">
12186 <desc>
12187 Assigns the machine and the (remote) console object associated with
12188 this remote-type session.
12189
12190 <result name="VBOX_E_INVALID_VM_STATE">
12191 Session state prevents operation.
12192 </result>
12193
12194 </desc>
12195 <param name="machine" type="IMachine" dir="in"/>
12196 <param name="console" type="IConsole" dir="in"/>
12197 </method>
12198
12199 <method name="updateMachineState">
12200 <desc>
12201 Updates the machine state in the VM process.
12202 Must be called only in certain cases
12203 (see the method implementation).
12204
12205 <result name="VBOX_E_INVALID_VM_STATE">
12206 Session state prevents operation.
12207 </result>
12208 <result name="VBOX_E_INVALID_OBJECT_STATE">
12209 Session type prevents operation.
12210 </result>
12211
12212 </desc>
12213 <param name="aMachineState" type="MachineState" dir="in"/>
12214 </method>
12215
12216 <method name="uninitialize">
12217 <desc>
12218 Uninitializes (closes) this session. Used by VirtualBox to close
12219 the corresponding remote session when the direct session dies
12220 or gets closed.
12221
12222 <result name="VBOX_E_INVALID_VM_STATE">
12223 Session state prevents operation.
12224 </result>
12225
12226 </desc>
12227 </method>
12228
12229 <method name="onDVDDriveChange">
12230 <desc>
12231 Triggered when settings of the DVD drive object of the
12232 associated virtual machine have changed.
12233
12234 <result name="VBOX_E_INVALID_VM_STATE">
12235 Session state prevents operation.
12236 </result>
12237 <result name="VBOX_E_INVALID_OBJECT_STATE">
12238 Session type prevents operation.
12239 </result>
12240
12241 </desc>
12242 </method>
12243
12244 <method name="onFloppyDriveChange">
12245 <desc>
12246 Triggered when settings of the floppy drive object of the
12247 associated virtual machine have changed.
12248
12249 <result name="VBOX_E_INVALID_VM_STATE">
12250 Session state prevents operation.
12251 </result>
12252 <result name="VBOX_E_INVALID_OBJECT_STATE">
12253 Session type prevents operation.
12254 </result>
12255
12256 </desc>
12257 </method>
12258
12259 <method name="onNetworkAdapterChange">
12260 <desc>
12261 Triggered when settings of a network adapter of the
12262 associated virtual machine have changed.
12263
12264 <result name="VBOX_E_INVALID_VM_STATE">
12265 Session state prevents operation.
12266 </result>
12267 <result name="VBOX_E_INVALID_OBJECT_STATE">
12268 Session type prevents operation.
12269 </result>
12270
12271 </desc>
12272 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12273 </method>
12274
12275 <method name="onSerialPortChange">
12276 <desc>
12277 Triggered when settings of a serial port of the
12278 associated virtual machine have changed.
12279
12280 <result name="VBOX_E_INVALID_VM_STATE">
12281 Session state prevents operation.
12282 </result>
12283 <result name="VBOX_E_INVALID_OBJECT_STATE">
12284 Session type prevents operation.
12285 </result>
12286
12287 </desc>
12288 <param name="serialPort" type="ISerialPort" dir="in"/>
12289 </method>
12290
12291 <method name="onParallelPortChange">
12292 <desc>
12293 Triggered when settings of a parallel port of the
12294 associated virtual machine have changed.
12295
12296 <result name="VBOX_E_INVALID_VM_STATE">
12297 Session state prevents operation.
12298 </result>
12299 <result name="VBOX_E_INVALID_OBJECT_STATE">
12300 Session type prevents operation.
12301 </result>
12302
12303 </desc>
12304 <param name="parallelPort" type="IParallelPort" dir="in"/>
12305 </method>
12306
12307 <method name="onStorageControllerChange">
12308 <desc>
12309 Triggered when settings of a storage controller of the
12310 associated virtual machine have changed.
12311
12312 <result name="VBOX_E_INVALID_VM_STATE">
12313 Session state prevents operation.
12314 </result>
12315 <result name="VBOX_E_INVALID_OBJECT_STATE">
12316 Session type prevents operation.
12317 </result>
12318
12319 </desc>
12320 </method>
12321
12322 <method name="onVRDPServerChange">
12323 <desc>
12324 Triggered when settings of the VRDP server object of the
12325 associated virtual machine have changed.
12326
12327 <result name="VBOX_E_INVALID_VM_STATE">
12328 Session state prevents operation.
12329 </result>
12330 <result name="VBOX_E_INVALID_OBJECT_STATE">
12331 Session type prevents operation.
12332 </result>
12333
12334 </desc>
12335 </method>
12336
12337 <method name="onUSBControllerChange">
12338 <desc>
12339 Triggered when settings of the USB controller object of the
12340 associated virtual machine have changed.
12341
12342 <result name="VBOX_E_INVALID_VM_STATE">
12343 Session state prevents operation.
12344 </result>
12345 <result name="VBOX_E_INVALID_OBJECT_STATE">
12346 Session type prevents operation.
12347 </result>
12348
12349 </desc>
12350 </method>
12351
12352 <method name="onSharedFolderChange">
12353 <desc>
12354 Triggered when a permanent (global or machine) shared folder has been
12355 created or removed.
12356 <note>
12357 We don't pass shared folder parameters in this notification because
12358 the order in which parallel notifications are delivered is not defined,
12359 therefore it could happen that these parameters were outdated by the
12360 time of processing this notification.
12361 </note>
12362
12363 <result name="VBOX_E_INVALID_VM_STATE">
12364 Session state prevents operation.
12365 </result>
12366 <result name="VBOX_E_INVALID_OBJECT_STATE">
12367 Session type prevents operation.
12368 </result>
12369
12370 </desc>
12371 <param name="global" type="boolean" dir="in"/>
12372 </method>
12373
12374 <method name="onUSBDeviceAttach">
12375 <desc>
12376 Triggered when a request to capture a USB device (as a result
12377 of matched USB filters or direct call to
12378 <link to="IConsole::attachUSBDevice"/>) has completed.
12379 A @c null @a error object means success, otherwise it
12380 describes a failure.
12381
12382 <result name="VBOX_E_INVALID_VM_STATE">
12383 Session state prevents operation.
12384 </result>
12385 <result name="VBOX_E_INVALID_OBJECT_STATE">
12386 Session type prevents operation.
12387 </result>
12388
12389 </desc>
12390 <param name="device" type="IUSBDevice" dir="in"/>
12391 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12392 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12393 </method>
12394
12395 <method name="onUSBDeviceDetach">
12396 <desc>
12397 Triggered when a request to release the USB device (as a result
12398 of machine termination or direct call to
12399 <link to="IConsole::detachUSBDevice"/>) has completed.
12400 A @c null @a error object means success, otherwise it
12401
12402 <result name="VBOX_E_INVALID_VM_STATE">
12403 Session state prevents operation.
12404 </result>
12405 <result name="VBOX_E_INVALID_OBJECT_STATE">
12406 Session type prevents operation.
12407 </result>
12408
12409 </desc>
12410 <param name="id" type="uuid" dir="in"/>
12411 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12412 </method>
12413
12414 <method name="onShowWindow">
12415 <desc>
12416 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12417 <link to="IMachine::showConsoleWindow"/> in order to notify
12418 console callbacks
12419 <link to="IConsoleCallback::onCanShowWindow"/>
12420 and <link to="IConsoleCallback::onShowWindow"/>.
12421
12422 <result name="VBOX_E_INVALID_OBJECT_STATE">
12423 Session type prevents operation.
12424 </result>
12425
12426 </desc>
12427 <param name="check" type="boolean" dir="in"/>
12428 <param name="canShow" type="boolean" dir="out"/>
12429 <param name="winId" type="unsigned long long" dir="out"/>
12430 </method>
12431
12432 <method name="accessGuestProperty">
12433 <desc>
12434 Called by <link to="IMachine::getGuestProperty"/> and by
12435 <link to="IMachine::setGuestProperty"/> in order to read and
12436 modify guest properties.
12437
12438 <result name="VBOX_E_INVALID_VM_STATE">
12439 Machine session is not open.
12440 </result>
12441 <result name="VBOX_E_INVALID_OBJECT_STATE">
12442 Session type is not direct.
12443 </result>
12444
12445 </desc>
12446 <param name="name" type="wstring" dir="in"/>
12447 <param name="value" type="wstring" dir="in"/>
12448 <param name="flags" type="wstring" dir="in"/>
12449 <param name="isSetter" type="boolean" dir="in"/>
12450 <param name="retValue" type="wstring" dir="out"/>
12451 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12452 <param name="retFlags" type="wstring" dir="out"/>
12453 </method>
12454
12455 <method name="enumerateGuestProperties">
12456 <desc>
12457 Return a list of the guest properties matching a set of patterns along
12458 with their values, time stamps and flags.
12459
12460 <result name="VBOX_E_INVALID_VM_STATE">
12461 Machine session is not open.
12462 </result>
12463 <result name="VBOX_E_INVALID_OBJECT_STATE">
12464 Session type is not direct.
12465 </result>
12466
12467 </desc>
12468 <param name="patterns" type="wstring" dir="in">
12469 <desc>
12470 The patterns to match the properties against as a comma-separated
12471 string. If this is empty, all properties currently set will be
12472 returned.
12473 </desc>
12474 </param>
12475 <param name="key" type="wstring" dir="out" safearray="yes">
12476 <desc>
12477 The key names of the properties returned.
12478 </desc>
12479 </param>
12480 <param name="value" type="wstring" dir="out" safearray="yes">
12481 <desc>
12482 The values of the properties returned. The array entries match the
12483 corresponding entries in the @a key array.
12484 </desc>
12485 </param>
12486 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12487 <desc>
12488 The time stamps of the properties returned. The array entries match
12489 the corresponding entries in the @a key array.
12490 </desc>
12491 </param>
12492 <param name="flags" type="wstring" dir="out" safearray="yes">
12493 <desc>
12494 The flags of the properties returned. The array entries match the
12495 corresponding entries in the @a key array.
12496 </desc>
12497 </param>
12498 </method>
12499
12500 </interface>
12501
12502 <interface
12503 name="ISession" extends="$dispatched"
12504 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12505 wsmap="managed"
12506 >
12507 <desc>
12508 The ISession interface represents a serialization primitive for virtual
12509 machines.
12510
12511 With VirtualBox, every time one wishes to manipulate a virtual machine
12512 (e.g. change its settings or start execution), a session object is
12513 required. Such an object must be passed to one of the session methods
12514 that open the given session, which then initiates the machine manipulation.
12515
12516 A session serves several purposes: it identifies to the inter-process VirtualBox
12517 code which process is currently working with the virtual machine, and it ensures
12518 that there are no incompatible requests from several processes for the
12519 same virtual machine. Session objects can therefore be thought of as mutex
12520 semaphores that lock virtual machines to prevent conflicting accesses from
12521 several processes.
12522
12523 How sessions objects are used depends on whether you use the Main API
12524 via COM or via the webservice:
12525
12526 <ul>
12527 <li>When using the COM API directly, an object of the Session class from the
12528 VirtualBox type library needs to be created. In regular COM C++ client code,
12529 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12530 This object will then act as a local session object in further calls to open
12531 a session.
12532 </li>
12533
12534 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12535 one session object automatically when <link to="IWebsessionManager::logon" />
12536 is called. A managed object reference to that session object can be retrieved by
12537 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12538 reference can then be used to open sessions.
12539 </li>
12540 </ul>
12541
12542 Sessions are mainly used in two variations:
12543
12544 <ul>
12545 <li>
12546 To start a virtual machine in a separate process, one would call
12547 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12548 object as its first parameter. This session then identifies the caller
12549 and lets him control the started machine (for example, pause machine
12550 execution or power it down) as well as be notified about machine
12551 execution state changes.
12552 </li>
12553
12554 <li>To alter machine settings, or to start machine execution within the
12555 current process, one needs to open a direct session for the machine first by
12556 calling <link to="IVirtualBox::openSession"/>. While a direct session
12557 is open within one process, no any other process may open another direct
12558 session for the same machine. This prevents the machine from being changed
12559 by other processes while it is running or while the machine is being configured.
12560 </li>
12561 </ul>
12562
12563 One also can attach to an existing direct session already opened by
12564 another process (for example, in order to send a control request to the
12565 virtual machine such as the pause or the reset request). This is done by
12566 calling <link to="IVirtualBox::openExistingSession"/>.
12567
12568 <note>
12569 Unless you are trying to write a new VirtualBox front-end that
12570 performs direct machine execution (like the VirtualBox or VBoxSDL
12571 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12572 session opened by <link to="IVirtualBox::openSession"/> and use this
12573 session only to change virtual machine settings. If you simply want to
12574 start virtual machine execution using one of the existing front-ends
12575 (for example the VirtualBox GUI or headless server), simply use
12576 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12577 will power up the machine automatically for you.
12578 </note>
12579 </desc>
12580
12581 <attribute name="state" type="SessionState" readonly="yes">
12582 <desc>Current state of this session.</desc>
12583 </attribute>
12584
12585 <attribute name="type" type="SessionType" readonly="yes">
12586 <desc>
12587 Type of this session. The value of this attribute is valid only
12588 if the session is currently open (i.e. its #state is
12589 SessionType_SessionOpen), otherwise an error will be returned.
12590 </desc>
12591 </attribute>
12592
12593 <attribute name="machine" type="IMachine" readonly="yes">
12594 <desc>Machine object associated with this session.</desc>
12595 </attribute>
12596
12597 <attribute name="console" type="IConsole" readonly="yes">
12598 <desc>Console object associated with this session.</desc>
12599 </attribute>
12600
12601 <method name="close">
12602 <desc>
12603 Closes a session that was previously opened.
12604
12605 It is recommended that every time an "open session" method (such as
12606 <link to="IVirtualBox::openRemoteSession" /> or
12607 <link to="IVirtualBox::openSession" />) has been called to
12608 manipulate a virtual machine, the caller invoke
12609 ISession::close() when it's done doing so. Since sessions are
12610 serialization primitives much like ordinary mutexes, they are
12611 best used the same way: for each "open" call, there should be
12612 a matching "close" call, even when errors occur.
12613
12614 Otherwise, if a direct session for a machine opened with
12615 <link to="IVirtualBox::openSession"/> is not explicitly closed
12616 when the application terminates, the state of the machine will
12617 be set to <link to="MachineState_Aborted" /> on the server.
12618
12619 Generally, it is recommended to close all open sessions explicitly
12620 before terminating the application (regardless of the reason for
12621 the termination).
12622
12623 <note>
12624 Do not expect the session state (<link to="ISession::state" />
12625 to return to "Closed" immediately after you invoke
12626 ISession::close(), particularly if you have started a remote
12627 session to execute the VM in a new process. The session state will
12628 automatically return to "Closed" once the VM is no longer executing,
12629 which can of course take a very long time.
12630 </note>
12631
12632 <result name="E_UNEXPECTED">
12633 Session is not open.
12634 </result>
12635
12636 </desc>
12637 </method>
12638
12639 </interface>
12640
12641 <!--
12642 // IStorageController
12643 /////////////////////////////////////////////////////////////////////////
12644 -->
12645
12646 <enum
12647 name="StorageBus"
12648 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12649 >
12650 <desc>
12651 The connection type of the storage controller.
12652 </desc>
12653 <const name="Null" value="0">
12654 <desc><tt>null</tt> value. Never used by the API.</desc>
12655 </const>
12656 <const name="IDE" value="1"/>
12657 <const name="SATA" value="2"/>
12658 <const name="SCSI" value="3"/>
12659 </enum>
12660
12661 <enum
12662 name="StorageControllerType"
12663 uuid="685387db-a837-4320-a258-08f46a22f62a"
12664 >
12665 <desc>
12666 Storage controller type.
12667 </desc>
12668
12669 <const name="Null" value="0">
12670 <desc><tt>null</tt> value. Never used by the API.</desc>
12671 </const>
12672 <const name="LsiLogic" value="1"/>
12673 <const name="BusLogic" value="2"/>
12674 <const name="IntelAhci" value="3"/>
12675 <const name="PIIX3" value="4"/>
12676 <const name="PIIX4" value="5"/>
12677 <const name="ICH6" value="6"/>
12678 </enum>
12679
12680 <interface
12681 name="IStorageController" extends="$unknown"
12682 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12683 wsmap="managed"
12684 >
12685 <desc>
12686 Represents a storage controller that is attached to a virtual machine
12687 (<link to="IMachine" />). Just as hard disks are attached to storage
12688 controllers in a real computer, virtual hard disks (represented by
12689 <link to="IHardDisk" />) are attached to virtual storage controllers,
12690 represented by this interface.
12691
12692 VirtualBox supports three types of virtual storage controller hardware:
12693 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12694 these three is used, certain sub-types are available and can be
12695 selected in <link to="#controllerType" />.
12696 </desc>
12697
12698 <attribute name="name" type="wstring" readonly="yes">
12699 <desc>
12700 Name of the storage controller, as originally specified with
12701 <link to="IMachine::addStorageController" />. This then uniquely
12702 identifies this controller with other method calls such as
12703 <link to="IMachine::attachHardDisk" />.
12704 </desc>
12705 </attribute>
12706
12707 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12708 <desc>
12709 Maximum number of devices which can be attached to one port.
12710 </desc>
12711 </attribute>
12712
12713 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12714 <desc>
12715 Minimum number of ports which can be set with
12716 <link to="IStorageController::SetPortCount"/>.
12717 </desc>
12718 </attribute>
12719
12720 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12721 <desc>
12722 Maximum number of ports which can be set with
12723 <link to="IStorageController::SetPortCount"/>.
12724 </desc>
12725 </attribute>
12726
12727 <attribute name="instance" type="unsigned long">
12728 <desc>
12729 The instance number of the device in the running VM.
12730 </desc>
12731 </attribute>
12732
12733 <attribute name="portCount" type="unsigned long">
12734 <desc>
12735 The number of currently usable ports on the controller.
12736 The minimum and maximum number of ports for one controller type can
12737 be determined with <link to="IStorageController::GetMinPortCount"/>
12738 and <link to="IStorageController::GetMaxPortCount"/>..
12739 </desc>
12740 </attribute>
12741
12742 <attribute name="bus" type="StorageBus" readonly="yes">
12743 <desc>
12744 The connection type of the storage controller.
12745 </desc>
12746 </attribute>
12747
12748 <attribute name="controllerType" type="StorageControllerType">
12749 <desc>
12750 Type of the virtual storage controller. Depending on this value,
12751 VirtualBox will provide a different virtual storage controller hardware
12752 to the guest.
12753
12754 For SCSI controllers, the default type is LsiLogic.
12755 </desc>
12756 </attribute>
12757
12758 <method name="GetIDEEmulationPort">
12759 <desc>
12760 Gets the corresponding port number which is emulated as an IDE device.
12761
12762 <result name="E_INVALIDARG">
12763 The @a devicePosition is not in the range 0 to 3.
12764 </result>
12765 <result name="E_NOTIMPL">
12766 The storage controller type is not SATAIntelAhci.
12767 </result>
12768
12769 </desc>
12770 <param name="devicePosition" type="long" dir="in"/>
12771 <param name="portNumber" type="long" dir="return"/>
12772 </method>
12773
12774 <method name="SetIDEEmulationPort">
12775 <desc>
12776 Sets the port number which is emulated as an IDE device.
12777
12778 <result name="E_INVALIDARG">
12779 The @a devicePosition is not in the range 0 to 3 or the
12780 @a portNumber is not in the range 0 to 29.
12781 </result>
12782 <result name="E_NOTIMPL">
12783 The storage controller type is not SATAIntelAhci.
12784 </result>
12785
12786 </desc>
12787 <param name="devicePosition" type="long" dir="in"/>
12788 <param name="portNumber" type="long" dir="in"/>
12789 </method>
12790
12791 </interface>
12792
12793<if target="wsdl">
12794
12795 <!--
12796 // IManagedObjectRef
12797 /////////////////////////////////////////////////////////////////////////
12798 -->
12799
12800 <interface
12801 name="IManagedObjectRef" extends="$unknown"
12802 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12803 internal="yes"
12804 wsmap="managed"
12805 wscpp="hardcoded"
12806 >
12807 <desc>
12808 Managed object reference.
12809
12810 Only within the webservice, a managed object reference (which is really
12811 an opaque number) allows a webservice client to address an object
12812 that lives in the address space of the webservice server.
12813
12814 Behind each managed object reference, there is a COM object that lives
12815 in the webservice server's address space. The COM object is not freed
12816 until the managed object reference is released, either by an explicit
12817 call to <link to="IManagedObjectRef::release" /> or by logging off from
12818 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12819 all objects created during the webservice session.
12820
12821 Whenever a method call of the VirtualBox API returns a COM object, the
12822 webservice representation of that method will instead return a
12823 managed object reference, which can then be used to invoke methods
12824 on that object.
12825 </desc>
12826
12827 <method name="getInterfaceName">
12828 <desc>
12829 Returns the name of the interface that this managed object represents,
12830 for example, "IMachine", as a string.
12831 </desc>
12832 <param name="return" type="wstring" dir="return"/>
12833 </method>
12834
12835 <method name="release">
12836 <desc>
12837 Releases this managed object reference and frees the resources that
12838 were allocated for it in the webservice server process. After calling
12839 this method, the identifier of the reference can no longer be used.
12840 </desc>
12841 </method>
12842
12843 </interface>
12844
12845 <!--
12846 // IWebsessionManager
12847 /////////////////////////////////////////////////////////////////////////
12848 -->
12849
12850 <interface
12851 name="IWebsessionManager" extends="$unknown"
12852 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12853 internal="yes"
12854 wsmap="global"
12855 wscpp="hardcoded"
12856 >
12857 <desc>
12858 Websession manager. This provides essential services
12859 to webservice clients.
12860 </desc>
12861 <method name="logon">
12862 <desc>
12863 Logs a new client onto the webservice and returns a managed object reference to
12864 the IVirtualBox instance, which the client can then use as a basis to further
12865 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12866 interface, in one way or the other.
12867 </desc>
12868 <param name="username" type="wstring" dir="in"/>
12869 <param name="password" type="wstring" dir="in"/>
12870 <param name="return" type="IVirtualBox" dir="return"/>
12871 </method>
12872
12873 <method name="getSessionObject">
12874 <desc>
12875 Returns a managed object reference to the internal ISession object that was created
12876 for this web service session when the client logged on.
12877
12878 <see>ISession</see>
12879 </desc>
12880 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12881 <param name="return" type="ISession" dir="return"/>
12882 </method>
12883
12884 <method name="logoff">
12885 <desc>
12886 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12887 and destroys all resources associated with the session (most importantly, all
12888 managed objects created in the server while the session was active).
12889 </desc>
12890 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12891 </method>
12892
12893 </interface>
12894
12895</if>
12896
12897 <!--
12898 // IPerformanceCollector & friends
12899 /////////////////////////////////////////////////////////////////////////
12900 -->
12901
12902 <interface
12903 name="IPerformanceMetric" extends="$unknown"
12904 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12905 >
12906 <desc>
12907 The IPerformanceMetric interface represents parameters of the given
12908 performance metric.
12909 </desc>
12910
12911 <attribute name="metricName" type="wstring" readonly="yes">
12912 <desc>
12913 Name of the metric.
12914 </desc>
12915 </attribute>
12916
12917 <attribute name="object" type="$unknown" readonly="yes">
12918 <desc>
12919 Object this metric belongs to.
12920 </desc>
12921 </attribute>
12922
12923 <attribute name="description" type="wstring" readonly="yes">
12924 <desc>
12925 Textual description of the metric.
12926 </desc>
12927 </attribute>
12928
12929 <attribute name="period" type="unsigned long" readonly="yes">
12930 <desc>
12931 Time interval between samples, measured in seconds.
12932 </desc>
12933 </attribute>
12934
12935 <attribute name="count" type="unsigned long" readonly="yes">
12936 <desc>
12937 Number of recent samples retained by the performance collector for this
12938 metric.
12939
12940 When the collected sample count exceeds this number, older samples
12941 are discarded.
12942 </desc>
12943 </attribute>
12944
12945 <attribute name="unit" type="wstring" readonly="yes">
12946 <desc>
12947 Unit of measurement.
12948 </desc>
12949 </attribute>
12950
12951 <attribute name="minimumValue" type="long" readonly="yes">
12952 <desc>
12953 Minimum possible value of this metric.
12954 </desc>
12955 </attribute>
12956
12957 <attribute name="maximumValue" type="long" readonly="yes">
12958 <desc>
12959 Maximum possible value of this metric.
12960 </desc>
12961 </attribute>
12962 </interface>
12963
12964 <interface
12965 name="IPerformanceCollector" extends="$unknown"
12966 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12967 wsmap="managed"
12968 >
12969 <desc>
12970 The IPerformanceCollector interface represents a service that collects and
12971 stores performance metrics data.
12972
12973 Performance metrics are associated with objects like IHost and
12974 IMachine. Each object has a distinct set of performance metrics.
12975 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12976
12977 Metric data are collected at the specified intervals and are retained
12978 internally. The interval and the number of samples retained can be set
12979 with <link to="IPerformanceCollector::setupMetrics" />.
12980
12981 Metrics are organized hierarchically, each level separated by slash (/).
12982 General scheme for metric name is
12983 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12984 metric name stands for: CPU category, Load metric, User submetric, average
12985 aggregate. An aggregate function is computed over all retained data. Valid
12986 aggregate functions are:
12987
12988 <ul>
12989 <li>avg -- average</li>
12990 <li>min -- minimum</li>
12991 <li>max -- maximum</li>
12992 </ul>
12993
12994 "Category/Metric" together form base metric name. A base metric is the
12995 smallest unit for which a sampling interval and the number of retained
12996 samples can be set. Only base metrics can be enabled and disabled. All
12997 sub-metrics are collected when their base metric is collected.
12998 Collected values for any set of sub-metrics can be queried with
12999 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
13000 metric parameters, querying metric data, enabling or disabling metrics
13001 wildcards can be used in metric names to specify a subset of metrics. For
13002 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13003 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13004 values without aggregates <tt>*:</tt> can be used.
13005
13006 The valid names for base metrics are:
13007
13008 <ul>
13009 <li>CPU/Load</li>
13010 <li>CPU/MHz</li>
13011 <li>RAM/Usage</li>
13012 </ul>
13013
13014 The general sequence for collecting and retrieving the metrics is:
13015 <ul>
13016 <li>
13017 Obtain an instance of IPerformanceCollector with
13018 <link to="IVirtualBox::performanceCollector" />
13019 </li>
13020 <li>
13021 Allocate and populate an array with references to objects the metrics
13022 will be collected for. Use references to IHost and IMachine objects.
13023 </li>
13024 <li>
13025 Allocate and populate an array with base metric names the data will be
13026 collected for.
13027 </li>
13028 <li>
13029 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13030 metric data will be collected and stored.
13031 </li>
13032 <li>
13033 Wait for the data to get collected.
13034 </li>
13035 <li>
13036 Allocate and populate an array with references to objects the metric
13037 values will be queried for. You can re-use the object array used for
13038 setting base metrics.
13039 </li>
13040 <li>
13041 Allocate and populate an array with metric names the data will be
13042 collected for. Note that metric names differ from base metric names.
13043 </li>
13044 <li>
13045 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13046 have been collected so far are returned. Note that the values are still
13047 retained internally and data collection continues.
13048 </li>
13049 </ul>
13050
13051 For an example of usage refer to the following files in VirtualBox SDK:
13052 <ul>
13053 <li>
13054 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13055 </li>
13056 <li>
13057 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13058 </li>
13059 </ul>
13060 </desc>
13061
13062 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13063 <desc>
13064 Array of unique names of metrics.
13065
13066 This array represents all metrics supported by the performance
13067 collector. Individual objects do not necessarily support all of them.
13068 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13069 list of supported metrics for a particular object.
13070 </desc>
13071 </attribute>
13072
13073 <method name="getMetrics">
13074 <desc>
13075 Returns parameters of specified metrics for a set of objects.
13076 <note>
13077 @c Null metrics array means all metrics. @c Null object array means
13078 all existing objects.
13079 </note>
13080 </desc>
13081 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13082 <desc>
13083 Metric name filter. Currently, only a comma-separated list of metrics
13084 is supported.
13085 </desc>
13086 </param>
13087 <param name="objects" type="$unknown" dir="in" safearray="yes">
13088 <desc>
13089 Set of objects to return metric parameters for.
13090 </desc>
13091 </param>
13092 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13093 <desc>
13094 Array of returned metric parameters.
13095 </desc>
13096 </param>
13097 </method>
13098
13099 <method name="setupMetrics">
13100 <desc>
13101 Sets parameters of specified base metrics for a set of objects. Returns
13102 an array of <link to="IPerformanceMetric" /> describing the metrics have
13103 been affected.
13104 <note>
13105 @c Null or empty metric name array means all metrics. @c Null or empty
13106 object array means all existing objects. If metric name array contains
13107 a single element and object array contains many, the single metric
13108 name array element is applied to each object array element to form
13109 metric/object pairs.
13110 </note>
13111 </desc>
13112 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13113 <desc>
13114 Metric name filter. Comma-separated list of metrics with wildcard
13115 support.
13116 </desc>
13117 </param>
13118 <param name="objects" type="$unknown" dir="in" safearray="yes">
13119 <desc>
13120 Set of objects to setup metric parameters for.
13121 </desc>
13122 </param>
13123 <param name="period" type="unsigned long" dir="in">
13124 <desc>
13125 Time interval in seconds between two consecutive samples of performance
13126 data.
13127 </desc>
13128 </param>
13129 <param name="count" type="unsigned long" dir="in">
13130 <desc>
13131 Number of samples to retain in performance data history. Older samples
13132 get discarded.
13133 </desc>
13134 </param>
13135 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13136 <desc>
13137 Array of metrics that have been modified by the call to this method.
13138 </desc>
13139 </param>
13140 </method>
13141
13142 <method name="enableMetrics">
13143 <desc>
13144 Turns on collecting specified base metrics. Returns an array of
13145 <link to="IPerformanceMetric" /> describing the metrics have been
13146 affected.
13147 <note>
13148 @c Null or empty metric name array means all metrics. @c Null or empty
13149 object array means all existing objects. If metric name array contains
13150 a single element and object array contains many, the single metric
13151 name array element is applied to each object array element to form
13152 metric/object pairs.
13153 </note>
13154 </desc>
13155 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13156 <desc>
13157 Metric name filter. Comma-separated list of metrics with wildcard
13158 support.
13159 </desc>
13160 </param>
13161 <param name="objects" type="$unknown" dir="in" safearray="yes">
13162 <desc>
13163 Set of objects to enable metrics for.
13164 </desc>
13165 </param>
13166 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13167 <desc>
13168 Array of metrics that have been modified by the call to this method.
13169 </desc>
13170 </param>
13171 </method>
13172
13173 <method name="disableMetrics">
13174 <desc>
13175 Turns off collecting specified base metrics. Returns an array of
13176 <link to="IPerformanceMetric" /> describing the metrics have been
13177 affected.
13178 <note>
13179 @c Null or empty metric name array means all metrics. @c Null or empty
13180 object array means all existing objects. If metric name array contains
13181 a single element and object array contains many, the single metric
13182 name array element is applied to each object array element to form
13183 metric/object pairs.
13184 </note>
13185 </desc>
13186 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13187 <desc>
13188 Metric name filter. Comma-separated list of metrics with wildcard
13189 support.
13190 </desc>
13191 </param>
13192 <param name="objects" type="$unknown" dir="in" safearray="yes">
13193 <desc>
13194 Set of objects to disable metrics for.
13195 </desc>
13196 </param>
13197 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13198 <desc>
13199 Array of metrics that have been modified by the call to this method.
13200 </desc>
13201 </param>
13202 </method>
13203
13204 <method name="queryMetricsData">
13205 <desc>
13206 Queries collected metrics data for a set of objects.
13207
13208 The data itself and related metric information are returned in seven
13209 parallel and one flattened array of arrays. Elements of
13210 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13211 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13212 the same index describe one set of values corresponding to a single
13213 metric.
13214
13215 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13216 start and length of a sub-array is indicated by
13217 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13218 value for metric <tt>metricNames[i]</tt> is at
13219 <tt>returnData[returnIndices[i]]</tt>.
13220
13221 <note>
13222 @c Null or empty metric name array means all metrics. @c Null or empty
13223 object array means all existing objects. If metric name array contains
13224 a single element and object array contains many, the single metric
13225 name array element is applied to each object array element to form
13226 metric/object pairs.
13227 </note>
13228 <note>
13229 Data collection continues behind the scenes after call to
13230 @c queryMetricsData. The return data can be seen as the snapshot of
13231 the current state at the time of @c queryMetricsData call. The
13232 internally kept metric values are not cleared by the call. This makes
13233 possible querying different subsets of metrics or aggregates with
13234 subsequent calls. If periodic querying is needed it is highly
13235 suggested to query the values with @c interval*count period to avoid
13236 confusion. This way a completely new set of data values will be
13237 provided by each query.
13238 </note>
13239 </desc>
13240 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13241 <desc>
13242 Metric name filter. Comma-separated list of metrics with wildcard
13243 support.
13244 </desc>
13245 </param>
13246 <param name="objects" type="$unknown" dir="in" safearray="yes">
13247 <desc>
13248 Set of objects to query metrics for.
13249 </desc>
13250 </param>
13251 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13252 <desc>
13253 Names of metrics returned in @c returnData.
13254 </desc>
13255 </param>
13256 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13257 <desc>
13258 Objects associated with metrics returned in @c returnData.
13259 </desc>
13260 </param>
13261 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13262 <desc>
13263 Units of measurement for each returned metric.
13264 </desc>
13265 </param>
13266 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13267 <desc>
13268 Divisor that should be applied to return values in order to get
13269 floating point values. For example:
13270 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13271 will retrieve the floating point value of i-th sample of the first
13272 metric.
13273 </desc>
13274 </param>
13275 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13276 <desc>
13277 Sequence numbers of the first elements of value sequences of particular metrics
13278 returned in @c returnData. For aggregate metrics it is the sequence number of
13279 the sample the aggregate started calculation from.
13280 </desc>
13281 </param>
13282 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13283 <desc>
13284 Indices of the first elements of value sequences of particular metrics
13285 returned in @c returnData.
13286 </desc>
13287 </param>
13288 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13289 <desc>
13290 Lengths of value sequences of particular metrics.
13291 </desc>
13292 </param>
13293 <param name="returnData" type="long" dir="return" safearray="yes">
13294 <desc>
13295 Flattened array of all metric data containing sequences of values for
13296 each metric.
13297 </desc>
13298 </param>
13299 </method>
13300
13301 </interface>
13302
13303 <module name="VBoxSVC" context="LocalServer">
13304 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13305 namespace="virtualbox.org">
13306 <interface name="IVirtualBox" default="yes"/>
13307 </class>
13308 </module>
13309
13310 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13311 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13312 namespace="virtualbox.org">
13313 <interface name="ISession" default="yes"/>
13314 </class>
13315 </module>
13316
13317</library>
13318
13319</idl>
13320
13321<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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